MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / sign

Method sign

jlyh.js:250–282  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

248
249 //签到函数
250 async sign() {
251 try {
252 const hasSignedToday = await this.signstate();
253 if (hasSignedToday) {
254 await this.points();
255 return;
256 }
257
258 const body = {
259 "signType": 0
260 };
261
262 let options = {
263 url: `https://galaxy-app.geely.com/app/v1/sign/add`,
264 headers: this.getPostHeader(204453306, `/app/v1/sign/add`, JSON.stringify(body)),
265 body: JSON.stringify(body)
266 };
267
268 let result = await httpRequest(options);
269
270 if (result.code == 0) {
271 $.DoubleLog(`✅签到成功!`);
272 await this.points();
273 Notify = 1;
274 } else {
275 $.DoubleLog(`❌签到失败!`);
276 console.log("⚠️失败原因:", result);
277 Notify = 1;
278 }
279 } catch (e) {
280 console.log(e);
281 }
282 }
283
284 //查询积分函数
285 async points() {

Callers 1

jlyh.jsFile · 0.45

Calls 6

signstateMethod · 0.95
pointsMethod · 0.95
getPostHeaderMethod · 0.95
httpRequestFunction · 0.70
DoubleLogMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected