可通过重置更新应用默认解析接口地址

This commit is contained in:
buvta
2021-01-19 19:16:56 +08:00
parent 35e6e59b73
commit f098198448
3 changed files with 23 additions and 4 deletions

View File

@@ -35,7 +35,7 @@
"name": "7K资源",
"api": "https://zy.7kjx.com/cjapi.php",
"download": "",
"jiexiUrl": "https://jx.7kjx.com/?url=",
"jiexiUrl": "default",
"group": "默认",
"isActive": true
},

View File

@@ -483,6 +483,15 @@ const zy = {
})
})
},
get7kParseURL () {
return new Promise((resolve, reject) => {
axios.get('https://zy.7kjx.com/').then(res => {
const $ = cheerio.load(res.data)
const parseURL = $('body > div.container > div > div.stui-pannel > div.col-pd > p:contains("解析接口:")').first().find('a').text()
resolve(parseURL)
}).catch(err => { reject(err) })
})
},
proxy () {
return new Promise((resolve, reject) => {
setting.find().then(db => {