Commit c0cfe502 authored by pengguangpu's avatar pengguangpu

Merge branch 'dev-1.0' of…

Merge branch 'dev-1.0' of https://gitlab.infra.miyatech.com/pengguangpu/doublescreen-back into dev-1.0
parents ac7a9c06 be58786c
...@@ -304,6 +304,11 @@ ...@@ -304,6 +304,11 @@
margin-left: 2%; margin-left: 2%;
} }
.shopcart-list-hidden {
height: 0;
width:0;
}
/* 顶部空白 */ /* 顶部空白 */
.shopcart-cart-top-blank { .shopcart-cart-top-blank {
......
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
<image class="empty-remind-icon" mode="aspectFit" src="/images/scan_good_guide.png"/> <image class="empty-remind-icon" mode="aspectFit" src="/images/scan_good_guide.png"/>
</view> </view>
<!-- 购物车有数据 --> <!-- 购物车有数据 -->
<scroll-view class="shopcart-list" scroll-y="{{true}}" a:if="{{goods.length > 0}}"> <scroll-view class="{{goods.length == 0 ? 'shopcart-list-hidden' : 'shopcart-list'}}" scroll-y="{{true}}" hidden="{{goods.length == 0}}">
<view class="shopcart-cart-top-blank"> <view class="shopcart-cart-top-blank">
</view> </view>
<block a:for="{{goods}}"> <block a:for="{{goods}}">
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
<view class="coupon-top"> <view class="coupon-top">
<view class="coupon-back-container" onTap="convertCouponClose" a:if="{{discCouponState == 1}}"> <view class="coupon-back-container" onTap="convertCouponClose" a:if="{{discCouponState == 1}}">
<image class="coupon-back-icon" mode="aspectFit" src="/images/icon_back.png"/> <image class="coupon-back-icon" mode="aspectFit" src="/images/icon_back.png"/>
<text class="coupon-back-text">返回</text> <text class="coupon-back-text" onTap="couponBack">返回</text>
</view> </view>
<view class="coupon-title" a:if="{{discCouponState == 1}}">优惠券</view> <view class="coupon-title" a:if="{{discCouponState == 1}}">优惠券</view>
<view></view> <view></view>
......
...@@ -712,8 +712,7 @@ Page({ ...@@ -712,8 +712,7 @@ Page({
totalPrice: 0.00, totalPrice: 0.00,
//折扣 //折扣
totalDisc: 0.00, totalDisc: 0.00,
goods: [ goods: [],
],
discCouponState: 0, discCouponState: 0,
discCouponMsg: "", discCouponMsg: "",
discCouponPrice: 0, discCouponPrice: 0,
...@@ -888,7 +887,6 @@ Page({ ...@@ -888,7 +887,6 @@ Page({
let quantitytemp = item.quantity let quantitytemp = item.quantity
item.quantity = quantitytemp - 1 item.quantity = quantitytemp - 1
newGoods.push(item); newGoods.push(item);
} }
} else { } else {
newGoods.push(item); newGoods.push(item);
...@@ -928,6 +926,9 @@ Page({ ...@@ -928,6 +926,9 @@ Page({
}) })
pricetemp = this.fen2Yuan(pricetemp) pricetemp = this.fen2Yuan(pricetemp)
if(pricetemp < this.data.discCouponPrice){
this.setData({ discCouponPrice: 0 })
}
this.setData({ totalQuantity: quantitytemp, totalPrice: pricetemp }) this.setData({ totalQuantity: quantitytemp, totalPrice: pricetemp })
//数据同步到前屏 //数据同步到前屏
this.sendGoodInfoToFront() this.sendGoodInfoToFront()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment