|
@@ -55,22 +55,22 @@
|
|
|
</view>
|
|
|
<view v-else class="commodity-list-wrapper" :style="{'overflow':'auto','height':(listData.length>4? windowHeight + 'px' : 'auto')}">
|
|
|
<scroll-view :style="{'height':(listData.length>4? scrollHeight+'px' : 'auto')}" @scrolltolower="scrolltolower" scroll-y v-if="!showEmpty">
|
|
|
- <view v-for="(item,index) in listData" :key="index" :id="item.id" class="all-type-list-content commodity-list" @click.stop="navToDetailPage(item.p_id)">
|
|
|
- <image mode='widthFix' :src="item.p_image" class="list-img" alt="list-img"></image>
|
|
|
+ <view v-for="(item,index) in listData" :key="index" :id="item.id" class="all-type-list-content commodity-list" @click.stop="navToDetailPage(item.productId)">
|
|
|
+ <image mode='widthFix' :src="item.image" class="list-img" alt="list-img"></image>
|
|
|
<view class="list-details-info">
|
|
|
<view class="list-details-title">
|
|
|
- <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="item.beautyActFlag == 1">美博会</text>
|
|
|
+ <text class="mclap" :class="item.beautyActFlag == 1 ? 'indent' : ''">{{isInterceptHtmlFn(item.name)}}</text>
|
|
|
</view>
|
|
|
- <text class="list-details-specs">规格:{{item.p_unit}}</text>
|
|
|
- <view class="list-details-specs" v-if="item.p_code!=''&&item.p_code!=null">
|
|
|
- <view>商品编码:{{item.p_code}}</view>
|
|
|
+ <text class="list-details-specs">规格:{{item.unit}}</text>
|
|
|
+ <view class="list-details-specs" v-if="item.code!=''&&item.code!=null">
|
|
|
+ <view>商品编码:{{item.code}}</view>
|
|
|
</view>
|
|
|
<view class="list-details-price">
|
|
|
<template v-if="userIdentity == 3">
|
|
|
<view class="floor-item-act" v-if="item.actStatus==1">
|
|
|
<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
- {{item.promotions.name}}<text v-if="item.p_price_flag != '1' && item.supplierId === shopId">:¥{{ item.price | NumFormat }}</text>
|
|
|
+ {{item.promotions.name}}<text v-if="item.priceFlag != 1 && item.supplierId === shopId">:¥{{ item.price | NumFormat }}</text>
|
|
|
</view>
|
|
|
<view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
|
</view>
|
|
@@ -81,7 +81,7 @@
|
|
|
<template v-else>
|
|
|
<view class="floor-item-act" 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>
|
|
|
+ {{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>
|
|
|
</view>
|
|
@@ -97,12 +97,12 @@
|
|
|
</text>
|
|
|
</template>
|
|
|
<template v-if="userIdentity == 4">
|
|
|
- <view class="price-larger" v-if="item.p_price_flag == '1'">
|
|
|
+ <view class="price-larger" v-if="item.priceFlag == 1">
|
|
|
<text class="txt">¥未公开价格</text>
|
|
|
</view>
|
|
|
<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
|
|
|
<view v-else>
|
|
|
- <view class="price-larger" v-if="item.p_price_flag == '2'">
|
|
|
+ <view class="price-larger" v-if="item.priceFlag == 2">
|
|
|
<text class="txt">¥价格仅会员可见</text>
|
|
|
</view>
|
|
|
<text v-else class="price-larger" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
|
|
@@ -112,7 +112,7 @@
|
|
|
</template>
|
|
|
<template v-if="userIdentity == 3">
|
|
|
<template v-if="item.supplierId == shopId">
|
|
|
- <view class="price-larger" v-if="item.p_price_flag == '1'">
|
|
|
+ <view class="price-larger" v-if="item.priceFlag == 1">
|
|
|
<text class="txt">¥未公开价格</text>
|
|
|
</view>
|
|
|
<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
|
|
@@ -123,12 +123,12 @@
|
|
|
<template v-else>
|
|
|
<view class="list-login-now">
|
|
|
<text class="p-no">¥</text>
|
|
|
- <uni-grader :grade="Number(item.p_price_grade)"></uni-grader>
|
|
|
+ <uni-grader :grade="Number(item.priceGrade)"></uni-grader>
|
|
|
</view>
|
|
|
</template>
|
|
|
</template>
|
|
|
<template v-if="userIdentity == 2">
|
|
|
- <view class="price-larger" v-if="item.p_price_flag == '1'">
|
|
|
+ <view class="price-larger" v-if="item.priceFlag == 1">
|
|
|
<text class="txt">¥未公开价格</text>
|
|
|
</view>
|
|
|
<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
|
|
@@ -139,7 +139,7 @@
|
|
|
</view>
|
|
|
<view v-else class="list-login-now">
|
|
|
<text class="p-no">¥</text>
|
|
|
- <uni-grader :grade="Number(item.p_price_grade)"></uni-grader>
|
|
|
+ <uni-grader :grade="Number(item.priceGrade)"></uni-grader>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -174,7 +174,7 @@
|
|
|
data() {
|
|
|
return {
|
|
|
shopId:0,
|
|
|
- userID:0,
|
|
|
+ userId:0,
|
|
|
tabValue:'产品',
|
|
|
themeClass: 'block',
|
|
|
show:false,
|
|
@@ -223,7 +223,7 @@
|
|
|
}
|
|
|
}
|
|
|
this.$api.getStorage().then((resolve) =>{
|
|
|
- this.userID = resolve.userId ? resolve.userId : 0;
|
|
|
+ this.userId = resolve.userId ? resolve.userId : 0;
|
|
|
this.shopId = resolve.shopId ? resolve.shopId : 0;
|
|
|
this.userIdentity = resolve.userIdentity;
|
|
|
this.listQuery.identity = this.identity;
|
|
@@ -258,7 +258,7 @@
|
|
|
})
|
|
|
},
|
|
|
initGetSerachRecord(){//查询搜索历史记录
|
|
|
- this.ProductService.GetProductSearchHistory({userId:this.userID}).then(response =>{
|
|
|
+ this.ProductService.GetProductSearchHistory({userId:this.userId}).then(response =>{
|
|
|
if(response.code == 0){
|
|
|
this.serachRecordList = response.data
|
|
|
}
|
|
@@ -303,6 +303,7 @@
|
|
|
this.isShowWrapper = true
|
|
|
const resData = JSON.parse(response.data);
|
|
|
const resList = resData.items;
|
|
|
+ console.log(resList)
|
|
|
if(resList && resList.length > 0){
|
|
|
this.total = resData.total;
|
|
|
this.showEmpty = false;
|
|
@@ -334,7 +335,7 @@
|
|
|
},
|
|
|
setSearchHistoryAdd(){//添加搜索记录
|
|
|
if (!this.hasLogin) {return false;}
|
|
|
- this.ProductService.GetAddProductSearchHistory({userId: this.userID,keyword:this.listQuery.keyword}).then(response =>{
|
|
|
+ this.ProductService.GetAddProductSearchHistory({userId: this.userId,keyword:this.listQuery.keyword}).then(response =>{
|
|
|
//此为每次搜索同时添加用户的搜索记录
|
|
|
}).catch(error =>{
|
|
|
this.$util.msg(error.msg,2000);
|
|
@@ -343,10 +344,10 @@
|
|
|
getProductPrice(){//获取价格
|
|
|
let productIdArr = [];
|
|
|
this.listData.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
|
|
|
- productIdArr.push(item.p_id)
|
|
|
+ productIdArr.push(item.productId)
|
|
|
})
|
|
|
this.productIds = productIdArr.join(",");
|
|
|
- this.ProductService.querySearchProductPrice({userId: this.userID,productIds:this.productIds}).then(response =>{
|
|
|
+ this.ProductService.querySearchProductPrice({userId: this.userId,productIds:this.productIds}).then(response =>{
|
|
|
if (response.data) {
|
|
|
this.listData = this.ReturnNewProducts(this.listData,response.data);
|
|
|
}
|
|
@@ -359,7 +360,7 @@
|
|
|
let NewArray = []
|
|
|
Array.map(item=>{
|
|
|
for (let i = 0; i < list.length; i++) {
|
|
|
- if( item.p_id == list[i].productId ){
|
|
|
+ if( item.productId == list[i].productId ){
|
|
|
NewArray.push(Object.assign(item,list[i]))
|
|
|
}
|
|
|
}
|