|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<view class="cart-pages">
|
|
|
- <view class="cart-bar">
|
|
|
+ <view class="cart-bar" v-if="cartList.length>0">
|
|
|
<view>共{{count}}件商品</view>
|
|
|
<view @click="editCart">
|
|
|
<text class="edit" v-if="!isEdit">管理</text>
|
|
@@ -63,8 +63,15 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="noData" v-if="cartList.length==0">
|
|
|
+ <u-empty mode="car">
|
|
|
+ <view slot="bottom">
|
|
|
+ <u-button size="mini" @click="toBuy">去选商品</u-button>
|
|
|
+ </view>
|
|
|
+ </u-empty>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="cart-submit">
|
|
|
+ <view class="cart-submit" v-if="cartList.length>0">
|
|
|
<view>
|
|
|
<u-checkbox
|
|
|
shape="circle"
|
|
@@ -145,6 +152,11 @@
|
|
|
this.hasCheckAll()
|
|
|
},
|
|
|
methods: {
|
|
|
+ toBuy(){
|
|
|
+ uni.switchTab({
|
|
|
+ url:"/pages/goods/index"
|
|
|
+ })
|
|
|
+ },
|
|
|
// 获取当前选择的商品, type: 0 删除,1 立即下单
|
|
|
getCheckGoods(type){
|
|
|
let arr = this.cartList
|
|
@@ -174,7 +186,7 @@
|
|
|
let ret = 0
|
|
|
let goldLimit = item.goldLimit
|
|
|
item.shoppingCartGoodsList.map(good=>{
|
|
|
- ret = ret + good.goods.sellGold
|
|
|
+ ret = ret + good.goods.sellGold * good.buyQty
|
|
|
})
|
|
|
console.log(ret , goldLimit)
|
|
|
return !this.isEdit ? ret >= goldLimit : true
|
|
@@ -296,6 +308,9 @@ page{
|
|
|
height: 100%;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
+ .noData{
|
|
|
+ padding-top: 150upx;
|
|
|
+ }
|
|
|
.cart-bar{
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|