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

Function getshare

wxapp/zhanma.js:416–444  ·  view source on GitHub ↗

* 小程序分享任务 *

(timeout = 2 * 1000)

Source from the content-addressed store, hash-verified

414 *
415 */
416function getshare (timeout = 2 * 1000) {
417 return new Promise((resolve) => {
418 let url = {
419 url: `https://zm.t7a.cn/api/share.php?safe=${zmnlxq}`,
420 headers: {
421 'Host': 'zm.t7a.cn',
422 'user-agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9'
423 },
424 // body: '',
425
426 }
427 $.get(url, async (error, response, data) => {
428 try {
429 result = JSON.parse(data)
430 if (result.status == 1) {
431 console.log(result.msg)
432 } else {
433 console.log(result.msg)
434
435 }
436
437 } catch (e) {
438 console.log('数据异常:', data);
439 } finally {
440 resolve();
441 }
442 }, timeout)
443 })
444}
445
446/**
447 * 小程序战马分享任务

Callers 1

zhanma.jsFile · 0.85

Calls 2

getMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected