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

Function getinfo

suning/suning.js:174–192  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

172}
173
174function getinfo() {
175 return new Promise((resolve, reject) => {
176 const timestamp = Math.round(new Date().getTime()).toString()
177 const url = { url: `https://sign.suning.com/sign-web/m/promotion/sign/receiveSignDrip.do?_=${timestamp}`, headers: JSON.parse(VAL_signheader) }
178 delete url.headers['Cookie']
179 chavy.get(url, (error, response, data) => {
180 try {
181 VAl_logflag ? chavy.log(`❕ ${cookieName} getinfo - info: ${JSON.stringify(response)}`) : ""
182 signinfo.info = JSON.parse(data)
183 resolve()
184 } catch (e) {
185 chavy.msg(cookieName, `获取签到信息: 失败`, `说明: ${e}`)
186 chavy.log(`❌ ${cookieName} getinfo - 获取签到信息失败: ${e}`)
187 chavy.log(`❌ ${cookieName} getinfo - response: ${JSON.stringify(response)}`)
188 resolve()
189 }
190 })
191 })
192}
193
194function showmsg() {
195 let subTitle = ''

Callers 1

suning.jsFile · 0.70

Calls 3

getMethod · 0.45
logMethod · 0.45
msgMethod · 0.45

Tested by

no test coverage detected