调整版本更新,修复鉴权显示bug,调整商品认证页面样式错误
This commit is contained in:
@@ -122,7 +122,7 @@
|
||||
params: {}, // 上个页面携带过来的参数
|
||||
remark: '', // 备注
|
||||
order_no: '', // 下单成功的id
|
||||
selectTypeId: '2', // 微信支付2 E币支付1
|
||||
selectTypeId: '2', // 微信支付2 支付宝支付3
|
||||
coupon_price: '' // 代驾券显示金额,提货券显示什么呢
|
||||
};
|
||||
},
|
||||
@@ -192,105 +192,45 @@
|
||||
apiUrl(data).then(res => {
|
||||
// 微信支付
|
||||
if (this.selectTypeId === '2') {
|
||||
if (typeof res === 'string') {
|
||||
let payInfo = JSON.parse(res)
|
||||
uni.requestPayment({
|
||||
provider: "wxpay",
|
||||
orderInfo: payInfo,
|
||||
success: res => {
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
duration: 3000,
|
||||
mask: true,
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/goods/payStatus?success=true'
|
||||
})
|
||||
this.canPay = true
|
||||
}, 3000);
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log(err.errMsg)
|
||||
uni.showToast({
|
||||
title: '支付被取消',
|
||||
duration: 3000,
|
||||
mask: true,
|
||||
icon: 'none'
|
||||
})
|
||||
// setTimeout(() => {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/goods/payStatus?success=false'
|
||||
// })
|
||||
// this.canPay = true
|
||||
// }, 3000);
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '创建订单成功',
|
||||
duration: 3000,
|
||||
mask: true,
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.canPay = true
|
||||
let payInfo = JSON.parse(res)
|
||||
uni.requestPayment({
|
||||
provider: "wxpay",
|
||||
orderInfo: payInfo,
|
||||
success: res => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/goods/payStatus?success=true'
|
||||
})
|
||||
}, 3000);
|
||||
}
|
||||
this.canPay = true
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.showToast({
|
||||
title: '支付被取消',
|
||||
mask: true,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
// 支付宝支付
|
||||
else if (this.selectTypeId === '3') {
|
||||
if (typeof res === 'string') {
|
||||
uni.requestPayment({
|
||||
provider: "alipay",
|
||||
orderInfo: res,
|
||||
success: res => {
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
duration: 3000,
|
||||
mask: true,
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/goods/payStatus?success=true'
|
||||
})
|
||||
this.canPay = true
|
||||
}, 3000);
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.showToast({
|
||||
title: '支付被取消',
|
||||
duration: 3000,
|
||||
mask: true,
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/goods/payStatus?success=false'
|
||||
})
|
||||
this.canPay = true
|
||||
}, 3000);
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '创建订单成功',
|
||||
duration: 3000,
|
||||
mask: true,
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.canPay = true
|
||||
uni.navigateTo({
|
||||
uni.requestPayment({
|
||||
provider: "alipay",
|
||||
orderInfo: res,
|
||||
success: res => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/goods/payStatus?success=true'
|
||||
})
|
||||
}, 3000);
|
||||
}
|
||||
this.canPay = true
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.showToast({
|
||||
title: '支付被取消',
|
||||
duration: 3000,
|
||||
mask: true,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
|
||||
Reference in New Issue
Block a user