|
@@ -532,7 +532,6 @@ paymentClick() {
|
|
|
shopid: this.data.shopid
|
|
|
}).then(res => {
|
|
|
if (res.code === '0000') {
|
|
|
- this.codeSetInterval(60)
|
|
|
this.setData({
|
|
|
codeName: '60s后重新获取',
|
|
|
paymentStatus: true,
|
|
@@ -557,6 +556,8 @@ paymentClick() {
|
|
|
activeNum: 0,
|
|
|
})
|
|
|
}
|
|
|
+ this.getPaySend()
|
|
|
+ this.codeSetInterval(60)
|
|
|
} else {
|
|
|
console.log(res.data.message)
|
|
|
console.log(this.data.integralNum,this.data.mobile,JSON.stringify(data))
|
|
@@ -587,9 +588,9 @@ paymentClick() {
|
|
|
nextCodeClick() {
|
|
|
console.log(this.data.activeNum,this.data.active2code)
|
|
|
if (this.data.activeNum === 1 && this.data.active2code !== '') {
|
|
|
- uni.showLoading({
|
|
|
- title: '兑换中'
|
|
|
- });
|
|
|
+ // wx.showLoading({
|
|
|
+ // title: '兑换中'
|
|
|
+ // });
|
|
|
// let fingerprint = ''
|
|
|
// let sessionid = ''
|
|
|
|
|
@@ -601,10 +602,10 @@ paymentClick() {
|
|
|
fingerprint: '',
|
|
|
mobile: this.data.mobile,
|
|
|
optCode: this.data.active2code,
|
|
|
- order_no: this.active1obj.order_no,
|
|
|
- orderId: this.active1obj.orderId,
|
|
|
+ order_no: this.data.active1obj.order_no,
|
|
|
+ orderId: this.data.active1obj.orderId,
|
|
|
sessionid: '',
|
|
|
- shopid: this.shopid
|
|
|
+ shopid: this.data.shopid
|
|
|
}).then(res => {
|
|
|
if (res.code === '0000') {
|
|
|
const obj = {
|
|
@@ -623,8 +624,10 @@ paymentClick() {
|
|
|
this.data.couponList.forEach((v)=>{
|
|
|
v.quantity = 0
|
|
|
})
|
|
|
- this.paymentStatus = false
|
|
|
- this.paymentBgStatus = false
|
|
|
+ this.setData({
|
|
|
+ paymentStatus: false,
|
|
|
+ paymentBgStatus: false,
|
|
|
+ })
|
|
|
wx.setStorageSync('orderDetails', null)
|
|
|
wx.hideLoading();
|
|
|
wx.navigateTo({
|
|
@@ -713,8 +716,44 @@ paymentClick() {
|
|
|
}, 1000)
|
|
|
},
|
|
|
|
|
|
+ getPaySend(){
|
|
|
+ if (this.data.activeNum === 1) {
|
|
|
+ console.log('发送短信')
|
|
|
+ Integralinfo.getPaySend({
|
|
|
+ order_no: this.data.active1obj.order_no,
|
|
|
+ mobile: this.data.mobile,
|
|
|
+ shopid: this.data.shopid,
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code === '0000') {
|
|
|
+ this.setData({
|
|
|
+ codeName: '60s后重新获取',
|
|
|
+ })
|
|
|
+ this.codeSetInterval(60)
|
|
|
+ } else {
|
|
|
+ this.setData({
|
|
|
+ showToastObj: {
|
|
|
+ icon: 'iconSueecss',
|
|
|
+ title: res.message,
|
|
|
+ status: true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ setTimeout(() => {
|
|
|
+ this.setData({
|
|
|
+ showToastObj: {
|
|
|
+ icon: 'iconSueecss',
|
|
|
+ title: res.message,
|
|
|
+ status: false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }, 2500)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
// 重新获取短信
|
|
|
getCodeClick() {
|
|
|
+ console.log(this.data.activeNum,this.data.codeName,this.data.active1obj.step)
|
|
|
if ((this.data.activeNum === 1 && this.data.codeName === '重新获取验证码') && this.data.active1obj.step === 1) {
|
|
|
Integralinfo.getSendCmccSms({
|
|
|
orderId: this.data.active1obj.orderId,
|
|
@@ -726,7 +765,7 @@ paymentClick() {
|
|
|
codeName: '60s后重新获取',
|
|
|
})
|
|
|
this.codeSetInterval(60)
|
|
|
- const obj = this.active1obj
|
|
|
+ const obj = this.data.active1obj
|
|
|
obj.date = Math.round(new Date().getTime() / 1000).toString()
|
|
|
wx.setStorageSync('orderDetails', JSON.stringify(obj))
|
|
|
} else {
|
|
@@ -778,6 +817,7 @@ paymentClick() {
|
|
|
}
|
|
|
});
|
|
|
} else if (this.data.activeNum === 1 && this.data.codeName === '重新获取验证码') {
|
|
|
+ console.log('短信')
|
|
|
Integralinfo.getPaySend({
|
|
|
order_no: this.data.active1obj.order_no,
|
|
|
mobile: this.data.mobile,
|