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

Function getSigninfo

wps/wps.js:197–218  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

195
196// 获取签到详情
197function getSigninfo() {
198 return new Promise((resove) => {
199 const url = { url: 'https://zt.wps.cn/2018/docer_check_in/api/checkin_record', headers: JSON.parse($.VAL_signhomeheader) }
200 url.headers['Accept-Encoding'] = 'gzip, deflate, br'
201 url.headers['Connection'] = 'keep-alive'
202 url.headers['Referer'] = 'https://zt.wps.cn/static/2019/docer_check_in_ios/dist/?position=member_ios'
203 url.headers['Accept'] = 'application/json, text/javascript, */*; q=0.01'
204 url.headers['Host'] = 'zt.wps.cn'
205 url.headers['Accept-Language'] = 'zh-cn'
206 url.headers['X-Requested-With'] = 'XMLHttpRequest'
207 $.get(url, (error, response, data) => {
208 try {
209 if (error) throw new Error(error)
210 $.signinfo = JSON.parse(data)
211 } catch (e) {
212 $.log(`❗️ ${$.name}, 执行失败!`, ` error = ${error || e}`, `response = ${JSON.stringify(response)}`, `data = ${data}`, '')
213 } finally {
214 resove()
215 }
216 })
217 })
218}
219
220// 获取签到奖励
221function getSignreward() {

Callers 1

wps.jsFile · 0.85

Calls 2

getMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected