mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-20 18:05:53 +08:00
1. 第一次进入商品列表,商品分类未展示
2. 链接选择器,店铺开启状态展示错误 3. 从新装修楼层,楼层bug修改 4. 搜索热词为空是返回null,导致报错 5. 首页全部商品分类缓存问题 6. 修改菜单项缓存、添加设置 7. 店铺分类二级分类修改时无父级分类
This commit is contained in:
@@ -81,10 +81,10 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
cateList: [], // 分类数据
|
||||
panel: false, // 二级分类展示
|
||||
panelData: [], // 二级分类数据
|
||||
showFirstList: false // 始终展示一级列表
|
||||
showFirstList: false, // 始终展示一级列表
|
||||
cateList: [] // 商品分类
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -98,6 +98,7 @@ export default {
|
||||
getCategory(0).then(res => {
|
||||
if (res.success) {
|
||||
this.cateList = res.result;
|
||||
this.$store.commit('SET_CATEGORY', res.result)
|
||||
// 过期时间
|
||||
var expirationTime = new Date().setHours(new Date().getHours() + 1);
|
||||
// 存放过期时间
|
||||
|
||||
@@ -183,10 +183,14 @@ export default {
|
||||
multSelected: [], // 多选分类
|
||||
selectedItem: [], // 已选分类集合 顶部展示
|
||||
brandIds: [], // 品牌id合集
|
||||
params: {}, // 请求参数
|
||||
cateList: [] // 全部商品分类
|
||||
params: {} // 请求参数
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
cateList () { // 商品分类
|
||||
return this.$store.state.category
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
selectedItem: {
|
||||
// 监听已选条件,来调用列表接口
|
||||
@@ -228,8 +232,12 @@ export default {
|
||||
methods: {
|
||||
getNav () { // 获取商品分类,分类下展示
|
||||
if (!this.$route.query.categoryId) return
|
||||
|
||||
this.cateList = JSON.parse(localStorage.getItem('category'))
|
||||
if (!this.cateList.length) { // 商品分类存储在localstorage,接口未调用成功前再次刷新数据
|
||||
setTimeout(() => {
|
||||
this.getNav()
|
||||
}, 500)
|
||||
return
|
||||
}
|
||||
const arr = this.$route.query.categoryId.split(',')
|
||||
if (arr.length > 0) {
|
||||
this.tabBar = this.cateList.filter(e => {
|
||||
@@ -416,7 +424,7 @@ export default {
|
||||
background: #fff;
|
||||
border: 1px solid #999;
|
||||
padding: 0 8px;
|
||||
width: 85px;
|
||||
min-width: 85px;
|
||||
text-align: center;
|
||||
margin: 0 3px;
|
||||
&:hover {
|
||||
|
||||
@@ -81,10 +81,10 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
cateList: [], // 分类数据
|
||||
panel: false, // 二级分类展示
|
||||
panelData: [], // 二级分类数据
|
||||
showFirstList: false // 始终展示一级列表
|
||||
showFirstList: false, // 始终展示一级列表
|
||||
cateList: [] // 商品分类
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -98,6 +98,7 @@ export default {
|
||||
getCategory(0).then(res => {
|
||||
if (res.success) {
|
||||
this.cateList = res.result;
|
||||
this.$store.commit('SET_CATEGORY', res.result)
|
||||
// 过期时间
|
||||
var expirationTime = new Date().setHours(new Date().getHours() + 1);
|
||||
// 存放过期时间
|
||||
|
||||
Reference in New Issue
Block a user