Browse Source

增加百度统计占击事件

wgl 4 năm trước cách đây
mục cha
commit
5645e3f236

+ 1 - 1
config/project.js

@@ -1 +1 @@
-exports.name = 'business'
+exports.name = 'home'

+ 2 - 0
index/business/index.html

@@ -100,5 +100,7 @@
 				}
 			})();
 		</script>
+		
+		<script src="https://hm.baidu.com/hm.js?37382f62b1544b15fb9496191e0b3cb4"></script>
 	</body>
 </html>

+ 2 - 0
index/home/index.html

@@ -128,5 +128,7 @@
 				}
 			})();
 		</script>
+		
+		<script src="https://hm.baidu.com/hm.js?37382f62b1544b15fb9496191e0b3cb4"></script>
 	</body>
 </html>

+ 2 - 0
index/pension/index.html

@@ -99,5 +99,7 @@
 				}
 			})();
 		</script>
+		
+		<script src="https://hm.baidu.com/hm.js?37382f62b1544b15fb9496191e0b3cb4"></script>
 	</body>
 </html>

+ 2 - 0
index/residence/index.html

@@ -52,5 +52,7 @@
 				}
 			})();
 		</script>
+		
+		<script src="https://hm.baidu.com/hm.js?37382f62b1544b15fb9496191e0b3cb4"></script>
 	</body>
 </html>

+ 4 - 0
src/projects/business/main.js

@@ -181,6 +181,10 @@ router.beforeEach((to, from, next) => {
 		store.commit('SET_TOKEN', to.query.token);
 	}
 
+	if (process.env.VUE_APP_NODE_NAME == 'production') {
+		window._hmt.push(['_trackEvent', '页面跳转', 'click', to.meta.title, 1]);
+	}
+
 	checkRole(to, from, next);
 
 })

+ 4 - 0
src/projects/home/main.js

@@ -29,6 +29,10 @@ router.beforeEach((to, from, next) => {
 	if (to.query.promote_id) {
 		store.commit('SET_INVITATION_CODE', to.query.promote_id);
 	}
+	
+	if (process.env.VUE_APP_NODE_NAME == 'production') {
+		window._hmt.push(['_trackEvent', '页面跳转', 'click', to.meta.title, 1]);
+	}
 
 	next();
 })

+ 4 - 0
src/projects/pension/main.js

@@ -151,6 +151,10 @@ router.beforeEach((to, from, next) => {
 	if (to.query.token) {
 		store.commit('SET_TOKEN', to.query.token);
 	}
+	
+	if (process.env.VUE_APP_NODE_NAME == 'production') {
+		window._hmt.push(['_trackEvent', '页面跳转', 'click', to.meta.title, 1]);
+	}
 
 	checkRole(to, from, next);
 })