MCPcopy Create free account
hub / github.com/Semporia/Scripts / getUserInfo

Function getUserInfo

jd_ms.js:112–135  ·  view source on GitHub ↗
(info=true)

Source from the content-addressed store, hash-verified

110 })
111}
112function getUserInfo(info=true) {
113 return new Promise(resolve => {
114 $.post(taskPostUrl('homePageV2', {}, 'appid=SecKill2020'), (err, resp, data) => {
115 try {
116 if (err) {
117 console.log(`${err},${jsonParse(resp.body)['message']}`)
118 console.log(`${$.name} API请求失败,请检查网路重试`)
119 } else {
120 if (safeGet(data)) {
121 data = JSON.parse(data)
122 if (data.code === 2041) {
123 $.score = data.result.assignment.assignmentPoints || 0
124 if(info) console.log(`当前秒秒币${$.score}`)
125 }
126 }
127 }
128 } catch (e) {
129 $.logErr(e, resp)
130 } finally {
131 resolve(data);
132 }
133 })
134 })
135}
136function getTaskList() {
137 let body = {"encryptProjectId": $.encryptProjectId, "sourceCode": "wh5"}
138 return new Promise(resolve => {

Callers 1

jdMsFunction · 0.70

Calls 6

taskPostUrlFunction · 0.70
jsonParseFunction · 0.70
safeGetFunction · 0.70
postMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected