Fix(首页):[#1113]每次从其他页面返回首页时刷新首页,以达到每次进入首页尖货推荐都随机刷新商品列表的效果

This commit is contained in:
lifizer
2024-04-15 16:23:38 +08:00
parent cfc84ab3db
commit 3c3904345a
2 changed files with 18 additions and 1 deletions
+16 -1
View File
@@ -410,8 +410,12 @@ export default {
this.getUnreadMsgList();
}
//获取团购商品
// 获取团购商品
this.getGroupGoods();
// fix bug#1113
if (this.bastList.length > 0) {
this.getBastList()
}
},
onShareAppMessage() {
return {
@@ -528,6 +532,17 @@ export default {
});
});
},
getBastList() {
getHomeData().then(res => {
const { success, data } = res
if (success) {
for (let i = 0; i < data.bastList.length; i++) {
data.bastList[i].hide = true
}
this.$set(that, 'bastList', data.bastList)
}
})
},
getGroupGoods() {
var params = {
page: 1,
+2
View File
@@ -186,6 +186,8 @@ export default {
changeTabs(index) {
if (this.isManage) return
// fix bug#1111
this.isAll = false
this.tabsIndex = index
this.page = 1
this.fetchData()