Authored by yyq

tips

... ... @@ -83,6 +83,11 @@ Page({
this._allGoodsList = resData.allGoodsList;
delete resData.allGoodsList;
if (this._closePriceDownTips) {
resData.priceDownTips = '';
}
this.setData(resData);
this._oldOrdinaryCartData = resData;
... ... @@ -113,6 +118,10 @@ Page({
this._removeGoodsList = {};
this.setData(data);
},
closePriceDownTips() {
this._closePriceDownTips = true;
this.setData({priceDownTips: ''});
},
editCart(list, selected) {
list = cartHandle.changeGoodsListData(list, selected);
... ...
... ... @@ -22,7 +22,7 @@
<view wx:if="{{shippingCostTips || priceDownTips}}" class="fixed-top-tips">
<view wx:if="{{priceDownTips}}" class="price-down-tips">
<text>{{priceDownTips}}</text>
<text class="iconfont icon-top" bindtap='tapPriceDownTipsAction'></text>
<text class="iconfont icon-cha close-price-down" bindtap="closePriceDownTips"></text>
</view>
<view wx:else class="shipping-cost-tips">{{shippingCostTips}}</view>
<view class="edit-cart-btn" bindtap="editCartStatus">{{isEditing ? '完成' : '编辑商品'}}</view>
... ...
... ... @@ -68,8 +68,23 @@ page {
.tips-wrap .price-down-tips,
.tips-wrap .shipping-cost-tips {
display: inline-block;
max-width: 70%;
width: 70%;
vertical-align: middle;
position: relative;
}
.tips-wrap .close-price-down {
width: 36rpx;
height: 36rpx;
line-height: 36rpx;
border-radius: 18rpx;
background-color: #fff;
color: #444;
text-align: center;
position: absolute;
right: -40rpx;
top: 50%;
margin-top: -18rpx;
}
.tips-wrap .edit-cart-btn {
... ...