erekook 1 год назад
Родитель
Сommit
b77c3e1e14
2 измененных файлов с 3 добавлено и 0 удалено
  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({
     onLaunch(options) {
         console.log('场景值:', options, options.scene);
+        this.globalData.from = options.query.from || ''
         novelPlugin.setLoggerConfig({
             info: false,
             debug: false,
@@ -125,6 +126,7 @@ App({
         isEnterVideoDetail: false,  // 是否进入过视频详情页
         ads_config: {}, // 广告策略配置
         userCode: '',
+        from: ''
     }
 })
 

+ 1 - 0
utils/util.js

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