index.wxml
4.23 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<view class="layout" style="padding-bottom:{{padding_bottom }}px">
<view class="box">
<block wx:if="{{addressFlag}}">
<block wx:if="{{shopFlag && shopCartFlag}}">
<view class="address-box">
<view class="ad-title">快递配送</view>
<view class="ad-box" bindtap="toShowAddressModal">
<block wx:if="{{contactInfo.contactAddress}}">
<view class="left">
<view class="top">
<view class="name text-hide">{{contactInfo.contactName}}</view>
<block wx:if="{{isDefault}}">
<view class="default text-center">默认地址</view>
</block>
<view class="phone">{{contactInfo.contactPhone}}</view>
</view>
<view class="bottom text-hide">{{contactInfo.contactAddress}}</view>
</view>
</block>
<block wx:else>
选择收货地址
</block>
<view class="right text-center">
<mp-icon icon="arrow" color="#B1B1B3" size="{{12}}"></mp-icon>
</view>
</view>
</view>
</block>
</block>
<view class="content-box">
<block wx:for="{{goodsInfo.goodsList}}" wx:key="index">
<view class="item">
<view class="content">
<view class="goods-info">
<view class="preview">
<image webp src="{{item.goodsImage || item.goodsImageUrl}}"></image>
</view>
<view class="text">
<view class="name">
<view class="text-hide">
{{item.goodsSkuName}}
</view>
<view wx:if="{{item.specificationData}}" class="specificationData-text" bindtap="handleChangeSku" data-target="{{item}}" data-index="{{index}}">
<view class="text-hide description">{{item.specificationData}}</view>
<mp-icon icon="back" class="change-icon" color="#6E6E7A" size="{{6}}"></mp-icon>
</view>
</view>
<view class="price-box">
<view class="price">
{{item.redeemPoints}}
<text>积分</text>
</view>
<stepper data-item="{{item}}" count="{{item.sellQty}}" max="{{item.goodsStock}}" data-id="{{item.id}}" bindchange="changeCount" data-index="{{index}}"></stepper>
</view>
</view>
</view>
</view>
</view>
</block>
</view>
<view class="all-box">
<view class="cell">
<view class="label">商品总价</view>
<view class="value">{{money || 0}}积分</view>
</view>
<view class="cell">
<view class="label">运费</view>
<view class="value">{{expressFee ? expressFee + '积分' : '包邮'}}</view>
</view>
<view class="all-item">
<text>合计</text>
<view class="price">{{total || 0}}<text>积分</text></view>
</view>
</view>
<view class="tips">
<text>当前积分</text>
{{walletObj.currentScore}}
</view>
</view>
</view>
<block wx:if="{{addressFlag}}">
<goods-action bindready="goodsActionReady" custom>
<view class="goods-action">
<view class="left">
<view class="radio">
共{{goodsNum}}件,合计:
</view>
<view class="total">
<view class="price">
{{total|| 0}}
<text>积分</text>
</view>
</view>
</view>
<view class="btn text-center {{total > walletObj.currentScore ? 'disabled' : ''}}" bindtap="checkOut">立即兑换</view>
</view>
</goods-action>
</block>
<address address="{{addressList}}" defaultAddress="{{contactInfo}}" bind:getAddress="getAddress" show="{{showAddress}}"></address>
<sku bind:cancelSku="closeSku" wx:if="{{showSku}}" show="{{showSku}}" goods="{{selectInfo}}" bindchangeSku="changeSku" clickType="change"></sku>
<Dialog show="{{ showModal }}" mask="true" bindbuttontap="dialogConfirm" buttons="{{buttons}}" title="积分兑换">
<view class="suggest-box">
<view>您当前总积分为<text>{{walletObj.currentScore}}</text>积分</view>
<view>确认使用<text>{{total}}</text>积分兑换该商品</view>
</view>
</Dialog>