Selaa lähdekoodia

Merge branches 'developerA' and 'developerB' of git.caimei365.com:caimei-repository/caimei-applets-caimei into developerA

# Conflicts:
#	common/config/config.js
#	services/ajax.env.js
jun.li@caimei365.com 4 vuotta sitten
vanhempi
commit
402c638b06

+ 12 - 12
components/cm-module/listTemplate/commodityList.vue

@@ -2,12 +2,12 @@
 	<view class="container commodity-list-wrapper" :style="{'overflow':(showSkeleton? 'hidden' : 'auto'),'height': (showSkeleton? windowHeight + 'px' : 'auto')}">
 		<list-skeleton v-if="showSkeleton" :listType='0'></list-skeleton>
 		<scroll-view :style="{'height':scrollHeight+'px'}" @scrolltolower="toLower" scroll-y v-if="listData.length > 0">
-			<view v-for="(item,index) in listData" :key="index" :id="item.id" class="all-type-list-content commodity-list" @click.stop="navToDetailPage(item.pid)">
-				<image mode='widthFix' :src="item.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.p_id)">
+				<image mode='widthFix' :src="item.p_image"  class="list-img" alt="list-img"></image>
 				<view class="list-details-info">
-					<text class="list-details-title">{{item.name}}</text>
-					<text class="list-details-specs">规格:{{item.unit}}</text>
-					<view class="list-details-specs" v-if="item.productCode!=''&&item.productCode!=null">商品编码:{{item.productCode}}</view>
+					<text class="list-details-title">{{item.p_name}}</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>
 					<view class="list-details-price">
 						<view v-if="hasLogin" class="list-price">
 							<view v-if="userIdentity == 1">
@@ -15,20 +15,20 @@
 								<text v-else>¥<text class="price-larger">{{item.price?item.price :'0.00'}}</text></text>
 							</view>	
 							<view v-if="userIdentity == 4">
-								<view class="price-larger" v-if="item.priceflag == '1'">
+								<view class="price-larger" v-if="item.p_price_flag == '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.priceflag == '2'">
+									<view class="price-larger" v-if="item.p_price_flag == '2'">
 										<text class="txt">价格仅会员可见</text>
 										<text class="btn" @click.stop="this.$api.navigateTo(`/pages/login/apply?clubStatus=${clubStatus}`)">去升级</text>
 									</view>
-									<text v-else>¥<text class="price-larger">{{item.price ?item.price :'0.00'}}</text></text>
+									<text v-else>¥<text class="price-larger">{{item.price ? item.price :'0.00'}}</text></text>
 								</view>
 							</view>
 							<view v-if="userIdentity == 2">
-								<view class="price-larger" v-if="item.priceflag == '1'">
+								<view class="price-larger" v-if="item.p_price_flag == '1'">
 									<text class="txt">未公开价格</text>
 								</view>
 								<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
@@ -37,7 +37,7 @@
 						</view>	
 						<view  v-else class="list-login-now">
 							<text class="p-no">价格:</text>
-							<uni-stars :stars="parseInt(item.pricegrade)" :font-size='36' :width-info="180"></uni-stars>
+							<uni-stars :stars="parseInt(item.p_price_grade)" :font-size='36' :width-info="180"></uni-stars>
 						</view>
 					</view>
 				</view>
@@ -188,7 +188,7 @@
 				if (!this.userID) {return false;}
 				let productIdArr = [];
 				this.listData.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
