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

Function signgame

suning/suning.js:78–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

76}*/
77
78function signgame() {
79 return new Promise((resolve, reject) => {
80 const url = { url: VAL_signgameurl, headers: JSON.parse(VAL_signgameheader) }
81 delete url.headers['Cookie']
82 chavy.get(url, (error, response, data) => {
83 try {
84 VAl_logflag ? chavy.log(`❕ ${cookieName} signgame - response: ${JSON.stringify(response)}`) : ""
85 signinfo.signgame = JSON.parse(data)
86 resolve()
87 } catch (e) {
88 chavy.msg(cookieName, `天天低价: 失败`, `说明: ${e}`)
89 chavy.log(`❌ ${cookieName} signgame - 签到失败: ${e}`)
90 chavy.log(`❌ ${cookieName} signgame - response: ${JSON.stringify(response)}`)
91 resolve()
92 }
93 })
94 })
95}
96
97function signweb() {
98 return new Promise((resolve, reject) => {

Callers 1

suning.jsFile · 0.85

Calls 3

getMethod · 0.45
logMethod · 0.45
msgMethod · 0.45

Tested by

no test coverage detected