ソースを参照

Revert "埋点"

This reverts commit 0a3ed8fcc9088bb6a9388492aa30706bd00754b5.
// 2 年 前
コミット
322ba486b0

+ 11 - 22
api/global.js

@@ -1,26 +1,15 @@
 import {
-  request
+    request
 } from "../utils/request";
 module.exports = {
-  //获取充值配置信息
-  getProducts: data => request('/v3/product', 'get', data),
-  // 购买vip
-  buyVip: data => request('/order', 'post', data, true),
-  // 购买次数
-  buyNum: data => request('/v3/pay', 'post', data),
-  // 获取任务配置
-  getTasks: data => request('/v3/task', 'get', data),
-  // 提交任务
-  submitTask: data => request('/v3/task', 'post', data),
-  // 行为记录接口
-  /* 
-    NEW_YEAR_ACTIVITY_BANNER("banner点击数"),
-    NEW_YEAR_ACTIVITY_CHOOSE_TEMPLATE("各模板选择数"),
-    NEW_YEAR_ACTIVITY_GENERATE_TEMPLATE("各模板生成的作品数"),
-    NEW_YEAR_ACTIVITY_SEND_BLESSING("发送祝福按钮点击数"),
-    NEW_YEAR_ACTIVITY_APP_LINK("小程序链接点开数"),
-    NEW_YEAR_ACTIVITY_SHARE("分享按钮点击数"),
-    NEW_YEAR_ACTIVITY_PLAY_TOO("我也要玩点击数"),
-  */
-  actionRecord: data => request('/userEvent/v2', 'post', data),
+    //获取充值配置信息
+    getProducts: data => request('/v3/product', 'get', data),
+    // 购买vip
+    buyVip: data => request('/order', 'post', data, true),
+    // 购买次数
+    buyNum: data => request('/v3/pay', 'post', data),
+    // 获取任务配置
+    getTasks: data => request('/v3/task', 'get', data),
+    // 提交任务
+    submitTask: data => request('/v3/task', 'post', data),
 }

+ 24 - 30
component/activityPop/index.js

@@ -1,36 +1,30 @@
 let app = getApp()
