picker.js 1.33 KB
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,
}