|
@@ -37,92 +37,92 @@
|
|
|
<image class="none-image" :src="iconNoneData" mode=""></image>
|
|
|
<view class="none-text">暂无主推商品~</view>
|
|
|
</view>
|
|
|
- <view v-else class="floor-item" v-for="(item, index) in recommendList" :key="index" @click.stop="navToDetailPage(item.id)">
|
|
|
- <image class="item-img tui-skeleton-fillet" :src="item.image" mode="aspectFill"></image>
|
|
|
+ <view v-else class="floor-item" v-for="(prop, index) in recommendList" :key="index" @click.stop="navToDetailPage(prop.productId)">
|
|
|
+ <image class="item-img tui-skeleton-fillet" :src="prop.image" mode="aspectFill"></image>
|
|
|
<view class="floor-item-content">
|
|
|
<view class="title tui-skeleton-rect">
|
|
|
- <text class="mclap-tag" v-if="item.beautyActFlag == '1'">美博会</text>
|
|
|
- <text class="mclap" :class="item.beautyActFlag =='1' ? 'indent' : ''">{{isInterceptHtmlFn(item.name)}}</text>
|
|
|
+ <text class="mclap-tag" v-if="prop.beautyActFlag == '1'">美博会</text>
|
|
|
+ <text class="mclap" :class="prop.beautyActFlag =='1' ? 'indent' : ''">{{ prop.name }}</text>
|
|
|
</view>
|
|
|
<view class="floor-item-act">
|
|
|
<template v-if="userIdentity === 3">
|
|
|
- <template v-if="item.actStatus===1">
|
|
|
- <view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
- {{item.promotions.name}}
|
|
|
- <text v-if="hasLogin && item.p_price_flag != 1 && item.supplierId == shopId">:¥{{item.price | NumFormat}}</text>
|
|
|
+ <template v-if="prop.actStatus===1">
|
|
|
+ <view class="floor-tags" v-if="PromotionsFormat(prop.promotions)">
|
|
|
+ {{prop.promotions.name}}
|
|
|
+ <text v-if="hasLogin && prop.priceFlag != 1 && prop.shopId == shopId">:¥{{prop.price | NumFormat}}</text>
|
|
|
</view>
|
|
|
- <view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
|
+ <view class="floor-tags" v-else>{{prop.promotions.name}}</view>
|
|
|
</template>
|
|
|
- <template v-if="item.actStatus ===0 && item.ladderPriceFlag===1">
|
|
|
+ <template v-if="prop.actStatus ===0 && prop.ladderPriceFlag===1">
|
|
|
<view class="floor-tags">阶梯价格</view>
|
|
|
</template>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <template v-if="item.actStatus===1">
|
|
|
- <view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
- {{item.promotions.name}}
|
|
|
- <text v-if="hasLogin && item.p_price_flag != 1">:¥{{item.price | NumFormat}}</text>
|
|
|
+ <template v-if="prop.actStatus===1">
|
|
|
+ <view class="floor-tags" v-if="PromotionsFormat(prop.promotions)">
|
|
|
+ {{prop.promotions.name}}
|
|
|
+ <text v-if="hasLogin && prop.priceFlag != 1">:¥{{prop.price | NumFormat}}</text>
|
|
|
</view>
|
|
|
- <view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
|
+ <view class="floor-tags" v-else>{{prop.promotions.name}}</view>
|
|
|
</template>
|
|
|
- <template v-if="item.actStatus ===0 && item.ladderPriceFlag===1">
|
|
|
+ <template v-if="prop.actStatus ===0 && prop.ladderPriceFlag===1">
|
|
|
<view class="floor-tags">阶梯价格</view>
|
|
|
</template>
|
|
|
</template>
|
|
|
</view>
|
|
|
<view class="" v-if="hasLogin">
|
|
|
<template v-if="userIdentity == 3">
|
|
|
- <template v-if="item.supplierId == shopId">
|
|
|
- <view class="title-none" v-if="item.p_price_flag === '1'">
|
|
|
+ <template v-if="prop.shopId == shopId">
|
|
|
+ <view class="title-none" v-if="prop.priceFlag === 1">
|
|
|
<text class="p big">¥未公开价格</text>
|
|
|
</view>
|
|
|
- <view class="price tui-skeleton-rect" v-else :class="PromotionsFormat(item.promotions) ? 'none' : ''">
|
|
|
+ <view class="price tui-skeleton-rect" v-else :class="PromotionsFormat(prop.promotions) ? 'none' : ''">
|
|
|
<text class="p sm">¥</text>
|
|
|
- <text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
|
|
|
+ <text class="p big">{{ (PromotionsFormat(prop.promotions) ? prop.originalPrice : prop.price ) | NumFormat}}</text>
|
|
|
</view>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<view class="no-price">
|
|
|
<view class="p-stars">
|
|
|
<text class="p-no">¥</text>
|
|
|
- <uni-grader :grade="Number(item.priceGrade)" :margin="14"></uni-grader>
|
|
|
+ <uni-grader :grade="Number(prop.priceGrade)" :margin="14"></uni-grader>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
</template>
|
|
|
<template v-else-if="userIdentity ===4">
|
|
|
- <view class="title-none" v-if="item.p_price_flag === '1'">
|
|
|
+ <view class="title-none" v-if="prop.priceFlag === 1">
|
|
|
<text class="p big">¥未公开价格</text>
|
|
|
</view>
|
|
|
- <view class="title-none" v-if="item.p_price_flag === '2'">
|
|
|
+ <view class="title-none" v-if="prop.priceFlag === 2">
|
|
|
<text class="p big">¥价格仅会员可见</text>
|
|
|
</view>
|
|
|
- <view class="price tui-skeleton-rect" v-if="item.p_price_flag === '0'" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
|
|
|
+ <view class="price tui-skeleton-rect" v-if="prop.priceFlag === 0" :class="PromotionsFormat(prop.promotions) ? 'none' : ''">
|
|
|
<text class="p sm">¥</text>
|
|
|
- <text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
|
|
|
+ <text class="p big">{{ (PromotionsFormat(prop.promotions) ? prop.originalPrice : prop.price ) | NumFormat}}</text>
|
|
|
</view>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <view class="title-none" v-if="item.p_price_flag === '1'">
|
|
|
+ <view class="title-none" v-if="prop.priceFlag === 1">
|
|
|
<text class="p big">¥未公开价格</text>
|
|
|
</view>
|
|
|
- <view class="price tui-skeleton-rect" v-else :class="PromotionsFormat(item.promotions) ? 'none' : ''">
|
|
|
+ <view class="price tui-skeleton-rect" v-else :class="PromotionsFormat(prop.promotions) ? 'none' : ''">
|
|
|
<text class="p sm">¥</text>
|
|
|
- <text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
|
|
|
+ <text class="p big">{{ (PromotionsFormat(prop.promotions) ? prop.originalPrice : prop.price ) | NumFormat}}</text>
|
|
|
</view>
|
|
|
</template>
|
|
|
</view>
|
|
|
<view v-else class="no-price">
|
|
|
<view class="p-stars">
|
|
|
<text class="p-no">¥</text>
|
|
|
- <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.p_price_flag != '1'">:¥{{item.price | NumFormat}}</text>
|
|
|
+ <uni-grader :grade="Number(prop.priceGrade)"></uni-grader>
|
|
|
+ <template v-if="prop.actStatus==1">
|
|
|
+ <view class="floor-tags" v-if="PromotionsFormat(prop.promotions)">
|
|
|
+ {{prop.promotions.name}}<text v-if="hasLogin && prop.priceFlag != 1">:¥{{prop.price | NumFormat}}</text>
|
|
|
</view>
|
|
|
- <view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
|
+ <view class="floor-tags" v-else>{{prop.promotions.name}}</view>
|
|
|
</template>
|
|
|
- <template v-if="item.actStatus ==0 && item.ladderPriceFlag==1">
|
|
|
+ <template v-if="prop.actStatus ==0 && prop.ladderPriceFlag==1">
|
|
|
<view class="floor-tags">阶梯价格</view>
|
|
|
</template>
|
|
|
</view>
|
|
@@ -138,85 +138,85 @@
|
|
|
<image class="none-image" :src="iconNoneData1" mode=""></image>
|
|
|
<view class="none-text">暂未发布任何商品~</view>
|
|
|
</view>
|
|
|
- <view v-else class="floor-item" v-for="(item, index) in productList" :key="index" @click.stop="navToDetailPage(item.p_id)">
|
|
|
- <image class="item-img tui-skeleton-fillet" :src="item.p_image" mode="aspectFill"></image>
|
|
|
+ <view v-else class="floor-item" v-for="(prop, index) in productList" :key="index" @click.stop="navToDetailPage(prop.productId)">
|
|
|
+ <image class="item-img tui-skeleton-fillet" :src="prop.image" mode="aspectFill"></image>
|
|
|
<view class="floor-item-content">
|
|
|
<view class="title tui-skeleton-rect">
|
|
|
- <text class="mclap-tag" v-if="item.p_act_flag == '1'">美博会</text>
|
|
|
- <text class="mclap" :class="item.p_act_flag =='1' ? 'indent' : ''">{{isInterceptHtmlFn(item.p_name)}}</text>
|
|
|
+ <text class="mclap-tag" v-if="prop.priceFlag == '1'">美博会</text>
|
|
|
+ <text class="mclap" :class="prop.priceFlag =='1' ? 'indent' : ''">{{isInterceptHtmlFn(prop.name)}}</text>
|
|
|
</view>
|
|
|
<view class="floor-item-act">
|
|
|
<template v-if="userIdentity === 3">
|
|
|
- <template v-if="item.actStatus===1">
|
|
|
- <view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
- {{item.promotions.name}}
|
|
|
- <text v-if="hasLogin && item.p_price_flag != 1 && item.supplierId == shopId">:¥{{item.price | NumFormat}}</text>
|
|
|
+ <template v-if="prop.actStatus===1">
|
|
|
+ <view class="floor-tags" v-if="PromotionsFormat(prop.promotions)">
|
|
|
+ {{prop.promotions.name}}
|
|
|
+ <text v-if="hasLogin && prop.priceFlag != 1 && prop.shopId == shopId">:¥{{prop.price | NumFormat}}</text>
|
|
|
</view>
|
|
|
- <view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
|
+ <view class="floor-tags" v-else>{{prop.promotions.name}}</view>
|
|
|
</template>
|
|
|
- <template v-if="item.actStatus ===0 && item.ladderPriceFlag===1">
|
|
|
+ <template v-if="prop.actStatus ===0 && prop.ladderPriceFlag===1">
|
|
|
<view class="floor-tags">阶梯价格</view>
|
|
|
</template>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <template v-if="item.actStatus===1">
|
|
|
- <view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
- {{item.promotions.name}}
|
|
|
- <text v-if="hasLogin && item.p_price_flag != 1">:¥{{item.price | NumFormat}}</text>
|
|
|
+ <template v-if="prop.actStatus===1">
|
|
|
+ <view class="floor-tags" v-if="PromotionsFormat(prop.promotions)">
|
|
|
+ {{prop.promotions.name}}
|
|
|
+ <text v-if="hasLogin && prop.priceFlag != 1">:¥{{prop.price | NumFormat}}</text>
|
|
|
</view>
|
|
|
- <view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
|
+ <view class="floor-tags" v-else>{{prop.promotions.name}}</view>
|
|
|
</template>
|
|
|
- <template v-if="item.actStatus ===0 && item.ladderPriceFlag===1">
|
|
|
+ <template v-if="prop.actStatus ===0 && prop.ladderPriceFlag===1">
|
|
|
<view class="floor-tags">阶梯价格</view>
|
|
|
</template>
|
|
|
</template>
|
|
|
</view>
|
|
|
<view class="" v-if="hasLogin">
|
|
|
<template v-if="userIdentity == 3">
|
|
|
- <template v-if="item.supplierId == shopId">
|
|
|
- <view class="title-none" v-if="item.p_price_flag === '1'">
|
|
|
+ <template v-if="prop.shopId == shopId">
|
|
|
+ <view class="title-none" v-if="prop.priceFlag === 1">
|
|
|
<text class="p big">¥未公开价格</text>
|
|
|
</view>
|
|
|
- <view class="price tui-skeleton-rect" v-else :class="PromotionsFormat(item.promotions) ? 'none' : ''">
|
|
|
+ <view class="price tui-skeleton-rect" v-else :class="PromotionsFormat(prop.promotions) ? 'none' : ''">
|
|
|
<text class="p sm">¥</text>
|
|
|
- <text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
|
|
|
+ <text class="p big">{{ (PromotionsFormat(prop.promotions) ? prop.originalPrice : prop.price ) | NumFormat}}</text>
|
|
|
</view>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<view class="no-price">
|
|
|
<view class="p-stars">
|
|
|
<text class="p-no">¥</text>
|
|
|
- <uni-grader :grade="Number(item.priceGrade)" :margin="14"></uni-grader>
|
|
|
+ <uni-grader :grade="Number(prop.priceGrade)" :margin="14"></uni-grader>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
</template>
|
|
|
<template v-else-if="userIdentity ===4">
|
|
|
- <view class="title-none" v-if="item.p_price_flag === '1'">
|
|
|
+ <view class="title-none" v-if="prop.priceFlag === 1">
|
|
|
<text class="p big">¥未公开价格</text>
|
|
|
</view>
|
|
|
- <view class="title-none" v-if="item.p_price_flag === '2'">
|
|
|
+ <view class="title-none" v-if="prop.priceFlag === 2">
|
|
|
<text class="p big">¥价格仅会员可见</text>
|
|
|
</view>
|
|
|
- <view class="price tui-skeleton-rect" v-if="item.p_price_flag === '0'" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
|
|
|
+ <view class="price tui-skeleton-rect" v-if="prop.priceFlag === 0" :class="PromotionsFormat(prop.promotions) ? 'none' : ''">
|
|
|
<text class="p sm">¥</text>
|
|
|
- <text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
|
|
|
+ <text class="p big">{{ (PromotionsFormat(prop.promotions) ? prop.originalPrice : prop.price ) | NumFormat}}</text>
|
|
|
</view>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <view class="title-none" v-if="item.p_price_flag === '1'">
|
|
|
+ <view class="title-none" v-if="prop.priceFlag === 1">
|
|
|
<text class="p big">¥未公开价格</text>
|
|
|
</view>
|
|
|
- <view class="price tui-skeleton-rect" v-else :class="PromotionsFormat(item.promotions) ? 'none' : ''">
|
|
|
+ <view class="price tui-skeleton-rect" v-else :class="PromotionsFormat(prop.promotions) ? 'none' : ''">
|
|
|
<text class="p sm">¥</text>
|
|
|
- <text class="p big">{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price ) | NumFormat}}</text>
|
|
|
+ <text class="p big">{{ (PromotionsFormat(prop.promotions) ? prop.originalPrice : prop.price ) | NumFormat}}</text>
|
|
|
</view>
|
|
|
</template>
|
|
|
</view>
|
|
|
<view v-else class="no-price">
|
|
|
<view class="p-stars">
|
|
|
<text class="p-no">¥</text>
|
|
|
- <uni-grader :grade="Number(item.p_price_grade)"></uni-grader>
|
|
|
+ <uni-grader :grade="Number(prop.p_price_grade)"></uni-grader>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -272,7 +272,9 @@
|
|
|
total:0
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+ computed: {
|
|
|
+ ...mapState(['hasLogin','userInfo','isActivity','identity','isWxAuthorize'])
|
|
|
+ },
|
|
|
onLoad(option) {
|
|
|
if(option.type =='share'){
|
|
|
authorize.getSetting().then(res =>{
|
|
@@ -284,12 +286,6 @@
|
|
|
this.$api.navigateTo('/pages/authorization/authorization')
|
|
|
}
|
|
|
})
|
|
|
- // if(uni.getStorageSync('_WX_State')){
|
|
|
- // wxLogin.wxLoginAuthorize()
|
|
|
- // }else{
|
|
|
- // console.log(new Date +'用户未授权微信信息')
|
|
|
- // this.$api.navigateTo('/pages/authorization/authorization')
|
|
|
- // }
|
|
|
}
|
|
|
this.listQuery.id = this.supplierId = option.shopId
|
|
|
this.$api.getStorage().then((resolve) =>{
|
|
@@ -306,9 +302,6 @@
|
|
|
return Number(text).toFixed(2);
|
|
|
},
|
|
|
},
|
|
|
- computed: {
|
|
|
- ...mapState(['hasLogin','userInfo','isActivity','isWxAuthorize'])
|
|
|
- },
|
|
|
methods: {
|
|
|
...mapMutations(['login','logout']),
|
|
|
InitShopDataInfo(){//初始化请求数据
|
|
@@ -336,7 +329,7 @@
|
|
|
})
|
|
|
},
|
|
|
GetSupplierHomeProduct(){//主推商品
|
|
|
- this.ShopService.GetSupplierHomeProduct({supplierId:this.supplierId}).then(response =>{
|
|
|
+ this.ShopService.GetSupplierHomeProduct({shopId:this.supplierId,identity:this.identity}).then(response =>{
|
|
|
let data = response.data
|
|
|
console.log('主推商品',data)
|
|
|
if(data.length>0){
|
|
@@ -381,7 +374,7 @@
|
|
|
let productIdArr = [];
|
|
|
let productIds ='';
|
|
|
data.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
|
|
|
- productIdArr.push(item.id)
|
|
|
+ productIdArr.push(item.productId)
|
|
|
})
|
|
|
productIds = productIdArr.join(",");
|
|
|
this.ProductService.querySearchProductPrice({userId: this.userID,productIds:productIds}).then(response =>{
|
|
@@ -394,11 +387,11 @@
|
|
|
let productIdArr = [];
|
|
|
let productIds ='';
|
|
|
data.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
|
|
|
- productIdArr.push(item.p_id)
|
|
|
+ productIdArr.push(item.productId)
|
|
|
})
|
|
|
productIds = productIdArr.join(",");
|
|
|
this.ProductService.querySearchProductPrice({userId: this.userID,productIds:productIds}).then(response =>{
|
|
|
- this.productList = this.ReturnNewProducts1(data,response.data);
|
|
|
+ this.productList = this.ReturnNewProducts(data,response.data);
|
|
|
console.log('合并价格后',this.productList)
|
|
|
}).catch(error =>{
|
|
|
this.$util.msg(error.msg,2000)
|
|
@@ -408,18 +401,7 @@
|
|
|
let NewArray = []
|
|
|
listA.map(item=>{
|
|
|
for (let i = 0; i < listB.length; i++) {
|
|
|
- if( item.id == listB[i].productId ){
|
|
|
- NewArray.push(Object.assign(item,listB[i]))
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- return NewArray
|
|
|
- },
|
|
|
- ReturnNewProducts1(listA,listB){
|
|
|
- let NewArray = []
|
|
|
- listA.map(item=>{
|
|
|
- for (let i = 0; i < listB.length; i++) {
|
|
|
- if( item.p_id == listB[i].productId ){
|
|
|
+ if( item.productId == listB[i].productId ){
|
|
|
NewArray.push(Object.assign(item,listB[i]))
|
|
|
}
|
|
|
}
|