MCPcopy Create free account
hub / github.com/chavyleung/scripts / signapp

Function signapp

wps/wps.js:44–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42
43// 签到 App
44function signapp() {
45 return new Promise((resove) => {
46 const url = { url: 'https://zt.wps.cn/2018/docer_check_in/api/checkin_today', headers: JSON.parse($.VAL_signhomeheader) }
47 url.headers['Accept'] = 'application/json, text/javascript, */*; q=0.01'
48 url.headers['Accept-Encoding'] = 'gzip, deflate, br'
49 url.headers['Origin'] = 'https://zt.wps.cn'
50 url.headers['Connection'] = 'keep-alive'
51 url.headers['Host'] = 'zt.wps.cn'
52 url.headers['Referer'] = 'https://zt.wps.cn/static/2019/docer_check_in_ios/dist/?position=member_ios'
53 url.headers['Accept-Language'] = 'zh-cn'
54 url.headers['X-Requested-With'] = 'XMLHttpRequest'
55 $.post(url, (error, response, data) => {
56 try {
57 if (error) throw new Error(error)
58 $.signapp = JSON.parse(data)
59 } catch (e) {
60 $.log(`❗️ ${$.name}, 执行失败!`, ` error = ${error || e}`, `response = ${JSON.stringify(response)}`, `data = ${data}`, '')
61 } finally {
62 resove()
63 }
64 })
65 })
66}
67
68// 获取并回答问题
69async function answerwx() {

Callers 1

wps.jsFile · 0.70

Calls 2

postMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected