MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / getVersion

Function getVersion

wxapp/zhanma.js:897–913  ·  view source on GitHub ↗

* 获取远程版本,鸟VPS不改post请求获取不了内容

(timeout = 3 * 1000)

Source from the content-addressed store, hash-verified

895* 获取远程版本,鸟VPS不改post请求获取不了内容
896*/
897function 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 固定代码 可以不管他

Callers

nothing calls this directly

Calls 3

postMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected