|
|
|
|
|
|
|
|
}, this,"POST") |
|
|
}, this,"POST") |
|
|
}, |
|
|
}, |
|
|
getInputVal:function(e){ |
|
|
getInputVal:function(e){ |
|
|
// if (e.detail.value < 1) { |
|
|
|
|
|
// wx.showToast({ |
|
|
|
|
|
// title: "购买量最小为1", |
|
|
|
|
|
// duration: 1000 |
|
|
|
|
|
// }) |
|
|
|
|
|
// this.setData({ |
|
|
|
|
|
// buyNumber: 1, |
|
|
|
|
|
// ticketNum: 1 |
|
|
|
|
|
// }) |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.setData({ |
|
|
|
|
|
// buyNumber: e.detail.value, |
|
|
|
|
|
// num: e.detail.value |
|
|
|
|
|
// }) |
|
|
|
|
|
// } |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
buyNumber: e.detail.value, |
|
|
|
|
|
num: e.detail.value |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
if (e.detail.value > 50) { |
|
|
|
|
|
wx.showToast({ |
|
|
|
|
|
title: "最多购买50张", |
|
|
|
|
|
icon:"none", |
|
|
|
|
|
duration: 2000 |
|
|
|
|
|
}) |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
buyNumber: 1, |
|
|
|
|
|
ticketNum: 1 |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
buyNumber: e.detail.value, |
|
|
|
|
|
num: e.detail.value |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
console.log(this.data.buyNumber) |
|
|
console.log(this.data.buyNumber) |
|
|
}, |
|
|
}, |
|
|
}) |
|
|
}) |