picker.wxml
4.39 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
<template name="Picker">
<view class="picker-bg" id="picker-bg" catchtap="pickerTap" disable-scroll='true' catchtouchmove="catchtouchmove" style="display:{{pickerData.view.isShow ? 'block':'none'}}">
<view class="picker-view">
<view class="pickerGoodsInfo">
<image class="img" src="{{pickerData.view.image}}">
</image>
<image class="placeholder"></image>
<view class="goodPrice">
<text class="realPrice">{{pickerData.view.goodPrice==='0'?pickerData.view.price:pickerData.view.goodPrice}}</text>
<text class="price" style="display:{{pickerData.view.goodPrice==='0'?'none':''}}">{{pickerData.view.price}}</text>
</view>
</view>
<view class="seperatorLine"></view>
<scroll-view scroll-y="true" style="height: 450rpx;">
<view class="goodsColor">
<text class="title">颜色</text>
<view class="list">
<block wx:for="{{pickerData.view.goodsList}}" wx:key="unique">
<!--pickerData.view.availableColor[index]?'normalItem':'disableItem'-->
<view id="{{index}}" class="{{item.selected?'selectedItem':'normalItem'}}" bindtap="colorTap" data-key="{{item}}">{{item.factory_goods_name}}</view>
</block>
</view>
</view>
<view class="seperatorLine"></view>
<view class="goodsSize">
<text class="title">尺码</text>
<view class="list">
<block wx:for="{{pickerData.view.sizeList}}" wx:key="unique">
<view id="{{index}}" class="{{ item.enable?(item.selected?'selectedItem':'normalItem'):'disableItem'}}" bindtap="sizeTap" data-key="{{item}}" >{{item.size_name}}</view>
</block>
</view>
</view>
<view class="seperatorLine"></view>
<view wx:if='{{!pickerData.view.should_hidden_number_view}}' class="goodsCount">
<text class="title">数量</text>
<view class="stepper">
<view bindtap="bindMinus" class='reduceNumberBtn'>
<image class='reduceImage' src='{{pickerData.view.minusButtonEnable ? "../shopCart/images/jian_h@2x.png" : "../shopCart/images/jian_disable@2x.png"}}' />
</view>
<view class='buyNumberText'>
{{pickerData.view.buyNumber}}
</view>
<view bindtap="bindPlus" class='addNumberBtn'>
<image class='addImage' src='{{pickerData.view.plusButtonEnable ? "../shopCart/images/and_normal@2x.png" : "../shopCart/images/and_h@2x.png"}}'/>
</view>
</view>
<view wx:if="{{pickerData.view.isSoldOutSoon}}" class='soldSoonOut'>
即将售罄
</view>
</view>
</scroll-view>
<view wx:if="{{pickerData.sourceType == 'goodsDetail'}}" class="{{pickerData.view.buyButtonEnable?'buyButton':'buyButtonDisable'}}" bindtap="{{isloadingForPayment?'':'goPayment'}}" data-type='{{pickerData}}'>
<text class="title">{{pickerData.view.buyButtonEnable?'确定':'已售罄'}}</text>
</view>
<view class="{{pickerData.view.buyButtonEnable?'buyButton':'buyButtonDisable'}}" bindtap='{{pickerData.view.buyButtonEnable?"chooseSizeColorCompleted" : ""}}' wx:elif="{{pickerData.sourceType == 'shopCart'}}">
<text class="title">{{pickerData.view.buyButtonEnable?'确定':'已售罄'}}</text>
</view>
<view class="{{pickerData.view.buyButtonEnable?'buyButton':'buyButtonDisable'}}" bindtap='{{pickerData.view.buyButtonEnable?"addShopCart" : ""}}' wx:elif="{{pickerData.sourceType == 'gift'}}">
<text class="title">{{pickerData.view.buyButtonEnable?'加入购物车':'已售罄'}}</text>
</view>
<view class="{{pickerData.view.buyButtonEnable?'buyButton':'buyButtonDisable'}}" bindtap='{{pickerData.view.buyButtonEnable?"addShopCart" : ""}}' wx:elif="{{pickerData.sourceType == 'promotionProductList'}}">
<text class="title">{{pickerData.view.buyButtonEnable?'加入购物车':'已售罄'}}</text>
</view>
</view>
</view>
</template>