* 小程序分享任务 *
(timeout = 2 * 1000)
| 414 | * |
| 415 | */ |
| 416 | function 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 | * 小程序战马分享任务 |