|
|
@@ -101,25 +101,24 @@ function handleDaySign() {
|
|
|
async function tryDaySign() {
|
|
|
let onlineData = await checkOnline();
|
|
|
let userInfo = await queryUserInfoSeven();
|
|
|
+ if (userInfo) {
|
|
|
+ await checkNotifyUsage(userInfo, onlineData);
|
|
|
+ }
|
|
|
if (userInfo && userInfo.signinState == '1') {
|
|
|
magicJS.notification.appendNotifyInfo(`🎉今日已签到,无需再次签到!`);
|
|
|
return;
|
|
|
}
|
|
|
- magicJS.logger.info(`userInfo=${JSON.stringify(userInfo)}`);
|
|
|
- if (userInfo) {
|
|
|
- await checkNotifyUsage(userInfo, onlineData);
|
|
|
+ let result = await doDaySign();
|
|
|
+ if (result) {
|
|
|
+ // 0002已签到
|
|
|
+ if (result.code === '0000') {
|
|
|
+ magicJS.notification.appendNotifyInfo(`🎉签到成功!`);
|
|
|
+ } else {
|
|
|
+ magicJS.notification.appendNotifyInfo(`❌签到失败,错误:${result.desc}`);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ magicJS.notification.appendNotifyInfo(`🔴签到失败!`);
|
|
|
}
|
|
|
- // let result = await doDaySign();
|
|
|
- // if (result) {
|
|
|
- // // 0002已签到
|
|
|
- // if (result.code === '0000') {
|
|
|
- // magicJS.notification.appendNotifyInfo(`🎉签到成功!`);
|
|
|
- // } else {
|
|
|
- // magicJS.notification.appendNotifyInfo(`❌签到失败,错误:${result.desc}`);
|
|
|
- // }
|
|
|
- // } else {
|
|
|
- // magicJS.notification.appendNotifyInfo(`🔴签到失败!`);
|
|
|
- // }
|
|
|
}
|
|
|
|
|
|
async function checkNotifyUsage(userInfo, onlineData) {
|