3
0
Fork 0

fix(specialArea): v0仅会员专区可见

This commit is contained in:
woody 2025-07-12 11:13:41 +08:00
parent 7b52076c44
commit e778f671ca
3 changed files with 20 additions and 59 deletions

View File

@ -28,7 +28,11 @@
</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">
<area-product-list
:list="repurchaseList"
@ -75,6 +79,10 @@ export default {
default: 'normal', // 'normal' or 'small'
validator: value => ['normal', 'small'].includes(value),
},
userInfo: {
type: Object,
default: () => {},
},
},
components: {
'area-product-list': areaProductList,
@ -95,12 +103,13 @@ export default {
...mapGetters(['isZeroLevel']),
},
created() {
const userInfo = uni.getStorageSync('userInfo')
if (userInfo.memberSign != MEMBER_SIGN.ZERO_LEVEL) {
this.getAreaListById(REISSUE_AREA.id, this.rescissionList)
this.getAreaListById(REGIEST_AREA.id, this.registList)
const userInfo = uni.getStorageSync('userInfo') || this.userInfo
if (userInfo.memberSign == MEMBER_SIGN.ZERO_LEVEL) {
this.upgrade.name = '会员专区'
}
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: {

View File

@ -28,58 +28,8 @@
</swiper>
</view>
</view>
<special-area-wrapper size="small" />
<view class="goods-sort">
<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 style="padding-bottom: 140rpx">
<special-area-wrapper :userInfo="userInfo" size="small" />
</view>
<cl-tabbar :current="0"></cl-tabbar>
<div>

View File

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