Authored by Tao

try 500

... ... @@ -246,28 +246,34 @@ export default {
delete searchParams[key];
}
}
let result = await this.fetchProductList({
...searchParams,
page,
pageSize
});
let {data} = result;
try{
let result = await this.fetchProductList({
...searchParams,
page,
pageSize
});
let {data} = result;
if (result.code === 200) {
if (result.code === 200) {
data.endReached = (data.page === data.page_total) && (data.page_size !== 1) || !data.page_total;
data.endReached = (data.page === data.page_total) && (data.page_size !== 1) || !data.page_total;
}
}
if (typeof data === 'object' && Object.keys(data).length) {
for (let key in data) {
if (key === 'product_list') {
list.list = data.page > 1 ? list.list.concat(data.product_list) : data.product_list;
} else {
list[key] = data[key];
if (typeof data === 'object' && Object.keys(data).length) {
for (let key in data) {
if (key === 'product_list') {
list.list = data.page > 1 ? list.list.concat(data.product_list) : data.product_list;
} else {
list[key] = data[key];
}
}
this.productList = list;
}
this.productList = list;
}catch(e) {
console.log(e);
this.productList.list = [];
}
},
... ...