diff --git a/components/area-product-list/special-area-wrapper.vue b/components/area-product-list/special-area-wrapper.vue index 5dfbb55..0862cad 100644 --- a/components/area-product-list/special-area-wrapper.vue +++ b/components/area-product-list/special-area-wrapper.vue @@ -103,14 +103,17 @@ export default { ...mapGetters(['isZeroLevel']), }, created() { - const userInfo = uni.getStorageSync('userInfo') || this.userInfo + const userInfo = Object.keys(this.userInfo).length + ? this.userInfo + : uni.getStorageSync('userInfo') if (userInfo.memberSign == MEMBER_SIGN.ZERO_LEVEL) { this.upgrade.name = '会员专区' + } else { + this.getAreaListById(REISSUE_AREA.id, this.rescissionList) + this.getAreaListById(REGIEST_AREA.id, this.registList) + this.getAreaListById(REPURCHASE_AREA.id, this.repurchaseList) } this.getAreaListById(UPGRADE_AREA.id, this.upgradeList) - this.getAreaListById(REISSUE_AREA.id, this.rescissionList) - this.getAreaListById(REGIEST_AREA.id, this.registList) - this.getAreaListById(REPURCHASE_AREA.id, this.repurchaseList) }, methods: { getAreaListById(areaId, list) { diff --git a/pages/index/index.vue b/pages/index/index.vue index 3250018..6d7026d 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -28,7 +28,7 @@ - + @@ -77,7 +77,6 @@ import * as api from '@/config/login.js' import * as apis from '@/config/index.js' import * as ban from '@/config/balance.js' -import { getAreaGoods } from '@/config/special-area' import clTabbar from '@/components/cl-tabbar.vue' import noticePopup from '@/components/noticePopup.vue' import znNewsPopup from '@/components/znNewsPopup.vue' @@ -128,6 +127,9 @@ export default { }, computed: { ...mapGetters(['priceSymbol', 'priceSymbolVisible', 'isZeroLevel']), + specialAreaVisble() { + return this.userInfo && Object.keys(this.userInfo).length + }, }, onLoad() { // this.getLanguage(); @@ -136,24 +138,7 @@ export default { onShow() { this.$store.dispatch('getCarLength') this.getBanners() - if ( - uni.getStorageSync('showInfo') == undefined || - uni.getStorageSync('showInfo') == 0 - ) { - } - this.getAreaGoods( - this.userInfo.memberSign == MEMBER_SIGN.ZERO_LEVEL - ? REPURCHASE_AREA.id - : REGIEST_AREA.id - ) }, - // onPullDownRefresh() { - // let that = this - // setTimeout(() => { - // that.getGoodsInfo() - // uni.stopPullDownRefresh() //停止刷新 - // }, 1000) - // }, methods: { formatCurrency, formatSales(value) { @@ -194,17 +179,6 @@ export default { } }) }, - getAreaGoods(areaId) { - getAreaGoods({ - pageNum: 1, - pageSize: 3, - specialArea: areaId, - }).then(res => { - if (res.code == 200) { - this.goodsList = res.data || [] - } - }) - }, confirmHandle() { this.promptFlag = false if (this.jumpPage == 1) { diff --git a/pages/specialArea/index.vue b/pages/specialArea/index.vue index 3fa8a08..9164c9d 100644 --- a/pages/specialArea/index.vue +++ b/pages/specialArea/index.vue @@ -6,7 +6,7 @@ -->