diff --git a/frontend/src/main.js b/frontend/src/main.js index a3008fae..f71efae5 100644 --- a/frontend/src/main.js +++ b/frontend/src/main.js @@ -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 diff --git a/frontend/src/views/spider/SpiderList.vue b/frontend/src/views/spider/SpiderList.vue index afc4d365..4b9fa610 100644 --- a/frontend/src/views/spider/SpiderList.vue +++ b/frontend/src/views/spider/SpiderList.vue @@ -401,7 +401,7 @@ export default { }) }, onView (row) { - this.$router.push('/spiders/' + row._id) + this.$router.push('/spiders/' + row._id) this.$st.sendEv('爬虫', '查看') }, onPageChange () {