Your Name 3 年之前
父節點
當前提交
d01878c476
共有 4 個文件被更改,包括 18 次插入12 次删除
  1. 4
    4
      config/dev.js
  2. 4
    4
      config/prod.js
  3. 1
    1
      project.config.json
  4. 9
    3
      src/app.jsx

+ 4
- 4
config/dev.js 查看文件

3
     NODE_ENV: '"development"'
3
     NODE_ENV: '"development"'
4
   },
4
   },
5
   defineConstants: {
5
   defineConstants: {
6
-    // HOST: '"https://xlk.njyz.tech"',
7
-    HOST: '"http://127.0.0.1:8081"',
6
+    HOST: '"https://xlk.njyz.tech"',
7
+    // HOST: '"http://127.0.0.1:8081"',
8
     WSS_HOST: '"wss://xlk.njyz.tech"',
8
     WSS_HOST: '"wss://xlk.njyz.tech"',
9
-    OSS_PATH: '"https://zhiyun-image.oss-accelerate.aliyuncs.com/"',
10
-    OSS_FAST_PATH: '"https://zhiyun-image.oss-accelerate.aliyuncs.com/"',
9
+    OSS_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
10
+    OSS_FAST_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
11
     ICON_FONT: '"https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/css/iconfont.ttf"',
11
     ICON_FONT: '"https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/css/iconfont.ttf"',
12
     Version: '"V3.5.29-20201112"'
12
     Version: '"V3.5.29-20201112"'
13
   },
13
   },

+ 4
- 4
config/prod.js 查看文件

3
     NODE_ENV: '"production"'
3
     NODE_ENV: '"production"'
4
   },
4
   },
5
   defineConstants: {
5
   defineConstants: {
6
-    HOST: '"https://xlk.njyz.tech"', //正式
7
-    WSS_HOST: '"wss://xlk.njyz.tech"',
8
-    OSS_PATH: '"https://zhiyun-image.oss-accelerate.aliyuncs.com/"',
9
-    OSS_FAST_PATH: '"https://zhiyun-image.oss-accelerate.aliyuncs.com/"',
6
+    HOST: '"https://xlj.newlandsh.com"', //正式
7
+    WSS_HOST: '"wss://xlj.newlandsh.com"',
8
+    OSS_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
9
+    OSS_FAST_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
10
     ICON_FONT: '"https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/css/iconfont.ttf"',
10
     ICON_FONT: '"https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/css/iconfont.ttf"',
11
     Version: '"V3.5.29-20201112"'
11
     Version: '"V3.5.29-20201112"'
12
   },
12
   },

+ 1
- 1
project.config.json 查看文件

2
 	"miniprogramRoot": "dist/",
2
 	"miniprogramRoot": "dist/",
3
 	"projectname": "miniapp",
3
 	"projectname": "miniapp",
4
 	"description": "",
4
 	"description": "",
5
-	"appid": "wxe44244d1a5ea3364",
5
+	"appid": "wxc96058d57e77f373",
6
 	"setting": {
6
 	"setting": {
7
 		"urlCheck": false,
7
 		"urlCheck": false,
8
 		"es6": false,
8
 		"es6": false,

+ 9
- 3
src/app.jsx 查看文件

10
 import './app.scss'
10
 import './app.scss'
11
 
11
 
12
 class App extends Component {
12
 class App extends Component {
13
+  // 是否登录
14
+  logged;
13
   // 更新埋点
15
   // 更新埋点
14
   updateTracking;
16
   updateTracking;
15
 
17
 
19
     // 保留初始场景
21
     // 保留初始场景
20
     Taro.setStorage({ key: 'scene', data: options.scene })
22
     Taro.setStorage({ key: 'scene', data: options.scene })
21
     // 埋点
23
     // 埋点
22
-    trackUserSource(options).then((res) => (this.updateTracking = res))
24
+    if (this.logged) {
25
+      trackUserSource(options).then((res) => (this.updateTracking = res))
26
+    }
23
   }
27
   }
24
 
28
 
25
   componentDidHide () {
29
   componentDidHide () {
72
           // 初始化 im
76
           // 初始化 im
73
           im.init(personId)
77
           im.init(personId)
74
 
78
 
75
-          // // 埋点
76
-          // trackUserSource(router.params).then(r => this.updateTrack = r)
79
+          this.logged = true
80
+
81
+          // 埋点
82
+          trackUserSource(options).then((x) => (this.updateTracking = x))
77
         })
83
         })
78
       })
84
       })
79
     })
85
     })