mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-11-02 21:44:01 +08:00
🧶 添加百度统计
This commit is contained in:
@@ -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])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
@@ -141,10 +141,11 @@
|
||||
<script>
|
||||
import { mapMutations } from 'vuex'
|
||||
import pkg from '../../package.json'
|
||||
import { setting, sites, shortcut, star } from '../lib/dexie'
|
||||
import { setting, sites, shortcut } from '../lib/dexie'
|
||||
import { sites as defaultSites } from '../lib/dexie/initData'
|
||||
import { shell, clipboard, remote } from 'electron'
|
||||
import db from '../lib/dexie/dexie'
|
||||
const _hmt = window._hmt
|
||||
export default {
|
||||
name: 'setting',
|
||||
data () {
|
||||
@@ -152,7 +153,6 @@ export default {
|
||||
pkg: pkg,
|
||||
sitesList: [],
|
||||
shortcutList: [],
|
||||
favoritesList: [],
|
||||
show: {
|
||||
site: false,
|
||||
shortcut: false,
|
||||
@@ -243,11 +243,6 @@ export default {
|
||||
this.shortcutList = res
|
||||
})
|
||||
},
|
||||
getFavorites () {
|
||||
star.all().then(res => {
|
||||
this.favoritesList = res
|
||||
})
|
||||
},
|
||||
changeView (e) {
|
||||
this.d.view = e
|
||||
this.updateSettingEvent()
|
||||
@@ -315,6 +310,7 @@ export default {
|
||||
changeTheme (e) {
|
||||
this.d.theme = e
|
||||
this.updateSettingEvent()
|
||||
_hmt.push(['_trackEvent', 'setting', 'theme', e])
|
||||
},
|
||||
changeShortcut (e) {
|
||||
this.d.shortcut = e
|
||||
@@ -382,7 +378,6 @@ export default {
|
||||
this.getSites()
|
||||
this.getSetting()
|
||||
this.getShortcut()
|
||||
this.getFavorites()
|
||||
this.getLatestVersion()
|
||||
this.createContextMenu()
|
||||
}
|
||||
|
||||
@@ -69,6 +69,8 @@ export default {
|
||||
const id = this.share.info.ids || this.share.info.id
|
||||
zy.detail(this.share.key, id).then(res => {
|
||||
if (res) {
|
||||
const _hmt = window._hmt
|
||||
_hmt.push(['_trackEvent', 'film', 'share', res.name])
|
||||
this.pic = res.pic
|
||||
var m3u8List = {}
|
||||
const dd = res.dl.dd
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
const _hmt = window._hmt
|
||||
_hmt.push(['_trackEvent', 'video', 'play', '红楼梦'])
|
||||
// _hmt.push(['_trackEvent', 'video', 'play', '三国演义'])
|
||||
// _hmt.push(['_trackEvent', 'page', 'open', 'Film'])
|
||||
// _hmt.push(['_trackEvent', 'page', 'open', 'IPTV'])
|
||||
console.log(_hmt)
|
||||
@@ -4,7 +4,6 @@ import store from './store'
|
||||
import 'modern-normalize'
|
||||
import Register from './components/register'
|
||||
import './lib/element/index'
|
||||
import './lib/site/analytics'
|
||||
|
||||
Register.registerComponents()
|
||||
Vue.config.productionTip = false
|
||||
|
||||
@@ -395,6 +395,8 @@ export default {
|
||||
this.xg = new Hls(this.config)
|
||||
this.mtEvent()
|
||||
this.getUrls()
|
||||
const _hmt = window._hmt
|
||||
_hmt.push(['_trackEvent', 'page', 'view', 'mini'])
|
||||
},
|
||||
beforeDestroy () {
|
||||
clearInterval(this.timer)
|
||||
|
||||
Reference in New Issue
Block a user