|
@@ -31,14 +31,14 @@
|
|
|
<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.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">
|
|
|
- <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-title">{{isInterceptHtmlFn(item.name)}}</text>
|
|
|
+ <text class="list-details-specs">规格:{{item.unit ? item.unit : ''}}</text>
|
|
|
<text class="list-details-miniQuantity list-details-specs">起订量:{{item.minBuyNumber}}</text>
|
|
|
- <view class="list-details-specs" v-if="item.p_code!=''&&item.p_code!=null">
|
|
|
- <view>商品编码:{{item.p_code}}</view>
|
|
|
+ <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="priceLoading">
|
|
@@ -79,19 +79,19 @@
|
|
|
<scroll-view :style="{'height':scrollHeight+'px',paddingTop:searchStatus?'112rpx':''}" @scrolltolower="scrolltolower(tabIndex)" scroll-y>
|
|
|
<view class="all-zuhe-list" v-for="(item,index) in combinationProduct" :key="index" :id="item.id">
|
|
|
<view class="zuhe_title" :class="index%2==0 ? 'active' : ''">{{item.name}}</view>
|
|
|
- <view v-for="(pros,proIndex) in item.combinationProductList" :class="index%2==0 ? 'stylecontent' : ''" :key="proIndex" :id="pros.productID" class="zuhe-list-content commodity-list" >
|
|
|
+ <view v-for="(pros,proIndex) in item.combinationProductList" :class="index%2==0 ? 'stylecontent' : ''" :key="proIndex" :id="pros.productId" class="zuhe-list-content commodity-list" >
|
|
|
<view class="list-details-info" >
|
|
|
- <text class="list-details-title zuhe_list_text">商品编码:{{pros.productCode}}</text>
|
|
|
- <text class="list-details-specs zuhe_list_text" @click.stop="navToDetailPage(pros.productID)">{{pros.name}}</text>
|
|
|
+ <text class="list-details-title zuhe_list_text">商品编码:{{pros.code}}</text>
|
|
|
+ <text class="list-details-specs zuhe_list_text" @click.stop="navToDetailPage(pros.productId)">{{pros.name}}</text>
|
|
|
<view class="list-details-price zuhe_list_price">
|
|
|
<view class="list-shop com">
|
|
|
<view class="list-price zuhe_list_price" >
|
|
|
<view class="zuhe_price-larger zuhe_list_text" >
|
|
|
- <view class="list-price-none" v-if="pros.repurchasePriceState">
|
|
|
- <text class="price-none">价格:¥{{pros.discountPrice}}</text>
|
|
|
+ <view class="list-price-none" v-if="pros.repurchaseFlag">
|
|
|
+ <text class="price-none">价格:¥{{ pros.originalPrice }}</text>
|
|
|
<text class="iconfont icon-wenhao" @click.stop="repurchModel"></text>
|
|
|
</view>
|
|
|
- <view class="price-larger">价格:¥{{ pros.retailPrice | NumFormat }}</view>
|
|
|
+ <view class="price-larger">价格:¥{{ pros.price | NumFormat }}</view>
|
|
|
</view>
|
|
|
<view class="zuhe_price-larger zuhe_list_text" >
|
|
|
<view class="floor-item-act" v-if="pros.actStatus==1">
|
|
@@ -257,8 +257,17 @@
|
|
|
this.loadingText = '加载中';
|
|
|
this.isShowEmpty = false;
|
|
|
if(loadMore) {this.pageNum += 1;}
|
|
|
- let params = {identity:this.identity,keyword:this.searchInputVal,pageNum:this.pageNum,pageSize:this.pageSize,sortField:'',sortType:''}
|
|
|
- this.ProductService.GetProductSearchList(params).then(response =>{
|
|
|
+ this.ProductService.GetProductSearchList(
|
|
|
+ {
|
|
|
+ identity:this.identity,
|
|
|
+ keyword:this.searchInputVal,
|
|
|
+ pageNum:this.pageNum,
|
|
|
+ pageSize:this.pageSize,
|
|
|
+ sortField:'',
|
|
|
+ sortType:'',
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(response =>{
|
|
|
this.isShowWrapper = true
|
|
|
const resData = JSON.parse(response.data);
|
|
|
const resList = resData.items;
|
|
@@ -289,7 +298,8 @@
|
|
|
this.isShowEmptyText ='暂无相关商品'
|
|
|
}
|
|
|
}
|
|
|
- }).catch(error =>{
|
|
|
+ })
|
|
|
+ .catch(error =>{
|
|
|
this.$util.msg(error.msg,2000);
|
|
|
})
|
|
|
},
|
|
@@ -297,7 +307,7 @@
|
|
|
let productIdArr = [];
|
|
|
let productIds ='';
|
|
|
this.listData.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
|
|
|
- productIdArr.push(item.p_id)
|
|
|
+ productIdArr.push(item.productId)
|
|
|
})
|
|
|
productIds = productIdArr.join(",");
|
|
|
this.ProductService.querySearchProductPrice({userId: this.clubUserId,productIds:productIds}).then(response =>{
|
|
@@ -311,7 +321,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]))
|
|
|
}
|
|
|
}
|
|
@@ -341,10 +351,18 @@
|
|
|
this.loadingText = '加载中';
|
|
|
this.isShowEmpty = false;
|
|
|
if(loadMore) {this.pageNum += 1;}
|
|
|
- let params = {clubUserId:this.clubUserId,pageNum:this.pageNum,pageSize:this.zuhepageSize,searchWord:this.searchInputVal}
|
|
|
- this.SellerService.GetCombinationProduct(params).then(response =>{
|
|
|
+ this.ProductService.GetSearchCombinationProduct(
|
|
|
+ {
|
|
|
+ clubUserId:this.clubUserId,
|
|
|
+ pageNum:this.pageNum,
|
|
|
+ pageSize:this.zuhepageSize,
|
|
|
+ searchWord:this.searchInputVal,
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(response =>{
|
|
|
this.isShowWrapper = true
|
|
|
const responseData = response.data;
|
|
|
+ console.log(responseData)
|
|
|
if(responseData.results && responseData.results.length > 0){
|
|
|
this.hasNextPage = responseData.hasNextPage;
|
|
|
this.isShowEmpty = false;
|
|
@@ -371,7 +389,8 @@
|
|
|
this.isShowEmpty = true;
|
|
|
this.isShowEmptyText ='暂无相关商品'
|
|
|
}
|
|
|
- }).catch(error =>{
|
|
|
+ })
|
|
|
+ .catch(error =>{
|
|
|
this.$util.msg(error.msg,2000);
|
|
|
})
|
|
|
},
|
|
@@ -451,7 +470,7 @@
|
|
|
})
|
|
|
},
|
|
|
processActivityPrice(pros){//单独处理活动价格和阶梯价格
|
|
|
- let ladderPriceList = pros.ladderPriceList;
|
|
|
+ let ladderPriceList = pros.ladderPrices;
|
|
|
if(pros.ladderPriceFlag == '0' || pros.actStatus == 1){
|
|
|
pros.totalPrice = pros.initProductNum*pros.retailPrice
|
|
|
}else{
|