* 获取远程版本,鸟VPS不改post请求获取不了内容
(timeout = 3 * 1000)
| 895 | * 获取远程版本,鸟VPS不改post请求获取不了内容 |
| 896 | */ |
| 897 | function getVersion (timeout = 3 * 1000) { |
| 898 | return new Promise((resolve) => { |
| 899 | let url = { |
| 900 | url: `http://www.holyxie.com/script/zmnlxq/zmnlxq.js`, |
| 901 | } |
| 902 | $.post(url, async (err, resp, data) => { |
| 903 | try { |
| 904 | VersionLatest = data.match(/"\d.+"/) |
| 905 | console.log(`最新版本号为:${VersionLatest}`); |
| 906 | } catch (e) { |
| 907 | $.logErr(e, resp); |
| 908 | } finally { |
| 909 | resolve() |
| 910 | } |
| 911 | }, timeout) |
| 912 | }) |
| 913 | } |
| 914 | |
| 915 | |
| 916 | //#region 固定代码 可以不管他 |