diff --git a/pages/index/index.vue b/pages/index/index.vue index 0118eb6..8d350dd 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -421,13 +421,14 @@ export default { ) { } this.getGoodsInfo() - this.getAreaGoods() + // this.getLanguage(); this.getService() }, onShow() { this.$store.dispatch('getCarLength') this.user = uni.getStorageSync('User') + this.getAreaGoods() this.newShareMember = this.user?.loginType !== 0 }, onPullDownRefresh() { @@ -474,12 +475,16 @@ export default { getAreaGoods() { getAreaGoods().then(res => { this.recommendSpecialAreaList = res.data?.recommendSpecialAreaList || [] - if(this.newShareMember){ - let obj = this.recommendSpecialAreaList.find(item => item.specialArea === 41) - if(obj){ + if (this.newShareMember) { + let obj = this.recommendSpecialAreaList.find( + item => item.specialArea === 41 + ) + if (obj) { this.$set(obj, 'specialAreaName', '会员专区') } - this.recommendSpecialAreaList = this.recommendSpecialAreaList.filter(item => item.specialArea === 41) + this.recommendSpecialAreaList = this.recommendSpecialAreaList.filter( + item => item.specialArea === 41 + ) } }) },