全新UI视觉体验,移动端API优化降低重复调用,提高并发6倍,修复N多Bug
This commit is contained in:
@@ -1,26 +1,27 @@
|
||||
<template>
|
||||
<view class="orderGoods">
|
||||
<view class='total'>共{{totalNmu}}件商品</view>
|
||||
<view class='goodWrapper'>
|
||||
<view class='item acea-row row-between-wrapper' v-for="(item,index) in cartInfo" :key="index" @click="jumpCon(item.productId)">
|
||||
<view class="orderGoods borRadius14">
|
||||
<view class='total'>共{{ orderProNum?orderProNum:totalNmu}}件商品</view>
|
||||
<view class='goodWrapper pad30'>
|
||||
<view class='item acea-row row-between-wrapper' v-for="(item,index) in cartInfo" :key="index"
|
||||
@click="jumpCon(item.productId)">
|
||||
<view class='pictrue'>
|
||||
<image :src='item.productInfo.attrInfo.image' v-if="item.productInfo.attrInfo"></image>
|
||||
<image :src='item.productInfo.image' v-else></image>
|
||||
<image :src='item.image'></image>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='acea-row row-between-wrapper'>
|
||||
<view class='name line1'>{{item.productInfo.storeName}}</view>
|
||||
<view class='num'>x {{item.cartNum}}</view>
|
||||
<view class='name line1'>{{item.productName ? item.productName : item.storeName}}</view>
|
||||
<view class='num'>x {{item.payNum ? item.payNum : item.cartNum}}</view>
|
||||
</view>
|
||||
<view class='attr line1' v-if="item.productInfo.attrInfo">{{item.productInfo.attrInfo.suk}}</view>
|
||||
<view class='money font-color' v-if="item.productInfo.attrInfo">¥{{item.productInfo.attrInfo.price}}</view>
|
||||
<view class='money font-color' v-else>¥{{item.productInfo.price}}</view>
|
||||
<view class='evaluate' v-if='item.isReply==0 && evaluate==3' @click.stop="evaluateTap(item.productAttrUnique,orderId,ids)">评价</view>
|
||||
<view class='evaluate' v-else-if="item.isReply==1 && evaluate==3">已评价</view>
|
||||
<view class='attr line1' v-if="item.sku">{{item.sku}}</view>
|
||||
<view class='money font-color'>¥{{item.price}}</view>
|
||||
<view class='evaluate' v-if='item.isReply==0 && evaluate==2' @click.stop="evaluateTap(item)">评价
|
||||
</view>
|
||||
<view class='evaluate' v-else-if="item.isReply==1">已评价</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -47,32 +48,45 @@
|
||||
jump: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
orderProNum: {
|
||||
type: Number,
|
||||
default: function() {
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
productType: {
|
||||
type: Number,
|
||||
default: function() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
totalNmu:''
|
||||
totalNmu: ''
|
||||
};
|
||||
},
|
||||
watch:{
|
||||
cartInfo:function(nVal,oVal){
|
||||
watch: {
|
||||
cartInfo: function(nVal, oVal) {
|
||||
let num = 0
|
||||
nVal.forEach((item,index)=>{
|
||||
nVal.forEach((item, index) => {
|
||||
num += item.cartNum
|
||||
})
|
||||
this.totalNmu = num
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
evaluateTap:function(unique,orderId,ids){
|
||||
evaluateTap(item) {
|
||||
uni.navigateTo({
|
||||
url:"/pages/users/goods_comment_con/index?unique="+unique+"&uni="+orderId + "&id=" + ids
|
||||
url: "/pages/users/goods_comment_con/index?unique=" + item.attrId + "&orderId=" + this.orderId + '&id=' + this.ids
|
||||
})
|
||||
},
|
||||
jumpCon:function(id){
|
||||
if(this.jump){
|
||||
jumpCon: function(id) {
|
||||
let type = this.productType==0?'normal':'video'
|
||||
if (this.jump) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods_details/index?id=${id}`
|
||||
url: `/pages/goods_details/index?id=${id}&type=${type}`
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -83,20 +97,21 @@
|
||||
<style scoped lang="scss">
|
||||
.orderGoods {
|
||||
background-color: #fff;
|
||||
margin-top: 12rpx;
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
|
||||
.orderGoods .total {
|
||||
width: 100%;
|
||||
height: 86rpx;
|
||||
padding: 0 30rpx;
|
||||
padding: 0 24rpx;
|
||||
border-bottom: 2rpx solid #f0f0f0;
|
||||
font-size: 30rpx;
|
||||
color: #282828;
|
||||
line-height: 86rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.pictrue image{
|
||||
|
||||
.pictrue image {
|
||||
background: #f4f4f4;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user