第一次提交
This commit is contained in:
@@ -123,6 +123,15 @@ Page({
|
||||
});
|
||||
},
|
||||
payment() {
|
||||
|
||||
if (this.data.seckill_start == "请输入开始日期") {
|
||||
wx.showToast({ title: '请输入开始日期', icon: 'none' });
|
||||
return
|
||||
}
|
||||
if (this.data.seckill_endx == "请输入结束日期") {
|
||||
wx.showToast({ title: '请输入结束日期', icon: 'none' });
|
||||
return
|
||||
}
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/system/order',
|
||||
@@ -142,15 +151,12 @@ Page({
|
||||
'Authorization': 'Bearer ' + app.getCache("token")
|
||||
},
|
||||
success(res) {
|
||||
console.log(1111111)
|
||||
console.log(res)
|
||||
if (res.data.code == 200) {
|
||||
that.setData({
|
||||
// order_id: res.data.order_id,
|
||||
order_id: 123456,
|
||||
})
|
||||
// wx.showToast({ title: res.data.msg, icon: 'none' });
|
||||
|
||||
wx.requestPayment({
|
||||
timeStamp: res.data.data.timeStamp,
|
||||
nonceStr: res.data.data.nonceStr,
|
||||
@@ -177,6 +183,28 @@ Page({
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//是否登录
|
||||
isdenglu() {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '请先登录',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定')
|
||||
wx.switchTab({
|
||||
url: '/pages/my/my'
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消')
|
||||
wx.switchTab({
|
||||
url: '/pages/my/my'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
bindDateChange: function (e) {
|
||||
this.setData({
|
||||
seckill_start: e.detail.value
|
||||
|
||||
Reference in New Issue
Block a user