|
@@ -7,47 +7,49 @@
|
|
|
<swiper-item v-for="(product,index) in hotProductList" :key="index">
|
|
|
<view class="floor-item" v-for="(item, idx) in product" :key="idx" @click.stop="navToDetailPage(item.id)">
|
|
|
<image class="item-img tui-skeleton-fillet" :src="item.image" mode="aspectFill"></image>
|
|
|
+ <image class="item-icon-type" :src="iconNew" mode="" v-if="item.actType === 2"></image>
|
|
|
+ <image class="item-icon-type" :src="iconHot" mode="" v-if="item.actType === 1"></image>
|
|
|
<view class="floor-item-content">
|
|
|
<view class="title tui-skeleton-rect">
|
|
|
<text class="mclap">{{item.name}}</text>
|
|
|
</view>
|
|
|
<view class="" v-if="hasLogin">
|
|
|
- <template v-if="userIdentity == 4">
|
|
|
- <view class="title-none" v-show="item.priceFlag == '1'">
|
|
|
+ <template v-if="userIdentity === 4">
|
|
|
+ <view class="title-none" v-if="item.priceFlag === 1">
|
|
|
<text class="p big">¥未公开价格</text>
|
|
|
</view>
|
|
|
- <view class="title-none" v-show="item.priceFlag == '2'">
|
|
|
+ <view class="title-none" v-if="item.priceFlag === 2">
|
|
|
<text class="p big">¥价格仅会员可见</text>
|
|
|
</view>
|
|
|
- <view class="price tui-skeleton-rect" v-show="item.priceFlag == '0'" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
|
|
|
+ <view class="price tui-skeleton-rect" v-if="item.priceFlag === 0" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
|
|
|
<text class="p sm">¥</text>
|
|
|
<text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
|
|
|
- <template v-if="item.actStatus==1">
|
|
|
+ <template v-if="item.actStatus===1">
|
|
|
<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
- {{item.promotions.name}}<text v-if="hasLogin && item.priceFlag != '1'">:¥{{item.price | NumFormat}}</text>
|
|
|
+ {{item.promotions.name}}<text v-if="hasLogin && item.priceFlag != 1">:¥{{item.price | NumFormat}}</text>
|
|
|
</view>
|
|
|
<view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
|
</template>
|
|
|
- <template v-if="item.actStatus ==0 && item.ladderPriceFlag==1">
|
|
|
+ <template v-if="item.actStatus ===0 && item.ladderPriceFlag===1">
|
|
|
<view class="floor-tags">阶梯价格</view>
|
|
|
</template>
|
|
|
</view>
|
|
|
</template>
|
|
|
- <template v-if="userIdentity == 3">
|
|
|
+ <template v-if="userIdentity === 3">
|
|
|
<template v-if="item.supplierId == shopId">
|
|
|
- <view class="title-none" v-if="item.priceFlag == '1'">
|
|
|
+ <view class="title-none" v-if="item.priceFlag === 1">
|
|
|
<text class="p big">¥未公开价格</text>
|
|
|
</view>
|
|
|
<view class="price tui-skeleton-rect" v-else :class="PromotionsFormat(item.promotions) ? 'none' : ''">
|
|
|
<text class="p sm">¥</text>
|
|
|
<text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
|
|
|
- <template v-if="item.actStatus==1">
|
|
|
+ <template v-if="item.actStatus===1">
|
|
|
<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
- {{item.promotions.name}}<text v-if="hasLogin && item.priceFlag != '1'">:¥{{item.price | NumFormat}} {{ shopId }}{{item.supplierId }}</text>
|
|
|
+ {{item.promotions.name}}<text v-if="hasLogin && item.priceFlag != 1">:¥{{item.price | NumFormat}} {{ shopId }}{{item.supplierId }}</text>
|
|
|
</view>
|
|
|
<view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
|
</template>
|
|
|
- <template v-if="item.actStatus ==0 && item.ladderPriceFlag==1">
|
|
|
+ <template v-if="item.actStatus ===0 && item.ladderPriceFlag===1">
|
|
|
<view class="floor-tags">阶梯价格</view>
|
|
|
</template>
|
|
|
</view>
|
|
@@ -62,19 +64,19 @@
|
|
|
</template>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <view class="title-none" v-if="item.priceFlag == '1'">
|
|
|
+ <view class="title-none" v-if="item.priceFlag === 1">
|
|
|
<text class="p big">¥未公开价格</text>
|
|
|
</view>
|
|
|
<view class="price tui-skeleton-rect" v-else :class="PromotionsFormat(item.promotions) ? 'none' : ''">
|
|
|
<text class="p sm">¥</text>
|
|
|
<text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
|
|
|
- <template v-if="item.actStatus==1">
|
|
|
+ <template v-if="item.actStatus === 1">
|
|
|
<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
- {{item.promotions.name}}<text v-if="hasLogin && item.priceFlag != '1'">:¥{{item.price | NumFormat}}</text>
|
|
|
+ {{item.promotions.name}}<text v-if="hasLogin && item.priceFlag != 1">:¥{{item.price | NumFormat}}</text>
|
|
|
</view>
|
|
|
<view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
|
</template>
|
|
|
- <template v-if="item.actStatus ==0 && item.ladderPriceFlag==1">
|
|
|
+ <template v-if="item.actStatus === 0 && item.ladderPriceFlag===1">
|
|
|
<view class="floor-tags">阶梯价格</view>
|
|
|
</template>
|
|
|
</view>
|
|
@@ -86,7 +88,7 @@
|
|
|
<uni-grader :grade="Number(item.priceGrade)"></uni-grader>
|
|
|
<template v-if="item.actStatus==1">
|
|
|
<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
- {{item.promotions.name}}<text v-if="hasLogin && item.priceFlag != '1'">:¥{{item.price | NumFormat}}</text>
|
|
|
+ {{item.promotions.name}}<text v-if="hasLogin && item.priceFlag != 1">:¥{{item.price | NumFormat}}</text>
|
|
|
</view>
|
|
|
<view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
|
</template>
|
|
@@ -133,7 +135,9 @@
|
|
|
swiperCurrent:0,
|
|
|
hotProductList:[],
|
|
|
pageSize:4,
|
|
|
- shopId:0
|
|
|
+ shopId:0,
|
|
|
+ iconNew:'http://static-b.caimei365.com/app/img/icon/icon-new.png',
|
|
|
+ iconHot:'http://static-b.caimei365.com/app/img/icon/icon-hot.png',
|
|
|
}
|
|
|
},
|
|
|
filters: {
NumFormat:function(text) {//处理金额
return Number(text).toFixed(2);
},
},
|
|
@@ -221,9 +225,18 @@
|
|
|
float: left;
|
|
|
box-sizing: border-box;
|
|
|
padding-bottom: 10rpx;
|
|
|
+ position: relative;
|
|
|
&:nth-child(2n){
|
|
|
margin-right: 0;
|
|
|
}
|
|
|
+ .item-icon-type{
|
|
|
+ width: 48rpx;
|
|
|
+ height: 62rpx;
|
|
|
+ display: block;
|
|
|
+ position: absolute;
|
|
|
+ top: 20rpx;
|
|
|
+ right: 20rpx;
|
|
|
+ }
|
|
|
.item-img{
|
|
|
width: 341rpx;
|
|
|
height: 341rpx;
|