Pages Payback

This commit is contained in:
2021-12-20 16:19:27 +07:00
parent 82c9a96339
commit 78fb6f3cf0
7 changed files with 101 additions and 55 deletions

View File

@@ -9,15 +9,15 @@ export class Payback {
filterCategory = null;
visibleModalPayback = false;
pageCategories = 0;
pageSizeCategories = 10;
dataCategories = [];
total_dataCategories = 0;
pagePayback = 0;
pageSizePayback = 10;
dataPayback = [];
total_dataPayback = 0;
pageSubCategories = 0;
pageSizeSubCategories = 10;
dataSubCategories = [];
total_dataSubCategories = 0;
pageSubPayback = 0;
pageSizeSubPayback = 10;
dataSubPayback = [];
total_dataPayback = 0;
constructor(ctx) {
this.ctx = ctx;
@@ -29,14 +29,14 @@ export class Payback {
const response = await http.get(
`/transaction/deposit-return?page=${this.page}&pageSize=${this.pageSize}`
);
//console.log(response)
console.log(response)
this.data =
response.body[0].map((item, idx) => {
response.body.data.map((item, idx) => {
item.key = idx;
return item;
}) ?? [];
this.total_data = response.body.total_data ?? 0;
this.total_data = response.body.count ?? 0;
} catch (e) {
console.error(e);
}
@@ -49,12 +49,12 @@ export class Payback {
);
console.log(response);
this.data =
response.body[0].map((item, idx) => {
response.body.data.map((item, idx) => {
item.key = idx;
return item;
}) ?? [];
this.total_data = response.body.total_data ?? 0;
this.total_data = response.body.count ?? 0;
} catch (e) {
console.error(e);
}