Ver Fonte

feat 埋点增加from来源

erekook há 1 ano atrás
pai
commit
b77c3e1e14
2 ficheiros alterados com 3 adições e 0 exclusões
  1. 2 0
      app.js
  2. 1 0
      utils/util.js

+ 2 - 0
app.js

@@ -16,6 +16,7 @@ import {apple} from './config/config'
 App({
 App({
     onLaunch(options) {
     onLaunch(options) {
         console.log('场景值:', options, options.scene);
         console.log('场景值:', options, options.scene);
+        this.globalData.from = options.query.from || ''
         novelPlugin.setLoggerConfig({
         novelPlugin.setLoggerConfig({
             info: false,
             info: false,
             debug: false,
             debug: false,
@@ -125,6 +126,7 @@ App({
         isEnterVideoDetail: false,  // 是否进入过视频详情页
         isEnterVideoDetail: false,  // 是否进入过视频详情页
         ads_config: {}, // 广告策略配置
         ads_config: {}, // 广告策略配置
         userCode: '',
         userCode: '',
+        from: ''
     }
     }
 })
 })
 
 

+ 1 - 0
utils/util.js

@@ -132,6 +132,7 @@ export const SendEvent = (eventName, eventParam, self) => {
     try {
     try {
         const app = self || getApp()
         const app = self || getApp()
         let eParam = {...eventParam}
         let eParam = {...eventParam}
+        eParam.from = app.globalData.from || ''
 
 
         const { brand, model, system, platform } = wx.getDeviceInfo()
         const { brand, model, system, platform } = wx.getDeviceInfo()