|
@@ -3,24 +3,24 @@
|
|
|
<list-skeleton v-if="showSkeleton" :listType='0'></list-skeleton>
|
|
|
<view class="product-container" v-if="!isShowEmpty">
|
|
|
<scroll-view :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower" scroll-y v-if="productList.length > 0">
|
|
|
- <view v-for="(item,index) in productList" :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>
|
|
|
+ <view v-for="(item,index) in productList" :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">
|
|
|
<text class="list-details-title">{{item.name}}</text>
|
|
|
<text class="list-details-specs">规格:{{item.unit !=null ? item.unit : ''}}</text>
|
|
|
<text class="list-details-miniQuantity">起订量:{{ item.ladderPriceFlag == '1' ? item.maxBuyNumber : item.minBuyNumber}}</text>
|
|
|
- <view class="list-details-price" v-if="item.price1TextFlag == 1">
|
|
|
+ <view class="list-details-price" v-if="item.priceFlag == 1">
|
|
|
<view class="list-none"><view class="price-small">未公开价格</view></view>
|
|
|
</view>
|
|
|
<view class="list-details-price" v-else>
|
|
|
<view class="list-shop">
|
|
|
- <view class="list-price-none" v-if="item.repurchasePriceState">
|
|
|
- <text class="price-none">¥{{item.discountPrice}}</text>
|
|
|
+ <view class="list-price-none" v-if="item.repurchaseFlag == 1">
|
|
|
+ <text class="price-none">¥{{item.originalPrice}}</text>
|
|
|
<text class="iconfont icon-wenhao" @click.stop="repurchModel"></text>
|
|
|
</view>
|
|
|
<view class="list-price" v-else>
|
|
|
<text class="price-larger" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
|
|
|
- ¥{{ (PromotionsFormat(item.promotions) ? item.price1 : item.retailPrice) | NumFormat }}
|
|
|
+ ¥{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price) | NumFormat }}
|
|
|
</text>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -29,7 +29,7 @@
|
|
|
<view class="list-details-price" v-if="item.actStatus==1">
|
|
|
<view class="floor-item-act">
|
|
|
<view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
- {{item.promotions.name}}<text v-if="item.price1TextFlag != 1">:¥{{ item.retailPrice | NumFormat }}</text>
|
|
|
+ {{item.promotions.name}}<text v-if="item.priceFlag != 1">:¥{{ item.price | NumFormat }}</text>
|
|
|
</view>
|
|
|
<view class="floor-tags" v-else>{{item.promotions.name}}</view>
|
|
|
</view>
|
|
@@ -90,7 +90,7 @@
|
|
|
windowHeight: '',
|
|
|
showSkeleton: true,
|
|
|
isShowEmpty: false,
|
|
|
- userID: '',
|
|
|
+ userId: '',
|
|
|
scrollHeight: '',
|
|
|
productList: [],
|
|
|
showLoading: false,
|
|
@@ -109,7 +109,7 @@
|
|
|
created() {
|
|
|
this.setScrollHeight();
|
|
|
this.$api.getStorage().then((resolve) =>{
|
|
|
- this.userID = resolve.userId ? resolve.userId : 0
|
|
|
+ this.userId = resolve.userId ? resolve.userId : 0
|
|
|
this.getProductAgainInfo()
|
|
|
})
|
|
|
},
|
|
@@ -138,18 +138,26 @@
|
|
|
this.loadingText = '加载中';
|
|
|
this.isShowEmpty = false;
|
|
|
if(loadMore) {this.pageNum += 1;}
|
|
|
- let params = {userId:this.userID,identity:this.identity,pageNum:this.pageNum,pageSize:this.pageSize}
|
|
|
- this.ProductService.GetRepeatBuyAgainProductList(params).then(response =>{
|
|
|
+ this.ProductService.GetRepeatBuyAgainProductList(
|
|
|
+ {
|
|
|
+ userId:13863,
|
|
|
+ // userId:this.userId,
|
|
|
+ identity:this.identity,
|
|
|
+ pageNum:this.pageNum,
|
|
|
+ pageSize:this.pageSize,
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(response =>{
|
|
|
this.isShowWrapper = true
|
|
|
this.cartQuantity = response.data.cartQuantity
|
|
|
- const responseData = response.data.pageDate;
|
|
|
- if(responseData.results && responseData.results.length > 0){
|
|
|
- this.hasNextPage = responseData.hasNextPage;
|
|
|
+ const listData = response.data.results;
|
|
|
+ if(listData && listData.length > 0){
|
|
|
+ this.hasNextPage = response.data.hasNextPage;
|
|
|
this.isShowEmpty = false;
|
|
|
if(loadMore) {
|
|
|
- this.productList = [...this.productList,...responseData.results];
|
|
|
+ this.productList = [...this.productList,...listData];
|
|
|
} else {
|
|
|
- this.productList = [...responseData.results];
|
|
|
+ this.productList = listData;
|
|
|
this.showSkeleton = false;
|
|
|
}
|
|
|
//价格显示处理
|