Update ddsy.js

This commit is contained in:
smallfawn committed 2026-04-08 20:07:12 +08:00
1 parent 07ce53557c
commit b66bc7aadd
1 file changed
+23 -17
+23 -17
View File
@@ -94,14 +94,14 @@ class Task {
result = result.replaceAll(")", "") result = result.replaceAll(")", "")
result = JSON.parse(result) result = JSON.parse(result)
if (result.code = "0") { if (result.code = "0") {
await this.user_info(result.result.signDayVo.signinId) await this.sign(result.result.signDayVo.signinId)
} }
} catch (e) { } catch (e) {
console.log(e); console.log(e);
} }
} }
async user_info(signInId) { async sign(signInId) {
let callbackStr = new Date().getTime() let callbackStr = new Date().getTime()
const time = this.getTime() const time = this.getTime()
const str = `ddky.promotion.signin.sign` + `channelH5` + `laterSignType1` + `loginToken${this.token}` + `methodddky.promotion.signin.sign` + const str = `ddky.promotion.signin.sign` + `channelH5` + `laterSignType1` + `loginToken${this.token}` + `methodddky.promotion.signin.sign` +
@@ -114,7 +114,13 @@ class Task {
headers: {}, headers: {},
} }
let { data: response } = await axios.request(options); let { data: response } = await axios.request(options);
console.log(response); let result = response.replace(`Zepto${callbackStr}`, "")
result = result.replaceAll("(", "")
result = result.replaceAll(")", "")
result = JSON.parse(result)
if (result.code = "0") {
$.log(`签到横杠`)
}
} catch (e) { } catch (e) {
console.log(e); console.log(e);
} }
@@ -140,19 +146,19 @@ class Task {
.finally(() => $.done()); .finally(() => $.done());
async function getNotice() { async function getNotice() {
try { try {
let options = { let options = {
url: `https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json`, url: `https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json`,
headers: { headers: {
"User-Agent": defaultUserAgent, "User-Agent": defaultUserAgent,
}, },
timeout:3000 timeout: 3000
} }
let { let {
data: res data: res
} = await axios.request(options); } = await axios.request(options);
$.log(res) $.log(res)
return res return res
} catch (e) {} } catch (e) { }
} }