index.wxml
3.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<view class="layout" style="padding-bottom:{{padding_bottom }}px;height: calc(100vh - {{padding_bottom}}px);">
<block wx:if="{{shoppingcartFlag}}">
<block wx:if="{{!goodsList.length}}">
<view class="nothing-box">
<view class="nothing">
<view class="icon">
<glsx-image webp src="/cart/nothing-icon.png" />
</view>
您的购物车空空如也
</view>
</view>
</block>
<block wx:else>
<view class="box">
<block wx:for="{{goodsList}}" wx:key="index">
<view class="item-box {{item.flag?'disabled':''}}">
<view class="list">
<view class="item {{item.showDel?'touch-move-active':''}}" data-index="{{index}}" data-ind="{{ind}}"
bindtouchstart="start" bindtouchmove="move">
<view class="content" catchtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{item}}">
<view class="icon" wx:if="{{!item.flag}}">
<icon type="{{item.active?'success':'circle'}}" color="{{item.active?'#FB8A32':'#B1B1B3'}}" size="20">
</icon>
</view>
<view wx:else class="invalid-icon">失效</view>
<view class="goods-info">
<view class="preview">
<image webp src="{{item.goodsImageUrl}}"></image>
</view>
<view class="text">
<view class="text-hide">{{item.goodsSkuName}}</view>
<view class="specification text-hide" wx:if="{{item.specificationData}}">{{item.specificationData}}</view>
<view class="price-box" wx:if="{{!item.flag}}">
<view class="price">
{{item.redeemPoints || 0}}
<text>积分</text>
</view>
<stepper count="{{item.sellQty}}" max="{{item.goodsStock}}" catchchange="changeCount"
data-index="{{index}}" data-item="{{item}}"></stepper>
</view>
<view wx:else class="invalid">该商品已下架/库存不足</view>
</view>
</view>
</view>
<view class="del text-center" catchtap="del" data-target="{{item}}">删除</view>
</view>
</view>
</view>
</block>
</view>
</block>
</block>
</view>
<block wx:if="{{goodsList.length}}">
<goods-action bindready="goodsActionReady" custom>
<view class="goods-action">
<view class="all-check" bindtap="chooseAll">
<view class="icon">
<icon type="{{allActive?'success':'circle'}}" color="{{allActive?'#FB8A32':'#B1B1B3'}}" size="20">
</icon>
</view>
全选
</view>
<view class="total">合计:
<view class="price">
<text>积分</text><text class="num">{{sum||0}}</text>
</view>
</view>
<button class="btn text-center" bindtap="checkOut" disabled="{{count<1}}">结算({{count || 0}})</button>
</view>
</goods-action>
</block>