|
@@ -65,16 +65,41 @@
|
|
<view class="title tui-skeleton-rect">
|
|
<view class="title tui-skeleton-rect">
|
|
<text class="mclap">{{item.name}}</text>
|
|
<text class="mclap">{{item.name}}</text>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="floor-item-act" v-if="item.actStatus==1">
|
|
|
|
+ <view class="floor-tags" v-if="item.promotions.type == 1 && item.promotions.mode==1">{{item.promotions.name}}<text v-if="hasLogin">:¥{{item.price | NumFormat}}</text></view>
|
|
|
|
+ <view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="floor-item-act" v-if="item.actStatus ==0 && item.ladderPriceFlag==1">
|
|
|
|
+ <view class="floor-tags">阶梯价格</view>
|
|
|
|
+ </view>
|
|
<view class="" v-if="hasLogin">
|
|
<view class="" v-if="hasLogin">
|
|
- <view class="price tui-skeleton-rect">
|
|
|
|
- <text class="p sm">¥</text>
|
|
|
|
- <text class="p big">{{item.retailPrice!=null ? item.retailPrice.toFixed(2):''}}</text>
|
|
|
|
|
|
+ <view v-if="userIdentity == 4">
|
|
|
|
+ <view class="title-none" v-show="item.price1TextFlag == '1'">
|
|
|
|
+ <text class="p big">¥未公开价格</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="title-none" v-show="item.price1TextFlag == '2'">
|
|
|
|
+ <text class="p big">¥价格仅会员可见</text>
|
|
|
|
+ <text class="p btn" @click.stop="this.$api.navigateTo(`/pages/login/apply?clubStatus=${clubStatus}`)">去升级</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="price tui-skeleton-rect" v-show="item.price1TextFlag == '0'">
|
|
|
|
+ <text class="p sm">¥</text>
|
|
|
|
+ <text class="p big">{{ item.price | NumFormat}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view v-else>
|
|
|
|
+ <view class="title-none" v-if="item.price1TextFlag == '1'">
|
|
|
|
+ <text class="p big">未公开价格</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="price tui-skeleton-rect" v-else :class="item.promotions.type == 1 && item.promotions.mode==1 ? 'none' : ''">
|
|
|
|
+ <text class="p sm">¥</text>
|
|
|
|
+ <text class="p big">{{item.price | NumFormat}}</text>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view v-else class="no-price">
|
|
<view v-else class="no-price">
|
|
- <text class="p-no">价格:</text>
|
|
|
|
<view class="p-stars">
|
|
<view class="p-stars">
|
|
- <uni-stars :stars="parseInt(item.price1Grade)"></uni-stars>
|
|
|
|
|
|
+ <text class="p-no">¥</text>
|
|
|
|
+ <uni-stars :stars="parseInt(item.price1Grade)" :fontSize="36" :widthInfo="180"></uni-stars>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -134,7 +159,6 @@
|
|
import activityAlert from '@/components/cm-module/activity/activity_on_1.vue'
|
|
import activityAlert from '@/components/cm-module/activity/activity_on_1.vue'
|
|
import uniStars from '@/components/uni-stars/uni-stars.vue'
|
|
import uniStars from '@/components/uni-stars/uni-stars.vue'
|
|
import { userInfoLogin, queryHomeInfo } from "@/api/use.js"
|
|
import { userInfoLogin, queryHomeInfo } from "@/api/use.js"
|
|
- import { queryPreferred } from "@/api/product.js"
|
|
|
|
import { mapState,mapMutations} from 'vuex';
|
|
import { mapState,mapMutations} from 'vuex';
|
|
export default {
|
|
export default {
|
|
components:{
|
|
components:{
|
|
@@ -146,11 +170,6 @@
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- webviewStyles: {
|
|
|
|
- progress: {
|
|
|
|
- color: '#FF3333'
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
nvabarData: {//顶部自定义导航
|
|
nvabarData: {//顶部自定义导航
|
|
showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
|
|
showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
|
|
showSearch: 0,
|
|
showSearch: 0,
|
|
@@ -160,7 +179,7 @@
|
|
textColor:'#FFFFFF'
|
|
textColor:'#FFFFFF'
|
|
},
|
|
},
|
|
CustomBar:this.CustomBar,// 顶部导航栏高度
|
|
CustomBar:this.CustomBar,// 顶部导航栏高度
|
|
- userID:'',
|
|
|
|
|
|
+ userID:0,
|
|
clubStatus:'',
|
|
clubStatus:'',
|
|
current:0,
|
|
current:0,
|
|
mode:'round',
|
|
mode:'round',
|
|
@@ -195,7 +214,15 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.getSellerHomeInfo()
|
|
|
|
|
|
+ this.$api.getStorage().then((resolve) =>{
|
|
|
|
+ this.userID = resolve.userID
|
|
|
|
+ this.getSellerHomeInfo()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ filters: {
|
|
|
|
+ NumFormat:function(text) {//处理金额
|
|
|
|
+ return Number(text).toFixed(2);
|
|
|
|
+ },
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapState(['hasLogin','userInfo','isActivity'])
|
|
...mapState(['hasLogin','userInfo','isActivity'])
|
|
@@ -223,12 +250,38 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getOrganizeProducts(){//获取模块三商品
|
|
getOrganizeProducts(){//获取模块三商品
|
|
- queryPreferred({userId:this.userID,preferredFlag:100,pageNum:1,pageSize:6}).then(res =>{
|
|
|
|
|
|
+ this.ProductService.queryProductPreferred({userId:this.userID,preferredFlag:100,pageNum:1,pageSize:6}).then(res =>{
|
|
this.organizeProducts = res.data.results
|
|
this.organizeProducts = res.data.results
|
|
|
|
+ this.getProductPrice()
|
|
}).catch(error =>{
|
|
}).catch(error =>{
|
|
this.$util.msg(error.msg,2000)
|
|
this.$util.msg(error.msg,2000)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ getProductPrice(){//获取商品或者活动价格
|
|
|
|
+ let productIdArr = [];
|
|
|
|
+ let productIds ='';
|
|
|
|
+ this.organizeProducts.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
|
|
|
|
+ productIdArr.push(item.productID)
|
|
|
|
+ })
|
|
|
|
+ productIds = productIdArr.join(",");
|
|
|
|
+ this.ProductService.querySearchProductPrice({userId: this.userID,productIds:productIds}).then(response =>{
|
|
|
|
+ this.organizeProducts = this.ReturnNewProducts(this.organizeProducts,response.data);
|
|
|
|
+ this.skeletonShow = false;
|
|
|
|
+ }).catch(error =>{
|
|
|
|
+ this.$util.msg(error.msg,2000)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ ReturnNewProducts(Array,list){
|
|
|
|
+ let NewArray = []
|
|
|
|
+ Array.map(item=>{
|
|
|
|
+ for (let i = 0; i < list.length; i++) {
|
|
|
|
+ if( item.productID == list[i].productId ){
|
|
|
|
+ NewArray.push(Object.assign(item,list[i]))
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ return NewArray
|
|
|
|
+ },
|
|
//轮播图切换修改背景色
|
|
//轮播图切换修改背景色
|
|
swiperChange(e) {
|
|
swiperChange(e) {
|
|
const index = e.detail.current;
|
|
const index = e.detail.current;
|
|
@@ -355,10 +408,9 @@
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 360rpx;
|
|
height: 360rpx;
|
|
padding-top:100rpx;
|
|
padding-top:100rpx;
|
|
- background:#FFFFFF url(https://admin-b.caimei365.com/userfiles/1/images/photo/2020/05/%E8%83%8C%E6%99%AF2%402x.png)no-repeat;
|
|
|
|
|
|
+ background:#FFFFFF url(https://img.caimei365.com/group1/M00/03/B0/Cmis217Z9LCALu9wAAAv45Bdpsk814.png)no-repeat;
|
|
position: relative;
|
|
position: relative;
|
|
background-size: cover;
|
|
background-size: cover;
|
|
- margin-top: 10rpx;
|
|
|
|
}
|
|
}
|
|
.tui-banner-swiper {
|
|
.tui-banner-swiper {
|
|
width: 700rpx;
|
|
width: 700rpx;
|
|
@@ -533,6 +585,7 @@
|
|
border-radius: 20rpx;
|
|
border-radius: 20rpx;
|
|
.floor-item{
|
|
.floor-item{
|
|
width: 341rpx;
|
|
width: 341rpx;
|
|
|
|
+ height: auto;
|
|
margin-right: 20rpx;
|
|
margin-right: 20rpx;
|
|
font-size: $font-size-24;
|
|
font-size: $font-size-24;
|
|
color: $text-color;
|
|
color: $text-color;
|
|
@@ -541,6 +594,8 @@
|
|
border-radius: 20rpx;
|
|
border-radius: 20rpx;
|
|
margin-bottom: 20rpx;
|
|
margin-bottom: 20rpx;
|
|
float: left;
|
|
float: left;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ padding-bottom: 16rpx;
|
|
&:nth-child(2n){
|
|
&:nth-child(2n){
|
|
margin-right: 0;
|
|
margin-right: 0;
|
|
}
|
|
}
|
|
@@ -555,6 +610,26 @@
|
|
width: 311rpx;
|
|
width: 311rpx;
|
|
padding: 0 15rpx;
|
|
padding: 0 15rpx;
|
|
}
|
|
}
|
|
|
|
+ .floor-item-act{
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 68rpx;
|
|
|
|
+ text-align: center;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ padding: 16rpx 0;
|
|
|
|
+ margin-top: 8rpx;
|
|
|
|
+ .floor-tags{
|
|
|
|
+ float: left;
|
|
|
|
+ height: 36rpx;
|
|
|
|
+ border-radius: 4rpx;
|
|
|
|
+ background-color: rgba(225, 86, 22, 0.1);
|
|
|
|
+ line-height: 36rpx;
|
|
|
|
+ color: $color-system;
|
|
|
|
+ text-align: center;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ padding:0 16rpx;
|
|
|
|
+ font-size: $font-size-20;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
.title-none{
|
|
.title-none{
|
|
font-size: $font-size-26;
|
|
font-size: $font-size-26;
|
|
color: #FF2A2A;
|
|
color: #FF2A2A;
|
|
@@ -591,21 +666,28 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.no-price{
|
|
.no-price{
|
|
- height: 76rpx;
|
|
|
|
- line-height: 76rpx;
|
|
|
|
|
|
+ height: 54rpx;
|
|
|
|
+ line-height: 54rpx;
|
|
display: flex;
|
|
display: flex;
|
|
|
|
+ box-sizing: border-box;
|
|
.p-no{
|
|
.p-no{
|
|
- font-size: $font-size-24;
|
|
|
|
- color: $color-system;
|
|
|
|
- margin-right: 5rpx;
|
|
|
|
|
|
+ font-size: $font-size-30;
|
|
|
|
+ color: $text-color;
|
|
|
|
+ display: block;
|
|
|
|
+ float: left;
|
|
}
|
|
}
|
|
.p-stars{
|
|
.p-stars{
|
|
- margin-top: 3rpx;
|
|
|
|
|
|
+ width: 230rpx;
|
|
|
|
+ float: left;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.price{
|
|
.price{
|
|
- color:#FF2A2A;
|
|
|
|
- line-height: 80rpx;
|
|
|
|
|
|
+ color: #FF2A2A;
|
|
|
|
+ line-height: 44rpx;
|
|
|
|
+ &.none{
|
|
|
|
+ text-decoration: line-through;
|
|
|
|
+ color: #999999;
|
|
|
|
+ }
|
|
.sm{
|
|
.sm{
|
|
font-size: $font-size-24;
|
|
font-size: $font-size-24;
|
|
}
|
|
}
|