This commit is contained in:
2021-12-10 13:19:06 +07:00
3 changed files with 126 additions and 167 deletions

View File

@@ -18,8 +18,6 @@ export class Product {
dataSubCategories = [];
total_dataSubCategories = 0;
visibleModal = false;
constructor(ctx) {
this.ctx = ctx;
makeAutoObservable(this);
@@ -33,7 +31,7 @@ export class Product {
}
async getDataSubCategories() {
const response = await http.get(`/product/sub-categories?pageSize=${this.pageSizeSubCategories}`);
const response = await http.get(`/product/sub-categories?page=${this.pageSubCategories}&pageSize=${this.pageSizeSubCategories}`);
this.dataSubCategories = response.body.data ?? []
this.total_dataSubCategories = response.body.count ?? 0
}