-import {
-  actionRecord
-} from '~/api/global'
 Component({
-  data: {
-    state: false
-  },
-  lifetimes: {
-    attached() {
-      let state = app.globalData.activityPop
-      if (this.data.state != state) {
-        this.setData({
-          state
-        })
-      }
-    },
-  },
-  methods: {
-    close() {
-      getApp().globalData.activityPop = false;
-      this.setData({
+    data: {
         state: false
-      })
     },
-    async jumpDet() {
-      await actionRecord({
-        action: 'NEW_YEAR_ACTIVITY_BANNER'
-      })
-      this.close()
-      wx.navigateTo({
-        url: '/pages/activityList/index',
-      })
+    lifetimes: {
+        attached() {
+            let state = app.globalData.activityPop
+            if (this.data.state != state) {
+                this.setData({
+                    state
+                })
+            }
+        },
+    },
+    methods: {
+        close() {
+            getApp().globalData.activityPop = false;
+            this.setData({
+                state: false
+            })
+        },
+        jumpDet() {
+            this.close()
+            wx.navigateTo({
+                url: '/pages/activityList/index',
+            })
+        }
     }
-  }
 })

+ 1 - 1
component/activityPop/index.less

@@ -11,7 +11,7 @@
     background-color: rgba(0, 0, 0, 0.46);
 
     .closeImg {
-        width: 50rpx;
+        width: 52rpx;
         height: 62rpx;
         margin-top: 250rpx;
         margin-left: 80%;

+ 1 - 1
component/activityPop/index.wxss

@@ -11,7 +11,7 @@
   background-color: rgba(0, 0, 0, 0.46);
 }
 .popBox .closeImg {
-  width: 50rpx;
+  width: 52rpx;
   height: 62rpx;
   margin-top: 250rpx;
   margin-left: 80%;

+ 2 - 29
pages/activityDet/index.js

@@ -3,9 +3,6 @@ import {
   getShareText,
   saveActivity
 } from '~/api/activity'
-import {
-  actionRecord
-} from '~/api/global'
 /*微信录音*/
 let recorderManager = wx.getRecorderManager();
 let dsq
@@ -60,6 +57,7 @@ Page({
     this.setData({
       configure,
       avatar: configure.photoText,
+      toWidth: '',
       fromWidth: configure.fromText.length * configure.fromFontSize,
       toWidth: configure.toText.length * configure.toFontSize,
       id: options.id,
@@ -67,25 +65,6 @@ Page({
       tens: configure.bgMusicLength[0],
       bits: configure.bgMusicLength[1]
     })
-    this.innerAudioContext = wx.createInnerAudioContext();
-    // 录音授权
-    wx.getSetting({
-      success(res) {
-        console.log(res);
-        if (!res.authSetting['scope.record']) {
-          wx.authorize({
-            scope: 'scope.record',
-            success() {
-              // 用户已经同意小程序使用录音功能,后续调用接口不会弹窗询问
-            }
-          })
-        }
-      }
-    })
-    await actionRecord({
-      action: 'NEW_YEAR_ACTIVITY_CHOOSE_TEMPLATE',
-      targetContent: options.id
-    })
   },
   async changeAvatar(e) {
     const {
@@ -99,6 +78,7 @@ Page({
   },
   play() {
     if (this.data.state == 'before') {
+      this.innerAudioContext = wx.createInnerAudioContext();
       this.innerAudioContext.src = this.data.configure.bgMusic; // 这里可以是录音的临时路径
       this.innerAudioContext.play();
       this.innerAudioContext.onEnded((res) => {
@@ -201,10 +181,6 @@ Page({
         greetingCard,
         uploadState: false
       })
-      await actionRecord({
-        action: 'NEW_YEAR_ACTIVITY_GENERATE_TEMPLATE',
-        targetContent: this.data.id
-      })
     })
   },
   playUserAudio() {
@@ -319,9 +295,6 @@ Page({
     from,
   }) {
     if (from == 'button') {
-      actionRecord({
-        action: 'NEW_YEAR_ACTIVITY_SEND_BLESSING',
-      })
       const promise = new Promise(resolve => {
         this.createActivityImg().then(res => {
           resolve(res)

+ 5 - 18
pages/greeting/index.js

@@ -6,9 +6,6 @@ import {
   getShareText,
   playAudioEvent
 } from '~/api/activity'
-import {
-  actionRecord
-} from '~/api/global'
 Page({
   /**
    * 页面的初始数据
@@ -35,20 +32,17 @@ Page({
    */
   async onLoad(options) {
     console.log(options);
-    this.setData({
-      uid: wx.getStorageSync('uid')
-    })
     if (options.cardId) {
       let oneCard = await getOneActivity(options.cardId)
       this.setData({
         list: oneCard ? [oneCard] : [],
         userId: options.uid
       })
-      await actionRecord({
-        action: 'NEW_YEAR_ACTIVITY_APP_LINK',
-      })
     }
     this.getMyActivity()
+    this.setData({
+      uid: wx.getStorageSync('uid')
+    })
     this.innerAudioContext = wx.createInnerAudioContext();
     this.innerAudioContext.onTimeUpdate(() => {
       this.setDuration('playTime', this.innerAudioContext.currentTime)
@@ -70,7 +64,7 @@ Page({
       pageSize: 6
     })
     if (this.data.userId) {
-      let firstCard = this.data.list.length > 0 ? this.data.list[0] : ''
+      let firstCard = this.data.list.length>0?this.data.list[0]:''
       console.log(firstCard);
       list = list.filter(item => {
         return item.id != firstCard.id
@@ -78,7 +72,6 @@ Page({
     }
     list = [...this.data.list, ...list]
     let isMy = false
-    console.log(list);
     if (list.length > 0) {
       isMy = list[0].uid == wx.getStorageSync('uid')
     }
@@ -164,10 +157,7 @@ Page({
       [`list[${index}].likeAmount`]: ++this.data.list[index].likeAmount
     })
   },
-  async jump() {
-    await actionRecord({
-      action: 'NEW_YEAR_ACTIVITY_PLAY_TOO',
-    })
+  jump() {
     wx.navigateTo({
       url: '/pages/activityList/index',
     })
@@ -214,9 +204,6 @@ Page({
           resolve(res)
         })
       })
-      actionRecord({
-        action: 'NEW_YEAR_ACTIVITY_SHARE',
-      })
       return {
         title: '',
         path: `/pages/greeting/index?&uid=${wx.getStorageSync('uid')}`,