mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-17 16:35:53 +08:00
fix: 🐛 修改在买家端商品详情中因为categoryName为空导致页面出错不展示bug
This commit is contained in:
@@ -118,6 +118,7 @@ export default {
|
|||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
|
||||||
const result = res.result;
|
const result = res.result;
|
||||||
const cateName = res.result.categoryName;
|
const cateName = res.result.categoryName;
|
||||||
const cateId = result.data.categoryPath.split(",");
|
const cateId = result.data.categoryPath.split(",");
|
||||||
@@ -126,7 +127,7 @@ export default {
|
|||||||
// 插入分类id和name
|
// 插入分类id和name
|
||||||
cateArr.push({
|
cateArr.push({
|
||||||
id: e,
|
id: e,
|
||||||
name: cateName[index],
|
name: cateName ? cateName[index] : "",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.categoryBar = cateArr;
|
this.categoryBar = cateArr;
|
||||||
|
|||||||
Reference in New Issue
Block a user