fixed send user stats issue

This commit is contained in:
Marvin Zhang
2019-06-04 20:26:33 +08:00
parent 9148e31afe
commit a1ee97ce6b
2 changed files with 10 additions and 8 deletions

View File

@@ -33,13 +33,15 @@ Vue.use(ElementUI, { locale })
Vue.config.productionTip = false
// 百度统计
window._hmt = window._hmt || [];
(function () {
let hm = document.createElement('script')
hm.src = 'https://hm.baidu.com/hm.js?c35e3a563a06caee2524902c81975add'
let s = document.getElementsByTagName('script')[0]
s.parentNode.insertBefore(hm, s)
})()
if (localStorage.getItem('useStats') !== '0') {
window._hmt = window._hmt || [];
(function () {
let hm = document.createElement('script')
hm.src = 'https://hm.baidu.com/hm.js?c35e3a563a06caee2524902c81975add'
let s = document.getElementsByTagName('script')[0]
s.parentNode.insertBefore(hm, s)
})()
}
// inject request api
Vue.prototype.$request = request

View File

@@ -401,7 +401,7 @@ export default {
})
},
onView (row) {
this.$router.push('/spiders/' + row._id)
this.$router.push('/spiders/' + row._id)
this.$st.sendEv('爬虫', '查看')
},
onPageChange () {