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

Function sign

jd_car.js:116–140  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

114}
115
116function sign() {
117 return new Promise(resolve => {
118 $.post(taskUrl('v1/user/sign'), (err, resp, data) => {
119 try {
120 if (err) {
121 data = JSON.parse(resp.body)
122 console.log(`${data.error.msg}`)
123 message += `签到失败,${data.error.msg}\n`
124 } else {
125 if (safeGet(data)) {
126 data = JSON.parse(data);
127 if (data.status) {
128 console.log(`签到成功,获得${data.data.point},已签到${data.data.signDays}天`)
129 message += `签到成功,获得${data.data.point},已签到${data.data.signDays}天\n`
130 }
131 }
132 }
133 } catch (e) {
134 $.logErr(e, resp)
135 } finally {
136 resolve();
137 }
138 })
139 })
140}
141
142function mission() {
143 return new Promise(resolve => {

Callers 1

jdCarFunction · 0.70

Calls 5

taskUrlFunction · 0.70
safeGetFunction · 0.70
postMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected