feat: completing sub categories
This commit is contained in:
@@ -26,21 +26,18 @@ export class Subcategory {
|
||||
|
||||
async getData() {
|
||||
const response = await http.get(`/product/sub-categories?page=${this.page}&pageSize=${this.pageSize}`);
|
||||
console.log(response)
|
||||
this.data = response.body.data ?? []
|
||||
this.total_data = response.body.total_data ?? 0
|
||||
}
|
||||
|
||||
async getDataSubCategories() {
|
||||
const response = await http.get(`/product/sub-categories?page=${this.pageSubCategories}&pageSize=${this.pageSizeSubCategories}`);
|
||||
console.log(response)
|
||||
this.dataSubCategories = response.body.data ?? []
|
||||
this.total_dataSubCategories = response.body.count ?? 0
|
||||
}
|
||||
|
||||
async create(data) {
|
||||
const response = await http.post('/product/sub-categories').send(data);
|
||||
console.log(response)
|
||||
await this.getData();
|
||||
return response;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user