fix: 🐛 修改在买家端商品详情中因为categoryName为空导致页面出错不展示bug
parent
48f2bd82a1
commit
26a539662e
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue