From 49589102d95ac471a6a3e3c3f90b15c6db146d8d Mon Sep 17 00:00:00 2001 From: Hunlongyu Date: Thu, 22 Oct 2020 14:22:59 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B6=20=E6=B7=BB=E5=8A=A0=E7=99=BE?= =?UTF-8?q?=E5=BA=A6=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Aside.vue | 13 +++---------- src/components/Detail.vue | 3 +++ src/components/EditSites.vue | 2 ++ src/components/Film.vue | 20 +++++++++++++------- src/components/Play.vue | 4 ++++ src/components/Setting.vue | 11 +++-------- src/components/Share.vue | 2 ++ src/lib/site/analytics.js | 6 ------ src/main.js | 1 - src/mini/Mini.vue | 2 ++ 10 files changed, 32 insertions(+), 32 deletions(-) delete mode 100644 src/lib/site/analytics.js diff --git a/src/components/Aside.vue b/src/components/Aside.vue index f6ec0b7..6a39140 100644 --- a/src/components/Aside.vue +++ b/src/components/Aside.vue @@ -69,24 +69,17 @@ export default { set (val) { this.SET_DETAIL(val) } - }, - editSites: { - get () { - return this.$store.getters.getEditSites - }, - set (val) { - this.SET_EDITSITES(val) - } } }, methods: { - ...mapMutations(['SET_VIEW', 'SET_DETAIL', 'SET_EDITSITES']), + ...mapMutations(['SET_VIEW', 'SET_DETAIL']), changeView (e) { this.view = e - // ChangeView 的时候关闭Detail页面 this.detail = { show: false } + const _hmt = window._hmt + _hmt.push(['_trackEvent', 'page', 'view', e]) } } } diff --git a/src/components/Detail.vue b/src/components/Detail.vue index c22f9b6..c26cd56 100644 --- a/src/components/Detail.vue +++ b/src/components/Detail.vue @@ -329,6 +329,9 @@ export default { this.loading = false } }) + const _hmt = window._hmt + const name = this.detail.info.name + _hmt.push(['_trackEvent', 'detail', 'view', name]) } }, created () { diff --git a/src/components/EditSites.vue b/src/components/EditSites.vue index 2d7ea8d..689e667 100644 --- a/src/components/EditSites.vue +++ b/src/components/EditSites.vue @@ -177,6 +177,8 @@ export default { api: this.siteInfo.api, download: this.siteInfo.download } + const _hmt = window._hmt + _hmt.push(['_trackEvent', 'site', 'add', `${this.siteInfo.name}: ${this.siteInfo.api}`]) if (this.dialogType === 'edit') sites.remove(this.siteInfo.id) sites.add(doc).then(res => { this.siteInfo = { diff --git a/src/components/Film.vue b/src/components/Film.vue index 6ad6f2a..37c92ac 100644 --- a/src/components/Film.vue +++ b/src/components/Film.vue @@ -213,6 +213,8 @@ export default { } }) } + const _hmt = window._hmt + _hmt.push(['_trackEvent', 'site', 'change', e.name]) }, classClick (e) { this.show.classList = false @@ -223,6 +225,8 @@ export default { this.infiniteId += 1 } }) + const _hmt = window._hmt + _hmt.push(['_trackEvent', 'class', 'change', e.name]) }, getClass () { return new Promise((resolve, reject) => { @@ -402,6 +406,15 @@ export default { this.searchList = res.reverse() }) }, + searchEvent (wd) { + if (this.setting.searchAllSites) { + this.searchAllSitesEvent(this.sites, wd) + } else { + this.searchSingleSiteEvent(this.site, wd) + } + const _hmt = window._hmt + _hmt.push(['_trackEvent', 'film', 'search', wd]) + }, searchAllSitesEvent (sites, wd) { this.searchTxt = wd this.searchContents = [] @@ -439,13 +452,6 @@ export default { }) } }, - searchEvent (wd) { - if (this.setting.searchAllSites) { - this.searchAllSitesEvent(this.sites, wd) - } else { - this.searchSingleSiteEvent(this.site, wd) - } - }, searchSingleSiteEvent (site, wd) { var sites = [] sites.push(this.site) diff --git a/src/components/Play.vue b/src/components/Play.vue index d058d22..a1c886e 100644 --- a/src/components/Play.vue +++ b/src/components/Play.vue @@ -302,6 +302,8 @@ export default { this.playUrl(this.video.iptv.url) this.name = this.video.iptv.name this.getIptvList() + const _hmt = window._hmt + _hmt.push(['_trackEvent', 'IPTV', 'play', this.name]) } else { const index = this.video.info.index | 0 let time = 0 @@ -353,6 +355,8 @@ export default { } zy.detail(this.video.key, this.video.info.id).then(res => { this.name = res.name + const _hmt = window._hmt + _hmt.push(['_trackEvent', 'film', 'play', res.name]) const dd = res.dl.dd const type = Object.prototype.toString.call(dd) let m3u8Txt = [] diff --git a/src/components/Setting.vue b/src/components/Setting.vue index f2e448e..33bcf27 100644 --- a/src/components/Setting.vue +++ b/src/components/Setting.vue @@ -141,10 +141,11 @@