|
@@ -80,73 +80,86 @@
|
|
|
:style="{ height: scrollHeight + 'px', paddingTop: CustomBar + 44 + 'px' }"
|
|
|
>
|
|
|
<view
|
|
|
- v-for="(item, index) in listData"
|
|
|
+ v-for="(pros, index) in listData"
|
|
|
:key="index"
|
|
|
- :id="item.productId"
|
|
|
+ :id="pros.productId"
|
|
|
class="all-type-list-content commodity-list"
|
|
|
- @click.stop="navToDetailPage(item.productId)"
|
|
|
+ @click.stop="navToDetailPage(pros.productId)"
|
|
|
>
|
|
|
- <image mode="widthFix" :src="item.image" class="list-img" alt="list-img"></image>
|
|
|
+ <image mode="widthFix" :src="pros.image" class="list-img" alt="list-img"></image>
|
|
|
<view class="list-details-info">
|
|
|
<text class="list-details-title">
|
|
|
- <text class="mclap-tag" v-if="item.beautyActFlag == 1">美博会</text>
|
|
|
- <text class="mclap" :class="item.beautyActFlag == 1 ? 'indent' : ''">{{
|
|
|
- item.name
|
|
|
+ <text class="mclap-tag" v-if="pros.beautyActFlag == 1">美博会</text>
|
|
|
+ <text class="mclap" :class="pros.beautyActFlag == 1 ? 'indent' : ''">{{
|
|
|
+ pros.name
|
|
|
}}</text>
|
|
|
</text>
|
|
|
- <text class="list-details-specs">规格:{{ item.unit }}</text>
|
|
|
- <view class="list-details-specs" v-if="item.code != '' && item.code != null"
|
|
|
- >商品编码:{{ item.code }}</view
|
|
|
+ <text class="list-details-specs">规格:{{ pros.unit }}</text>
|
|
|
+ <view class="list-details-specs" v-if="pros.code != '' && pros.code != null"
|
|
|
+ >商品编码:{{ pros.code }}</view
|
|
|
>
|
|
|
<view class="list-details-price">
|
|
|
<template v-if="userIdentity == 3">
|
|
|
<view class="floor-item-act">
|
|
|
- <view class="coupon-tags" v-if="item.couponsLogo">优惠券</view>
|
|
|
- <template v-if="item.actStatus == 1">
|
|
|
- <view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
- {{ item.promotions.name }}
|
|
|
- <text v-if="hasLogin && userIdentity == 3 && item.priceFlag != 1"
|
|
|
- >:¥{{ item.price | NumFormat }}</text
|
|
|
+ <view class="coupon-tags" v-if="pros.couponsLogo">优惠券</view>
|
|
|
+ <template v-if="pros.actStatus == 1">
|
|
|
+ <view class="floor-tags" v-if="PromotionsFormat(pros.promotions)">
|
|
|
+ {{ pros.promotions.name }}
|
|
|
+ <text v-if="hasLogin && userIdentity == 3 && pros.priceFlag != 1"
|
|
|
+ >:¥{{ pros.price | NumFormat }}</text
|
|
|
>
|
|
|
</view>
|
|
|
- <view class="floor-tags" v-else>{{ item.promotions.name }}</view>
|
|
|
+ <view class="floor-tags" v-else>{{ pros.promotions.name }}</view>
|
|
|
</template>
|
|
|
- <template v-if="item.svipProductFlag == 1">
|
|
|
+ <template v-if="pros.svipProductFlag == 1">
|
|
|
<view
|
|
|
class="svip-tags"
|
|
|
- v-if="hasLogin && userIdentity == 3 && item.priceFlag != 1"
|
|
|
+ v-if="hasLogin && userIdentity == 3 && pros.priceFlag != 1"
|
|
|
>
|
|
|
<view class="tags">SVIP</view>
|
|
|
- <view class="price">{{ item.svipPriceTag }}</view>
|
|
|
+ <view class="price">{{ pros.svipPriceTag }}</view>
|
|
|
</view>
|
|
|
<view class="svip-tags" v-else> <view class="tags none">SVIP</view> </view>
|
|
|
</template>
|
|
|
</view>
|
|
|
</template>
|
|
|
- <template v-else>
|
|
|
+ <template v-else-if="userIdentity == 1">
|
|
|
<view class="floor-item-act">
|
|
|
- <view class="coupon-tags" v-if="item.couponsLogo">优惠券</view>
|
|
|
- <template v-if="item.actStatus == 1">
|
|
|
+ <view class="coupon-tags" v-if="pros.couponsLogo">优惠券</view>
|
|
|
+ <template v-if="pros.actStatus == 1">
|
|
|
<view
|
|
|
class="floor-tags"
|
|
|
- v-if="item.actStatus == 1 && PromotionsFormat(item.promotions)"
|
|
|
+ v-if="pros.actStatus == 1 && PromotionsFormat(pros.promotions)"
|
|
|
>
|
|
|
- {{ item.promotions.name }}
|
|
|
- <text v-if="hasLogin && userIdentity == 2 && item.priceFlag != 1"
|
|
|
- >:¥{{ item.price | NumFormat }}</text
|
|
|
- >
|
|
|
+ {{ pros.promotions.name }} <text>:¥{{ pros.price | NumFormat }}</text>
|
|
|
</view>
|
|
|
- <view class="floor-tags" v-else>{{ item.promotions.name }}</view>
|
|
|
+ <view class="floor-tags" v-else>{{ pros.promotions.name }}</view>
|
|
|
+ </template>
|
|
|
+ <template v-if="pros.svipProductFlag == 1">
|
|
|
+ <view class="svip-tags"><view class="tags none">SVIP</view> </view>
|
|
|
</template>
|
|
|
- <template v-if="item.svipProductFlag == 1">
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <view class="floor-item-act">
|
|
|
+ <view class="coupon-tags" v-if="pros.couponsLogo">优惠券</view>
|
|
|
+ <template v-if="pros.actStatus == 1">
|
|
|
<view
|
|
|
- class="svip-tags"
|
|
|
- v-if="hasLogin && userIdentity == 2 && item.priceFlag != 1"
|
|
|
+ class="floor-tags"
|
|
|
+ v-if="pros.actStatus == 1 && PromotionsFormat(pros.promotions)"
|
|
|
>
|
|
|
- <view class="tags">SVIP</view>
|
|
|
- <view class="price">{{ item.svipPriceTag }}</view>
|
|
|
+ {{ pros.promotions.name }}
|
|
|
+ <text v-if="hasLogin && userIdentity == 2 && pros.priceFlag != 1"
|
|
|
+ >:¥{{ pros.price | NumFormat }}</text
|
|
|
+ >
|
|
|
+ </view>
|
|
|
+ <view class="floor-tags" v-else>{{ pros.promotions.name }}</view>
|
|
|
+ </template>
|
|
|
+ <template v-if="pros.svipProductFlag == 1">
|
|
|
+ <view class="svip-tags">
|
|
|
+ <view class="tags" :class="{ none : vipFlag == 0 }">SVIP</view>
|
|
|
+ <view class="price" v-if="isShowVipFlag(pros)">{{ pros.svipPriceTag }}</view>
|
|
|
</view>
|
|
|
- <view class="svip-tags" v-else> <view class="tags none">SVIP</view> </view>
|
|
|
</template>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -157,48 +170,48 @@
|
|
|
<text
|
|
|
class="price-larger"
|
|
|
:class="
|
|
|
- PromotionsFormat(item.promotions) || item.svipProductFlag == 1
|
|
|
+ PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
|
|
|
? 'none'
|
|
|
: ''
|
|
|
"
|
|
|
>
|
|
|
¥{{
|
|
|
- (PromotionsFormat(item.promotions) || item.svipProductFlag == 1
|
|
|
- ? item.originalPrice
|
|
|
- : item.price) | NumFormat
|
|
|
+ (PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
|
|
|
+ ? pros.originalPrice
|
|
|
+ : pros.price) | NumFormat
|
|
|
}}
|
|
|
</text>
|
|
|
</template>
|
|
|
</template>
|
|
|
- <template v-if="userIdentity == 4">
|
|
|
- <view class="price-larger" v-if="item.priceFlag == 1">
|
|
|
+ <template v-if="userIdentity == 4 && vipFlag == 0">
|
|
|
+ <view class="price-larger" v-if="pros.priceFlag == 1">
|
|
|
<text class="txt">¥未公开价格</text>
|
|
|
</view>
|
|
|
<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
|
|
|
<template v-else>
|
|
|
- <view class="price-larger" v-if="item.priceFlag == 2">
|
|
|
+ <view class="price-larger" v-if="pros.priceFlag == 2">
|
|
|
<text class="txt">¥价格仅会员可见</text>
|
|
|
</view>
|
|
|
<text
|
|
|
v-else
|
|
|
class="price-larger"
|
|
|
:class="
|
|
|
- PromotionsFormat(item.promotions) || item.svipProductFlag == 1
|
|
|
+ PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
|
|
|
? 'none'
|
|
|
: ''
|
|
|
"
|
|
|
>
|
|
|
¥{{
|
|
|
- (PromotionsFormat(item.promotions) || item.svipProductFlag == 1
|
|
|
- ? item.originalPrice
|
|
|
- : item.price) | NumFormat
|
|
|
+ (PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
|
|
|
+ ? pros.originalPrice
|
|
|
+ : pros.price) | NumFormat
|
|
|
}}
|
|
|
</text>
|
|
|
</template>
|
|
|
</template>
|
|
|
<template v-if="userIdentity == 3">
|
|
|
- <template v-if="item.supplierId === shopId">
|
|
|
- <view class="price-larger" v-if="item.priceFlag == 1">
|
|
|
+ <template v-if="pros.supplierId === shopId">
|
|
|
+ <view class="price-larger" v-if="pros.priceFlag == 1">
|
|
|
<text class="txt">¥未公开价格</text>
|
|
|
</view>
|
|
|
<text v-else-if="priceLoading" class="price-larger small"
|
|
@@ -208,27 +221,27 @@
|
|
|
v-else
|
|
|
class="price-larger"
|
|
|
:class="
|
|
|
- PromotionsFormat(item.promotions) || item.svipProductFlag == 1
|
|
|
+ PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
|
|
|
? 'none'
|
|
|
: ''
|
|
|
"
|
|
|
>
|
|
|
¥{{
|
|
|
- (PromotionsFormat(item.promotions) || item.svipProductFlag == 1
|
|
|
- ? item.originalPrice
|
|
|
- : item.price) | NumFormat
|
|
|
+ (PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
|
|
|
+ ? pros.originalPrice
|
|
|
+ : pros.price) | NumFormat
|
|
|
}}
|
|
|
</text>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<view class="list-login-now">
|
|
|
<text class="p-no">¥</text>
|
|
|
- <uni-grader :grade="Number(item.priceGrade)"></uni-grader>
|
|
|
+ <uni-grader :grade="Number(pros.priceGrade)"></uni-grader>
|
|
|
</view>
|
|
|
</template>
|
|
|
</template>
|
|
|
- <template v-if="userIdentity == 2">
|
|
|
- <view class="price-larger" v-if="item.priceFlag == 1">
|
|
|
+ <template v-if="userIdentity == 2 || (userIdentity == 4 && vipFlag == 1) ">
|
|
|
+ <view class="price-larger" v-if="pros.priceFlag == 1">
|
|
|
<text class="txt">¥未公开价格</text>
|
|
|
</view>
|
|
|
<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
|
|
@@ -236,15 +249,15 @@
|
|
|
<text
|
|
|
class="price-larger"
|
|
|
:class="
|
|
|
- PromotionsFormat(item.promotions) || item.svipProductFlag == 1
|
|
|
+ PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
|
|
|
? 'none'
|
|
|
: ''
|
|
|
"
|
|
|
>
|
|
|
¥{{
|
|
|
- (PromotionsFormat(item.promotions) || item.svipProductFlag == 1
|
|
|
- ? item.originalPrice
|
|
|
- : item.price) | NumFormat
|
|
|
+ (PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
|
|
|
+ ? pros.originalPrice
|
|
|
+ : pros.price) | NumFormat
|
|
|
}}
|
|
|
</text>
|
|
|
</template>
|
|
@@ -252,7 +265,7 @@
|
|
|
</view>
|
|
|
<view v-else class="list-login-now">
|
|
|
<text class="p-no">¥</text>
|
|
|
- <uni-grader :grade="Number(item.priceGrade)"></uni-grader>
|
|
|
+ <uni-grader :grade="Number(pros.priceGrade)"></uni-grader>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -656,6 +669,16 @@ export default {
|
|
|
}
|
|
|
return false
|
|
|
},
|
|
|
+ isShowVipFlag(pros) {
|
|
|
+ // 超级会员价格显示控制
|
|
|
+ if (this.hasLogin && pros.priceFlag != 1) {
|
|
|
+ if (this.userIdentity == 4 && this.vipFlag == 1) {
|
|
|
+ return true
|
|
|
+ } else if (this.userIdentity == 2) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
SetScrollHeight() {
|
|
|
const { windowHeight, pixelRatio } = wx.getSystemInfoSync()
|
|
|
this.windowHeight = windowHeight - 1
|