Skip to content

Commit

Permalink
更新: 修复脚本提前 $done 问题
Browse files Browse the repository at this point in the history
QX 432版本,如果提前 $done, 后续代码将不执行。
.catch查阅文档只有一个参数。旧脚本写了两个参数。
  • Loading branch information
id77 committed Nov 14, 2020
1 parent fc695bb commit 0b4ef54
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 14 deletions.
5 changes: 3 additions & 2 deletions 10010/10010.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ let gosign = JSON.parse(chavy.getdata("chavy_gosign_10010")||chavygosign)
}
await getinfo()
showmsg()
chavy.done()
})().catch((e) => chavy.log(`❌ ${cookieName} 签到失败: ${e}`), chavy.done())
})()
.catch((e) => chavy.log(`❌ ${cookieName} 签到失败: ${e}`))
.finally(() => chavy.done())

function loginapp() {
return new Promise((resolve, reject) => {
Expand Down
5 changes: 3 additions & 2 deletions csdn/csdn.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ let VAL_signheader = chavy.getdata(KEY_signheader)
await luckyapp()
}
showmsg()
chavy.done()
})().catch((e) => chavy.log(`❌ ${cookieName} 签到失败: ${e}`), chavy.done())
})()
.catch((e) => chavy.log(`❌ ${cookieName} 签到失败: ${e}`))
.finally(() => chavy.done())

function loginapp() {
return new Promise((resolve, reject) => {
Expand Down
5 changes: 3 additions & 2 deletions everphoto/everphoto.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ let VAL_signheader = chavy.getdata(KEY_signheader)
chavy.log(`🔔 ${cookieName} 开始签到`)
await signapp()
showmsg()
chavy.done()
})().catch((e) => chavy.log(`❌ ${cookieName} 签到失败: ${e}`), chavy.done())
})()
.catch((e) => chavy.log(`❌ ${cookieName} 签到失败: ${e}`))
.finally(() => chavy.done())

function signapp() {
return new Promise((resolve, reject) => {
Expand Down
5 changes: 3 additions & 2 deletions mcdd/mcdd.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ let VAL_homeheader = chavy.getdata(KEY_homeheader)
await browseapp()
await getinfo()
showmsg()
chavy.done()
})().catch((e) => chavy.log(`❌ ${cookieName} 签到失败: ${e}`), chavy.done())
})()
.catch((e) => chavy.log(`❌ ${cookieName} 签到失败: ${e}`))
.finally(() => chavy.done())

function getinfo() {
return new Promise((resolve, reject) => {
Expand Down
5 changes: 3 additions & 2 deletions rrtv/rrtv.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ const week = "日一二三四五六".charAt(new Date().getDay())
)
await getinfo()
showmsg()
chavy.done()
})().catch((e) => chavy.log(`❌ ${cookieName} 签到失败: ${e}`), chavy.done())
})()
.catch((e) => chavy.log(`❌ ${cookieName} 签到失败: ${e}`))
.finally(() => chavy.done())

function getuid() {
return new Promise((resolve, reject) => {
Expand Down
5 changes: 3 additions & 2 deletions suning/suning.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ let VAl_logflag = chavy.getdata(KEY_logflag) === "true" ? true : false
if (VAL_signgameurl && VAL_signgetgameurl) await signgame(), await getgameinfo()
showmsg()
chavy.log(`🔔 ${cookieName} 结束`)
chavy.done()
})().catch((e) => chavy.log(`❌ ${cookieName} 签到失败: ${e}`), chavy.done())
})()
.catch((e) => chavy.log(`❌ ${cookieName} 签到失败: ${e}`))
.finally(() => chavy.done())

function loginapp() {
return new Promise((resolve, reject) => {
Expand Down
5 changes: 3 additions & 2 deletions videoqq/videoqq.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ let VAL_mh5signheader = chavy.getdata(KEY_mh5signheader)
await signapp()
await getexp()
showmsg()
chavy.done()
})().catch((e) => chavy.log(`❌ ${cookieName} 签到失败: ${e}`), chavy.done())
})()
.catch((e) => chavy.log(`❌ ${cookieName} 签到失败: ${e}`))
.finally(() => chavy.done())

function login() {
return new Promise((resolve, reject) => {
Expand Down

0 comments on commit 0b4ef54

Please sign in to comment.