From a469272b1aad8e37f414637d9891e7328c8a11bf Mon Sep 17 00:00:00 2001
From: haptear <haptear@hotmail.com>
Date: Fri, 18 Feb 2022 18:10:05 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8F=90=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 fqkk.js | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/fqkk.js b/fqkk.js
index 4003ce0..8753e68 100644
--- a/fqkk.js
+++ b/fqkk.js
@@ -54,7 +54,7 @@ let v2pUrl = ($.isNode() ? process.env.v2pUrl : $.getdata('v2pUrl')) || '';
 
 ///////////////////////////////////////////////////////////////////
 class UserInfo {
-    constructor(wxParam, cookie) {
+    constructor(id, wxParam, cookie) {
         this.index = ++userIdx
         this.flag = true
         this.gold = 0
@@ -62,6 +62,7 @@ class UserInfo {
         this.helpee = ''
 
         this.cookie = cookie
+        this.id = id;
 
         let wxParamJSON = req2json(wxParam)
         this.uin = wxParamJSON.uin
@@ -100,12 +101,18 @@ class UserInfo {
         if (!result) return
         //console.log(result)
         if (result.data) {
-            console.log(`本轮剩余${result.data.infoView.rest}可读,今日已读${result.data.infoView.num},今日收益${result.data.infoView.score}币`)
+            console.log(`账号${this.id} 本轮剩余${result.data.infoView.rest}可读,今日已读${result.data.infoView.num},今日收益${result.data.infoView.score}币`)
             if (result.data.infoView.msg) {
                 let str1 = result.data.infoView.msg.replace(/<.*?>/g, '')
                 console.log(str1);
             }
-            if (result.data.infoView.rest == 0) this.flag = false;
+            if (result.data.infoView.rest == 0) 
+                this.flag = false;
+            else
+            {
+                notifyStr=`账号${this.id} \n本轮剩余${result.data.infoView.rest}可读 \n 今日已读${result.data.infoView.num} \n 今日收益${result.data.infoView.score}币`
+                showmsg()
+            }
         } else {
             console.log(`查询今日阅读情况失败`)
             console.log(result)
@@ -511,6 +518,7 @@ async function deleteV2pValue (key) {
 }
 async function checkEnv () {
     var fqkkSettingStr = await getV2pValue('fqkkSetting');
+    let id = 1;
     if (fqkkSettingStr) {
         var fqkkSetting = JSON.parse(fqkkSettingStr);
         for (let key in fqkkSetting) {
@@ -520,14 +528,14 @@ async function checkEnv () {
                 fqkkWxParam = fqkkSetting[key]['fqkkWxParam'];
                 fqkkCookie = fqkkSetting[key]['fqkkCookie'];
                 fqkkSetting[key].finish = true;
-
+                id = key;
                 updateV2pValue(fqkkSetting)
                 break;
             }
         }
     }
     if (fqkkWxParam && fqkkCookie) {
-        user = new UserInfo(fqkkWxParam, fqkkCookie);
+        user = new UserInfo(id, fqkkWxParam, fqkkCookie);
     } else {
         let errorStr = ''
         if (!fqkkWxParam) errorStr += 'fqkkWxParam '