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

Function getCoin

jd_mohe.js:225–248  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

223 })
224}
225function getCoin() {
226 return new Promise((resolve) => {
227 const url = `getCoin?t=${Date.now()}`;
228 $.get(taskurl(url), (err, resp, data) => {
229 try {
230 // console.log('homeGoBrowse', data)
231 data = JSON.parse(data);
232 // console.log('homeGoBrowse', data)
233 if (data.code === 1001) {
234 console.log(data.msg);
235 $.msg($.name, '领取失败', `${data.msg}`);
236 $.done();
237 } else {
238 console.log(`成功领取${data.data}热力值`)
239 resolve(data);
240 }
241 } catch (e) {
242 $.logErr(e, resp);
243 } finally {
244 resolve();
245 }
246 })
247 })
248}
249function taskList() {
250 return new Promise((resolve) => {
251 const url = `taskList?t=${Date.now()}`;

Callers 1

jd_mohe.jsFile · 0.70

Calls 6

taskurlFunction · 0.70
getMethod · 0.45
logMethod · 0.45
msgMethod · 0.45
doneMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected