tang лет назад: 3
Родитель
Сommit
2070ddab83
1 измененных файлов с 7 добавлено и 8 удалено
  1. 7 8
      index.html

+ 7 - 8
index.html

@@ -310,7 +310,7 @@
310 310
         //判断是不是支付宝
311 311
         if (ua.match(/AlipayClient/i) == "alipayclient") {
312 312
             trade_type = "ALI"
313
-            if (userpay.code == null || userpay.code == "") {
313
+            if (userpay.auth_code == null || userpay.auth_code == "") {
314 314
                 local = local.replace('#/', '');
315 315
                 let aliHrefurl =
316 316
                     "https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=2021001197698727&scope=auth_user&redirect_uri=" +
@@ -451,17 +451,16 @@
451 451
                     signType: signType, // 签名方式,默认为'SHA1',使用新版支付需传入'MD5'
452 452
                     paySign: paysign, // 支付签名
453 453
                     success: (res) => {
454
-                        console.log(res, '支付返回的数据')
455
-
456 454
                         // 支付成功后的回调函数
457 455
                         money = '';
456
+                        // 跳完成支付页面
458 457
                         //结束loading
459
-                        alert('支付成功');
460
-                    },
461
-                    cancel: function (res) {
462
-                         //结束loading
463
-                        alert('取消支付');
458
+                        // alert('支付成功');
464 459
                     },
460
+                    // cancel: function (res) {
461
+                    //      结束loading
462
+                    //     alert('取消支付');
463
+                    // },
465 464
                     fail: function (res) {
466 465
                          //结束loading
467 466
                         alert('支付失败');