feat(gloabl): v0会员只能看到升级专区,且升级专区展示为会员专区

This commit is contained in:
woody 2025-07-05 09:42:12 +08:00
parent 53413462a9
commit 0ee7347883
5 changed files with 39 additions and 69 deletions

View File

@ -28,7 +28,11 @@
</view> </view>
<!-- 复购 --> <!-- 复购 -->
<view key="repurchase" v-if="repurchaseList.length > 0" class="goods-flexs"> <view
key="repurchase"
v-if="repurchaseList.length > 0 && !isZeroLevel"
class="goods-flexs"
>
<view class="goods-view"> <view class="goods-view">
<area-product-list <area-product-list
:list="repurchaseList" :list="repurchaseList"
@ -75,6 +79,10 @@ export default {
default: 'normal', // 'normal' or 'small' default: 'normal', // 'normal' or 'small'
validator: value => ['normal', 'small'].includes(value), validator: value => ['normal', 'small'].includes(value),
}, },
userInfo: {
type: Object,
default: () => {},
},
}, },
components: { components: {
'area-product-list': areaProductList, 'area-product-list': areaProductList,
@ -95,12 +103,14 @@ export default {
...mapGetters(['isZeroLevel']), ...mapGetters(['isZeroLevel']),
}, },
created() { created() {
const userInfo = uni.getStorageSync('userInfo') const userInfo = uni.getStorageSync('userInfo') || this.userInfo
if (userInfo.memberSign != MEMBER_SIGN.ZERO_LEVEL) { if (userInfo.memberSign == MEMBER_SIGN.ZERO_LEVEL) {
this.getAreaListById(REISSUE_AREA.id, this.rescissionList) this.getAreaListById(UPGRADE_AREA.id, this.upgradeList)
this.getAreaListById(REGIEST_AREA.id, this.registList) this.upgrade.name = '会员专区'
return
} }
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) this.getAreaListById(REPURCHASE_AREA.id, this.repurchaseList)
}, },
methods: { methods: {

View File

@ -28,59 +28,10 @@
</swiper> </swiper>
</view> </view>
</view> </view>
<special-area-wrapper size="small" /> <view style="padding-bottom: 140rpx">
<view class="goods-sort"> <special-area-wrapper :userInfo="userInfo" size="small" />
<view class="goods_content" style="padding-bottom: 130rpx">
<view
class="goods-center-lists"
v-for="item in goodsList"
:key="item.waresId"
@click="goDetails(item)"
>
<view
class="fly"
v-show="item.preSaleStatus == 3 || item.isSale == 1"
></view>
<view class="goods-flex-s">
<view class="goods-img">
<image :src="item.cover1"></image>
</view>
<view class="padding_s goods-info">
<view class="goods-name">{{ item.waresName }}</view>
<view class="goods-sales-wrapper">
<view class="goods-sales"
>累计销量{{ formatSales(item.sales) }}</view
>
<view
class="goods-price"
v-if="item.specialArea == 31 && userInfo.isMakerSpace == 1"
>
<span v-if="priceSymbolVisible" class="price-symbol">
{{ priceSymbol }}
</span>
<span>{{ formatCurrency(item.vipPrice) }}</span>
</view>
<view class="goods-price" v-if="item.specialArea != 31">
<span v-if="priceSymbolVisible" class="price-symbol">
{{ priceSymbol }}
</span>
<span>{{ formatCurrency(item.waresPrice) }}</span>
</view>
<view
class="goods-price"
v-if="item.specialArea == 31 && userInfo.isMakerSpace == 0"
>
<span v-if="priceSymbolVisible" class="price-symbol">
{{ priceSymbol }}
</span>
<span>{{ formatCurrency(item.waresPrice) }}</span>
</view>
</view>
</view>
</view>
</view>
</view>
</view> </view>
<cl-tabbar :current="0"></cl-tabbar> <cl-tabbar :current="0"></cl-tabbar>
<div> <div>
<!-- 公告弹窗 --> <!-- 公告弹窗 -->

View File

@ -6,7 +6,7 @@
--> -->
<template> <template>
<view class="content"> <view class="content">
<special-area-wrapper /> <special-area-wrapper :userInfo="userInfo" />
<cl-tabbar :current="1"></cl-tabbar> <cl-tabbar :current="1"></cl-tabbar>
</view> </view>
@ -22,7 +22,9 @@ export default {
}, },
data() { data() {
return {} return {
userInfo: uni.getStorageSync('User'),
}
}, },
onLoad() {}, onLoad() {},

View File

@ -249,9 +249,17 @@ export default {
// }) // })
// } // }
// //
//
// this.getClassIfy()
this.userInfo = uni.getStorageSync('User')
const areaMap = { const areaMap = {
[REGIEST_AREA.id]: REGIEST_AREA.name, [REGIEST_AREA.id]: REGIEST_AREA.name,
[UPGRADE_AREA.id]: UPGRADE_AREA.name, [UPGRADE_AREA.id]:
this.userInfo.memberSign == MEMBER_SIGN.ZERO_LEVEL
? '会员专区'
: UPGRADE_AREA.name,
[REPURCHASE_AREA.id]: REPURCHASE_AREA.name, [REPURCHASE_AREA.id]: REPURCHASE_AREA.name,
[REISSUE_AREA.id]: REISSUE_AREA.name, [REISSUE_AREA.id]: REISSUE_AREA.name,
} }
@ -260,11 +268,6 @@ export default {
title: this.titLabel, title: this.titLabel,
success: () => {}, success: () => {},
}) })
//
// this.getClassIfy()
this.userInfo = uni.getStorageSync('User')
this.pkCountry = this.userInfo.pkCountry || 1 this.pkCountry = this.userInfo.pkCountry || 1
this.setSpecial({ this.setSpecial({
value: this.specialArea, value: this.specialArea,

View File

@ -337,6 +337,7 @@ import mustAgreeMent from '@/components/mustAgreeMent.vue'
import * as api from '@/config/regiest' import * as api from '@/config/regiest'
import agreement from '@/components/agreement.vue' import agreement from '@/components/agreement.vue'
import { upgradeOrder } from '@/config/order' import { upgradeOrder } from '@/config/order'
import { MEMBER_SIGN } from '@/util/common'
import { import {
REGIEST_AREA, REGIEST_AREA,
UPGRADE_AREA, UPGRADE_AREA,
@ -372,7 +373,7 @@ export default {
isTrans: false, isTrans: false,
countryIndex: 0, countryIndex: 0,
isCountry: false, isCountry: false,
userInfo: '', userInfo: uni.getStorageSync('User'),
countryList: [], countryList: [],
isClick: 0, isClick: 0,
specialArea: '', specialArea: '',
@ -528,9 +529,9 @@ export default {
// //
this.getGenerate() this.getGenerate()
// //
this.userInfo = uni.getStorageSync('User')
this.$set(this.form, 'memberCode', this.userInfo.memberCode) this.$set(this.form, 'memberCode', this.userInfo.memberCode)
this.$set(this.form, 'memberName', this.userInfo.memberName) this.$set(this.form, 'memberName', this.userInfo.memberName)
console.log(this.userInfo, '...a?')
this.setPageTitle(this.specialArea) this.setPageTitle(this.specialArea)
}, },
onShow() { onShow() {
@ -547,7 +548,10 @@ export default {
] ]
const title = areaList.find(item => item.id == areaId)?.name const title = areaList.find(item => item.id == areaId)?.name
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title, title:
this.userInfo.memberSign == MEMBER_SIGN.ZERO_LEVEL
? '会员专区'
: title,
}) })
}, },
toAgree() { toAgree() {