feat: fix paging data

This commit is contained in:
caturbgs
2021-12-20 13:59:24 +07:00
parent 1bf45213de
commit f2b754a187
8 changed files with 20 additions and 20 deletions

View File

@@ -1,5 +1,5 @@
import { makeAutoObservable } from "mobx";
import { http } from "../utils/http";
import {makeAutoObservable} from "mobx";
import {http} from "../utils/http";
export class Payback {
page = 0;
@@ -36,7 +36,7 @@ export class Payback {
return item;
}) ?? [];
this.total_data = response.body.total_data ?? 0;
this.total_data = response?.body?.count ?? 0;
} catch (e) {
console.error(e);
}
@@ -54,7 +54,7 @@ export class Payback {
return item;
}) ?? [];
this.total_data = response.body.total_data ?? 0;
this.total_data = response?.body?.count ?? 0;
} catch (e) {
console.error(e);
}