From 958c219454b68cd8f0991598320824d35549c7af Mon Sep 17 00:00:00 2001 From: Ctrlcvs <1509167646@qq.com> Date: Wed, 9 Nov 2022 22:14:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=BD=93=E5=8A=9B=E6=8E=A8?= =?UTF-8?q?=E9=80=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/Note.js | 7 +++++-- model/note.js | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/Note.js b/apps/Note.js index 2465f67..ea75e7c 100644 --- a/apps/Note.js +++ b/apps/Note.js @@ -39,6 +39,10 @@ export async function Note(e, { if (isV3) { if(e.msg.replace(/全|全部/g,'多').includes('多')){ let ck=await gsCfg.getBingCkSingle(e.user_id) + if(Object.keys(ck).length==0){ + e.reply(`请先【#绑定cookie】`) + return true; + } let sendMsg=[] e._reply=e.reply; e.reply=((msg)=>{ @@ -113,8 +117,7 @@ export async function Note(e, { saveJson(); } } - await notes.getNote(cookie,uid,res,{render}) - return true; + return await notes.getNote(cookie,uid,res,{render}) } async function getDailyNote(uid, cookie) { diff --git a/model/note.js b/model/note.js index 5fc13a8..7af8d14 100644 --- a/model/note.js +++ b/model/note.js @@ -103,7 +103,7 @@ export default class note { } async getNote(cookie, uid, res,{render}){ - if (!res || res.retcode !== 0) return true + if (!res || res.retcode !== 0) return false let data = res.data; //推送任务 @@ -294,6 +294,7 @@ export default class note { render, scale: 1.2 }) + return true; } async dateTime_(time) {