Update wx_lccd.js

This commit is contained in:
smallfawn
2023-12-31 16:50:09 +08:00
committed by GitHub
parent 7d2e16c662
commit 1924bc370f

View File

@@ -36,7 +36,8 @@ class UserInfo {
}
}
async main() {
await this.user_info()
if(this.ckStatus){
await this.task_sign();
if (this.signStatus == 0) {
await this.task_sign();
@@ -48,6 +49,8 @@ class UserInfo {
await this.task_complete(3)
await this.task_complete(4)
}
}
async task_sign() {
try {
let options = {
@@ -75,6 +78,28 @@ class UserInfo {
console.log(e);
}
}
async user_info() {
try {
let options = {
fn: "信息",
method: "get",
url: `https://shop.laichon.com/api/v1/member/userinfo`,
headers: this.headers,
}
let { body: result } = await $.httpRequest(options);
//console.log(options);
//console.log(result);
if(result.code_key == "success"){
this.ckStatus = true
$.log(`当前[${result.data.mobile} 积分[${result.data.point}]]`)
}else {
this.ckStatus = false
console.log(result);
}
} catch (e) {
console.log(e);
}
}
async task_double() {
try {
let options = {