picker.wxml
4.46 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
<template name="Picker">
<view class="picker-bg" id="picker-bg" catchtap="hidePicker" 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">
<view id="{{index}}" class="{{item.selected?'selectedItem':'normalItem'}}"
bindtap="chooseColor"
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="chooseSize" 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 ? "../../../static/images/jian_h@2x.png" : "../../../static/images/jian_disable@2x.png"}}'></image>
</view>
<view class='buyNumberText'>
{{pickerData.view.buyNumber}}
</view>
<view bindtap="bindPlus" class='addNumberBtn'>
<image class='addImage'
src='{{pickerData.view.plusButtonEnable ? "../../../static/images/and_normal@2x.png" : "../../../static/images/and_h@2x.png"}}'></image>
</view>
</view>
<view wx:if="{{pickerData.view.isSoldOutSoon}}" class='soldSoonOut'>
即将售罄
</view>
<view wx:if="{{pickerData.view.buy_limit_number}}" class='soldSoonOut'>
限购{{pickerData.view.buy_limit_number}}件
</view>
<view wx:if="{{pickerData.view.bundle_count}}" class='soldSoonOut'>
{{pickerData.view.bundle_count}}件起售
</view>
</view>
</scroll-view>
<view wx:if="{{pickerData.sourceType == 'goodsDetail' && pickerData.view.buyButtonEnable}}"
class="{{pickerData.view.buyButtonEnable?'buyButton':'buyButtonDisable'}}" bindtap="goPayment"
data-type='{{pickerData}}'>
<text class="title">确定</text>
</view>
<view wx:if="{{pickerData.sourceType == 'goodsDetail' && !pickerData.view.buyButtonEnable}}"
class="{{pickerData.view.buyButtonEnable?'buyButton':'buyButtonDisable'}}" data-type='{{pickerData}}'>
<text class="title">已售罄</text>
</view>
</view>
</view>
</template>