|
@@ -41,20 +41,20 @@
|
|
</view>
|
|
</view>
|
|
<template v-else>
|
|
<template v-else>
|
|
<view class="container-list" :style="{'height':scrollHeight+'px',paddingTop:(CustomBar+44)+'px'}">
|
|
<view class="container-list" :style="{'height':scrollHeight+'px',paddingTop:(CustomBar+44)+'px'}">
|
|
- <view v-for="(item,index) in listData" :key="index" :id="item.p_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.productId" 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-info">
|
|
<text class="list-details-title">
|
|
<text 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' : ''">{{ item.p_name }}</text>
|
|
|
|
|
|
+ <text class="mclap-tag" v-if="item.beautyActFlag == 1">美博会</text>
|
|
|
|
+ <text class="mclap" :class="item.beautyActFlag == 1 ? 'indent' : ''">{{ item.name }}</text>
|
|
</text>
|
|
</text>
|
|
- <text class="list-details-specs">规格:{{item.p_unit}}</text>
|
|
|
|
- <view class="list-details-specs" v-if="item.p_code!=''&&item.p_code!=null">商品编码:{{item.p_code}}</view>
|
|
|
|
|
|
+ <text class="list-details-specs">规格:{{item.unit}}</text>
|
|
|
|
+ <view class="list-details-specs" v-if="item.code!=''&&item.code!=null">商品编码:{{item.code}}</view>
|
|
<view class="list-details-price">
|
|
<view class="list-details-price">
|
|
<template v-if="userIdentity == 3">
|
|
<template v-if="userIdentity == 3">
|
|
<view class="floor-item-act" v-if="item.actStatus==1">
|
|
<view class="floor-item-act" v-if="item.actStatus==1">
|
|
<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
<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>
|
|
<view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
<view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
</view>
|
|
</view>
|
|
@@ -65,7 +65,7 @@
|
|
<template v-else>
|
|
<template v-else>
|
|
<view class="floor-item-act" v-if="item.actStatus==1">
|
|
<view class="floor-item-act" v-if="item.actStatus==1">
|
|
<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
<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>
|
|
<view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
<view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
</view>
|
|
</view>
|
|
@@ -83,10 +83,10 @@
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
<template v-if="userIdentity == 4">
|
|
<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>
|
|
<text class="txt">¥未公开价格</text>
|
|
</view>
|
|
</view>
|
|
- <view class="price-larger" v-if="item.p_price_flag == '2'">
|
|
|
|
|
|
+ <view class="price-larger" v-if="item.priceFlag == 1">
|
|
<text class="txt">¥价格仅会员可见</text>
|
|
<text class="txt">¥价格仅会员可见</text>
|
|
</view>
|
|
</view>
|
|
<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
|
|
<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
|
|
@@ -98,7 +98,7 @@
|
|
</template>
|
|
</template>
|
|
<template v-if="userIdentity == 3">
|
|
<template v-if="userIdentity == 3">
|
|
<template v-if="item.supplierId === shopId">
|
|
<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>
|
|
<text class="txt">¥未公开价格</text>
|
|
</view>
|
|
</view>
|
|
<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
|
|
<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
|
|
@@ -109,12 +109,12 @@
|
|
<template v-else>
|
|
<template v-else>
|
|
<view class="list-login-now">
|
|
<view class="list-login-now">
|
|
<text class="p-no">¥</text>
|
|
<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>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
<template v-if="userIdentity == 2">
|
|
<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>
|
|
<text class="txt">¥未公开价格</text>
|
|
</view>
|
|
</view>
|
|
<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
|
|
<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
|
|
@@ -127,7 +127,7 @@
|
|
</view>
|
|
</view>
|
|
<view v-else class="list-login-now">
|
|
<view v-else class="list-login-now">
|
|
<text class="p-no">¥</text>
|
|
<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>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -144,11 +144,11 @@
|
|
<view class="drawer-container clearfix" :style="{paddingTop:CustomBar+'px'}">
|
|
<view class="drawer-container clearfix" :style="{paddingTop:CustomBar+'px'}">
|
|
<view class="drawer-title">{{ classData.name }}</view>
|
|
<view class="drawer-title">{{ classData.name }}</view>
|
|
<view class="drawer-main">
|
|
<view class="drawer-main">
|
|
- <template v-if="classData.smalltypeList">
|
|
|
|
- <view class="drawer-item-cell" v-for="(item,index) in classData.smalltypeList" :key="index">
|
|
|
|
|
|
+ <template v-if="classData.smallTypeList">
|
|
|
|
+ <view class="drawer-item-cell" v-for="(item,index) in classData.smallTypeList" :key="index">
|
|
<view class="drawer-item-title">{{ item.name }}</view>
|
|
<view class="drawer-item-title">{{ item.name }}</view>
|
|
- <view class="drawer-item-main" v-if="item.tinytypeList">
|
|
|
|
- <text class="drawer-item-text" :class="tiny.isChecked ? 'checked' : ''" v-for="(tiny,tinyIndex) in item.tinytypeList" :key="tinyIndex" @click="SearchCondition(3,item,tiny)">{{ tiny.name }}</text>
|
|
|
|
|
|
+ <view class="drawer-item-main" v-if="item.tinyTypeList">
|
|
|
|
+ <text class="drawer-item-text" :class="tiny.isChecked ? 'checked' : ''" v-for="(tiny,tinyIndex) in item.tinyTypeList" :key="tinyIndex" @click="SearchCondition(3,item,tiny)">{{ tiny.name }}</text>
|
|
</view>
|
|
</view>
|
|
<view class="drawer-item-main" v-else>
|
|
<view class="drawer-item-main" v-else>
|
|
<text class="drawer-item-text" :class="item.isChecked ? 'checked' : ''" @click="SearchCondition(2,item)">全部商品</text>
|
|
<text class="drawer-item-text" :class="item.isChecked ? 'checked' : ''" @click="SearchCondition(2,item)">全部商品</text>
|
|
@@ -182,9 +182,9 @@
|
|
import modalLayer from "@/components/modal-layer"
|
|
import modalLayer from "@/components/modal-layer"
|
|
import authorize from '@/common/config/authorize.js'
|
|
import authorize from '@/common/config/authorize.js'
|
|
import wxLogin from "@/common/config/wxLogin.js"
|
|
import wxLogin from "@/common/config/wxLogin.js"
|
|
-
|
|
|
|
const defaultListQuery = {
|
|
const defaultListQuery = {
|
|
id:0,
|
|
id:0,
|
|
|
|
+ identity:0,
|
|
pageNum:1,
|
|
pageNum:1,
|
|
pageSize:10,
|
|
pageSize:10,
|
|
sortField:'',
|
|
sortField:'',
|
|
@@ -200,7 +200,7 @@
|
|
},
|
|
},
|
|
data(){
|
|
data(){
|
|
return{
|
|
return{
|
|
- shopID:0,
|
|
|
|
|
|
+ shopId:0,
|
|
tabIndex:0,
|
|
tabIndex:0,
|
|
isModallayer:false,
|
|
isModallayer:false,
|
|
isSearchSalesFirst:true,
|
|
isSearchSalesFirst:true,
|
|
@@ -217,7 +217,7 @@
|
|
isRequest:false,
|
|
isRequest:false,
|
|
showSkeleton: true,
|
|
showSkeleton: true,
|
|
showEmpty: false,
|
|
showEmpty: false,
|
|
- userID: 0,
|
|
|
|
|
|
+ userId: 0,
|
|
userIdentity:'',
|
|
userIdentity:'',
|
|
listData: [],
|
|
listData: [],
|
|
windowHeight: '',
|
|
windowHeight: '',
|
|
@@ -260,11 +260,12 @@
|
|
methods:{
|
|
methods:{
|
|
InitOption(option) {
|
|
InitOption(option) {
|
|
this.listQuery.id = option.id;
|
|
this.listQuery.id = option.id;
|
|
|
|
+ this.listQuery.identity = this.identity;
|
|
this.listQuery.idType = this.classifyType = Number(option.classType);
|
|
this.listQuery.idType = this.classifyType = Number(option.classType);
|
|
uni.setNavigationBarTitle({title:option.title});
|
|
uni.setNavigationBarTitle({title:option.title});
|
|
this.$api.getComStorage('userInfo').then((resolve) =>{
|
|
this.$api.getComStorage('userInfo').then((resolve) =>{
|
|
- this.userID = resolve.userId ? resolve.userId : 0
|
|
|
|
- this.shopID = resolve.shopId ? resolve.shopId : 0
|
|
|
|
|
|
+ this.userId = resolve.userId ? resolve.userId : 0
|
|
|
|
+ this.shopId = resolve.shopId ? resolve.shopId : 0
|
|
this.userIdentity = resolve.userIdentity
|
|
this.userIdentity = resolve.userIdentity
|
|
this.isRequest = true
|
|
this.isRequest = true
|
|
this.GetProductListInfo()
|
|
this.GetProductListInfo()
|
|
@@ -276,10 +277,17 @@
|
|
console.log(this.classifyID)
|
|
console.log(this.classifyID)
|
|
},
|
|
},
|
|
GetProductOneClassly(){//根据分类ID 查询二三级分类
|
|
GetProductOneClassly(){//根据分类ID 查询二三级分类
|
|
- this.CommonService.GetProductOneClassly({typeId:this.listQuery.id,idType:this.classifyType,source :'crm'}).then(response =>{
|
|
|
|
- console.log(response.data)
|
|
|
|
|
|
+ this.CommonService.GetProductOneClassly(
|
|
|
|
+ {
|
|
|
|
+ typeId:this.listQuery.id,
|
|
|
|
+ idType:this.classifyType,
|
|
|
|
+ source :'crm',
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ .then(response =>{
|
|
this.classData = response.data
|
|
this.classData = response.data
|
|
- }).catch(error =>{
|
|
|
|
|
|
+ })
|
|
|
|
+ .catch(error =>{
|
|
this.$util.msg(error.msg,2000)
|
|
this.$util.msg(error.msg,2000)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -312,6 +320,7 @@
|
|
this.nomoreText = '已至底部'
|
|
this.nomoreText = '已至底部'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ console.log(this.listData)
|
|
} else {
|
|
} else {
|
|
this.showEmpty = true;
|
|
this.showEmpty = true;
|
|
}
|
|
}
|
|
@@ -346,11 +355,11 @@
|
|
GetProductPrice(){//获取价格
|
|
GetProductPrice(){//获取价格
|
|
let productIdArr = [];
|
|
let productIdArr = [];
|
|
this.listData.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
|
|
this.listData.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
|
|
- productIdArr.push(item.p_id)
|
|
|
|
|
|
+ productIdArr.push(item.productId)
|
|
})
|
|
})
|
|
this.priceLoading = true;
|
|
this.priceLoading = true;
|
|
this.productIds = productIdArr.join(",");
|
|
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) {
|
|
if(response.data) {
|
|
this.listData = this.ReturnNewProducts(this.listData,response.data);
|
|
this.listData = this.ReturnNewProducts(this.listData,response.data);
|
|
}
|
|
}
|
|
@@ -363,7 +372,7 @@
|
|
let NewArray = []
|
|
let NewArray = []
|
|
Array.map(item=>{
|
|
Array.map(item=>{
|
|
for (let i = 0; i < list.length; i++) {
|
|
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]))
|
|
NewArray.push(Object.assign(item,list[i]))
|
|
}
|
|
}
|
|
}
|
|
}
|