更新setting数据

This commit is contained in:
haiyangcui
2020-10-08 22:40:31 +02:00
parent 015595eb0a
commit 4212cc681a
4 changed files with 19 additions and 36 deletions

View File

@@ -189,12 +189,6 @@ export default {
searchTxt () {
this.searchChangeEvent()
},
'setting.sitesList': {
handler (nv) {
this.getAllsites()
},
deep: true
},
'$store.state.editSites.sites': function () {
this.getAllsites()
}
@@ -475,28 +469,16 @@ export default {
}
}
},
getAllsites (nv) {
if (nv) {
sites.all().then(res => {
this.sites = res
for (const i of res) {
if (i.key === nv) {
this.site = i
this.siteClick(this.site)
return false
}
}
})
} else {
sites.all().then(res => {
this.sites = res
this.site = this.sites[0]
this.siteClick(this.site)
})
}
getAllsites () {
sites.all().then(res => {
this.sites = res
this.site = this.sites[0]
this.siteClick(this.site)
})
}
},
created () {
this.getAllsites()
this.getAllSearch()
}
}

View File

@@ -197,18 +197,15 @@ export default {
setting.find().then(res => {
this.d = {
id: res.id,
site: res.site,
theme: res.theme,
shortcut: res.shortcut,
view: res.view,
searchAllSites: res.searchAllSites !== null ? res.searchAllSites : true,
externalPlayer: res.externalPlayer,
editPlayerPath: false,
excludeRootClasses: res.excludeRootClasses !== null ? res.excludeRootClasses : true,
excludeR18Films: res.excludeR18Films !== null ? res.excludeR18Films : true,
forwardTimeInSec: res.forwardTimeInSec !== null ? res.forwardTimeInSec : 5
searchAllSites: res.searchAllSites,
excludeRootClasses: res.excludeRootClasses,
excludeR18Films: res.excludeR18Films,
forwardTimeInSec: res.forwardTimeInSec
}
this.setting = this.d
})
},
getSites () {
@@ -346,8 +343,8 @@ export default {
}
},
created () {
this.getSetting()
this.getSites()
this.getSetting()
this.getShortcut()
this.getFavorites()
this.getLatestVersion()

View File

@@ -6,7 +6,7 @@ const db = new Dexie('zy')
db.version(3).stores({
search: '++id, keywords',
iptvSearch: '++id, keywords',
setting: 'id, theme, site, shortcut, view',
setting: 'id, theme, site, shortcut, view, externalPlayer, searchAllSites, excludeRootClasses, excludeR18Films, forwardTimeInSec',
shortcut: 'name, key, desc',
star: '++id, site, ids, name, type, year, index',
sites: '++id, key, name, json, xml, down, level',

View File

@@ -2,9 +2,13 @@ const setting = [
{
id: 0,
theme: 'light',
site: 'zuidazy',
shortcut: true,
view: 'picture'
view: 'picture',
externalPlayer: '',
searchAllSites: true,
excludeRootClasses: true,
excludeR18Films: true,
forwardTimeInSec: 5
}
]