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

Function getwebinfo

suning/suning.js:133–153  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

131}
132
133function getwebinfo() {
134 return new Promise((resolve, reject) => {
135 const timestamp = Math.round(new Date().getTime()).toString()
136 const VAL_webinfourl = `https://luckman.suning.com/luck-web/sign/api/query/detail/record_sign.do?terminal=app&channel=sign&_=${timestamp}`
137 const url = { url: VAL_webinfourl, headers: JSON.parse(VAL_signheader) }
138 delete url.headers['Cookie']
139 url.headers['Host'] = 'luckman.suning.com'
140 chavy.get(url, (error, response, data) => {
141 try {
142 VAl_logflag ? chavy.log(`❕ ${cookieName} getwebinfo - response: ${JSON.stringify(response)}`) : ""
143 signinfo.webinfo = JSON.parse(data)
144 resolve()
145 } catch (e) {
146 chavy.msg(cookieName, `领红包结果: 失败`, `说明: ${e}`)
147 chavy.log(`❌ ${cookieName} getwebinfo - 领红包失败: ${e}`)
148 chavy.log(`❌ ${cookieName} getwebinfo - response: ${JSON.stringify(response)}`)
149 resolve()
150 }
151 })
152 })
153}
154
155function getgameinfo() {
156 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