bayi 11 maanden geleden
bovenliggende
commit
5e75639fc0
2 gewijzigde bestanden met toevoegingen van 20 en 11 verwijderingen
  1. 9 2
      pages/my/index.less
  2. 11 9
      小咖秀公众号支付/index.html

+ 9 - 2
pages/my/index.less

@@ -85,16 +85,19 @@
             }
         }
     }
+
     .menu {
         margin-top: 30rpx;
         border-radius: 20rpx;
         background-color: white;
+
         .activation {
             padding: 28rpx 20rpx;
             display: flex;
             align-items: center;
             justify-content: space-between;
             border-bottom: 1rpx solid #EEEEEE;
+
             .tips {
                 display: flex;
                 align-items: center;
@@ -108,6 +111,7 @@
 
                 font-size: 30rpx;
             }
+
             .black {
                 margin-right: 20rpx;
                 width: 16rpx;
@@ -115,7 +119,8 @@
                 opacity: 0.8;
             }
         }
-        .activation:last-child{
+
+        .activation:last-child {
             border: none;
         }
     }
@@ -123,6 +128,7 @@
     .scrollViewBox {
         position: relative;
         width: 100vw;
+
         .goodsList {
             margin-top: 40rpx;
             width: 100%;
@@ -190,7 +196,8 @@
             }
 
         }
-        .goodsTips{
+
+        .goodsTips {
             position: absolute;
             font-size: 24rpx;
             color: #555;

+ 11 - 9
小咖秀公众号支付/index.html

@@ -205,10 +205,21 @@
             this.product = res.data.data.productList[0]
           })
         } else {
+          // 首次进来参数不含code,需要前端跳转后获取code
           this.getWxCode()
         }
       },
       methods: {
+        getWxCode() {
+          setTimeout(() => {
+            const appId = 'wxf05800eea975a68b'
+            const redirect_uri = encodeURIComponent('https://h5-pay.ai160.com/reader-ios?uid=' + this.uid)
+            // const redirect_uri = encodeURIComponent('https://h5-pay.ai160.com/reader-ios?uid=d83d947655f6455a96f4197d31afa6d4')
+            const url = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + appId + '&redirect_uri=' + redirect_uri + '&response_type=code&scope=snsapi_base#wechat_redirect'
+            location.href = url
+          }, 300)
+        },
+        
         selected(e) {
           this.active = e.id
           this.product = e
@@ -287,15 +298,6 @@
         closeMask() {
           this.mask = false
           this.getWxCode()
-        },
-        getWxCode() {
-          setTimeout(() => {
-            const appId = 'wxf05800eea975a68b'
-            const redirect_uri = encodeURIComponent('https://h5-pay.ai160.com/reader-ios?uid=' + this.uid)
-            // const redirect_uri = encodeURIComponent('https://h5-pay.ai160.com/reader-ios?uid=d83d947655f6455a96f4197d31afa6d4')
-            const url = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + appId + '&redirect_uri=' + redirect_uri + '&response_type=code&scope=snsapi_base#wechat_redirect'
-            location.href = url
-          }, 300)
         }
       }
     })