From 53d549839c8568f6e45fe14ae1e8c4bebe159ead Mon Sep 17 00:00:00 2001
From: 石广澎 <shiguangpeng@163.com>
Date: 星期二, 03 九月 2024 16:48:35 +0800
Subject: [PATCH] feat(支付): 1、改为hash路由 2、页面显示错误原因

---
 pay/scanpay.vue |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/pay/scanpay.vue b/pay/scanpay.vue
index a910cda..5b64e21 100644
--- a/pay/scanpay.vue
+++ b/pay/scanpay.vue
@@ -44,9 +44,11 @@
                   color: #1E8BE0
                 }
               </style>
-              <span class="txt">寰俊鎼滅储鎴栫洿鎺ョ偣鍑绘墦寮�</span>
-              <span class="btn">銆愬唨浼橀偖銆�</span>
-              <span class="txt">灏忕▼搴忥紝浜彈鏇村浼樻儬</span>
+              <div>
+                <span class="txt">寰俊鎼滅储鎴栫洿鎺ョ偣鍑绘墦寮�</span>
+                <span class="btn">銆愬唨浼橀偖銆�</span>
+                <span class="txt">灏忕▼搴忥紝浜彈鏇村浼樻儬</span>
+              </div>
             </script>
           </wx-open-launch-weapp>
         </view>
@@ -310,7 +312,7 @@
     /*鎺堟潈unionid*/
     toRegister() {
       if (this.payWay == 2) {
-        const redirect_uri = encodeURIComponent(`${config.webURL}/pay/scanpay?cid=${this.cid || ''}&shopId=${this.shopId || ''}&activityQrcodeId=${this.activityQrcodeId || ''}&smoney=${this.smoney || ''}`)
+        const redirect_uri = encodeURIComponent(`${config.webURL}/#/pay/scanpay?cid=${this.cid || ''}&shopId=${this.shopId || ''}&activityQrcodeId=${this.activityQrcodeId || ''}&smoney=${this.smoney || ''}`)
         uni.clearStorageSync()
         window.location.href =
             `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${config.wx_appid}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect`
@@ -357,10 +359,10 @@
           res.logoImage = config.baseURL + res.logoImage
         }
         this.shopInfo = res
-      }).catch(() => {
+      }).catch((err) => {
         clearTimeout(timer)
         this.shopInfo.scanFlag = 0
-        this.tips = '褰撳墠鐢ㄦ埛杩囧锛岃绋嶅悗閲嶈瘯锝瀇锝�'
+        this.tips = err.description||'褰撳墠鐢ㄦ埛杩囧锛岃绋嶅悗閲嶈瘯锝瀇锝�'
         this.loading = false
       })
 

--
Gitblit v1.9.1