This commit is contained in:
touchscale 2023-07-20 14:28:04 +08:00
commit da4f8fe662
11 changed files with 33 additions and 24 deletions

View File

@ -21,7 +21,7 @@
"chalk": "^5.2.0", "chalk": "^5.2.0",
"chokidar": "^3.5.3", "chokidar": "^3.5.3",
"https-proxy-agent": "5.0.1", "https-proxy-agent": "5.0.1",
"icqq": "^0.4.10", "icqq": "^0.4.11",
"image-size": "^1.0.2", "image-size": "^1.0.2",
"inquirer": "^8.2.5", "inquirer": "^8.2.5",
"lodash": "^4.17.21", "lodash": "^4.17.21",

View File

@ -8,14 +8,14 @@ export class sevenSaints extends plugin {
name: '七圣召唤卡组查询', name: '七圣召唤卡组查询',
dsc: '原神角色信息查询', dsc: '原神角色信息查询',
event: 'message', event: 'message',
priority: 5000, priority: 0,
rule: [ rule: [
{ {
reg: '^#*七圣(召唤)?(牌|卡)组(列表)?[0-9]{0,2}$', reg: '^#*七圣(召唤)?查询(牌|卡)组(列表)?[0-9]{0,2}$',
fnc: 'deckIndex' fnc: 'deckIndex'
}, },
{ {
reg: '^#*七圣(召唤)?(角色|行动)?(卡)?牌(列表)?$', reg: '^#*七圣(召唤)?查询(角色|行动)?(卡)?牌(列表)?$',
fnc: 'deck_cards' fnc: 'deck_cards'
} }
] ]

View File

@ -1,3 +1,12 @@
- from: '2023-07-19 11:00:00'
to: '2023-08-09 11:59:59'
five:
-
four:
- 阿兰
- 娜塔莎
- 素裳
name: 业途游魂
- from: '2023-06-28 12:00:00' - from: '2023-06-28 12:00:00'
to: '2023-07-18 14:59:59' to: '2023-07-18 14:59:59'
five: five:

View File

@ -1,3 +1,12 @@
- from: '2023-07-19 11:00:00'
to: '2023-08-09 11:59:59''
five:
- 到不了的彼岸
four:
- 秘密誓心
- 同一种心情
- 论剑
name: 流光定影
- from: '2023-06-28 12:00:00' - from: '2023-06-28 12:00:00'
to: '2023-07-18 14:59:59' to: '2023-07-18 14:59:59'
five: five:

View File

@ -2,6 +2,7 @@ import BaseModel from './BaseModel.js'
import lodash from 'lodash' import lodash from 'lodash'
import { UserGameDB } from './index.js' import { UserGameDB } from './index.js'
import MysUtil from '../mys/MysUtil.js' import MysUtil from '../mys/MysUtil.js'
import MysUserDB from './MysUserDB.js'
const { Types } = BaseModel const { Types } = BaseModel
@ -95,6 +96,6 @@ class UserDB extends BaseModel {
} }
BaseModel.initDB(UserDB, COLUMNS) BaseModel.initDB(UserDB, COLUMNS)
await UserDB.sync({ alter: true }) await UserDB.sync()
export default UserDB export default UserDB

View File

@ -10,21 +10,8 @@ export default class Deck extends base {
this.headIndexStyle = `<style> .head_box { background: url(${this.screenData.pluResPath}img/roleIndex/namecard/${lodash.random(1, 8)}.png) #f5f5f5; background-position-x: 30px; background-repeat: no-repeat; border-radius: 15px; font-family: tttgbnumber; padding: 10px 20px; position: relative; background-size: auto 101%; }</style>` this.headIndexStyle = `<style> .head_box { background: url(${this.screenData.pluResPath}img/roleIndex/namecard/${lodash.random(1, 8)}.png) #f5f5f5; background-position-x: 30px; background-repeat: no-repeat; border-radius: 15px; font-family: tttgbnumber; padding: 10px 20px; position: relative; background-size: auto 101%; }</style>`
} }
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) { 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 if (res?.retcode !== 0) return false
let Data let Data
@ -58,7 +45,7 @@ export default class Deck extends base {
let res = {} let res = {}
for (let api of ['basicInfo', 'avatar_cardList', 'action_cardList']) { for (let api of ['basicInfo', 'avatar_cardList', 'action_cardList']) {
if ((id == 2 && api == 'avatar_cardList') || (id == 1 && api == 'action_cardList')) continue 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' this.model = 'deckCard'

View File

@ -25,7 +25,7 @@ export default class MysInfo {
} }
// ck对应MysUser对象 // ck对应MysUser对象
this.ckUser = null 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) { static async init(e, api) {

View File

@ -43,6 +43,9 @@
</div> </div>
</div> </div>
</div> </div>
{{if !avatar_cardList && !action_cardList}}
<div class="logo">请绑定cookie后查看更多信息</div>
{{/if}}
</div> </div>
{{/if}} {{/if}}
<div style="height: 5px;"></div> <div style="height: 5px;"></div>

View File

@ -29,7 +29,7 @@
{{each Data vals}} {{each Data vals}}
<div class="basicInfo"> <div class="basicInfo">
<div class="tab_lable">七圣卡组{{vals.id}} 使用#七圣卡组{{vals.id}}查看详情</div> <div class="tab_lable">七圣卡组{{vals.id}} 使用#七圣查询卡组{{vals.id}}查看详情</div>
<div style="height: 10px;"></div> <div style="height: 10px;"></div>
<div class="avatar_covers"> <div class="avatar_covers">
{{each vals.avatar_cards val}} {{each vals.avatar_cards val}}

View File

@ -76,7 +76,7 @@ nobr {
} }
.uid-list .game-inner { .uid-list .game-inner {
display: flex; display: flex;
background: linear-gradient(to right, rgba(240, 236, 228, 0.7), rgba(240, 236, 228, 0.5), rgba(240, 236, 228, 0)); background: linear-gradient(to right, rgba(240, 236, 228, 0.6), rgba(240, 236, 228, 0.6), rgba(240, 236, 228, 0), rgba(240, 236, 228, 0));
padding: 4px; padding: 4px;
border-radius: 33px; border-radius: 33px;
} }

View File

@ -94,7 +94,7 @@ nobr {
.game-inner { .game-inner {
display: flex; display: flex;
background: linear-gradient(to right, rgba(240, 236, 228, 0.7), rgba(240, 236, 228, 0.5), rgba(240, 236, 228, 0)); background: linear-gradient(to right, rgba(240, 236, 228, 0.6), rgba(240, 236, 228, 0.6), rgba(240, 236, 228, 0), rgba(240, 236, 228, 0));
padding: 4px; padding: 4px;
border-radius: 33px; border-radius: 33px;