bayi 1 ano atrás
pai
commit
639c8de970

+ 2 - 3
pages/my/index.js

@@ -142,6 +142,8 @@ Page({
         })
         let res = await buyVip({
             productId: currentTarget.dataset.id
+        }).finally(() => {
+            wx.hideLoading()
         })
         userEvent({
             action: 'ANDROID_PAY_ACTIVITY',
@@ -174,9 +176,6 @@ Page({
                     icon: "none",
                     duration: 3000
                 })
-            },
-            complete: () => {
-                wx.hideLoading()
             }
         })
     },

+ 1 - 2
pages/my/index.wxml

@@ -61,8 +61,7 @@
     </view>
   </view> -->
     <!-- 安卓 -->
-    <view class="scrollViewBox">
-        <!-- <view class="scrollViewBox" wx:if="{{vipTime!='1'&&!isIos}}"> -->
+    <view class="scrollViewBox" wx:if="{{vipTime!='1'&&!isIos}}">
         <scroll-view class="goodsList" scroll-x="true" enhanced show-scrollbar="{{false}}">
             <view class="payBox pbbg2" bindtap="toBuy" data-id="{{products[0].id}}">
                 <view class="pay">

+ 8 - 2
pages/reading/index.js

@@ -143,9 +143,9 @@ Page({
             console.log('触发评分结束了');
             this.getRecordScore(res)
         });
-        wsEngine.onErrorResult(async (res) => {
+        wsEngine.onErrorResult((res) => {
             console.log("===收到错误结果=============", res)
-            await userEvent({
+            userEvent({
                 action: 'WXSCORE',
                 targetContent: res
             })
@@ -762,6 +762,9 @@ Page({
         }).finally(() => {
             wx.hideLoading()
         })
+        userEvent({
+            action: 'ANDROID_PAY_ACTIVITY',
+        })
         let {
             timeStamp,
             nonceStr,
@@ -784,6 +787,9 @@ Page({
                 setTimeout(() => {
                     this.getVipInfo()
                 }, 1500)
+                userEvent({
+                    action: 'ANDROID_PAY_SUCCESS',
+                })
             },
             fail(res) {
                 wx.showToast({

+ 3 - 3
utils/request.js

@@ -6,13 +6,13 @@ const {
         envVersion
     }
 } = wx.getAccountInfoSync();
-if (envVersion == 'develop') {
+/* if (envVersion == 'develop') {
     baseUrl = 'https://reader-api.efunbox.cn/wx'
     oldUrl = 'https://reader-api.efunbox.cn'
-} else {
+} else { */
     baseUrl = 'https://reader-api.ai160.com/wx'
     oldUrl = 'https://reader-api.ai160.com'
-}
+// }
 
 function request(url, method, data, oldBaseUrl = false, intercept = true) {
     let header = {

+ 36 - 0
小咖秀公众号支付/index.html

@@ -178,6 +178,7 @@
         var searchParams = new URLSearchParams(url)
         // 获取code参数的值
         var code = searchParams.get('code')
+        var first = searchParams.get('first')
         var uid = searchParams.get('uid')
         if (uid) {
           this.uid = uid
@@ -200,6 +201,19 @@
         } else {
           this.getWxCode()
         }
+        if (first) {
+          axios({
+            method: 'post',
+            url: 'https://reader-api.ai160.com/wx/userEvent/v2',
+            headers: {
+              uid: this.uid,
+              channelCode: '3001'
+            },
+            data: {
+              action: 'IOS_PAY_ENTER'
+            }
+          })
+        }
       },
       methods: {
         selected(e) {
@@ -246,6 +260,17 @@
                 async res => {
                   if (res.err_msg == 'get_brand_wcpay_request:ok') {
                     this.mask = true
+                    axios({
+                      method: 'post',
+                      url: 'https://reader-api.ai160.com/wx/userEvent/v2',
+                      headers: {
+                        uid: this.uid,
+                        channelCode: '3001'
+                      },
+                      data: {
+                        action: 'IOS_PAY_SUCCESS'
+                      }
+                    })
                   } else {
                     this.getWxCode()
                   }
@@ -253,6 +278,17 @@
               )
             })
           })
+          axios({
+            method: 'post',
+            url: 'https://reader-api.ai160.com/wx/userEvent/v2',
+            headers: {
+              uid: this.uid,
+              channelCode: '3001'
+            },
+            data: {
+              action: 'IOS_PAY_ACTIVITY'
+            }
+          })
         },
         closeMask() {
           this.mask = false