|
@@ -36,7 +36,8 @@ Page({ |
|
|
opacity:0, |
|
|
opacity:0, |
|
|
queueData:null, |
|
|
queueData:null, |
|
|
zIndex:11, |
|
|
zIndex:11, |
|
|
display:null |
|
|
|
|
|
|
|
|
display:null, |
|
|
|
|
|
showbutton:false |
|
|
}, |
|
|
}, |
|
|
phone: function () { |
|
|
phone: function () { |
|
|
let that = this; |
|
|
let that = this; |
|
@@ -111,7 +112,8 @@ Page({ |
|
|
gotopay: function () { |
|
|
gotopay: function () { |
|
|
let that = this; |
|
|
let that = this; |
|
|
that.setData({ |
|
|
that.setData({ |
|
|
queueData: null |
|
|
|
|
|
|
|
|
queueData: null, |
|
|
|
|
|
showbutton:true |
|
|
}) |
|
|
}) |
|
|
Http.get({ |
|
|
Http.get({ |
|
|
url: config.api.getQuestion, |
|
|
url: config.api.getQuestion, |
|
@@ -150,7 +152,6 @@ Page({ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
countdown(end_time) { |
|
|
countdown(end_time) { |
|
|
let that = this; |
|
|
let that = this; |
|
|
var EndTime = end_time; |
|
|
var EndTime = end_time; |
|
@@ -273,15 +274,14 @@ Page({ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
.then(res => { |
|
|
.then(res => { |
|
|
|
|
|
wx.hideLoading() |
|
|
console.log(res); |
|
|
console.log(res); |
|
|
if (!type) { |
|
|
if (!type) { |
|
|
setTimeout(() => { |
|
|
|
|
|
wx.navigateTo({ |
|
|
|
|
|
url: `/pages/order/detail/index?orderId=${ |
|
|
|
|
|
orderId |
|
|
|
|
|
}` |
|
|
|
|
|
}); |
|
|
|
|
|
}, 1000) |
|
|
|
|
|
|
|
|
wx.navigateTo({ |
|
|
|
|
|
url: `/pages/order/detail/index?orderId=${ |
|
|
|
|
|
orderId |
|
|
|
|
|
}` |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
.catch(err => { |
|
|
.catch(err => { |
|
@@ -298,9 +298,9 @@ Page({ |
|
|
*/ |
|
|
*/ |
|
|
orderFunc(flag) { |
|
|
orderFunc(flag) { |
|
|
var that = this; |
|
|
var that = this; |
|
|
wx.showLoading({ |
|
|
|
|
|
title: "加载中..." |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
// wx.showLoading({ |
|
|
|
|
|
// title: "加载中..." |
|
|
|
|
|
// }); |
|
|
if (that.data.data.type == 6) {} else { |
|
|
if (that.data.data.type == 6) {} else { |
|
|
Http.post({ |
|
|
Http.post({ |
|
|
url: config.api.checkPhoneStatus, |
|
|
url: config.api.checkPhoneStatus, |
|
@@ -426,7 +426,6 @@ Page({ |
|
|
orderId: orderId |
|
|
orderId: orderId |
|
|
} |
|
|
} |
|
|
}).then(res => { |
|
|
}).then(res => { |
|
|
/// Begin payment ---- |
|
|
|
|
|
var payOrderId = "" + res.data.payOrderId; |
|
|
var payOrderId = "" + res.data.payOrderId; |
|
|
wx.hideLoading(); |
|
|
wx.hideLoading(); |
|
|
wx.requestPayment({ |
|
|
wx.requestPayment({ |
|
@@ -436,6 +435,12 @@ Page({ |
|
|
signType: (res.data.signType) ? res.data.signType : "MD5", |
|
|
signType: (res.data.signType) ? res.data.signType : "MD5", |
|
|
paySign: res.data.paySign, |
|
|
paySign: res.data.paySign, |
|
|
success: res => { |
|
|
success: res => { |
|
|
|
|
|
wx.showLoading({ |
|
|
|
|
|
title: '订单正在处理中...', |
|
|
|
|
|
}) |
|
|
|
|
|
setTimeout(function(){ |
|
|
|
|
|
wx.hideLoading() |
|
|
|
|
|
},5000) |
|
|
that.payOrderUpdate(that.data.orderId, payOrderId, 1, '', '', that); |
|
|
that.payOrderUpdate(that.data.orderId, payOrderId, 1, '', '', that); |
|
|
if (res.errMsg == "requestPayment:ok") { |
|
|
if (res.errMsg == "requestPayment:ok") { |
|
|
setTimeout(function () { |
|
|
setTimeout(function () { |
|
@@ -462,6 +467,9 @@ Page({ |
|
|
* 支付失败,需要更新订单的状态 |
|
|
* 支付失败,需要更新订单的状态 |
|
|
*/ |
|
|
*/ |
|
|
that.payOrderUpdate(that.data.orderId, payOrderId, 2, '', 'fail', that); |
|
|
that.payOrderUpdate(that.data.orderId, payOrderId, 2, '', 'fail', that); |
|
|
|
|
|
that.setData({ |
|
|
|
|
|
showbutton: false |
|
|
|
|
|
}) |
|
|
return; |
|
|
return; |
|
|
}, |
|
|
}, |
|
|
complete: res => {} |
|
|
complete: res => {} |
|
@@ -483,13 +491,13 @@ Page({ |
|
|
key: 'couponNum', |
|
|
key: 'couponNum', |
|
|
data: "couponNum" |
|
|
data: "couponNum" |
|
|
}) |
|
|
}) |
|
|
setTimeout(function () { |
|
|
|
|
|
wx.navigateTo({ |
|
|
|
|
|
url: `/pages/order/detail/index?orderId=${ |
|
|
|
|
|
that.data.orderId |
|
|
|
|
|
}` |
|
|
|
|
|
}); |
|
|
|
|
|
}, 1000) |
|
|
|
|
|
|
|
|
wx.navigateTo({ |
|
|
|
|
|
url: `/pages/order/detail/index?orderId=${ |
|
|
|
|
|
that.data.orderId |
|
|
|
|
|
}` |
|
|
|
|
|
}); |
|
|
|
|
|
// setTimeout(function () { |
|
|
|
|
|
// }, 1000) |
|
|
// if (that.data.data.type == 5) { |
|
|
// if (that.data.data.type == 5) { |
|
|
// setTimeout(() => { |
|
|
// setTimeout(() => { |
|
|
// wx.switchTab({ |
|
|
// wx.switchTab({ |
|
@@ -510,6 +518,11 @@ Page({ |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
onShow(){ |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
showbutton:false |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
onShareAppMessage: function (options) { |
|
|
onShareAppMessage: function (options) { |
|
|
var that = this; |
|
|
var that = this; |
|
|
var shareObj = { |
|
|
var shareObj = { |
|
|