买家端商品分类,导航加载报错问题,商家端跳转买家端商品地址代码优化,文件上传地址调用位置修改

This commit is contained in:
mabo
2021-08-06 11:32:29 +08:00
parent 1fe7c050a4
commit c75bd5208b
17 changed files with 33 additions and 46 deletions

View File

@@ -89,7 +89,11 @@ export default {
},
computed: {
navList () { // 导航列表
return JSON.parse(storage.getItem('navList')) || []
if (storage.getItem('navList')) {
return JSON.parse(storage.getItem('navList'))
} else {
return []
}
}
},
methods: {

View File

@@ -188,7 +188,7 @@ export default {
},
computed: {
cateList () { // 商品分类
return this.$store.state.category
return this.$store.state.category || []
}
},
watch: {

View File

@@ -89,7 +89,11 @@ export default {
},
computed: {
navList () { // 导航列表
return JSON.parse(storage.getItem('navList')) || []
if (storage.getItem('navList')) {
return JSON.parse(storage.getItem('navList'))
} else {
return []
}
}
},
methods: {

View File

@@ -13,7 +13,7 @@ export default new Vuex.Store({
cartNum: storage.getItem('cartNum') || 0,
logoImg: require('@/assets/images/logo2.png'),
hotWordsList: storage.getItem('hotWordsList'),
category: localStorage.getItem('category')
category: JSON.parse(localStorage.getItem('category'))
},
getters,
actions,