|
@@ -42,50 +42,96 @@
|
|
|
>
|
|
|
<text class="list-details-title">{{ pros.name }}</text>
|
|
|
<text class="list-details-specs">规格:{{ pros.unit != null ? pros.unit : '' }}</text>
|
|
|
- <view class="list-details-price" v-if="pros.priceFlag == 1">
|
|
|
- <view class="list-none"><view class="price-small">¥未公开价格</view></view>
|
|
|
- </view>
|
|
|
- <view class="list-details-price" v-else-if="pros.priceFlag == 2">
|
|
|
- <view class="list-none"><view class="price-small">¥价格仅会员可见</view></view>
|
|
|
- </view>
|
|
|
- <template v-else>
|
|
|
- <view class="list-details-price">
|
|
|
- <view class="list-price">
|
|
|
- <text
|
|
|
- class="price-larger"
|
|
|
- :class="PromotionsFormat(pros.promotions) ? 'none' : ''"
|
|
|
+ <template v-if="userIdentity == 4">
|
|
|
+ <view class="list-details-price" v-if="pros.priceFlag == 1">
|
|
|
+ <view class="list-none"><view class="price-small">¥未公开价格</view></view>
|
|
|
+ </view>
|
|
|
+ <view class="list-details-price" v-else-if="pros.priceFlag == 2">
|
|
|
+ <view class="list-none"><view class="price-small">¥价格仅会员可见</view></view>
|
|
|
+ </view>
|
|
|
+ <template v-else>
|
|
|
+ <view class="list-details-price">
|
|
|
+ <view class="list-price">
|
|
|
+ <text
|
|
|
+ class="price-larger"
|
|
|
+ :class="PromotionsFormat(pros.promotions) ? 'none' : ''"
|
|
|
+ >
|
|
|
+ ¥{{
|
|
|
+ (PromotionsFormat(pros.promotions)
|
|
|
+ ? pros.originalPrice
|
|
|
+ : pros.price) | NumFormat
|
|
|
+ }}
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ <view class="add-cart-btn" v-if="!popupShow" @click.stop="showPopup(1, pros)"
|
|
|
+ >数量</view
|
|
|
>
|
|
|
- ¥{{
|
|
|
- (PromotionsFormat(pros.promotions)
|
|
|
- ? pros.originalPrice
|
|
|
- : pros.price) | NumFormat
|
|
|
- }}
|
|
|
- </text>
|
|
|
</view>
|
|
|
- <view class="add-cart-btn" v-if="!popupShow" @click.stop="showPopup(1, pros)"
|
|
|
- >数量</view
|
|
|
- >
|
|
|
- </view>
|
|
|
- <view class="list-details-price none">
|
|
|
- <view class="floor-item-act" v-if="pros.actStatus == 1">
|
|
|
- <template>
|
|
|
- <view class="floor-tags" v-if="PromotionsFormat(pros.promotions)">
|
|
|
- {{ pros.promotions.name }}
|
|
|
- <text v-if="pros.priceFlag != 1"
|
|
|
- >:¥{{ pros.price | NumFormat }}</text
|
|
|
- >
|
|
|
- </view>
|
|
|
- <view class="floor-tags" v-else>{{ pros.promotions.name }}</view>
|
|
|
- </template>
|
|
|
+ <view class="list-details-price none">
|
|
|
+ <view class="floor-item-act" v-if="pros.actStatus == 1">
|
|
|
+ <template>
|
|
|
+ <view class="floor-tags" v-if="PromotionsFormat(pros.promotions)">
|
|
|
+ {{ pros.promotions.name }}
|
|
|
+ <text v-if="pros.priceFlag != 1"
|
|
|
+ >:¥{{ pros.price | NumFormat }}</text
|
|
|
+ >
|
|
|
+ </view>
|
|
|
+ <view class="floor-tags" v-else>{{ pros.promotions.name }}</view>
|
|
|
+ </template>
|
|
|
+ </view>
|
|
|
+ <view class="floor-item-act" v-if="pros.actStatus == 0">
|
|
|
+ <view
|
|
|
+ class="floor-tags"
|
|
|
+ v-if="pros.actStatus == 0 && pros.ladderPriceFlag == 1"
|
|
|
+ >阶梯价格</view
|
|
|
+ >
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="floor-item-act" v-if="pros.actStatus == 0">
|
|
|
- <view
|
|
|
- class="floor-tags"
|
|
|
- v-if="pros.actStatus == 0 && pros.ladderPriceFlag == 1"
|
|
|
- >阶梯价格</view
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <view class="list-details-price" v-if="pros.priceFlag == 1">
|
|
|
+ <view class="list-none"><view class="price-small">¥未公开价格</view></view>
|
|
|
+ </view>
|
|
|
+ <template v-else>
|
|
|
+ <view class="list-details-price">
|
|
|
+ <view class="list-price">
|
|
|
+ <text
|
|
|
+ class="price-larger"
|
|
|
+ :class="PromotionsFormat(pros.promotions) ? 'none' : ''"
|
|
|
+ >
|
|
|
+ ¥{{
|
|
|
+ (PromotionsFormat(pros.promotions)
|
|
|
+ ? pros.originalPrice
|
|
|
+ : pros.price) | NumFormat
|
|
|
+ }}
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ <view class="add-cart-btn" v-if="!popupShow" @click.stop="showPopup(1, pros)"
|
|
|
+ >数量</view
|
|
|
>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ <view class="list-details-price none">
|
|
|
+ <view class="floor-item-act" v-if="pros.actStatus == 1">
|
|
|
+ <template>
|
|
|
+ <view class="floor-tags" v-if="PromotionsFormat(pros.promotions)">
|
|
|
+ {{ pros.promotions.name }}
|
|
|
+ <text v-if="pros.priceFlag != 1"
|
|
|
+ >:¥{{ pros.price | NumFormat }}</text
|
|
|
+ >
|
|
|
+ </view>
|
|
|
+ <view class="floor-tags" v-else>{{ pros.promotions.name }}</view>
|
|
|
+ </template>
|
|
|
+ </view>
|
|
|
+ <view class="floor-item-act" v-if="pros.actStatus == 0">
|
|
|
+ <view
|
|
|
+ class="floor-tags"
|
|
|
+ v-if="pros.actStatus == 0 && pros.ladderPriceFlag == 1"
|
|
|
+ >阶梯价格</view
|
|
|
+ >
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -244,16 +290,19 @@ export default {
|
|
|
navbarHeight: '',
|
|
|
nomoreText: '上拉显示更多',
|
|
|
contentModalText: '', //操作文字提示语句
|
|
|
- modal: false
|
|
|
+ modal: false,
|
|
|
+ userIdentity:0,
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
this.initGetStotage()
|
|
|
},
|
|
|
filters: {
|
|
|
- NumFormat: function(text) {
|
|
|
+ NumFormat: function(value) {
|
|
|
//处理金额
|
|
|
- return Number(text).toFixed(2)
|
|
|
+ if (!value) return '0.00'
|
|
|
+ let number = Number(value).toFixed(2)
|
|
|
+ return number
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -264,6 +313,7 @@ export default {
|
|
|
async initGetStotage() {
|
|
|
const userInfo = await this.$api.getStorage()
|
|
|
this.listQuery.userId = userInfo.userId ? userInfo.userId : 0
|
|
|
+ this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
|
|
|
this.GetProductListInfo()
|
|
|
this.shoppingHeaderCartNumber()
|
|
|
},
|