|
@@ -308,8 +308,42 @@
|
|
|
orderPayApple(req).then(res => {
|
|
|
if (res.code == 0 && res.data) {
|
|
|
iapChannel.finishTransaction(data.transactionIdentifier)
|
|
|
- console.log('resiapChanneliapChanneliapChannel', res);
|
|
|
- genggaiVip()
|
|
|
+ console.log('resiapChanneliapChanneliapChannel', res);
|
|
|
+ orderCheck({
|
|
|
+ id: orderId.value
|
|
|
+ }).then(res3 => {
|
|
|
+ console.log('res3', res3);
|
|
|
+ if (res3.code == 0) {
|
|
|
+ genggaiVip(res3.data)
|
|
|
+ } else {
|
|
|
+ setTimeout(() => {
|
|
|
+ orderCheck({
|
|
|
+ id: orderId.value
|
|
|
+ }).then(res4 => {
|
|
|
+ if (res4.code == 0) {
|
|
|
+ genggaiVip(res4.data)
|
|
|
+ } else {
|
|
|
+ toast(
|
|
|
+ "开通失败,请联系管理员!"
|
|
|
+ )
|
|
|
+ uni
|
|
|
+ .hideLoading();
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ uni.hideLoading();
|
|
|
+ toast("check接口报错")
|
|
|
+ return false
|
|
|
+ })
|
|
|
+ }, 5000)
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ uni.hideLoading();
|
|
|
+ toast("check接口报错")
|
|
|
+ return false
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
} else {
|
|
|
|
|
|
iapChannel.finishTransaction(data.transactionIdentifier)
|
|
@@ -403,7 +437,10 @@
|
|
|
id: orderId.value
|
|
|
}).then(res2 => {
|
|
|
uni.hideLoading();
|
|
|
- console.log('res2', res2);
|
|
|
+ console.log('res2', res2);
|
|
|
+ if(res2.code !=0){
|
|
|
+ return false
|
|
|
+ }
|
|
|
uni.requestPayment({
|
|
|
"provider": "wxpay",
|
|
|
"orderInfo": {
|
|
@@ -477,7 +514,10 @@
|
|
|
orderPayAli({
|
|
|
id: orderId.value
|
|
|
}).then(res2 => {
|
|
|
- console.log('res2', res2);
|
|
|
+ console.log('res2', res2);
|
|
|
+ if(res2.code !=0){
|
|
|
+ return false
|
|
|
+ }
|
|
|
uni.hideLoading();
|
|
|
uni.requestPayment({
|
|
|
"provider": "alipay",
|