mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-13 10:35:07 +08:00
v3.8.2 修改登录超时刷新页面跳转登录页面还提示重新登录问题
This commit is contained in:
21
yudao-ui-admin/src/tongji.js
Normal file
21
yudao-ui-admin/src/tongji.js
Normal file
@ -0,0 +1,21 @@
|
||||
// Baidu 统计 integration
|
||||
import router from './router'
|
||||
|
||||
window._hmt = window._hmt || []; // 用于 router push
|
||||
const HM_ID = process.env.VUE_APP_BAIDU_CODE || ''; // 有值的时候,才开启
|
||||
(function() {
|
||||
if (!HM_ID) {
|
||||
return;
|
||||
}
|
||||
const hm = document.createElement("script")
|
||||
hm.src = "https://hm.baidu.com/hm.js?" + HM_ID
|
||||
const s = document.getElementsByTagName("script")[0]
|
||||
s.parentNode.insertBefore(hm, s)
|
||||
})()
|
||||
|
||||
router.afterEach(function (to) {
|
||||
if (!HM_ID) {
|
||||
return;
|
||||
}
|
||||
_hmt.push(['_trackPageview', to.fullPath])
|
||||
})
|
Reference in New Issue
Block a user