Config Page

This commit is contained in:
2021-12-23 12:05:30 +07:00
parent ce2d2e1072
commit 4ba8f07f93
3 changed files with 9 additions and 10 deletions

View File

@@ -6,6 +6,7 @@ export class Membership {
pageSize = 10
data = [];
total_data = 0
dataDetail=[]
constructor(ctx) {
this.ctx = ctx;
@@ -32,7 +33,7 @@ export class Membership {
try {
const response = await http.get(`/users/`+id);
console.log(response,'Data Detail')
this.data = response.body.data
this.dataDetail = response.body.data
this.total_data = response?.body?.count ?? 0
} catch (e) {
console.error(e);

View File

@@ -58,7 +58,6 @@ export class Transaction {
async getDataCategories() {
try {
const response = await http.get(`/product/categories?page=${this.pageCategories}&pageSize=${this.pageSizeCategories}`);
this.dataCategories = response.body.data ?? []
this.total_dataCategories = response?.body?.count ?? 0
if (this.dataCategories.length > 0) {
@@ -72,7 +71,6 @@ export class Transaction {
async getDataHistoryTransaction() {
try {
const response = await http.get(`/transaction/history?page=${this.pageHistoryTransaction}&pageSize=${this.pageSizeHistoryTransaction}`);
this.dataHistoryTransaction = response.body.data ?? []
this.total_dataHistoryTransaction = response?.body?.count ?? 0
} catch (e) {
@@ -82,9 +80,9 @@ export class Transaction {
async getDataHistoryTopUp(id) {
try {
console.log("Top up")
//console.log("Top up")
const response = await http.get(`/transaction/history-deposit?page=${this.pageHistoryTopUp}&user-destination=${id}`);
console.log(response,"data")
//console.log(response,"data")
this.dataHistoryTopUp = response.body.data ?? []
this.total_dataHistoryTopUp = response?.body?.count ?? 0
} catch (e) {