|
|
|
@ -20,8 +20,10 @@ |
|
|
|
|
<!-- 购物车商品列表 --> |
|
|
|
|
<view v-if="list.length" class="cart-list"> |
|
|
|
|
<view class="cart-item" v-for="(item, index) in list" :key="index"> |
|
|
|
|
<view v-if="storeVersion == 1 && item.goods.merchant_id > 0 && item.goods.merchant" class="merchant-name" @click="toShop(item)"> |
|
|
|
|
<image :src="item.goods.merchant.logoImage && item.goods.merchant.logoImage[0].external_url" mode="aspectFill"></image> |
|
|
|
|
<view v-if="storeVersion == 1 && item.goods.merchant_id > 0 && item.goods.merchant" |
|
|
|
|
class="merchant-name" @click="toShop(item)"> |
|
|
|
|
<image :src="item.goods.merchant.logoImage && item.goods.merchant.logoImage[0].external_url" |
|
|
|
|
mode="aspectFill"></image> |
|
|
|
|
<text>{{ item.goods.merchant.shop_name }}</text> |
|
|
|
|
<image src="@/static/arrow-right.png" mode="aspectFill"></image> |
|
|
|
|
</view> |
|
|
|
@ -76,56 +78,56 @@ |
|
|
|
|
</view> |
|
|
|
|
<view class="goodsRecommend"> |
|
|
|
|
<!-- <u-waterfall v-model="goodsRecommend" ref="uWaterfall1"> --> |
|
|
|
|
<!-- <template v-slot:left="{leftList}"> --> |
|
|
|
|
<view class="goodsItem" v-for="(item,index) in goodsRecommend" @click="onTargetGoods(item.goods_id)" |
|
|
|
|
:key="index"> |
|
|
|
|
<view class="pic"> |
|
|
|
|
<image :src="item.goods_image" mode="aspectFill"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="goodsInfo"> |
|
|
|
|
<view class="title"> |
|
|
|
|
<!-- <text v-if="item.selling_point" class="ziying">{{item.selling_point}}</text> --> |
|
|
|
|
<text class="name">{{item.goods_name}}</text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- 商品价格 --> |
|
|
|
|
<view class="shenBox"> |
|
|
|
|
<view class="detail-price oneline-hide"> |
|
|
|
|
<text class="goods-price f-30 col-m"><text |
|
|
|
|
style="font-size: 26rpx;">¥</text>{{ item.goods_price_min>0?Number(item.goods_price_min):0.00}} |
|
|
|
|
<text class="delPrice"></text></text> |
|
|
|
|
<text v-if="item.line_price_min > 0" |
|
|
|
|
class="line-price col-9 f-24">¥{{ item.line_price_min>0?Number(item.line_price_min):0.00 }}</text> |
|
|
|
|
</view> |
|
|
|
|
<image :src="$picUrl+'/static/detail/redShen.png'" v-if="item.is_check==1" mode=""></image> |
|
|
|
|
</view> |
|
|
|
|
<!-- <template v-slot:left="{leftList}"> --> |
|
|
|
|
<view class="goodsItem" v-for="(item,index) in goodsRecommend" @click="onTargetGoods(item.goods_id)" |
|
|
|
|
:key="index"> |
|
|
|
|
<view class="pic"> |
|
|
|
|
<image :src="item.goods_image" mode="aspectFill"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="goodsInfo"> |
|
|
|
|
<view class="title"> |
|
|
|
|
<!-- <text v-if="item.selling_point" class="ziying">{{item.selling_point}}</text> --> |
|
|
|
|
<text class="name">{{item.goods_name}}</text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- 商品价格 --> |
|
|
|
|
<view class="shenBox"> |
|
|
|
|
<view class="detail-price oneline-hide"> |
|
|
|
|
<text class="goods-price f-30 col-m"><text |
|
|
|
|
style="font-size: 26rpx;">¥</text>{{ item.goods_price_min>0?Number(item.goods_price_min):0.00}} |
|
|
|
|
<text class="delPrice"></text></text> |
|
|
|
|
<text v-if="item.line_price_min > 0" |
|
|
|
|
class="line-price col-9 f-24">¥{{ item.line_price_min>0?Number(item.line_price_min):0.00 }}</text> |
|
|
|
|
</view> |
|
|
|
|
<image :src="$picUrl+'/static/detail/redShen.png'" v-if="item.is_check==1" mode=""></image> |
|
|
|
|
</view> |
|
|
|
|
<!-- <view class="goodsInfo1" v-if="item.cmmdty_model"> |
|
|
|
|
<view class="oneTip"> |
|
|
|
|
{{item.cmmdty_model}} |
|
|
|
|
</view> |
|
|
|
|
</view> --> |
|
|
|
|
<view class="goodsSend"> |
|
|
|
|
<view class="sendLeft"> |
|
|
|
|
<view class="left_1"> |
|
|
|
|
{{item.goods_source}} |
|
|
|
|
</view> |
|
|
|
|
<view class="left_2"> |
|
|
|
|
{{Number(item.discount)}}折 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="sendRight"> |
|
|
|
|
<text v-if="item.delivery_time==0">24小时内发货</text> |
|
|
|
|
<text v-if="item.delivery_time==1">48小时内发货</text> |
|
|
|
|
<text v-if="item.delivery_time==2">72小时内发货</text> |
|
|
|
|
<text v-if="item.delivery_time==3">7天内发货</text> |
|
|
|
|
<text v-if="item.delivery_time==4">15天内发货</text> |
|
|
|
|
<text v-if="item.delivery_time==5">30天内发货</text> |
|
|
|
|
<text v-if="item.delivery_time==6">45天内发货</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="goodsSend"> |
|
|
|
|
<view class="sendLeft"> |
|
|
|
|
<view class="left_1"> |
|
|
|
|
{{item.goods_source}} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- </template> --> |
|
|
|
|
<!-- <template v-slot:right="{rightList}"> |
|
|
|
|
<view class="left_2"> |
|
|
|
|
{{Number(item.discount)}}折 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="sendRight"> |
|
|
|
|
<text v-if="item.delivery_time==0">24小时内发货</text> |
|
|
|
|
<text v-if="item.delivery_time==1">48小时内发货</text> |
|
|
|
|
<text v-if="item.delivery_time==2">72小时内发货</text> |
|
|
|
|
<text v-if="item.delivery_time==3">7天内发货</text> |
|
|
|
|
<text v-if="item.delivery_time==4">15天内发货</text> |
|
|
|
|
<text v-if="item.delivery_time==5">30天内发货</text> |
|
|
|
|
<text v-if="item.delivery_time==6">45天内发货</text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- </template> --> |
|
|
|
|
<!-- <template v-slot:right="{rightList}"> |
|
|
|
|
<view class="goodsItem" style="margin-right: 0;" v-for="(item,index) in rightList" |
|
|
|
|
@click="onTargetGoods(item.goods_id)" :key="index"> |
|
|
|
|
<view class="pic"> |
|
|
|
@ -294,7 +296,7 @@ |
|
|
|
|
checkLogin() ? this.getCartList() : this.isLoading = false |
|
|
|
|
}, |
|
|
|
|
onReachBottom() { |
|
|
|
|
if (!this.recommendFinish) { |
|
|
|
|
if (!this.recommendFinish) { |
|
|
|
|
this.getSuggest() |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -302,7 +304,9 @@ |
|
|
|
|
methods: { |
|
|
|
|
getSuggest() { |
|
|
|
|
// 获取推荐商品 |
|
|
|
|
Api.recommendedNew({ page: this.recommendPage++ }).then(res => { |
|
|
|
|
Api.recommendedNew({ |
|
|
|
|
page: this.recommendPage++ |
|
|
|
|
}).then(res => { |
|
|
|
|
console.log(res); |
|
|
|
|
let arr = res.data.goodsList.data |
|
|
|
|
if (arr && arr.length > 0) { |
|
|
|
@ -316,10 +320,10 @@ |
|
|
|
|
if (arr.length < res.data.goodsList.per_page) { |
|
|
|
|
this.recommendFinish = true; |
|
|
|
|
} |
|
|
|
|
this.recommendLoadTitle = this.recommendFinish ? "已全部加载完" : "上拉加载更多"; |
|
|
|
|
this.recommendLoadTitle = this.recommendFinish ? "已全部加载完" : "上拉加载更多"; |
|
|
|
|
this.goodsRecommend = [...this.goodsRecommend, ...arr] |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
// 计算合计金额 (根据选中的商品) |
|
|
|
|
onCalcTotalPrice() { |
|
|
|
@ -482,7 +486,7 @@ |
|
|
|
|
app.handleToggleMode() |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
toShop(item) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: `/pages/shopList/shopPage?id=${item.goods.merchant_id}`, |
|
|
|
@ -540,22 +544,30 @@ |
|
|
|
|
margin: 0rpx 0 20rpx 0; |
|
|
|
|
|
|
|
|
|
.pic { |
|
|
|
|
position: relative; |
|
|
|
|
width: 100%; |
|
|
|
|
align-items: center; |
|
|
|
|
display: flex; |
|
|
|
|
height: 256rpx; |
|
|
|
|
overflow: hidden; |
|
|
|
|
|
|
|
|
|
width: 100%; |
|
|
|
|
height: 0; |
|
|
|
|
padding-bottom: 100%; |
|
|
|
|
overflow: hidden; |
|
|
|
|
|
|
|
|
|
image { |
|
|
|
|
width: 100%; |
|
|
|
|
height: 100%; |
|
|
|
|
|
|
|
|
|
object-fit: cover; |
|
|
|
|
position: absolute; |
|
|
|
|
left: 0; |
|
|
|
|
top: 0 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.goodsInfo { |
|
|
|
|
margin-bottom: 12rpx; |
|
|
|
|
height: 60rpx; |
|
|
|
|
height: 60rpx; |
|
|
|
|
|
|
|
|
|
.title { |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
@ -628,6 +640,7 @@ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.finished { |
|
|
|
|
font-size: 28rpx; |
|
|
|
|
line-height: 100rpx; |
|
|
|
@ -680,21 +693,25 @@ |
|
|
|
|
border-radius: 12rpx; |
|
|
|
|
padding: 30rpx 16rpx; |
|
|
|
|
margin-bottom: 24rpx; |
|
|
|
|
|
|
|
|
|
.merchant-name { |
|
|
|
|
font-size: 30rpx; |
|
|
|
|
color: #333; |
|
|
|
|
font-weight: bold; |
|
|
|
|
|
|
|
|
|
>text { |
|
|
|
|
overflow: hidden; |
|
|
|
|
text-overflow: ellipsis; |
|
|
|
|
white-space: nowrap; |
|
|
|
|
max-width: calc(100% - 73rpx); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
>image { |
|
|
|
|
margin-left: 10rpx; |
|
|
|
|
width: 13rpx; |
|
|
|
|
height: 24rpx; |
|
|
|
|
flex-shrink: 0; |
|
|
|
|
|
|
|
|
|
&:first-child { |
|
|
|
|
width: 40rpx; |
|
|
|
|
height: 40rpx; |
|
|
|
@ -702,6 +719,7 @@ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
>view { |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|