|
@@ -118,7 +118,7 @@
|
|
|
</template>
|
|
|
<template v-if="prop.svipProductFlag == 1">
|
|
|
<view class="svip-tags">
|
|
|
- <view class="tags" :class="{ none: vipFlag != 1 }">SVIP</view>
|
|
|
+ <view class="tags" :class="{ none: !isShowVipFlag(pros) }">SVIP</view>
|
|
|
<view class="price" v-if="isShowVipFlag(pros)">{{
|
|
|
pros.svipPriceTag
|
|
|
}}</view>
|
|
@@ -157,10 +157,10 @@
|
|
|
<view class="title-none" v-if="prop.priceFlag === 1">
|
|
|
<text class="p big">¥未公开价格</text>
|
|
|
</view>
|
|
|
- <view class="title-none" v-if="prop.priceFlag === 2">
|
|
|
+ <view class="title-none" v-else-if="prop.priceFlag === 2">
|
|
|
<text class="p big">¥价格仅会员可见</text>
|
|
|
</view>
|
|
|
- <view class="title-none" v-if="prop.priceFlag === 3">
|
|
|
+ <view class="title-none" v-else-if="prop.priceFlag === 3">
|
|
|
<text class="p big">¥仅医美机构可见</text>
|
|
|
</view>
|
|
|
<view
|
|
@@ -179,7 +179,7 @@
|
|
|
<view class="title-none" v-if="prop.priceFlag === 1">
|
|
|
<text class="p big">¥未公开价格</text>
|
|
|
</view>
|
|
|
- <view class="title-none" v-if="prop.priceFlag === 3">
|
|
|
+ <view class="title-none" v-else-if="prop.priceFlag === 3 && (firstClubType!=1)">
|
|
|
<text class="p big">¥仅医美机构可见</text>
|
|
|
</view>
|
|
|
<view
|
|
@@ -291,7 +291,7 @@
|
|
|
</template>
|
|
|
<template v-if="prop.svipProductFlag == 1">
|
|
|
<view class="svip-tags">
|
|
|
- <view class="tags" :class="{ none: vipFlag != 1 }">SVIP</view>
|
|
|
+ <view class="tags" :class="{ none: !isShowVipFlag(pros) }">SVIP</view>
|
|
|
<view class="price" v-if="isShowVipFlag(pros)">{{
|
|
|
pros.svipPriceTag
|
|
|
}}</view>
|
|
@@ -330,10 +330,10 @@
|
|
|
<view class="title-none" v-if="prop.priceFlag === 1">
|
|
|
<text class="p big">¥未公开价格</text>
|
|
|
</view>
|
|
|
- <view class="title-none" v-if="prop.priceFlag === 2">
|
|
|
+ <view class="title-none" v-else-if="prop.priceFlag === 2">
|
|
|
<text class="p big">¥价格仅会员可见</text>
|
|
|
</view>
|
|
|
- <view class="title-none" v-if="prop.priceFlag === 3">
|
|
|
+ <view class="title-none" v-else-if="prop.priceFlag === 3">
|
|
|
<text class="p big">¥仅医美机构可见</text>
|
|
|
</view>
|
|
|
<view
|
|
@@ -352,7 +352,7 @@
|
|
|
<view class="title-none" v-if="prop.priceFlag === 1">
|
|
|
<text class="p big">¥未公开价格</text>
|
|
|
</view>
|
|
|
- <view class="title-none" v-if="prop.priceFlag === 3">
|
|
|
+ <view class="title-none" v-else-if="prop.priceFlag === 3 && (firstClubType!=1)">
|
|
|
<text class="p big">¥仅医美机构可见</text>
|
|
|
</view>
|
|
|
<view
|
|
@@ -433,6 +433,7 @@ export default {
|
|
|
recommendList: [],
|
|
|
productList: [],
|
|
|
userIdentity: 0,
|
|
|
+ firstClubType:0,
|
|
|
listQuery: {
|
|
|
keyword: '',
|
|
|
pageSize: 10,
|
|
@@ -445,7 +446,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapState(['hasLogin', 'userInfo', 'isActivity', 'identity', 'isWxAuthorize'])
|
|
|
+ ...mapState(['hasLogin', 'userInfo', 'isActivity', 'identity', 'clubType'])
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
if (option.type == 'share') {
|
|
@@ -469,6 +470,7 @@ export default {
|
|
|
this.listQuery.identity = this.identity
|
|
|
this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
|
|
|
this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
|
|
|
+ this.firstClubType = this.clubType
|
|
|
//初始化请求数据
|
|
|
this.GetSupplierHomeBanner()
|
|
|
this.GetSupplierHomeDeatils()
|
|
@@ -658,15 +660,30 @@ export default {
|
|
|
this.$api.navigateTo(`/pages/goods/product?id=${id}`)
|
|
|
},
|
|
|
isShowVipFlag(pros) {
|
|
|
- // 超级会员价格显示控制
|
|
|
- if (this.hasLogin && pros.priceFlag != 1) {
|
|
|
- if (this.userIdentity == 1 || (this.userIdentity == 4 && this.vipFlag == 1)) {
|
|
|
- return true
|
|
|
- } else if (this.userIdentity == 2) {
|
|
|
- return true
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ /**
|
|
|
+ *显示SVIP和超级会员价格:
|
|
|
+ * 个人机构(不是超级会员,但价格所有机构可见),
|
|
|
+ * 资质机构(不是超级会员,但价格所有机构可见或仅会员可见),
|
|
|
+ * 超级会员(价格所有机构可见或仅会员可见),超级会员(是医美机构,价格仅医美可见)
|
|
|
+ *商品价格是否可见:priceFlag 0:所有机构可见 1:未公开价格 2:仅会员可见 3:仅医美机构可见
|
|
|
+ * 普通机构
|
|
|
+ * 超级会员 && priceFlag === 0
|
|
|
+ * 资质机构
|
|
|
+ * priceFlag !== 1 ||
|
|
|
+ * 超级会员
|
|
|
+ * 商品priceFlag === 3 && 是否是医美机构
|
|
|
+ */
|
|
|
+ // 未登录 || 非会员
|
|
|
+ if(!this.hasLogin || !this.vipFlag === 1) return false
|
|
|
+ // 商品所有机构可见
|
|
|
+ if(pros.priceFlag === 0 ) return true
|
|
|
+ // 商品价格仅资质机构可见
|
|
|
+ if((pros.priceFlag === 2 && this.userIdentity === 2) || this.userIdentity === 1) return true
|
|
|
+ // 商品价格仅医美机构可见
|
|
|
+ if((pros.priceFlag === 3 && this.userIdentity === 2 && this.firstClubType == 1) || this.userIdentity === 1) return true
|
|
|
+ // 其它
|
|
|
+ return false
|
|
|
+ },
|
|
|
},
|
|
|
onPageScroll(e) {
|
|
|
//实时获取到滚动的值
|