Ver código fonte

开发安卓支付相关埋点

bayi 1 ano atrás
pai
commit
a2b5d2d990
4 arquivos alterados com 15 adições e 7 exclusões
  1. 1 1
      api/global.js
  2. 1 1
      components/uploadFile/index.js
  3. 9 2
      pages/my/index.js
  4. 4 3
      pages/my/index.wxml

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
api/global.js


+ 1 - 1
components/uploadFile/index.js

@@ -84,7 +84,7 @@ Component({
                     percent: res.progress - 1
                 })
             })
-            await userEvent({
+            userEvent({
                 action: 'WXUPLOAD',
             })
         },

+ 9 - 2
pages/my/index.js

@@ -6,7 +6,8 @@ import {
     getLearnCard
 } from '~/api/user'
 import {
-    getProducts
+    getProducts,
+    userEvent
 } from '~/api/global'
 import {
     createStoreBindings
@@ -142,6 +143,9 @@ Page({
         let res = await buyVip({
             productId: currentTarget.dataset.id
         })
+        userEvent({
+            action: 'ANDROID_PAY_ACTIVITY',
+        })
         let {
             timeStamp,
             nonceStr,
@@ -155,11 +159,14 @@ Page({
             package: res.package,
             signType,
             paySign,
-            success: (res) => {
+            success: async (res) => {
                 setTimeout(() => {
                     this.setUserInfo()
                     this.selectComponent('#vipModal').open()
                 }, 1500)
+                userEvent({
+                    action: 'ANDROID_PAY_SUCCESS',
+                })
             },
             fail(res) {
                 wx.showToast({

+ 4 - 3
pages/my/index.wxml

@@ -61,7 +61,8 @@
     </view>
   </view> -->
     <!-- 安卓 -->
-    <view class="scrollViewBox" wx:if="{{vipTime!='1'&&!isIos}}">
+    <view class="scrollViewBox">
+        <!-- <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">
@@ -97,12 +98,12 @@
         </view>
         <image class='black' src='/static/black.png'></image>
     </view>
-    <view class="activation" bindtap="jump" data-url="/pages/orderRecord/index">
+    <!--     <view class="activation" bindtap="jump" data-url="/pages/orderRecord/index">
         <view class="tips">
             <image src="/static/care.png" class="tipsImg" />购买记录
         </view>
         <image class='black' src='/static/black.png'></image>
-    </view>
+    </view> -->
     <!-- 弹窗 -->
     <view class="activationModal" wx:if="{{activationModal}}">
         <view class="box zoomIn">