|
@@ -2,7 +2,7 @@
|
|
|
<view class="container product clearfix">
|
|
|
<view class="superv-header" v-if="!isEmpty">
|
|
|
<view class="superv-header-click">
|
|
|
- <view class="oltext">共<text class="red">3</text>件商品</view>
|
|
|
+ <view class="oltext">共<text class="red">{{ totalRecord }}</text>件商品</view>
|
|
|
<view class="ortext" @click="showPopup(0)" v-if="!popupShow">编辑</view>
|
|
|
<view class="ortext" @click="hidePopup(0)" v-else>完成</view>
|
|
|
</view>
|
|
@@ -18,25 +18,25 @@
|
|
|
<text class="error-text">暂无收藏商品~</text>
|
|
|
</view>
|
|
|
<!-- 列表 -->
|
|
|
- <view class="tui-cart-cell tui-mtop" v-for="(item, index) in productList" :key="index">
|
|
|
+ <view class="tui-cart-cell tui-mtop" v-for="(pros, index) in productList" :key="index" @click.stop="navToDetailPage(pros.productId)">
|
|
|
<view class="tui-goods-item">
|
|
|
<view class="tui-goods-main">
|
|
|
<view class="tui-goods-checkBox" v-if="popupShow">
|
|
|
<view
|
|
|
class="checkbox iconfont"
|
|
|
- :class="[item.isChecked ? 'icon-yixuanze' : 'icon-weixuanze']"
|
|
|
- @click="checkedSoperv(item)"
|
|
|
+ :class="[pros.isChecked ? 'icon-yixuanze' : 'icon-weixuanze']"
|
|
|
+ @click="checkedSoperv(pros)"
|
|
|
>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="tui-goods-image"> <image :src="item.image" class="tui-goods-img" /> </view>
|
|
|
+ <view class="tui-goods-image"> <image :src="pros.image" class="tui-goods-img" /> </view>
|
|
|
<view class="tui-goods-info" :style="{ width: popupShow ? '420rpx' : '528rpx' }">
|
|
|
- <text class="list-details-title">{{ item.name }}</text>
|
|
|
- <text class="list-details-specs">规格:{{ item.unit != null ? item.unit : '' }}</text>
|
|
|
- <view class="list-details-price" v-if="item.priceFlag == 1">
|
|
|
+ <text class="list-details-title">{{ pros.name }}</text>
|
|
|
+ <text class="list-details-specs">规格:{{ pros.unit != null ? pros.unit : '' }}</text>
|
|
|
+ <view class="list-details-price" v-if="pros.priceFlag == 1">
|
|
|
<view class="list-none"><view class="price-small">¥未公开价格</view></view>
|
|
|
</view>
|
|
|
- <view class="list-details-price" v-else-if="item.priceFlag == 2">
|
|
|
+ <view class="list-details-price" v-else-if="pros.priceFlag == 2">
|
|
|
<view class="list-none"><view class="price-small">¥价格仅会员可见</view></view>
|
|
|
</view>
|
|
|
<template v-else>
|
|
@@ -44,35 +44,35 @@
|
|
|
<view class="list-price">
|
|
|
<text
|
|
|
class="price-larger"
|
|
|
- :class="PromotionsFormat(item.promotions) ? 'none' : ''"
|
|
|
+ :class="PromotionsFormat(pros.promotions) ? 'none' : ''"
|
|
|
>
|
|
|
¥{{
|
|
|
- (PromotionsFormat(item.promotions)
|
|
|
- ? item.originalPrice
|
|
|
- : item.price) | NumFormat
|
|
|
+ (PromotionsFormat(pros.promotions)
|
|
|
+ ? pros.originalPrice
|
|
|
+ : pros.price) | NumFormat
|
|
|
}}
|
|
|
</text>
|
|
|
</view>
|
|
|
- <view class="add-cart-btn" v-if="!popupShow" @click.stop="showPopup(1, item)"
|
|
|
+ <view class="add-cart-btn" v-if="!popupShow" @click.stop="showPopup(1, pros)"
|
|
|
>数量</view
|
|
|
>
|
|
|
</view>
|
|
|
<view class="list-details-price none">
|
|
|
- <view class="floor-item-act" v-if="item.actStatus == 1">
|
|
|
+ <view class="floor-item-act" v-if="pros.actStatus == 1">
|
|
|
<template>
|
|
|
- <view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
|
|
|
- {{ item.promotions.name }}
|
|
|
- <text v-if="item.priceFlag != 1"
|
|
|
- >:¥{{ item.price | NumFormat }}</text
|
|
|
+ <view class="floor-tags" v-if="PromotionsFormat(pros.promotions)">
|
|
|
+ {{ pros.promotions.name }}
|
|
|
+ <text v-if="pros.priceFlag != 1"
|
|
|
+ >:¥{{ pros.price | NumFormat }}</text
|
|
|
>
|
|
|
</view>
|
|
|
- <view class="floor-tags" v-else>{{ item.promotions.name }}</view>
|
|
|
+ <view class="floor-tags" v-else>{{ pros.promotions.name }}</view>
|
|
|
</template>
|
|
|
</view>
|
|
|
- <view class="floor-item-act" v-if="item.actStatus == 0">
|
|
|
+ <view class="floor-item-act" v-if="pros.actStatus == 0">
|
|
|
<view
|
|
|
class="floor-tags"
|
|
|
- v-if="item.actStatus == 0 && item.ladderPriceFlag == 1"
|
|
|
+ v-if="pros.actStatus == 0 && pros.ladderPriceFlag == 1"
|
|
|
>阶梯价格</view
|
|
|
>
|
|
|
</view>
|
|
@@ -213,6 +213,7 @@ export default {
|
|
|
plain: false
|
|
|
}
|
|
|
],
|
|
|
+ totalRecord:0,
|
|
|
cartQuantity: 0,
|
|
|
popupShow: false,
|
|
|
popupShow1: false,
|
|
@@ -237,7 +238,9 @@ export default {
|
|
|
modal: false
|
|
|
}
|
|
|
},
|
|
|
- onLoad() {},
|
|
|
+ onLoad() {
|
|
|
+ this.initGetStotage()
|
|
|
+ },
|
|
|
filters: {
|
|
|
NumFormat: function(text) {
|
|
|
//处理金额
|
|
@@ -264,6 +267,7 @@ export default {
|
|
|
if (data.results && data.results.length > 0) {
|
|
|
this.isEmpty = false
|
|
|
this.hasNextPage = data.hasNextPage
|
|
|
+ this.totalRecord = data.totalRecord
|
|
|
this.productList = data.results
|
|
|
this.pullFlag = false
|
|
|
setTimeout(() => {
|
|
@@ -531,6 +535,11 @@ export default {
|
|
|
break
|
|
|
}
|
|
|
},
|
|
|
+ navToDetailPage(id) {
|
|
|
+ this.isModallayer = true
|
|
|
+ this.$api.navigateTo(`/pages/goods/product?id=${id}`)
|
|
|
+ this.isModallayer = false
|
|
|
+ },
|
|
|
btnClick() {
|
|
|
this.$api.switchTabTo('/pages/tabBar/cart/index')
|
|
|
},
|
|
@@ -558,7 +567,7 @@ export default {
|
|
|
}, 200)
|
|
|
},
|
|
|
onShow() {
|
|
|
- this.initGetStotage()
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -581,7 +590,7 @@ page {
|
|
|
left: 0;
|
|
|
box-sizing: border-box;
|
|
|
padding: 0 24rpx;
|
|
|
- z-index: 999;
|
|
|
+ z-index: 99;
|
|
|
.superv-header-click {
|
|
|
width: 100%;
|
|
|
height: 80rpx;
|
|
@@ -829,7 +838,7 @@ page {
|
|
|
.tui-popup-box {
|
|
|
position: relative;
|
|
|
box-sizing: border-box;
|
|
|
- min-height: 200rpx;
|
|
|
+ min-height: 168rpx;
|
|
|
padding: 6rpx 24rpx;
|
|
|
.tui-popup-content {
|
|
|
padding-top: 30rpx;
|