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

Function doubleSign

activity/jx_sign.js:194–219  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

192 })
193}
194function doubleSign() {
195 return new Promise((resolve) => {
196 $.get(taskUrl("double_sign/IssueReward",), async (err, resp, data) => {
197 try {
198 if (err) {
199 console.log(`${JSON.stringify(err)}`)
200 console.log(`${$.name} API请求失败,请检查网路重试`)
201 } else {
202 if (safeGet(data)) {
203 data = JSON.parse(data);
204 if(data.retCode ===0){
205 console.log(`双签成功,获得金币${data.data.jd_amount / 100}元`)
206 $.money += data.data.jd_amount / 100
207 }else{
208 console.log(`任务完成失败,错误信息${data.errMsg}`)
209 }
210 }
211 }
212 } catch (e) {
213 $.logErr(e, resp)
214 } finally {
215 resolve(data);
216 }
217 })
218 })
219}
220function showMsg() {
221 message+=`本次运行获得金币${$.coins},现金${$.money}`
222 return new Promise(resolve => {

Callers 1

jdCashFunction · 0.85

Calls 5

taskUrlFunction · 0.70
safeGetFunction · 0.70
getMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected