feat: remodel product page
This commit is contained in:
parent
cf3afb27c4
commit
5d5fa12fce
|
@ -49,14 +49,7 @@ export class Product {
|
|||
|
||||
async getDataCategories() {
|
||||
const response = await http.get(`/product/categories?page=${this.pageCategories}&pageSize=${this.pageSizeCategories}`);
|
||||
this.dataCategories = response.body.data ?? []
|
||||
this.total_dataCategories = response.body.total_data ?? 0
|
||||
|
||||
if (this.dataCategories.length > 0) {
|
||||
this.filterCategory = this.dataCategories[0].id
|
||||
}
|
||||
|
||||
this.dataCategories = this.dataCategories.map((item, idx) => {
|
||||
this.dataCategories = response.body.data.map((item, idx) => {
|
||||
item.key = idx;
|
||||
return item
|
||||
}) ?? []
|
||||
|
|
Loading…
Reference in New Issue
Block a user