fix(index): 首页获取专区列表改为在onshow时执行
This commit is contained in:
parent
3fe086d4d4
commit
6a27c8bca2
|
|
@ -421,13 +421,14 @@ export default {
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
this.getGoodsInfo()
|
this.getGoodsInfo()
|
||||||
this.getAreaGoods()
|
|
||||||
// this.getLanguage();
|
// this.getLanguage();
|
||||||
this.getService()
|
this.getService()
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.$store.dispatch('getCarLength')
|
this.$store.dispatch('getCarLength')
|
||||||
this.user = uni.getStorageSync('User')
|
this.user = uni.getStorageSync('User')
|
||||||
|
this.getAreaGoods()
|
||||||
this.newShareMember = this.user?.loginType !== 0
|
this.newShareMember = this.user?.loginType !== 0
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
|
|
@ -475,11 +476,15 @@ export default {
|
||||||
getAreaGoods().then(res => {
|
getAreaGoods().then(res => {
|
||||||
this.recommendSpecialAreaList = res.data?.recommendSpecialAreaList || []
|
this.recommendSpecialAreaList = res.data?.recommendSpecialAreaList || []
|
||||||
if (this.newShareMember) {
|
if (this.newShareMember) {
|
||||||
let obj = this.recommendSpecialAreaList.find(item => item.specialArea === 41)
|
let obj = this.recommendSpecialAreaList.find(
|
||||||
|
item => item.specialArea === 41
|
||||||
|
)
|
||||||
if (obj) {
|
if (obj) {
|
||||||
this.$set(obj, 'specialAreaName', '会员专区')
|
this.$set(obj, 'specialAreaName', '会员专区')
|
||||||
}
|
}
|
||||||
this.recommendSpecialAreaList = this.recommendSpecialAreaList.filter(item => item.specialArea === 41)
|
this.recommendSpecialAreaList = this.recommendSpecialAreaList.filter(
|
||||||
|
item => item.specialArea === 41
|
||||||
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue