【优化】优化订单详情下推荐商品的显示效果。

This commit is contained in:
jianweie
2023-05-09 15:09:38 +08:00
parent 3161855ee2
commit 10a27df915

View File

@@ -408,29 +408,50 @@
<!--推荐列表-->
<view class="coreshop-goods-group" v-if="otherData.length>0">
<u-grid col="2" :border="false" align="left">
<u-grid-item bg-color="transparent" :custom-style="{padding: '0px'}" v-for="(item, index) in otherData" :key="index" @click="goGoodsDetail(item.id)">
<view class="good_box">
<u--image :src="item.image" mode="widthFix" width="174px" height="174px" radius="10"></u--image>
<view class="good_title u-line-2">
{{item.name}}
<custom-waterfalls-flow :value="otherData" @wapperClick="wapperClick" @imageClick="imageClick">
<!-- #ifdef MP-WEIXIN -->
<view class="goods" v-for="(item,index) in otherData" :key="index" slot="slot{{index}}">
<view class="coreshop-padding-top-6 coreshop-padding-bottom-10 coreshop-padding-left-8 coreshop-padding-right-8 coreshop-bg-white coreshop-border-radius-bl-18">
<view class="coreshop-title-294 coreshop-multiple-line-clamp">
<text class="coreshop-font-14">{{item.name}}</text>
</view>
<view class="good-price">
{{item.price}} <span class="coreshop-font-xs coreshop-text-through coreshop-margin-left-15 coreshop-text-gray">{{item.mktprice}}</span>
</view>
<view class="good-tag-recommend" v-if="item.isRecommend">
推荐
</view>
<view class="good-tag-hot" v-if="item.isHot">
热门
<view class="coreshop-margin-top-8 coreshop-flex coreshop-justify-between coreshop-align-center">
<view class="coreshop-text-red coreshop-font-weight-bold">
<text class="coreshop-font-12">¥</text>
<text class="coreshop-font-16">{{item.price}}</text>
<span class="coreshop-font-xs coreshop-text-through coreshop-margin-left-6 coreshop-text-gray">{{item.mktprice}}</span>
</view>
<view>
<text class="coreshop-font-10 coreshop-text-gray">已售{{item.buyCount+item.initialSales}}{{item.unit}}</text>
</view>
</view>
</view>
</u-grid-item>
</u-grid>
</view>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<template v-slot:default="item">
<view class="goods">
<view class="coreshop-padding-top-6 coreshop-padding-bottom-10 coreshop-padding-left-8 coreshop-padding-right-8 coreshop-bg-white coreshop-border-radius-bl-18">
<view class="coreshop-title-294 coreshop-multiple-line-clamp">
<text class="coreshop-font-14">{{item.name}}</text>
</view>
<view class="coreshop-margin-top-8 coreshop-flex coreshop-justify-between coreshop-align-center">
<view class="coreshop-text-red coreshop-font-weight-bold">
<text class="coreshop-font-12">¥</text>
<text class="coreshop-font-16">{{item.price}}</text>
<span class="coreshop-font-xs coreshop-text-through coreshop-margin-left-6 coreshop-text-gray">{{item.mktprice}}</span>
</view>
<view>
<text class="coreshop-font-10 coreshop-text-gray">已售{{item.buyCount+item.initialSales}}{{item.unit}}</text>
</view>
</view>
</view>
</view>
</template>
<!-- #endif -->
</custom-waterfalls-flow>
</view>
<!--底部-->
<view class="coreshop-foot-hight-view" />
@@ -514,6 +535,12 @@
pointShowName() { return this.$store.state.config.pointShowName },
},
methods: {
wapperClick(item) {
this.goGoodsDetail(item.id)
},
imageClick(item) {
this.goGoodsDetail(item.id)
},
// 获取订单详情
orderDetail() {
let _this = this
@@ -586,7 +613,8 @@
getGoodsRecommendList() {
let _this = this;
let data = {
id: 10
id: 10,
data: true
}
_this.$u.api.getGoodsRecommendList(data).then(res => {
if (res.status) {