| 244 | } |
| 245 | |
| 246 | function checkIsAllProcessed() { |
| 247 | //$nobyda.notify("贴吧签到", `最终进度${process.result.length}/${process.total}`, ""); |
| 248 | if (process.result.length != process.total) return; |
| 249 | for (var i = 0; i < Math.ceil(process.total / singleNotifyCount); i++) {//todo 验证消息为什么不分几次通知 |
| 250 | var notify = ""; |
| 251 | var spliceArr = process.result.splice(0, singleNotifyCount); |
| 252 | var notifySuccessCount = 0; |
| 253 | for (const res of spliceArr) { |
| 254 | if (res.errorCode == 0 || res.errorCode == 9999) { |
| 255 | notifySuccessCount++; |
| 256 | } |
| 257 | if (res.errorCode == 9999) { |
| 258 | notify += `【${res.bar}】已经签到,当前等级${res.level},经验${res.exp}` + `\n`; |
| 259 | } else { |
| 260 | notify += `【${res.bar}】${res.errorCode==0?'签到成功':'签到失败'},${res.errorCode==0?res.errorMsg:('原因:'+res.errorMsg)}` + `\n`; |
| 261 | } |
| 262 | } |
| 263 | $.msg("贴吧签到", `签到${spliceArr.length}个,成功${notifySuccessCount}个`, notify); |
| 264 | } |
| 265 | $.done(); |
| 266 | } |
| 267 | |
| 268 | function GetCookie() { |
| 269 | if (typeof $request.headers.cookie != 'undefined') { |