From b7ecc6058efbcefecd328ae6e24ae7d183399681 Mon Sep 17 00:00:00 2001 From: bbaban <3102509561@qq.com> Date: Mon, 10 Jul 2023 16:19:29 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=B8=83=E5=9C=A3=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E4=B8=8D=E4=BD=BF=E7=94=A8device=5Ffp?= =?UTF-8?q?=EF=BC=8C=E8=AF=B7=E6=B1=82device=5Ffp=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E4=BB=85=E4=BD=BF=E7=94=A8=E8=87=AA=E5=B7=B1=E7=9A=84ck,?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=A2=9E=E5=8A=A0=E6=9C=AA=E7=BB=91ck?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/genshin/model/deck.js | 17 ++--------------- plugins/genshin/model/mys/mysInfo.js | 2 +- .../resources/html/deckCard/deckCard.html | 3 +++ 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/plugins/genshin/model/deck.js b/plugins/genshin/model/deck.js index 7e24cb9..35851bf 100644 --- a/plugins/genshin/model/deck.js +++ b/plugins/genshin/model/deck.js @@ -10,21 +10,8 @@ export default class Deck extends base { this.headIndexStyle = `` } - async getdata(api) { - let seed_id = lodash.sample('abcdefghijklmnopqrstuvwxyz0123456789', 16).replace(/,/g, '') - let device_fp = await MysInfo.get(this.e, 'getFp', { - seed_id - }) - let res = await MysInfo.get(this.e, api, { - headers: { - 'x-rpc-device_fp': device_fp?.data?.device_fp - } - }) - return res - } - async getIndex(id, list = false) { - let res = await this.getdata('deckList') + let res = await MysInfo.get(this.e, 'deckList') if (res?.retcode !== 0) return false let Data @@ -58,7 +45,7 @@ export default class Deck extends base { let res = {} for (let api of ['basicInfo', 'avatar_cardList', 'action_cardList']) { if ((id == 2 && api == 'avatar_cardList') || (id == 1 && api == 'action_cardList')) continue - res[api] = (await this.getdata(api)).data + res[api] = (await MysInfo.get(this.e, api)).data } this.model = 'deckCard' diff --git a/plugins/genshin/model/mys/mysInfo.js b/plugins/genshin/model/mys/mysInfo.js index 6e28300..36a909e 100644 --- a/plugins/genshin/model/mys/mysInfo.js +++ b/plugins/genshin/model/mys/mysInfo.js @@ -25,7 +25,7 @@ export default class MysInfo { } // ck对应MysUser对象 this.ckUser = null - this.auth = ['dailyNote', 'bbs_sign_info', 'bbs_sign_home', 'bbs_sign', 'ys_ledger', 'compute', 'avatarSkill', 'detail', 'blueprint', 'UserGame', 'deckList', 'avatar_cardList', 'action_cardList'] + this.auth = ['dailyNote', 'bbs_sign_info', 'bbs_sign_home', 'bbs_sign', 'ys_ledger', 'compute', 'avatarSkill', 'detail', 'blueprint', 'UserGame', 'getFp', 'deckList', 'avatar_cardList', 'action_cardList'] } static async init(e, api) { diff --git a/plugins/genshin/resources/html/deckCard/deckCard.html b/plugins/genshin/resources/html/deckCard/deckCard.html index 601da4b..032e62e 100644 --- a/plugins/genshin/resources/html/deckCard/deckCard.html +++ b/plugins/genshin/resources/html/deckCard/deckCard.html @@ -43,6 +43,9 @@ + {{if !avatar_cardList && !action_cardList}} + + {{/if}} {{/if}}
From 51df04cfec098d1ea187ae311034eb89dd361c28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=AE=E5=B8=AE?= <3102509561@qq.com> Date: Mon, 10 Jul 2023 09:11:12 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BC=98=E5=85=88?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 帮帮 <3102509561@qq.com> --- plugins/genshin/apps/sevenSaints.js | 6 +++--- plugins/genshin/resources/html/deckList/deckList.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/genshin/apps/sevenSaints.js b/plugins/genshin/apps/sevenSaints.js index b21a646..c549168 100644 --- a/plugins/genshin/apps/sevenSaints.js +++ b/plugins/genshin/apps/sevenSaints.js @@ -8,14 +8,14 @@ export class sevenSaints extends plugin { name: '七圣召唤卡组查询', dsc: '原神角色信息查询', event: 'message', - priority: 5000, + priority: 0, rule: [ { - reg: '^#*七圣(召唤)?(牌|卡)组(列表)?[0-9]{0,2}$', + reg: '^#*七圣(召唤)?查询(牌|卡)组(列表)?[0-9]{0,2}$', fnc: 'deckIndex' }, { - reg: '^#*七圣(召唤)?(角色|行动)?(卡)?牌(列表)?$', + reg: '^#*七圣(召唤)?查询(角色|行动)?(卡)?牌(列表)?$', fnc: 'deck_cards' } ] diff --git a/plugins/genshin/resources/html/deckList/deckList.html b/plugins/genshin/resources/html/deckList/deckList.html index f62c299..6334b08 100644 --- a/plugins/genshin/resources/html/deckList/deckList.html +++ b/plugins/genshin/resources/html/deckList/deckList.html @@ -29,7 +29,7 @@ {{each Data vals}}
-
七圣卡组{{vals.id}} 使用#七圣卡组{{vals.id}}查看详情
+
七圣卡组{{vals.id}} 使用#七圣查询卡组{{vals.id}}查看详情
{{each vals.avatar_cards val}}