|
|
|
@ -489,7 +489,7 @@ function yiji() { |
|
|
|
|
try{ |
|
|
|
|
programversion = $.require("config").version || 0; |
|
|
|
|
}catch(e){} |
|
|
|
|
if(programversion<10){ |
|
|
|
|
if(programversion<11){ |
|
|
|
|
confirm({ |
|
|
|
|
title: "温馨提示", |
|
|
|
|
content: "发现小程序新版本", |
|
|
|
@ -500,6 +500,27 @@ function yiji() { |
|
|
|
|
return "toast://不升级小程序,功能不全或有异常" |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
let delquirelist = ['https://cdn.staticaly.com/gh/', 'https://ghproxy.com/https://raw.githubusercontent.com/']; |
|
|
|
|
let requirelist = [{ url: 'https://ghproxy.net/https://raw.githubusercontent.com/', sort: 0 }, { url: 'https://gh.con.sh/https://raw.githubusercontent.com/', sort: 0 }, { url: 'https://mirror.ghproxy.com/https://raw.githubusercontent.com/', sort: 0 }, { url: 'https://ghps.cc/https://raw.githubusercontent.com/', sort: 0 }, { url: 'https://github.jevons.vip/https://raw.githubusercontent.com/', sort: 0 }]; |
|
|
|
|
let requirefile = "hiker://files/rules/Src/require.json"; |
|
|
|
|
if (fetch(requirefile)) { |
|
|
|
|
try { |
|
|
|
|
eval("let requirelist_tmp=" + fetch(requirefile) + ";"); |
|
|
|
|
requirelist.forEach(it=>{ |
|
|
|
|
let index = requirelist_tmp.indexOf(requirelist_tmp.filter(d=>d.name == it.url)[0]); |
|
|
|
|
if(index==-1){ |
|
|
|
|
requirelist_tmp.push(it); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
for (let i = 0; i < requirelist_tmp.length; i++) { |
|
|
|
|
if(delquirelist.includes(requirelist_tmp[i].url)){ |
|
|
|
|
delete requirelist_tmp[i]; |
|
|
|
|
i = i - 1; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
writeFile(requirefile, JSON.stringify(requirelist_tmp)); |
|
|
|
|
} catch (e) { } |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Version(); |
|
|
|
|
} |
|
|
|
|