-					productIdArr.push(item.pid)
+					productIdArr.push(item.p_id)
 				})
 				this.productIds = productIdArr.join(",");
 				querySearchProductPrice({userId: this.userID,productIds:this.productIds}).then(response =>{
@@ -205,7 +205,7 @@
 										price:Number(priceList[i].price).toFixed(2),
 										minBuyNumber:priceList[i].minBuyNumber
 									}
-								if( item.pid == priceList[i].productId ){
+								if( item.p_id == priceList[i].productId ){
 									Object.assign(item,priceObj)
 								}
 							}

+ 9 - 9
components/cm-module/listTemplate/immediatelyList.vue

@@ -31,20 +31,20 @@
 		<view class="product-container" v-else >
 			<view :class="tabIndex" v-if="tabIndex === 0"  :style="{paddingTop:searchStatus?'128rpx':''}">
 				<scroll-view :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower(tabIndex)" scroll-y v-if="listData.length > 0">
-					<view v-for="(item,index) in listData" :key="index" :id="item.id" class="all-type-list-content commodity-list" @click.stop="navToDetailPage(item.pid)"  >
-					    <image mode='widthFix' :src="item.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.p_id)"  >
+					    <image mode='widthFix' :src="item.p_image"  class="list-img" alt="list-img"></image>
 						<view class="list-details-info">
-							<text class="list-details-title">{{isInterceptHtmlFn(item.name)}}</text>
-							<text class="list-details-specs">规格:{{item.unit?item.unit:''}}</text>
+							<text class="list-details-title">{{isInterceptHtmlFn(item.p_name)}}</text>
+							<text class="list-details-specs">规格:{{item.p_unit?item.p_unit:''}}</text>
 							<text class="list-details-miniQuantity list-details-specs">起订量:{{item.minBuyNumber}}</text>
-							<view class="list-details-specs" v-if="item.productCode!=''&&item.productCode!=null">
-								<view>商品编码:{{item.productCode}}</view>
+							<view class="list-details-specs" v-if="item.p_code!=''&&item.p_code!=null">
+								<view>商品编码:{{item.p_code}}</view>
 							</view>
 							<view class="list-details-price">
 								<view v-if="priceLoading" class="list-price-loding">正在获取价格...</view>
 								<view v-else class="list-shop">
 									<view class="list-price">
-										<text class="price-larger">¥{{item.price}}</text>
+										<text class="price-larger">¥{{item.price ? item.price :'0.00'}}</text>
 										<text class="price-view activity" v-if="item.isShowActFlg">活</text>
 										<text class="price-view ladder" v-if="item.ladderPriceFlag == '1'" @click.stop="alertjieti(item)">阶</text>
 									</view>
@@ -271,7 +271,7 @@
 			setProductPrice(){//获取价格
 				let productIdArr = [];
 				this.listData.map(item=>{
-					productIdArr.push(item.pid) 
+					productIdArr.push(item.p_id) 
 				})
 				this.productIds = productIdArr.join(",");
 				querySearchProductPrice({userId: this.clubUserId,productIds:this.productIds}).then(response =>{
@@ -297,7 +297,7 @@
 										minBuyNumber:priceList[i].minBuyNumber,
 										isShowActFlg:isActFlg
 								}
-								if( item.pid == priceList[i].productId ){
+								if( item.p_id == priceList[i].productId ){
 									Object.assign(item,priceObj)
 								}
 							}

+ 12 - 3
components/cm-module/listTemplate/secondHand.vue

@@ -170,7 +170,7 @@
 		},
 		methods:{
 			scrolltolower() {
-				if(this.totalPage>this.listData.length && this.pullFlag) {
+				if(this.hasNextPage && this.pullFlag) {
 					this.getProductAgainInfo(true);
 				}
 			},
@@ -227,7 +227,10 @@
 			},
 			searchOpertor(){//搜索商品
 				if(this.searchKeyword == ''){
-					this.$util.msg('请输入商品关键词',2000)
+					// this.$util.msg('请输入商品关键词',2000)
+					this.secondHandType = 1
+					this.instrumentType=''
+					this.getProductAgainInfo();
 				}else{
 					this.pageNum = 1
 					this.showSkeleton = true;
@@ -258,6 +261,9 @@
 				this.loadingNow = false;
 				this.isShowEmpty = true;
 				this.isShowEmptyText ='暂无相关商品'
+				this.secondHandType = 1;
+				this.instrumentType='';
+				this.getProductAgainInfo();
 			},
 			isInterceptHtmlFn(text){
 				let name = this.$reg.interceptHtmlFn(text)
@@ -281,7 +287,10 @@
 				this.screenTab = index
 				this.isTabIndexSelect = false
 				this.tabIndexSelectText = item
-				this.instrumentType = index+1
+				this.instrumentType = index
+				if(index==0){
+					this.instrumentType=''
+				}
 				this.getProductAgainInfo();
 			},
 			toFixedFn(text){//处理小数点后两位数

+ 1 - 3
components/cm-module/productDetails/recommend.vue

@@ -51,14 +51,12 @@
 			}
 		},
 		created() {
-				
 			this.productID = this.queryProductid
 			this.infoRecommend(this.queryProductid)
 		},
 		methods:{
 			infoRecommend(id){
-				
-				this.SellerService.ProductRecommend({productId:5232}).then(response =>{
+				this.SellerService.ProductRecommend({productId:id}).then(response =>{
 					console.log(response)
 					if( response.data && response.data.length > 0){
 						this.isEmpty = false

+ 4 - 4
components/cm-module/productDetails/second-attributes.vue

@@ -5,11 +5,11 @@
 			<view class="info-viewT" :class="goodsData.isNoneDisabled ? 'none' : ''">
 				<view class="info-viewL tui-skeleton-fillet">品牌:<text>{{product.brandName}}</text></view>
 				<view class="info-viewL tui-skeleton-fillet">分类:<text>{{product.typeStr}}</text></view>
-				<view class="info-viewL tui-skeleton-fillet">出厂日期:<text>{{product.fixedYears}}</text></view>
 				<view class="info-viewL tui-skeleton-fillet">商品成色:<text>{{product.productQuality}}</text></view>
-				<view class="info-viewL tui-skeleton-fillet">联系人:<text>{{product.contactName}}</text></view>
-				<view class="info-viewL tui-skeleton-fillet">联系方式:<text>{{product.contactMobile}}</text></view>
-				<view class="info-viewL tui-skeleton-fillet">商品类型:<text v-if="product.productType==1">医美</text><text v-else>非医美</text></view>
+				<view class="info-viewL tui-skeleton-fillet" v-if="product.fixedYears!=''">出厂日期:<text>{{product.fixedYears}}</text></view>
+				<view class="info-viewL tui-skeleton-fillet" v-if="product.showContactFlag==2">联系人:<text>{{product.contactName}}</text></view>
+				<view class="info-viewL tui-skeleton-fillet" v-if="product.showContactFlag==2">联系方式:<text>{{product.contactMobile}}</text></view>
+				<view class="info-viewL tui-skeleton-fillet" v-if="product.productType!=null||product.productType!=''">商品类型:<text v-if="product.productType==1">医美</text><text v-else>非医美</text></view>
 			</view>
 			<view class="info-viewT" :class="goodsData.isNoneDisabled ? 'none' : ''" v-if="product.secondHandType==2">
 				<view class="info-viewL tui-skeleton-fillet">市场价:<text>{{product.normalPriceStr}}</text></view>	

+ 3 - 2
components/cm-module/productDetails/secondDeatail.vue

@@ -52,7 +52,7 @@
 		.Disclaimer ._p{
 		font-size: 24rpx;
 		color: #666666;
-		padding: 10rpx 15rpx
+		padding: 10rpx 15rpx;
 		}
 		.imgList{
 			width: 702rpx; 
@@ -66,8 +66,9 @@
 			
 		}
 		.detailsText{
-			padding: 0 0rpx 20rpx 22rpx;
+			padding: 0 30rpx 30rpx 30rpx;
 			color: #333333;
 			font-size: 24rpx;
+			text-align: left;
 		}
 </style>

+ 12 - 13
pages/search/search.vue

@@ -21,13 +21,13 @@
 		<!-- <go-search :theme="themeClass" @subMitSearch="subMitSearch"></go-search> -->
 		<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.pid)">
-					<image mode='widthFix' :src="item.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.p_id)">
+					<image mode='widthFix' :src="item.p_image"  class="list-img" alt="list-img"></image>
 					<view class="list-details-info">
-						<view class="list-details-title">{{isInterceptHtmlFn(item.name)}}</view>
-						<text class="list-details-specs">规格:{{item.unit}}</text>
-						<view class="list-details-specs" v-if="item.productcode!=''&&item.productCode!=null">
-							<view>商品编码:{{item.productCode}}</view>
+						<view class="list-details-title">{{isInterceptHtmlFn(item.p_name)}}</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>
 						</view>
 						<view class="list-details-price">
 							<view v-if="hasLogin"class="list-price">
@@ -36,12 +36,12 @@
 									<text v-else>¥<text class="price-larger">{{item.price?item.price :'0.00'}}</text></text>
 								</view>	
 								<view v-if="userIdentity == 4">
-									<view class="price-larger" v-if="item.priceflag == '1'">
+									<view class="price-larger" v-if="item.p_price_flag == '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.priceflag == '2'">
+										<view class="price-larger" v-if="item.p_price_flag == '2'">
 											<text class="txt">价格仅会员可见</text>
 											<text class="btn" @click.stop="this.$api.navigateTo(`/pages/login/apply?clubStatus=${clubStatus}`)">去升级</text>
 										</view>
@@ -49,7 +49,7 @@
 									</view>
 								</view>
 								<view v-if="userIdentity == 2">
-									<view class="price-larger" v-if="item.priceflag == '1'">
+									<view class="price-larger" v-if="item.p_price_flag == '1'">
 										<text class="txt">未公开价格</text>
 									</view>
 									<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
@@ -58,7 +58,7 @@
 							</view>	
 							<view  v-else class="list-login-now">
 								<text class="p-no">价格:</text>
-								<uni-stars :stars="parseInt(item.pricegrade)" :font-size='36' :width-info="180"></uni-stars>
+								<uni-stars :stars="parseInt(item.p_price_grade)" :font-size='36' :width-info="180"></uni-stars>
 							</view>
 						</view>
 					</view>
@@ -202,7 +202,6 @@
 						setTimeout(()=>{ this.pullFlag = true; },500)
 						// 底部提示文案
 						if(this.totalPage>this.listData.length) {
-							console.log('1111111111')
 							this.loadingText = '上拉加载更多';
 						} else {
 							this.showLoading = true;
@@ -229,7 +228,7 @@
 				if (!this.hasLogin) {return false;}
 				let productIdArr = [];
 				this.listData.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
-					productIdArr.push(item.pid)
+					productIdArr.push(item.p_id)
 				})
 				this.productIds = productIdArr.join(",");
 				querySearchProductPrice({userId: this.userID,productIds:this.productIds}).then(response =>{
@@ -246,7 +245,7 @@
 										price:Number(priceList[i].price).toFixed(2),
 										minBuyNumber:priceList[i].minBuyNumber
 								}
-								if( item.pid == priceList[i].productId ){
+								if( item.p_id == priceList[i].productId ){
 									Object.assign(item,priceObj)
 								}
 							}

+ 4 - 4
seller/pages/cart/immediately.vue

@@ -17,10 +17,10 @@
 			<view class="layer" @tap.stop="discard" :style="{paddingBottom :isIphoneX ? '68rpx' : '36rpx',bottom:isIphoneX ?'-370rpx' : '-360rpx'}">
 				<view class="content">
 					<view class="layer-smimg">
-						<image :src="handleData.image" mode=""></image>
+						<image :src="handleData.p_image" mode=""></image>
 					</view>
 					<view class="layer-nunbox">
-						<view class="layer-nunbox-m" v-if="handleData.productcode!=''&& handleData.productcode!=null">商品编码:{{handleData.productcode}}</view>
+						<view class="layer-nunbox-m" v-if="handleData.p_code!=''&& handleData.p_code!=null">商品编码:{{handleData.p_code}}</view>
 						<view class="layer-nunbox-t">
 							<view class="layer-nunbox-text">数量:</view>
 							<view class="number-box">
@@ -160,7 +160,7 @@
 					this.buyRetailPriceStep = data.step
 					this.specClass = 'show';
 					if(this.handleData.ladderPriceFlag == '1'){
-						querySearchProductLadderPrice({productId:this.handleData.pid}).then(response=>{
+						querySearchProductLadderPrice({productId:this.handleData.p_id}).then(response=>{
 							this.handleDataLadderPriceList = response.data
 							this.handleDataLadderPriceList.forEach((item,index)=>{
 								if(this.number>=item.buyNum){
@@ -278,7 +278,7 @@
 			},
 			getAddProductCart(){//增加购物车成功和toast弹窗提示成功
 				let params ={
-						productId:this.handleData.pid,
+						productId:this.handleData.p_id,
 						clubId:this.clubID,
 						serviceProviderId:this.serviceProviderId,
 						num:this.number

+ 42 - 28
seller/pages/cart/second.vue

@@ -86,10 +86,10 @@
 			hanldOperationConfim(data){//显示选择数量确认弹窗
 				console.log(this.handleData)
 				this.handleData = data
-				this.number = 1
-				this.buyRetailPrice = Number(data.price1);
-				this.secondProductType = data.secondProductType
-				this.specClass = 'show';
+					this.number = 1
+					this.buyRetailPrice = Number(data.price1);
+					this.secondProductType = data.secondProductType
+					this.specClass = 'show';
 			},
 			hideSpec() {//关闭选择数量确认弹窗
 				this.specClass = 'hide';
@@ -98,50 +98,64 @@
 				}, 200);
 			},
 			changeCountAdd(){//popup弹窗数量增加按钮
-				if(this.handleData.secondProductType == 2){
-					if(this.number >= this.handleData.stock){
-						this.number= this.handleData.stock
-						this.isStock =true
-						this.$util.msg(`购买数量最高为${this.handleData.stock}`,2000);
-						return
-					}else{
+				if(this.handleData.secondHandType == 2||this.handleData.secondHandType == 3){
+					// if(this.number >= this.handleData.stock){
+					// 	this.number= this.handleData.stock
+					// 	this.isStock =true
+					// 	this.$util.msg(`购买数量最高为${this.handleData.stock}`,2000);
+					// 	return
+					// }else{
 						this.number++
 						this.isQuantity =false
-					}
+					// }
+					this.buyRetailPrice = this.number*this.handleData.price1
 				}else{
 					this.isStock =true
 					this.$util.msg(`该商品购买数量只能为1`,2000);
 				}
 			},
 			changeCountSub(){//popup弹窗数量减按钮
-				if(this.handleData.secondProductType == 2){
-					if(this.number < 1){
-						this.number= 1
-						this.isQuantity =true
-						this.$util.msg(`购买数量最低为1`,2000);
-						return
-					}else{
+				if(this.handleData.secondHandType == 2||this.handleData.secondHandType == 3){
+					// if(this.number <= 1){
+					// 	this.number= 1
+					// 	this.isQuantity =true
+					// 	this.$util.msg(`购买数量最低为1`,2000);
+					// 	return
+					// }else{
 						this.number--
 						this.isQuantity =false
-					}
+					// }
+					this.buyRetailPrice = this.number*this.handleData.price1
 				}else{
 					this.isQuantity =true
 					this.$util.msg(`该商品购买数量只能为1`,2000);
 				}
 			 },
+			// changeNumber(e){
+			// 	let _value = e.detail.value;
+			// 	if(!this.$api.isNumber(_value)){
+			// 		this.number = this.minBuyNumber
+			// 	}else if(_value < this.minBuyNumber){
+			// 		this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`,2000);
+			// 		this.number = this.minBuyNumber
+			// 	}else if( _value % this.minBuyNumber !=0 ){
+			// 		this.$util.msg(`购买量必须为起订量的整数倍`,2000);
+			// 		this.number = this.minBuyNumber
+			// 	}else{
+			// 		this.number = e.detail.value
+			// 	}
+			// },
 			changeNumber(e){
 				let _value = e.detail.value;
 				if(!this.$api.isNumber(_value)){
-					this.number = this.minBuyNumber
-				}else if(_value < this.minBuyNumber){
-					this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`,2000);
-					this.number = this.minBuyNumber
-				}else if( _value % this.minBuyNumber !=0 ){
-					this.$util.msg(`购买量必须为起订量的整数倍`,2000);
-					this.number = this.minBuyNumber
+					this.number = 1
+				}else if(_value <= 1){
+					this.$util.msg(`该商品最小起订量为1`,2000);
+					this.number = 1
 				}else{
 					this.number = e.detail.value
 				}
+				this.buyRetailPrice = this.number*this.handleData.price1
 			},
 			clearProduct(){//成功加入购物车后清空所选值
 				this.handleData.productKind= 0;
@@ -155,7 +169,7 @@
 				this.specClass = 'hide';
 				let cartPramsData={
 						clubId:this.clubID,
-						allPrice:this.number*this.buyRetailPrice,
+						allPrice:this.buyRetailPrice,
 						allCount:this.number,
 						productID:this.handleData.productID,
 						productCount:this.number

+ 8 - 1
seller/pages/club/club-list.vue

@@ -312,10 +312,17 @@
 					flex-direction: row;
 					justify-content: flex-start;
 					.list-name{
+						width: 400rpx;
 						display: block;
 						float: left;
-						width: 50%;
 						text-align: left;
+						-o-text-overflow: ellipsis;
+						text-overflow: ellipsis;
+						display: -webkit-box;
+						word-break: break-all;
+						-webkit-box-orient: vertical;
+						-webkit-line-clamp: 1;
+						overflow: hidden;
 					}
 					.list-hist{
 						display: block;

+ 170 - 56
seller/pages/search/search.vue

@@ -3,57 +3,78 @@
 		<view class="search-main">
 			<view class="search-input">
 				<text class="iconfont icon-iconfonticonfontsousuo1"></text>
-				<input maxlength="20" focus type="text" value="" confirm-type="search" @focus="onFocus" @input="onShowClose" @confirm="subMitSearch()" placeholder="请输入商品关键词" v-model.trim="searchInputVal"/>
-				<text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
+				<input maxlength="20" :focus="isFocus" type="text" value="" confirm-type="search" @focus="onFocus" @input="onShowClose" @confirm="subMitSearch()" placeholder="请输入商品关键词" v-model.trim="searchInputVal"/>
+				<text class="iconfont icon-shanchu1" v-if="isShowClose" @click.stop="delInputText()"></text>
 			</view>
 			<view class="search-btn" @click="subMitSearch()">搜索</view>
 		</view>
 		<view class="search-container-history" v-if="!isShowWrapper">
 			<view :class="'s-' + themeClass" v-if="serachRecordList.length>0">
 				<view class="header">
-					搜索历史
-					<text class="iconfont icon-shanchu" @click="confirmDetele"></text>
+					搜索历史<text class="iconfont icon-shanchu" @click="confirmDetele"></text>
 				</view>
 				<view class="list">
 					<view v-for="(item,index) in serachRecordList" :key="index" @click="keywordsClick(item.searchWord)">{{item.searchWord}}</view>
 				</view>
 			</view>
 		</view>
-		<view v-else class="commodity-list-wrapper"  :style="{'overflow':'auto','height':(commodityList.length>4? windowHeight + 'px' : 'auto')}">
-			<scroll-view :style="{'height':(commodityList.length>4? scrollHeight+'px' : 'auto')}" @scrolltolower="scrolltolower" scroll-y v-if="!showEmpty">
-				<view v-for="(item,index) in commodityList" :key="index" :id="item.id" class="all-type-list-content commodity-list" @click.stop="navToDetailPage(item.productID)">
-					<image mode='widthFix' :src="item.mainImage"  class="list-img" alt="list-img"></image>
+		<!-- <go-search :theme="themeClass" @subMitSearch="subMitSearch"></go-search> -->
+		<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 class="list-details-info">
-						<text class="list-details-title">{{item.name}}</text>
-						<text class="list-details-specs">规格:{{item.unit}}</text>
-						<text class="list-details-miniQuantity" v-if="fromRegularPurchasePage">起订量:{{item.minBuyNumber}}</text>
+						<view class="list-details-title">{{isInterceptHtmlFn(item.p_name)}}</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>
+						</view>
 						<view class="list-details-price">
-							<view v-if="!hasLogin" class="list-login-now">
-								<text class="p-no">价格:</text>
-								<uni-stars :stars="parseInt(item.price1Grade)" :font-size='36' :width-info="180"></uni-stars>
-							</view>
-							<view class="list-price" v-else>
-								<view class="price-larger" v-if="item.price1TextFlag == '1'">
-									<text class="txt">未公开价格</text>
+							<view v-if="hasLogin"class="list-price">
+								<view v-if="userIdentity == 1">
+									<text v-if="priceLoading" class="price-larger small">正在获取价格...</text>
+									<text v-else>¥<text class="price-larger">{{item.price?item.price :'0.00'}}</text></text>
+								</view>	
+								<view v-if="userIdentity == 4">
+									<view class="price-larger" v-if="item.p_price_flag == '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'">
+											<text class="txt">价格仅会员可见</text>
+											<text class="btn" @click.stop="this.$api.navigateTo(`/pages/login/apply?clubStatus=${clubStatus}`)">去升级</text>
+										</view>
+										<text v-else>¥<text class="price-larger">{{item.price ?item.price :'0.00'}}</text></text>
+									</view>
+								</view>
+								<view v-if="userIdentity == 2">
+									<view class="price-larger" v-if="item.p_price_flag == '1'">
+										<text class="txt">未公开价格</text>
+									</view>
+									<text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
+									<text v-else>¥<text class="price-larger">{{item.price ? item.price :'0.00'}}</text></text>
 								</view>
-								<text v-else>¥<text class="price-larger">{{item.retailPrice.toFixed(2)}}</text></text>
+							</view>	
+							<view  v-else class="list-login-now">
+								<text class="p-no">价格:</text>
+								<uni-stars :stars="parseInt(item.p_price_grade)" :font-size='36' :width-info="180"></uni-stars>
 							</view>
 						</view>
 					</view>
 				</view>
-				<view v-if="showLoading && commodityList.length > 4">
+				<view v-if="showLoading && listData.length > 4">
 					<view class="loading-wrapper loading-wrapper-now" v-if="loadingNow">{{loadingText}}<text v-if="loadingText === '已至底部'">‧ ‧ ‧</text></view>
 					<view class="loading-wrapper loading-wrapper-btm" v-else>———<text class="btm-text">已至底部</text>———</view>
 				</view>
 			</scroll-view>
 			<view class="empty-container" v-if="showEmpty">
-				<image class="empty-container-image" src="https://img.caimei365.com/group1/M00/03/94/Cmis216Sk_SAMs28AAELHadZ9Xg226.png"></image>
+				<image class="empty-container-image" src="https://img.caimei365.com/group1/M00/03/8D/Cmis215XHXWAHCoqAAELHadZ9Xg365.png"></image>
 				<text class="error-text">抱歉,没有相关商品!</text>
 			</view>
 		</view>
 		<!-- 透明模态层 -->
 		<modal-layer v-if='isModallayer'></modal-layer>
-	
 	</view>
 </template>
 
@@ -63,7 +84,13 @@
 	import modalLayer from "@/components/modal-layer"
 	import uniStars from '@/components/uni-stars/uni-stars.vue'
 	import authorize from '@/common/config/authorize.js'
-	import { querySearchProduct , querySearchHistory,clearSearchHistory } from "@/api/product.js" 
+	import { 
+		queryNewSearchProduct , 
+		querySearchHistory,
+		clearSearchHistory,
+		searchHistoryAdd,
+		querySearchProductPrice
+	} from "@/api/product.js" 
 	
 	export default {
 		components: {
@@ -75,20 +102,25 @@
 			return {
 				userID:'',
 				themeClass: 'block',
-				searchInputVal:'',							//搜索关键词
-				isShowClose:false,							//是否显示清空输入框图标
-				isSearchHistory:false,						//是都显示搜索历史
-				serachRecordList:[],						//历史搜索记录
+				searchInputVal:'',	//搜索关键词
+				userIdentity:'',	
+				identity:2,
+				isShowClose:false,	//是否显示清空输入框图标
+				isSearchHistory:false,//是都显示搜索历史
+				serachRecordList:[],//历史搜索记录
 				isShowWrapper:false,
 				isModallayer:false,
+				isFocus:false,
+				priceLoading:true,
 				windowHeight: '',
 				showEmpty: false,
 				scrollHeight: '',
-				commodityList: [],
+				listData: [],
+				productIds:'',//查询价格的商品ID
 				showLoading: false,
 				loadingNow: true,
 				loadingText: '上拉加载更多',
-				pageSize: 10,
+				pageSize: 20,
 				pageNum: 1,
 				hasNextPage: false,
 				totalPage: 1,
@@ -96,6 +128,7 @@
 			}
 		},
 		onLoad() {
+			this.isFocus = true
 			this.initGetSerachRecord()			
 		},
 		computed: {
@@ -105,6 +138,12 @@
 			initGetSerachRecord(){
 				this.$api.getStorage().then((resolve) =>{
 					this.userID = resolve.userID ? resolve.userID : '';
+					this.userIdentity = resolve.userIdentity ? resolve.userIdentity : '';
+					if(this.userIdentity == 1){
+						this.identity = 1
+					}else{
+						this.identity = 2
+					}
 				    querySearchHistory({userId:this.userID}).then(response =>{
 						if(response.code == 0){
 							this.serachRecordList = response.data
@@ -116,12 +155,14 @@
 				if (this.searchInputVal == '') {
 					this.$util.msg('请输入商品关键词',2000);
 				}else{
-					this.commodityList =[]
-					this.getListFromServer(false)
+					this.listData =[]
+					this.setSearchHistoryAdd()
+					this.getListFromServer()
+					this.isFocus = false
 				}
 			},
 			scrolltolower() {
-				if(this.hasNextPage && this.pullFlag) {
+				if(this.totalPage>this.listData.length && this.pullFlag) {
 					this.getListFromServer(true);
 				}
 			},
@@ -133,27 +174,34 @@
 				if(loadMore) {
 					this.pageNum += 1;
 				}
-				let params = {userId:this.userID,searchWord:this.searchInputVal,pageNum:this.pageNum,pageSize:this.pageSize}
-				querySearchProduct(params).then(response =>{
+				let params = {
+						identity:this.identity,
+						keyword:this.searchInputVal,
+						pageNum:this.pageNum,
+						pageSize:this.pageSize,
+						sortField:'',
+						sortType:'',
+					}
+				queryNewSearchProduct(params).then(response =>{
 					this.isShowWrapper = true
-					const resData = response.data;
-					const resList = resData.results;
+					const resData = JSON.parse(response.data);
+					const resList = resData.items;
+					// console.log(resData)
 					if(resList && resList.length > 0){
-						this.hasNextPage = resData.hasNextPage;
-						this.totalPage = resData.totalPage;
+						this.totalPage = resData.total;
 						this.showEmpty = false;
 						if(loadMore) {
-							this.commodityList = [...this.commodityList,...resList];
+							this.listData = [...this.listData,...resList];
+							this.setProductPrice()
 						} else {
-							this.commodityList = [...resList];
+							this.listData = [...resList];
+							this.setProductPrice()
 						}
 						// 防上拉暴滑
 						this.pullFlag = false;
-						setTimeout(()=>{
-							this.pullFlag = true;
-						},500)
+						setTimeout(()=>{ this.pullFlag = true; },500)
 						// 底部提示文案
-						if(this.hasNextPage) {
+						if(this.totalPage>this.listData.length) {
 							this.loadingText = '上拉加载更多';
 						} else {
 							this.showLoading = true;
@@ -164,11 +212,51 @@
 							this.showEmpty = true;
 						}
 					}
-				}).catch(response =>{
-					this.$util.msg(response.msg,2000);
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000);
+				})
+			},
+			setSearchHistoryAdd(){//添加搜索记录
+				if (!this.hasLogin) {return false;}
+				searchHistoryAdd({userId: this.userID,keyword:this.searchInputVal}).then(response =>{
+					//此为每次搜索同时添加用户的搜索记录
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000);
 				})
 			},
-			onShowClose () {//输入框失去焦点时触发
+			setProductPrice(){//获取价格
+				if (!this.hasLogin) {return false;}
+				let productIdArr = [];
+				this.listData.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
+					productIdArr.push(item.p_id)
+				})
+				this.productIds = productIdArr.join(",");
+				querySearchProductPrice({userId: this.userID,productIds:this.productIds}).then(response =>{
+					if (response.data) {
+						let priceList = response.data
+						this.listData.map(item=>{
+							for (let i = 0; i < priceList.length; i++) {
+								let priceObj ={
+										actStatus:priceList[i].actStatus,
+										costCheckFlag:priceList[i].costCheckFlag,
+										costPrice:priceList[i].costPrice,
+										costProportional:priceList[i].costProportional,
+										ladderPriceFlag:priceList[i].ladderPriceFlag,
+										price:Number(priceList[i].price).toFixed(2),
+										minBuyNumber:priceList[i].minBuyNumber
+								}
+								if( item.p_id == priceList[i].productId ){
+									Object.assign(item,priceObj)
+								}
+							}
+						});
+					}
+					this.priceLoading = false;
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			onShowClose () {//输入框输入时触发
 				this.inputEmpty(this.searchInputVal)
 			},
 			onFocus () { //输入框获取焦点时触发
@@ -192,8 +280,8 @@
 					clearSearchHistory({userId:this.userID}).then(response =>{
 						this.$util.msg('删除成功',2000,true,'success')
 						this.serachRecordList=[];
-					}).catch(response =>{
-						this.$util.msg(response.msg,2000)
+					}).catch(error =>{
+						this.$util.msg(error.msg,2000)
 					})
 				})
 			},
@@ -201,10 +289,16 @@
 				this.isShowWrapper = false
 				if(val != ''){
 					this.isShowClose = true
+					this.isFocus = true
 				}else{					
 					this.isShowClose = false
+					this.isFocus = true
 				}
 			},
+			isInterceptHtmlFn(text){
+				let name = this.$reg.interceptHtmlFn(text)
+				return name
+			},
 			navToDetailPage(id) {
 				this.isModallayer = true;
 				this.$api.navigateTo(`/pages/goods/product?id=${id}`);
@@ -253,6 +347,8 @@
 			background: #F0F0F0;
 			float: left;
 			.icon-iconfonticonfontsousuo1{
+				display: block;
+				width: 68rpx;
 				font-size: 36rpx;
 				color: #8A8A8A;
 				position: absolute;
@@ -260,13 +356,15 @@
 				z-index: 10;
 			}
 			.icon-shanchu1{
+				display: block;
+				width: 68rpx;
 				font-size: 36rpx;
-				color: #8A8A8A;
+				text-align: center;
+				color: #999;
 				position: absolute;
-				right: 24rpx;
+				right: 0;
 				top: 0;
-				padding: 0 10rpx;
-				z-index: 10;
+				z-index: 60;
 			}
 			input{
 				width: 448rpx;
@@ -473,7 +571,7 @@
 		}
 		.list-details-specs {
 			margin-top: 8rpx;
-			color: #999999;
+			color: #666666;
 		}
 		.list-details-miniQuantity {
 			margin-top: 7rpx;
@@ -481,7 +579,6 @@
 	}
 	.list-details-price {
 		width: 100%;
-		display: flex;
 		flex-direction: row;
 		justify-content: space-between;
 		position: absolute;
@@ -515,12 +612,29 @@
 		.list-price {
 			color: #FF2A2A;
 			.price-larger {
+				width: 100%;
 				font-size: 32rpx;
+				&.small{
+					font-size: $font-size-24;
+				}
 				.txt{
 					font-size: $font-size-24;
 					display: inline-block;
-					line-height: 30rpx;
+					line-height: 44rpx;
 					text-align: left;
+					float: left;
+				}
+				.btn{
+					width: 112rpx;
+					height: 44rpx;
+					display: inline-block;
+					float: right;
+					background: $btn-confirm;
+					line-height: 44rpx;
+					text-align: center;
+					color: #FFFFFF;
+					font-size: $font-size-24;
+					border-radius: 22rpx;
 				}
 			}
 		}