picker.js
1.33 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
function init(that,callback) {
// console.log(that.data.pickerData)
var temData = {};
var view = that.data.pickerData.view;
temData.sourceType = that.data.pickerData.sourceType;
wx.getSystemInfo({
success: function(res) {
var wHeight = res.windowHeight;
temData.view = view;
that.setData({
pickerData: temData
});
}
})
// if (typeof (callBack) == "function") {
// callBack();
// }
}
function pickerShow(event, that, callBack) {
var temData = that.data.pickerData;
temData.view.isShow = !temData.view.isShow;
that.setData({
pickerData: temData
});
//回调
if (typeof (callBack) == "function") {
callBack();
}
}
function pickerHide(event,that){
var temData = that.data.pickerData;
temData.view.isShow = false;
that.setData({
pickerData: temData
});
}
function colorTap(event,that){
}
function sizeTap(event,that){
}
function bindMinus(event) {
}
function bindPlus(event) {
}
function goPayment(event){
// console.log('######')
}
function catchtouchmove(event){
}
module.exports = {
init: init,
pickerShow: pickerShow,
pickerHide:pickerHide,
colorTap:colorTap,
sizeTap:sizeTap,
goPayment:goPayment,
bindMinus:bindMinus,
bindPlus:bindPlus,
}