From 9d68d2562324a92d3e1ab546e5a4fd23b12c775d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=8C=8C?= Date: Sat, 23 Sep 2023 22:37:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E6=98=9F=E9=93=81?= =?UTF-8?q?=E6=8A=BD=E5=8D=A1=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/genshin/model/gachaLog.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/plugins/genshin/model/gachaLog.js b/plugins/genshin/model/gachaLog.js index e4b8311..7f42ece 100644 --- a/plugins/genshin/model/gachaLog.js +++ b/plugins/genshin/model/gachaLog.js @@ -13,18 +13,16 @@ export default class GachaLog extends base { this.urlKey = `${this.prefix}url:` /** 绑定的uid */ this.uidKey = `Yz:genshin:mys:qq-uid:${this.userId}` - this.path = `./data/gachaJson/${this.e.user_id}/` - this.pool = [ { type: 301, typeName: '角色' }, { type: 302, typeName: '武器' }, { type: 200, typeName: '常驻' } ] - if (e.isSr) { - /** 绑定的uid */ - this.uidKey = `Yz:srJson:mys:qq-uid:${this.userId}` + if (!e.isSr && e.msg) e.isSr = /\/(common|hkrpg)\//.test(e.msg) + if (e.isSr) { + this.uidKey = `Yz:srJson:mys:qq-uid:${this.userId}` this.path = `./data/srJson/${this.e.user_id}/` this.pool = [ { type: 11, typeName: '角色' }, @@ -87,8 +85,6 @@ export default class GachaLog extends base { } dealUrl(url) { - if (!this.e.isSr) this.e.isSr = /hkrpg/.test(this.e.msg) - // timestamp=1641338980〈=zh-cn 修复链接有奇怪符号 url = url.replace(/〈=/g, '&') if (url.includes('getGachaLog?')) url = url.split('getGachaLog?')[1]