fix: 格式化
This commit is contained in:
parent
f3db812256
commit
89e24a10d2
.gitignore.prettierignore.prettierrc.jsonREADME.mddeploy.shindex.ts
apps
abbrSet.tscalculator.tsdailyNote.tsexchange.tsgacha.tsgcLog.tsindex.tsledger.tsmaterial.tsmysNews.tspayLog.tsrole.tssetPubCk.tssevenSaints.tsstrategy.tstakeBirthdayPhoto.tsuser.tsuserAdmin.ts
defSet
bot
gacha
mys
pool
prop
role
skill
weapon
model
abyss.tsbase.tsblueprint.tscalculator.tsdeck.tsexportLog.tsgachaData.tsgachaLog.tsgsCfg.tsledger.tslogCount.tsmysNews.tsnote.tspayLogData.tsroleBag.tsroleDetail.tsroleIndex.tsuser.tsweapon.ts
package.jsonresources
StarRail/html
html
abyss
admin
avatar
blueprint
calculator
calculator-gs.csscalculator-gs.htmlcalculator-gs.lesscalculator-sr.csscalculator-sr.htmlcalculator-sr.less
deck
deckCard
deckList
gacha
|
@ -0,0 +1 @@
|
|||
node_modules
|
|
@ -0,0 +1,21 @@
|
|||
# Node dependencies
|
||||
node_modules
|
||||
|
||||
|
||||
# 旧版文件夹
|
||||
config
|
||||
docker
|
||||
lib
|
||||
plugins
|
||||
renderers
|
||||
|
||||
# 旧版文件
|
||||
|
||||
CHANGELOG.md
|
||||
docker-compose.yaml
|
||||
miao.js
|
||||
|
||||
|
||||
# 缓存目录
|
||||
data
|
||||
trss.js
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/prettierrc",
|
||||
"semi": false,
|
||||
"tabWidth": 2,
|
||||
"singleQuote": true,
|
||||
"printWidth": 80,
|
||||
"trailingComma": "none",
|
||||
"useTabs": false,
|
||||
"proseWrap": "preserve",
|
||||
"arrowParens": "avoid",
|
||||
"bracketSpacing": true,
|
||||
"endOfLine": "auto",
|
||||
"quoteProps": "consistent",
|
||||
"vueIndentScriptAndStyle": true
|
||||
}
|
157
README.md
157
README.md
|
@ -1,86 +1,85 @@
|
|||
### Miao-Yunzai v3
|
||||
|
||||
| 米游社查询指令 | 说明|
|
||||
| :---------------- | --------------- |
|
||||
|#角色|米游社角色数据查询|
|
||||
|#探险|米游社角色数据查询|
|
||||
|#角色卡片|米游社角色数据查询|
|
||||
|#刻晴|米游社角色详情查询|
|
||||
|#武器|米游社角色详情武器查询|
|
||||
|#五星,#四星,#角色背包|米游社角色详情背包|
|
||||
|#深渊|米游社深渊查询|
|
||||
|#深渊十二层|米游社深渊层数查询|
|
||||
|#刻晴突破,#刻晴素材|米游社友人A的角色突破素材图|
|
||||
|#刻晴攻略|米游社西风攻略|
|
||||
|#练度统计,#五星列表,#天赋列表|米游社角色详情列表|
|
||||
|#体力|原神体力查询|
|
||||
|#原石、#原石七月|查询米游社原石札记|
|
||||
|#原石统计|查询米游社原石札记,会自动保存数据|
|
||||
|#2022年原石统计| 按年份查询保存的历史原石札记数据|
|
||||
|#原石任务|保存米游社原石札记数据|
|
||||
|#今日素材|按已拥有角色查询今日素材|
|
||||
|#公告,#公告2,#资讯,#活动|米游社原神最新20条公告资讯|
|
||||
|#米游社xxx|米游社原神帖子搜索,如#米游社七七|
|
||||
|#开启、关闭公告推送,#开启、关闭资讯推送|米游社原神公告资讯推送|
|
||||
|#原神(星铁)开启(关闭)到期活动预警推送|原神(星铁)活动即将截止时推送|
|
||||
|#原石预估|新版本可获取原石数量预估|
|
||||
| 米游社查询指令 | 说明 |
|
||||
| :--------------------------------------- | ---------------------------------- |
|
||||
| #角色 | 米游社角色数据查询 |
|
||||
| #探险 | 米游社角色数据查询 |
|
||||
| #角色卡片 | 米游社角色数据查询 |
|
||||
| #刻晴 | 米游社角色详情查询 |
|
||||
| #武器 | 米游社角色详情武器查询 |
|
||||
| #五星,#四星,#角色背包 | 米游社角色详情背包 |
|
||||
| #深渊 | 米游社深渊查询 |
|
||||
| #深渊十二层 | 米游社深渊层数查询 |
|
||||
| #刻晴突破,#刻晴素材 | 米游社友人A的角色突破素材图 |
|
||||
| #刻晴攻略 | 米游社西风攻略 |
|
||||
| #练度统计,#五星列表,#天赋列表 | 米游社角色详情列表 |
|
||||
| #体力 | 原神体力查询 |
|
||||
| #原石、#原石七月 | 查询米游社原石札记 |
|
||||
| #原石统计 | 查询米游社原石札记,会自动保存数据 |
|
||||
| #2022年原石统计 | 按年份查询保存的历史原石札记数据 |
|
||||
| #原石任务 | 保存米游社原石札记数据 |
|
||||
| #今日素材 | 按已拥有角色查询今日素材 |
|
||||
| #公告,#公告2,#资讯,#活动 | 米游社原神最新20条公告资讯 |
|
||||
| #米游社xxx | 米游社原神帖子搜索,如#米游社七七 |
|
||||
| #开启、关闭公告推送,#开启、关闭资讯推送 | 米游社原神公告资讯推送 |
|
||||
| #原神(星铁)开启(关闭)到期活动预警推送 | 原神(星铁)活动即将截止时推送 |
|
||||
| #原石预估 | 新版本可获取原石数量预估 |
|
||||
|
||||
| 抽卡指令 | 说明 |
|
||||
| :-------- | ------------------------------------------------ |
|
||||
| #十连 | 原神模拟十连抽卡,角色池,默认每日一次,四点更新 |
|
||||
| #十连武器 | 原神模拟十连抽卡 |
|
||||
| #十连常驻 | 原神模拟十连抽卡 |
|
||||
| #定轨 | 武器池定轨 |
|
||||
|
||||
| 抽卡指令 | 说明|
|
||||
| :---------------- | --------------- |
|
||||
|#十连|原神模拟十连抽卡,角色池,默认每日一次,四点更新|
|
||||
|#十连武器|原神模拟十连抽卡|
|
||||
|#十连常驻|原神模拟十连抽卡|
|
||||
|#定轨|武器池定轨|
|
||||
| ck指令 | 说明 |
|
||||
| :------------------- | --------------------- |
|
||||
| 体力帮助,cookie帮助 | cookie绑定教程 |
|
||||
| cookie代码 | 获取cookie的js代码 |
|
||||
| #绑定cookie | 绑定米游社cookie |
|
||||
| #删除cookie | 删除绑定的cookie |
|
||||
| #绑定uid | 绑定游戏的uid |
|
||||
| #uid | 显示已绑定cookie的uid |
|
||||
| #我的ck | 当前绑定的主cookie |
|
||||
|
||||
| ck指令 | 说明|
|
||||
| :---------------- | --------------- |
|
||||
|体力帮助,cookie帮助|cookie绑定教程|
|
||||
|cookie代码|获取cookie的js代码|
|
||||
|#绑定cookie|绑定米游社cookie|
|
||||
|#删除cookie|删除绑定的cookie|
|
||||
|#绑定uid|绑定游戏的uid|
|
||||
|#uid|显示已绑定cookie的uid|
|
||||
|#我的ck|当前绑定的主cookie|
|
||||
| 抽卡记录指令 | 说明 |
|
||||
| :----------- | -------------------------------- |
|
||||
| 抽卡记录链接 | 发送链接,导入抽卡记录 |
|
||||
| #角色记录 | 统计抽卡数据 |
|
||||
| #武器记录 | 统计抽卡数据 |
|
||||
| #常驻记录 | 统计抽卡数据 |
|
||||
| #角色统计 | 统计抽卡数据,按卡池统计 |
|
||||
| #武器统计 | 统计抽卡数据,按卡池统计 |
|
||||
| #常驻统计 | 统计抽卡数据,按卡池统计 |
|
||||
| #记录帮助 | 抽卡记录导入说明 |
|
||||
| #导出记录 | 抽卡记录json导出 |
|
||||
| json文件导入 | json导入,统一可交换祈愿记录v2.2 |
|
||||
|
||||
| 抽卡记录指令 | 说明|
|
||||
| :---------------- | --------------- |
|
||||
|抽卡记录链接|发送链接,导入抽卡记录|
|
||||
|#角色记录|统计抽卡数据|
|
||||
|#武器记录|统计抽卡数据|
|
||||
|#常驻记录|统计抽卡数据|
|
||||
|#角色统计|统计抽卡数据,按卡池统计|
|
||||
|#武器统计|统计抽卡数据,按卡池统计|
|
||||
|#常驻统计|统计抽卡数据,按卡池统计|
|
||||
|#记录帮助|抽卡记录导入说明|
|
||||
|#导出记录|抽卡记录json导出|
|
||||
|json文件导入|json导入,统一可交换祈愿记录v2.2|
|
||||
| 其他指令 | 说明 |
|
||||
| :------------ | ---------------------------------------- |
|
||||
| #帮助 | 帮助命令说明 |
|
||||
| #状态 | 查询发送消息数据,群聊则发送群数据 |
|
||||
| #重启 | 重新启动 |
|
||||
| #日志 | 查看运行日志 |
|
||||
| #错误日志 | 查看错误日志 |
|
||||
| #日志关键词 | 搜索日志 |
|
||||
| #更新 | 执行git pull拉取更新 |
|
||||
| #强制更新 | 放弃本地修改,强制拉取 |
|
||||
| #全部更新 | 全部插件更新 |
|
||||
| #更新日志 | 最近50条commit记录 |
|
||||
| #添加xxx | 添加表情,文字等内容,支持多个 |
|
||||
| #添加图片 | 添加图片默认为表情,大图显示请用添加图片 |
|
||||
| #删除xxx | 删除已添加表情 |
|
||||
| #删除全部 | 删除全部表情 |
|
||||
| #表情列表 | 显示已添加内容 |
|
||||
| #表情xxx | 搜索已添加内容 |
|
||||
| #设置刻晴别名 | 自定义别名 |
|
||||
| #删除别名龟龟 | 删除设置的别名 |
|
||||
| #刻晴别名 | 别名列表 |
|
||||
| #配置ck | 添加公共查询ck |
|
||||
| #使用用户ck | 将用户ck加入到公共查询ck池 |
|
||||
|
||||
| 其他指令 | 说明|
|
||||
| :---------------- | --------------- |
|
||||
|#帮助|帮助命令说明|
|
||||
|#状态|查询发送消息数据,群聊则发送群数据|
|
||||
|#重启|重新启动|
|
||||
|#日志|查看运行日志|
|
||||
|#错误日志|查看错误日志|
|
||||
|#日志关键词|搜索日志|
|
||||
|#更新|执行git pull拉取更新|
|
||||
|#强制更新|放弃本地修改,强制拉取|
|
||||
|#全部更新|全部插件更新|
|
||||
|#更新日志|最近50条commit记录|
|
||||
|#添加xxx|添加表情,文字等内容,支持多个|
|
||||
|#添加图片|添加图片默认为表情,大图显示请用添加图片|
|
||||
|#删除xxx|删除已添加表情|
|
||||
|#删除全部|删除全部表情|
|
||||
|#表情列表|显示已添加内容|
|
||||
|#表情xxx|搜索已添加内容|
|
||||
|#设置刻晴别名|自定义别名|
|
||||
|#删除别名龟龟|删除设置的别名|
|
||||
|#刻晴别名|别名列表|
|
||||
|#配置ck|添加公共查询ck|
|
||||
|#使用用户ck|将用户ck加入到公共查询ck池|
|
||||
|
||||
| 兑换码相关 | 说明 |
|
||||
| :---------------- | --------------- |
|
||||
|#兑换码使用 兑换码 或者 #cdk-u 兑换码|将兑换码使用掉,兑换内容将通过游戏内邮件系统发送到当前用户的uid|
|
||||
|#兑换码|获取直播兑换码,目前只支持国服|
|
||||
| 兑换码相关 | 说明 |
|
||||
| :------------------------------------ | --------------------------------------------------------------- |
|
||||
| #兑换码使用 兑换码 或者 #cdk-u 兑换码 | 将兑换码使用掉,兑换内容将通过游戏内邮件系统发送到当前用户的uid |
|
||||
| #兑换码 | 获取直播兑换码,目前只支持国服 |
|
||||
|
|
|
@ -34,15 +34,22 @@ export class abbrSet extends Plugin {
|
|||
|
||||
async init() {
|
||||
if (!fs.existsSync(this.file)) {
|
||||
fs.writeFileSync(this.file, `神里绫华:
|
||||
fs.writeFileSync(
|
||||
this.file,
|
||||
`神里绫华:
|
||||
- 龟龟
|
||||
- 小乌龟`)
|
||||
- 小乌龟`
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
async abbr() {
|
||||
if (!await this.checkAuth()) return
|
||||
let role = gsCfg.getRole(this.e.msg, '#|星铁|设置|配置|别名|昵称', this.e.isSr)
|
||||
if (!(await this.checkAuth())) return
|
||||
let role = gsCfg.getRole(
|
||||
this.e.msg,
|
||||
'#|星铁|设置|配置|别名|昵称',
|
||||
this.e.isSr
|
||||
)
|
||||
if (!role) return false
|
||||
this.e.role = role
|
||||
this.isSr = this.e.isSr
|
||||
|
@ -102,7 +109,10 @@ export class abbrSet extends Plugin {
|
|||
name = name.replace(/#|星铁|设置|配置|别名|昵称/g, '')
|
||||
if (!name) continue
|
||||
/** 重复添加 */
|
||||
if (nameArr[role.name].includes(name) || gsCfg.roleNameToID(name, this.isSr)) {
|
||||
if (
|
||||
nameArr[role.name].includes(name) ||
|
||||
gsCfg.roleNameToID(name, this.isSr)
|
||||
) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -137,7 +147,7 @@ export class abbrSet extends Plugin {
|
|||
return true
|
||||
}
|
||||
|
||||
nameArr[role.name] = nameArr[role.name].filter((v) => {
|
||||
nameArr[role.name] = nameArr[role.name].filter(v => {
|
||||
if (v == role.alias) return false
|
||||
return v
|
||||
})
|
||||
|
@ -152,7 +162,9 @@ export class abbrSet extends Plugin {
|
|||
|
||||
if (!role) return false
|
||||
|
||||
let name = gsCfg.getdefSet('role', this.e.isSr ? 'sr_name' : 'name')[role.roleId]
|
||||
let name = gsCfg.getdefSet('role', this.e.isSr ? 'sr_name' : 'name')[
|
||||
role.roleId
|
||||
]
|
||||
let nameUser = gsCfg.getConfig('role', 'name')[role.name] ?? []
|
||||
|
||||
let list = lodash.uniq([...name, ...nameUser])
|
||||
|
@ -163,8 +175,12 @@ export class abbrSet extends Plugin {
|
|||
msg.push(`${num}.${list[i]}`)
|
||||
}
|
||||
|
||||
msg = await common.makeForwardMsg(this.e, [msg.join("\n")], `${role.name}别名,${list.length}个`)
|
||||
msg = await common.makeForwardMsg(
|
||||
this.e,
|
||||
[msg.join('\n')],
|
||||
`${role.name}别名,${list.length}个`
|
||||
)
|
||||
|
||||
await this.e.reply(msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { plugin } from 'yunzai/core'
|
||||
import Calculator from '../model/calculator.js'
|
||||
import Blueprint from '../model/blueprint.js'
|
||||
import {puppeteer} from 'yunzai/utils'
|
||||
import { gsCfg} from 'yunzai/mys'
|
||||
import { puppeteer } from 'yunzai/utils'
|
||||
import { gsCfg } from 'yunzai/mys'
|
||||
export class calculator extends plugin {
|
||||
constructor () {
|
||||
constructor() {
|
||||
/**
|
||||
*
|
||||
name: '养成计算',
|
||||
|
@ -28,26 +28,27 @@ export class calculator extends plugin {
|
|||
{
|
||||
reg: '^#*尘歌壶(模数|养成|养成计算)(\\d{10,15})$',
|
||||
fnc: 'Blueprint'
|
||||
},
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
_path = process.cwd().replace(/\\/g, '/')
|
||||
|
||||
async blueprintHelp (e) {
|
||||
let msg = '#尘歌壶模数\n指令:#尘歌壶模数\n示例:#尘歌壶模数123456\n参数为模数id(10-15位数字)'
|
||||
_path = process.cwd().replace(/\\/g, '/')
|
||||
|
||||
async blueprintHelp(e) {
|
||||
let msg =
|
||||
'#尘歌壶模数\n指令:#尘歌壶模数\n示例:#尘歌壶模数123456\n参数为模数id(10-15位数字)'
|
||||
await e.reply(msg)
|
||||
return true
|
||||
}
|
||||
|
||||
async calculatorHelp (e) {
|
||||
async calculatorHelp(e) {
|
||||
let msg = `角色养成计算\n指令:${e.isSr ? '*克拉拉养成\n示例:*克拉拉养成75 80 6 9 9 9\n参数为角色、武器、普攻、战技、终结技、天赋' : '#刻晴养成\n示例:#刻晴养成81 90 9 9 9\n参数为角色、武器、技能等级'}`
|
||||
await e.reply(msg)
|
||||
return true
|
||||
}
|
||||
|
||||
async Blueprint () {
|
||||
async Blueprint() {
|
||||
let role = this.e.msg.replace(/#/, '').match(/\d+/g)
|
||||
let data = await new Blueprint(this.e).get(role)
|
||||
if (!data) return
|
||||
|
@ -58,8 +59,12 @@ export class calculator extends plugin {
|
|||
}
|
||||
|
||||
/** #刻晴养成 */
|
||||
async Calculator () {
|
||||
let role = gsCfg.getRole(this.e.msg, '#|#|星铁|养成|计算|[0-9]|,|,| ', this.e.isSr)
|
||||
async Calculator() {
|
||||
let role = gsCfg.getRole(
|
||||
this.e.msg,
|
||||
'#|#|星铁|养成|计算|[0-9]|,|,| ',
|
||||
this.e.isSr
|
||||
)
|
||||
if (!role) return false
|
||||
|
||||
if ([10000005, 10000007, 20000000].includes(Number(role.roleId))) {
|
||||
|
|
|
@ -1,29 +1,31 @@
|
|||
import { plugin } from 'yunzai/core'
|
||||
import Note from '../model/note.js'
|
||||
import { gsCfg} from 'yunzai/mys'
|
||||
import { gsCfg } from 'yunzai/mys'
|
||||
gsCfg.cpCfg('mys', 'set')
|
||||
export class dailyNote extends plugin {
|
||||
constructor () {
|
||||
constructor() {
|
||||
/**
|
||||
name: '体力查询',
|
||||
dsc: '体力查询',
|
||||
*/
|
||||
super({
|
||||
priority: 300,
|
||||
rule: [{
|
||||
reg: '^#*(原神|星铁)?(体力|树脂|查询体力)$',
|
||||
fnc: 'note'
|
||||
}]
|
||||
rule: [
|
||||
{
|
||||
reg: '^#*(原神|星铁)?(体力|树脂|查询体力)$',
|
||||
fnc: 'note'
|
||||
}
|
||||
]
|
||||
})
|
||||
this.set = gsCfg.getConfig('mys', 'set')
|
||||
}
|
||||
|
||||
/** #体力 */
|
||||
async note () {
|
||||
async note() {
|
||||
let data = await Note.get(this.e)
|
||||
if (!data) return
|
||||
|
||||
/** 生成图片 */
|
||||
this.renderImg('genshin', `html/player/daily-note-${data.game}`, data)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,9 @@ export class exchange extends plugin {
|
|||
}
|
||||
|
||||
async getCode() {
|
||||
let reg = this.e.msg.match(/^(#|\*)?(原神|星铁|崩铁|崩三|崩坏三|崩坏3)?(直播|前瞻)?兑换码$/)
|
||||
let reg = this.e.msg.match(
|
||||
/^(#|\*)?(原神|星铁|崩铁|崩三|崩坏三|崩坏3)?(直播|前瞻)?兑换码$/
|
||||
)
|
||||
this.uid = '75276550'
|
||||
if (reg[1] == '*' || ['星铁', '崩铁'].includes(reg[2])) {
|
||||
this.uid = '80823548'
|
||||
|
@ -66,9 +68,10 @@ export class exchange extends plugin {
|
|||
|
||||
for (let val of code.data.code_list) {
|
||||
if (val.code) {
|
||||
codes.push([val.code, segment.button([
|
||||
{ text: '兑换', callback: `#兑换码使用${val.code}` },
|
||||
])])
|
||||
codes.push([
|
||||
val.code,
|
||||
segment.button([{ text: '兑换', callback: `#兑换码使用${val.code}` }])
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,7 +84,7 @@ export class exchange extends plugin {
|
|||
let url = {
|
||||
index: `https://api-takumi.mihoyo.com/event/miyolive/index`,
|
||||
code: `https://api-takumi-static.mihoyo.com/event/miyolive/refreshCode?version=${this.code_ver}&time=${this.now}`,
|
||||
actId: `https://bbs-api.mihoyo.com/painter/api/user_instant/list?offset=0&size=20&uid=${this.uid}`,
|
||||
actId: `https://bbs-api.mihoyo.com/painter/api/user_instant/list?offset=0&size=20&uid=${this.uid}`
|
||||
}
|
||||
|
||||
let response
|
||||
|
@ -98,7 +101,9 @@ export class exchange extends plugin {
|
|||
}
|
||||
|
||||
if (!response.ok) {
|
||||
logger.error(`[兑换码接口错误][${type}] ${response.status} ${response.statusText}`)
|
||||
logger.error(
|
||||
`[兑换码接口错误][${type}] ${response.status} ${response.statusText}`
|
||||
)
|
||||
return false
|
||||
}
|
||||
const res = await response.json()
|
||||
|
@ -135,7 +140,9 @@ export class exchange extends plugin {
|
|||
this.deadline = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} 12:00:00`
|
||||
}
|
||||
let structured_content = post.structured_content
|
||||
let result = structured_content.match(/{\"link\":\"https:\/\/webstatic.mihoyo.com\/bbs\/event\/live\/index.html\?act_id=(.*?)\\/)
|
||||
let result = structured_content.match(
|
||||
/{\"link\":\"https:\/\/webstatic.mihoyo.com\/bbs\/event\/live\/index.html\?act_id=(.*?)\\/
|
||||
)
|
||||
if (result) {
|
||||
return result[1]
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ import GachaData from '../model/gachaData.js'
|
|||
import fs from 'node:fs'
|
||||
import lodash from 'lodash'
|
||||
export class gacha extends plugin {
|
||||
constructor () {
|
||||
constructor() {
|
||||
/**
|
||||
*
|
||||
name: '十连',
|
||||
|
@ -25,7 +25,7 @@ export class gacha extends plugin {
|
|||
}
|
||||
|
||||
/** #十连 */
|
||||
async gacha () {
|
||||
async gacha() {
|
||||
this.GachaData = await GachaData.init(this.e)
|
||||
|
||||
if (this.checkLimit()) return
|
||||
|
@ -34,12 +34,15 @@ export class gacha extends plugin {
|
|||
|
||||
/** 生成图片 */
|
||||
await this.renderImg('genshin', 'html/gacha/gacha-trial', data, {
|
||||
recallMsg: data.nowFive >= 1 || data.nowFour >= 4 ? false : this.GachaData.set.delMsg
|
||||
recallMsg:
|
||||
data.nowFive >= 1 || data.nowFour >= 4
|
||||
? false
|
||||
: this.GachaData.set.delMsg
|
||||
})
|
||||
}
|
||||
|
||||
/** 检查限制 */
|
||||
checkLimit () {
|
||||
checkLimit() {
|
||||
/** 主人不限制 */
|
||||
if (this.e.isMaster) return false
|
||||
|
||||
|
@ -78,7 +81,7 @@ export class gacha extends plugin {
|
|||
}
|
||||
|
||||
/** #定轨 */
|
||||
async weaponBing () {
|
||||
async weaponBing() {
|
||||
let Gacha = await GachaData.init(this.e)
|
||||
|
||||
let { NowPool, user, msg = '' } = Gacha
|
||||
|
@ -109,7 +112,7 @@ export class gacha extends plugin {
|
|||
}
|
||||
|
||||
/** 初始化创建配置文件 */
|
||||
async init () {
|
||||
async init() {
|
||||
let file = './plugins/genshin/config/gacha.set.yaml'
|
||||
|
||||
if (fs.existsSync(file)) return
|
||||
|
|
154
apps/gcLog.ts
154
apps/gcLog.ts
|
@ -1,9 +1,9 @@
|
|||
import { plugin } from "yunzai/core"
|
||||
import fs from "node:fs"
|
||||
import GachaLog from "../model/gachaLog.js"
|
||||
import ExportLog from "../model/exportLog.js"
|
||||
import LogCount from "../model/logCount.js"
|
||||
const _path = process.cwd() + "/plugins/genshin"
|
||||
import { plugin } from 'yunzai/core'
|
||||
import fs from 'node:fs'
|
||||
import GachaLog from '../model/gachaLog.js'
|
||||
import ExportLog from '../model/exportLog.js'
|
||||
import LogCount from '../model/logCount.js'
|
||||
const _path = process.cwd() + '/plugins/genshin'
|
||||
export class gcLog extends plugin {
|
||||
constructor() {
|
||||
/**
|
||||
|
@ -15,59 +15,69 @@ export class gcLog extends plugin {
|
|||
priority: 300,
|
||||
rule: [
|
||||
{
|
||||
reg: "(.*)authkey=(.*)",
|
||||
fnc: "logUrl"
|
||||
reg: '(.*)authkey=(.*)',
|
||||
fnc: 'logUrl'
|
||||
},
|
||||
{
|
||||
reg: "^#json文件导入记录$",
|
||||
fnc: "logJson"
|
||||
reg: '^#json文件导入记录$',
|
||||
fnc: 'logJson'
|
||||
},
|
||||
{
|
||||
reg: "^#?(原神|星铁)?(全部)?(抽卡|抽奖|角色|武器|集录|常驻|up|新手|光锥|全部)池*(记录|祈愿|分析)$",
|
||||
fnc: "getLog"
|
||||
reg: '^#?(原神|星铁)?(全部)?(抽卡|抽奖|角色|武器|集录|常驻|up|新手|光锥|全部)池*(记录|祈愿|分析)$',
|
||||
fnc: 'getLog'
|
||||
},
|
||||
{
|
||||
reg: "^#?(原神|星铁)?(强制)?导出记录(json)?$",
|
||||
fnc: "exportLog"
|
||||
reg: '^#?(原神|星铁)?(强制)?导出记录(json)?$',
|
||||
fnc: 'exportLog'
|
||||
},
|
||||
{
|
||||
reg: "^#?(记录帮助|抽卡帮助)$",
|
||||
fnc: "help"
|
||||
reg: '^#?(记录帮助|抽卡帮助)$',
|
||||
fnc: 'help'
|
||||
},
|
||||
{
|
||||
reg: "^#?(安卓|苹果|电脑|pc|ios)帮助$",
|
||||
fnc: "helpPort"
|
||||
reg: '^#?(安卓|苹果|电脑|pc|ios)帮助$',
|
||||
fnc: 'helpPort'
|
||||
},
|
||||
{
|
||||
reg: "^#?(原神|星铁)?(抽卡|抽奖|角色|武器|集录|常驻|up|新手|光锥)池*统计$",
|
||||
fnc: "logCount"
|
||||
reg: '^#?(原神|星铁)?(抽卡|抽奖|角色|武器|集录|常驻|up|新手|光锥)池*统计$',
|
||||
fnc: 'logCount'
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
this.androidUrl = "https://docs.qq.com/doc/DUWpYaXlvSklmVXlX"
|
||||
Object.defineProperty(this, "button", {
|
||||
this.androidUrl = 'https://docs.qq.com/doc/DUWpYaXlvSklmVXlX'
|
||||
Object.defineProperty(this, 'button', {
|
||||
get() {
|
||||
this.prefix = this.e?.isSr ? "*" : "#"
|
||||
return segment.button([
|
||||
{ text: "角色记录", callback: `${this.prefix}角色记录` },
|
||||
{ text: "角色统计", callback: `${this.prefix}角色统计` },
|
||||
], [
|
||||
{ text: "武器记录", callback: `${this.prefix}武器记录` },
|
||||
{ text: "武器统计", callback: `${this.prefix}武器统计` },
|
||||
], [
|
||||
{ text: "集录记录", callback: `${this.prefix}集录记录` },
|
||||
{ text: "集录统计", callback: `${this.prefix}集录统计` },
|
||||
], [
|
||||
{ text: "常驻记录", callback: `${this.prefix}常驻记录` },
|
||||
{ text: "常驻统计", callback: `${this.prefix}常驻统计` },
|
||||
])
|
||||
this.prefix = this.e?.isSr ? '*' : '#'
|
||||
return segment.button(
|
||||
[
|
||||
{ text: '角色记录', callback: `${this.prefix}角色记录` },
|
||||
{ text: '角色统计', callback: `${this.prefix}角色统计` }
|
||||
],
|
||||
[
|
||||
{ text: '武器记录', callback: `${this.prefix}武器记录` },
|
||||
{ text: '武器统计', callback: `${this.prefix}武器统计` }
|
||||
],
|
||||
[
|
||||
{ text: '集录记录', callback: `${this.prefix}集录记录` },
|
||||
{ text: '集录统计', callback: `${this.prefix}集录统计` }
|
||||
],
|
||||
[
|
||||
{ text: '常驻记录', callback: `${this.prefix}常驻记录` },
|
||||
{ text: '常驻统计', callback: `${this.prefix}常驻统计` }
|
||||
]
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
async init() {
|
||||
let file = ["./data/gachaJson", "./data/srJson", "./temp/html/StarRail", "./temp/uigf"]
|
||||
let file = [
|
||||
'./data/gachaJson',
|
||||
'./data/srJson',
|
||||
'./temp/html/StarRail',
|
||||
'./temp/uigf'
|
||||
]
|
||||
for (let i of file) {
|
||||
if (!fs.existsSync(i)) {
|
||||
fs.mkdirSync(i)
|
||||
|
@ -78,13 +88,13 @@ export class gcLog extends plugin {
|
|||
accept() {
|
||||
if (this.e.file) {
|
||||
let name = this.e.file?.name
|
||||
if (/(.*)([1-9]|18)[0-9]{8}(.*).json/ig.test(name)) {
|
||||
this.e.msg = "#json文件导入记录"
|
||||
if (/(.*)([1-9]|18)[0-9]{8}(.*).json/gi.test(name)) {
|
||||
this.e.msg = '#json文件导入记录'
|
||||
return true
|
||||
}
|
||||
}
|
||||
if (this.e.msg && /^#?(角色|武器)统计$/g.test(this.e.msg)) {
|
||||
this.e.msg = this.e.msg.replace("统计", "池统计")
|
||||
this.e.msg = this.e.msg.replace('统计', '池统计')
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
@ -94,60 +104,71 @@ export class gcLog extends plugin {
|
|||
let data = await new GachaLog(this.e).logUrl()
|
||||
if (!data) return
|
||||
|
||||
await this.renderImg("genshin", `html/gacha/gacha-log`, data)
|
||||
await this.renderImg('genshin', `html/gacha/gacha-log`, data)
|
||||
|
||||
if (this.e.isGroup)
|
||||
this.e.reply("已收到链接,请撤回", false, { at: true })
|
||||
if (this.e.isGroup) this.e.reply('已收到链接,请撤回', false, { at: true })
|
||||
}
|
||||
|
||||
/** #抽卡记录 */
|
||||
async getLog() {
|
||||
this.e.isAll = !!(this.e.msg.includes("全部"))
|
||||
this.e.isAll = !!this.e.msg.includes('全部')
|
||||
let data = await new GachaLog(this.e).getLogData()
|
||||
if (!data) return
|
||||
let name = `html/gacha/gacha-log`
|
||||
if (this.e.isAll) {
|
||||
name = `html/gacha/gacha-all-log`
|
||||
}
|
||||
this.reply([await this.renderImg("genshin", name, data, { retType: "base64" }), this.button])
|
||||
this.reply([
|
||||
await this.renderImg('genshin', name, data, { retType: 'base64' }),
|
||||
this.button
|
||||
])
|
||||
}
|
||||
|
||||
/** 导出记录 */
|
||||
exportLog() {
|
||||
if (this.e.isGroup && !this.e.msg.includes("强制")) {
|
||||
return this.reply("建议私聊导出,若你确认要在此导出,请发送【#强制导出记录】", false, { at: true })
|
||||
if (this.e.isGroup && !this.e.msg.includes('强制')) {
|
||||
return this.reply(
|
||||
'建议私聊导出,若你确认要在此导出,请发送【#强制导出记录】',
|
||||
false,
|
||||
{ at: true }
|
||||
)
|
||||
}
|
||||
|
||||
return new ExportLog(this.e).exportJson()
|
||||
}
|
||||
|
||||
async logJson() {
|
||||
if (!this.e.file)
|
||||
return this.e.reply("请发送Json文件")
|
||||
if (!this.e.file) return this.e.reply('请发送Json文件')
|
||||
|
||||
await new ExportLog(this.e).logJson()
|
||||
|
||||
if (this.e.isGroup)
|
||||
this.e.reply("已收到文件,请撤回", false, { at: true })
|
||||
if (this.e.isGroup) this.e.reply('已收到文件,请撤回', false, { at: true })
|
||||
}
|
||||
|
||||
help() {
|
||||
this.e.reply([segment.image(`file://${_path}/resources/logHelp/记录帮助.png`), segment.button([
|
||||
{ text: "电脑", callback: "#电脑帮助" },
|
||||
{ text: "安卓", callback: "#安卓帮助" },
|
||||
{ text: "苹果", callback: "#苹果帮助" },
|
||||
])])
|
||||
this.e.reply([
|
||||
segment.image(`file://${_path}/resources/logHelp/记录帮助.png`),
|
||||
segment.button([
|
||||
{ text: '电脑', callback: '#电脑帮助' },
|
||||
{ text: '安卓', callback: '#安卓帮助' },
|
||||
{ text: '苹果', callback: '#苹果帮助' }
|
||||
])
|
||||
])
|
||||
}
|
||||
|
||||
helpPort() {
|
||||
let msg = this.e.msg.replace(/#|帮助/g, "")
|
||||
let msg = this.e.msg.replace(/#|帮助/g, '')
|
||||
|
||||
if (["电脑", "pc"].includes(msg)) {
|
||||
this.e.reply(segment.image(`file://${_path}/resources/logHelp/记录帮助-电脑.png`))
|
||||
} else if (["安卓"].includes(msg)) {
|
||||
if (['电脑', 'pc'].includes(msg)) {
|
||||
this.e.reply(
|
||||
segment.image(`file://${_path}/resources/logHelp/记录帮助-电脑.png`)
|
||||
)
|
||||
} else if (['安卓'].includes(msg)) {
|
||||
this.e.reply(`安卓抽卡记录获取教程:${this.androidUrl}`)
|
||||
} else if (["苹果", "ios"].includes(msg)) {
|
||||
this.e.reply(segment.image(`file://${_path}/resources/logHelp/记录帮助-苹果.png`))
|
||||
} else if (['苹果', 'ios'].includes(msg)) {
|
||||
this.e.reply(
|
||||
segment.image(`file://${_path}/resources/logHelp/记录帮助-苹果.png`)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -155,6 +176,11 @@ export class gcLog extends plugin {
|
|||
let data = await new LogCount(this.e).count()
|
||||
if (!data) return
|
||||
|
||||
this.reply([await this.renderImg("genshin", `html/gacha/log-count`, data, { retType: "base64" }), this.button])
|
||||
this.reply([
|
||||
await this.renderImg('genshin', `html/gacha/log-count`, data, {
|
||||
retType: 'base64'
|
||||
}),
|
||||
this.button
|
||||
])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,4 +14,4 @@ export * from './sevenSaints'
|
|||
export * from './strategy'
|
||||
export * from './takeBirthdayPhoto'
|
||||
export * from './user'
|
||||
export * from './userAdmin'
|
||||
export * from './userAdmin'
|
||||
|
|
|
@ -31,13 +31,15 @@ export class ledger extends plugin {
|
|||
]
|
||||
})
|
||||
|
||||
Object.defineProperty(this, "button", { get() {
|
||||
this.prefix = this.e?.isSr ? "*星琼" : "#原石"
|
||||
return segment.button([
|
||||
{ text: "记录", callback: this.prefix },
|
||||
{ text: "统计", callback: `${this.prefix}统计` },
|
||||
])
|
||||
}})
|
||||
Object.defineProperty(this, 'button', {
|
||||
get() {
|
||||
this.prefix = this.e?.isSr ? '*星琼' : '#原石'
|
||||
return segment.button([
|
||||
{ text: '记录', callback: this.prefix },
|
||||
{ text: '统计', callback: `${this.prefix}统计` }
|
||||
])
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
async init() {
|
||||
|
@ -55,7 +57,12 @@ export class ledger extends plugin {
|
|||
if (!data) return
|
||||
|
||||
/** 生成图片 */
|
||||
this.reply([await this.renderImg('genshin', `html/ledger/ledger-${data.game}`, data, { retType: "base64" }), this.button])
|
||||
this.reply([
|
||||
await this.renderImg('genshin', `html/ledger/ledger-${data.game}`, data, {
|
||||
retType: 'base64'
|
||||
}),
|
||||
this.button
|
||||
])
|
||||
}
|
||||
|
||||
/** 原石任务 */
|
||||
|
@ -69,7 +76,15 @@ export class ledger extends plugin {
|
|||
if (!data) return
|
||||
|
||||
/** 生成图片 */
|
||||
this.reply([await this.renderImg('genshin', `html/ledger/ledger-count-${data.game}`, data, { retType: "base64" }), this.button])
|
||||
this.reply([
|
||||
await this.renderImg(
|
||||
'genshin',
|
||||
`html/ledger/ledger-count-${data.game}`,
|
||||
data,
|
||||
{ retType: 'base64' }
|
||||
),
|
||||
this.button
|
||||
])
|
||||
}
|
||||
|
||||
async ledgerCountHistory() {
|
||||
|
@ -77,6 +92,14 @@ export class ledger extends plugin {
|
|||
if (!data) return
|
||||
|
||||
/** 生成图片 */
|
||||
this.reply([await this.renderImg('genshin', `html/ledger/ledger-count-${data.game}`, data, { retType: "base64" }), this.button])
|
||||
this.reply([
|
||||
await this.renderImg(
|
||||
'genshin',
|
||||
`html/ledger/ledger-count-${data.game}`,
|
||||
data,
|
||||
{ retType: 'base64' }
|
||||
),
|
||||
this.button
|
||||
])
|
||||
}
|
||||
}
|
||||
|
|
116
apps/material.ts
116
apps/material.ts
|
@ -14,30 +14,50 @@ export class material extends Plugin {
|
|||
priority: 500,
|
||||
rule: [
|
||||
{
|
||||
reg: "^#?(星铁)?(.*)(突破|材料|素材|培养)$",
|
||||
fnc: "material"
|
||||
reg: '^#?(星铁)?(.*)(突破|材料|素材|培养)$',
|
||||
fnc: 'material'
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
path = "./temp/material/gs/友人A"
|
||||
pathOther = "./temp/material/gs/other"
|
||||
srPath = "./temp/material/sr/小橙子啊"
|
||||
srPathOther = "./temp/material/sr/other"
|
||||
path = './temp/material/gs/友人A'
|
||||
pathOther = './temp/material/gs/other'
|
||||
srPath = './temp/material/sr/小橙子啊'
|
||||
srPathOther = './temp/material/sr/other'
|
||||
|
||||
url = "https://bbs-api.mihoyo.com/post/wapi/getPostFullInCollection?&gids=2&order_type=2&collection_id="
|
||||
url =
|
||||
'https://bbs-api.mihoyo.com/post/wapi/getPostFullInCollection?&gids=2&order_type=2&collection_id='
|
||||
|
||||
collection_id = [428421, 1164644, 1362644]
|
||||
srCollection_id = [1998643, 2146693, 2279356]
|
||||
|
||||
special = ["雷电将军", "珊瑚宫心海", "菲谢尔", "托马", "八重神子", "九条裟罗", "辛焱", "神里绫华"]
|
||||
special = [
|
||||
'雷电将军',
|
||||
'珊瑚宫心海',
|
||||
'菲谢尔',
|
||||
'托马',
|
||||
'八重神子',
|
||||
'九条裟罗',
|
||||
'辛焱',
|
||||
'神里绫华'
|
||||
]
|
||||
|
||||
oss = "?x-oss-process=image//resize,s_1000/quality,q_80/auto-orient,0/interlace,1/format,jpg"
|
||||
oss =
|
||||
'?x-oss-process=image//resize,s_1000/quality,q_80/auto-orient,0/interlace,1/format,jpg'
|
||||
|
||||
/** 初始化创建配置文件 */
|
||||
async init() {
|
||||
for (let dir of ["./temp", "./temp/material", "./temp/material/gs", "./temp/material/sr", this.path, this.pathOther, this.srPath, this.srPathOther]) {
|
||||
for (let dir of [
|
||||
'./temp',
|
||||
'./temp/material',
|
||||
'./temp/material/gs',
|
||||
'./temp/material/sr',
|
||||
this.path,
|
||||
this.pathOther,
|
||||
this.srPath,
|
||||
this.srPathOther
|
||||
]) {
|
||||
if (!fs.existsSync(dir)) {
|
||||
fs.mkdirSync(dir)
|
||||
}
|
||||
|
@ -46,39 +66,43 @@ export class material extends Plugin {
|
|||
|
||||
/** #刻晴素材 *符玄素材 */
|
||||
async material() {
|
||||
let isUpdate = this.e.msg.includes("更新")
|
||||
let role = gsCfg.getRole(this.e.msg, "星铁|突破|材料|素材|更新")
|
||||
let isUpdate = this.e.msg.includes('更新')
|
||||
let role = gsCfg.getRole(this.e.msg, '星铁|突破|材料|素材|更新')
|
||||
if (!role) return false
|
||||
|
||||
if (["10000005", "10000007", "20000000", "8003", "8001"].includes(String(role.roleId))) {
|
||||
await this.e.reply("暂无主角素材")
|
||||
if (
|
||||
['10000005', '10000007', '20000000', '8003', '8001'].includes(
|
||||
String(role.roleId)
|
||||
)
|
||||
) {
|
||||
await this.e.reply('暂无主角素材')
|
||||
return
|
||||
}
|
||||
|
||||
let pathSuffix = this.e.msg.includes("星铁") ? "sr" : ""
|
||||
this.imgPath = `${this[pathSuffix + "Path"]}/${role.name}.jpg`
|
||||
let pathSuffix = this.e.msg.includes('星铁') ? 'sr' : ''
|
||||
this.imgPath = `${this[pathSuffix + 'Path']}/${role.name}.jpg`
|
||||
|
||||
if (fs.existsSync(this.imgPath) && !isUpdate) {
|
||||
await this.e.reply(segment.image(`file://${this.imgPath}`))
|
||||
return
|
||||
}
|
||||
|
||||
if (await this[`getImg${pathSuffix ? "Sr" : ""}`](role.name)) {
|
||||
if (await this[`getImg${pathSuffix ? 'Sr' : ''}`](role.name)) {
|
||||
return await this.e.reply(segment.image(`file://${this.imgPath}`))
|
||||
}
|
||||
|
||||
this.imgPath = `${this[pathSuffix + "PathOther"]}/${role.name}.jpg`
|
||||
this.imgPath = `${this[pathSuffix + 'PathOther']}/${role.name}.jpg`
|
||||
|
||||
if (fs.existsSync(this.imgPath) && !isUpdate) {
|
||||
await this.e.reply(segment.image(`file://${this.imgPath}`))
|
||||
return
|
||||
}
|
||||
|
||||
if (await this[`getImg${pathSuffix ? "OtherSr" : "Other"}`](role.name)) {
|
||||
if (await this[`getImg${pathSuffix ? 'OtherSr' : 'Other'}`](role.name)) {
|
||||
return await this.e.reply(segment.image(`file://${this.imgPath}`))
|
||||
}
|
||||
|
||||
if (await this[`getImg${pathSuffix ? "Other2Sr" : "Other2"}`](role.name)) {
|
||||
if (await this[`getImg${pathSuffix ? 'Other2Sr' : 'Other2'}`](role.name)) {
|
||||
return await this.e.reply(segment.image(`file://${this.imgPath}`))
|
||||
}
|
||||
}
|
||||
|
@ -90,8 +114,8 @@ export class material extends Plugin {
|
|||
let ret = await this.getData(this.collection_id[0])
|
||||
|
||||
if (!ret || ret.retcode !== 0) {
|
||||
await this.e.reply("暂无素材数据,请稍后再试")
|
||||
logger.error(`米游社接口报错:${ret.message || "未知错误"}}`)
|
||||
await this.e.reply('暂无素材数据,请稍后再试')
|
||||
logger.error(`米游社接口报错:${ret.message || '未知错误'}}`)
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -112,7 +136,7 @@ export class material extends Plugin {
|
|||
|
||||
logger.mark(`${this.e.logFnc} 下载${name}素材图`)
|
||||
|
||||
if (!await downFile(url + this.oss, this.imgPath)) {
|
||||
if (!(await downFile(url + this.oss, this.imgPath))) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -127,8 +151,8 @@ export class material extends Plugin {
|
|||
let ret = await this.getData(this.collection_id[1])
|
||||
|
||||
if (!ret || ret.retcode !== 0) {
|
||||
await this.e.reply("暂无素材数据,请稍后再试")
|
||||
logger.error(`米游社接口报错:${ret.message || "未知错误"}}`)
|
||||
await this.e.reply('暂无素材数据,请稍后再试')
|
||||
logger.error(`米游社接口报错:${ret.message || '未知错误'}}`)
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -146,7 +170,7 @@ export class material extends Plugin {
|
|||
|
||||
logger.mark(`${this.e.logFnc} 下载${name}素材图`)
|
||||
|
||||
if (!await downFile(url + this.oss, this.imgPath)) {
|
||||
if (!(await downFile(url + this.oss, this.imgPath))) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -161,8 +185,8 @@ export class material extends Plugin {
|
|||
let ret = await this.getData(this.collection_id[2])
|
||||
|
||||
if (!ret || ret.retcode !== 0) {
|
||||
await this.e.reply("暂无素材数据,请稍后再试")
|
||||
logger.error(`米游社接口报错:${ret.message || "未知错误"}}`)
|
||||
await this.e.reply('暂无素材数据,请稍后再试')
|
||||
logger.error(`米游社接口报错:${ret.message || '未知错误'}}`)
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -180,7 +204,7 @@ export class material extends Plugin {
|
|||
|
||||
logger.mark(`${this.e.logFnc} 下载${name}素材图`)
|
||||
|
||||
if (!await downFile(url + this.oss, this.imgPath)) {
|
||||
if (!(await downFile(url + this.oss, this.imgPath))) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -195,8 +219,8 @@ export class material extends Plugin {
|
|||
let ret = await this.getData(this.srCollection_id[0])
|
||||
|
||||
if (!ret || ret.retcode !== 0) {
|
||||
await this.e.reply("暂无素材数据,请稍后再试")
|
||||
logger.error(`米游社接口报错:${ret.message || "未知错误"}}`)
|
||||
await this.e.reply('暂无素材数据,请稍后再试')
|
||||
logger.error(`米游社接口报错:${ret.message || '未知错误'}}`)
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -214,7 +238,7 @@ export class material extends Plugin {
|
|||
|
||||
logger.mark(`${this.e.logFnc} 下载${name}素材图`)
|
||||
|
||||
if (!await downFile(url + this.oss, this.imgPath)) {
|
||||
if (!(await downFile(url + this.oss, this.imgPath))) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -229,24 +253,24 @@ export class material extends Plugin {
|
|||
let ret = await this.getData(this.srCollection_id[1])
|
||||
|
||||
if (!ret || ret.retcode !== 0) {
|
||||
await this.e.reply("暂无素材数据,请稍后再试")
|
||||
logger.error(`米游社接口报错:${ret.message || "未知错误"}}`)
|
||||
await this.e.reply('暂无素材数据,请稍后再试')
|
||||
logger.error(`米游社接口报错:${ret.message || '未知错误'}}`)
|
||||
return false
|
||||
}
|
||||
|
||||
let url;
|
||||
let url
|
||||
for (let val of ret.data.posts) {
|
||||
if (val.post.subject.includes(name)) {
|
||||
url = val.post.images[0];
|
||||
break;
|
||||
url = val.post.images[0]
|
||||
break
|
||||
}
|
||||
}
|
||||
if (!url) {
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
logger.mark(`${this.e.logFnc} 下载${name}素材图`);
|
||||
if (!await downFile(url + this.oss, this.imgPath)) {
|
||||
return false;
|
||||
logger.mark(`${this.e.logFnc} 下载${name}素材图`)
|
||||
if (!(await downFile(url + this.oss, this.imgPath))) {
|
||||
return false
|
||||
}
|
||||
|
||||
logger.mark(`${this.e.logFnc} 下载${name}素材成功`)
|
||||
|
@ -260,8 +284,8 @@ export class material extends Plugin {
|
|||
let ret = await this.getData(this.srCollection_id[2])
|
||||
|
||||
if (!ret || ret.retcode !== 0) {
|
||||
await this.e.reply("暂无素材数据,请稍后再试")
|
||||
logger.error(`米游社接口报错:${ret.message || "未知错误"}}`)
|
||||
await this.e.reply('暂无素材数据,请稍后再试')
|
||||
logger.error(`米游社接口报错:${ret.message || '未知错误'}}`)
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -279,7 +303,7 @@ export class material extends Plugin {
|
|||
|
||||
logger.mark(`${this.e.logFnc} 下载${name}素材图`)
|
||||
|
||||
if (!await downFile(url + this.oss, this.imgPath)) {
|
||||
if (!(await downFile(url + this.oss, this.imgPath))) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -290,11 +314,11 @@ export class material extends Plugin {
|
|||
|
||||
/** 获取数据 */
|
||||
async getData(collectionId) {
|
||||
let response = await fetch(this.url + collectionId, { method: "get" })
|
||||
let response = await fetch(this.url + collectionId, { method: 'get' })
|
||||
if (!response.ok) {
|
||||
return false
|
||||
}
|
||||
const res = await response.json()
|
||||
return res
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import { plugin } from 'yunzai/core'
|
|||
import MysNews from '../model/mysNews.js'
|
||||
import fs from 'node:fs'
|
||||
import lodash from 'lodash'
|
||||
import { gsCfg} from 'yunzai/mys'
|
||||
import { gsCfg } from 'yunzai/mys'
|
||||
import YAML from 'yaml'
|
||||
gsCfg.cpCfg('mys', 'pushNews')
|
||||
export class mysNews extends plugin {
|
||||
|
@ -47,7 +47,6 @@ export class mysNews extends plugin {
|
|||
]
|
||||
})
|
||||
|
||||
|
||||
/** 定时任务 */
|
||||
this.task = {
|
||||
cron: gsCfg.getConfig('mys', 'pushNews').pushTime,
|
||||
|
@ -56,8 +55,8 @@ export class mysNews extends plugin {
|
|||
log: false
|
||||
}
|
||||
}
|
||||
|
||||
file = './plugins/genshin/config/mys.pushNews.yaml'
|
||||
|
||||
file = './plugins/genshin/config/mys.pushNews.yaml'
|
||||
|
||||
async init() {
|
||||
if (fs.existsSync(this.file)) return
|
||||
|
@ -88,7 +87,7 @@ export class mysNews extends plugin {
|
|||
}
|
||||
let typeName
|
||||
let pushGame
|
||||
if(this.e.msg.includes('星铁')) {
|
||||
if (this.e.msg.includes('星铁')) {
|
||||
typeName = `srActivityPush`
|
||||
pushGame = `星铁`
|
||||
} else {
|
||||
|
@ -96,11 +95,12 @@ export class mysNews extends plugin {
|
|||
pushGame = `原神`
|
||||
}
|
||||
let cfg = gsCfg.getConfig('mys', 'pushNews')
|
||||
if(!cfg[typeName]) cfg[typeName] = {}
|
||||
if(!Array.isArray(cfg[typeName][this.e.self_id])) cfg[typeName][this.e.self_id] = []
|
||||
if (!cfg[typeName]) cfg[typeName] = {}
|
||||
if (!Array.isArray(cfg[typeName][this.e.self_id]))
|
||||
cfg[typeName][this.e.self_id] = []
|
||||
let model
|
||||
let msg = `${pushGame}活动到期预警推送已`
|
||||
if(this.e.msg.includes('开启')) {
|
||||
if (this.e.msg.includes('开启')) {
|
||||
model = '开启'
|
||||
cfg[typeName][this.e.self_id].push(this.e.group_id)
|
||||
cfg[typeName][this.e.self_id] = lodash.uniq(cfg[typeName][this.e.self_id])
|
||||
|
@ -108,14 +108,19 @@ export class mysNews extends plugin {
|
|||
} else {
|
||||
model = '关闭'
|
||||
msg += model
|
||||
cfg[typeName][this.e.self_id] = lodash.difference(cfg[typeName][this.e.self_id], [this.e.group_id])
|
||||
cfg[typeName][this.e.self_id] = lodash.difference(
|
||||
cfg[typeName][this.e.self_id],
|
||||
[this.e.group_id]
|
||||
)
|
||||
if (lodash.isEmpty(cfg[typeName][this.e.self_id]))
|
||||
delete cfg[typeName][this.e.self_id]
|
||||
delete cfg[typeName][this.e.self_id]
|
||||
}
|
||||
let yaml = YAML.stringify(cfg)
|
||||
fs.writeFileSync(this.file, yaml, 'utf8')
|
||||
|
||||
logger.mark(`${this.e.logFnc} ${model}${pushGame}活动到期预警:${this.e.group_id}`)
|
||||
logger.mark(
|
||||
`${this.e.logFnc} ${model}${pushGame}活动到期预警:${this.e.group_id}`
|
||||
)
|
||||
await this.reply(msg)
|
||||
}
|
||||
async mysSearch() {
|
||||
|
@ -133,8 +138,7 @@ export class mysNews extends plugin {
|
|||
|
||||
async mysEstimate() {
|
||||
let args = ['版本原石', 218945821]
|
||||
if (/星(琼|铁)/.test(this.e.msg))
|
||||
args = ['可获取星琼', 73779489]
|
||||
if (/星(琼|铁)/.test(this.e.msg)) args = ['可获取星琼', 73779489]
|
||||
let data = await new MysNews(this.e).mysEstimate(...args)
|
||||
if (!data) return
|
||||
await this.reply(data)
|
||||
|
@ -153,7 +157,18 @@ export class mysNews extends plugin {
|
|||
let cfg = gsCfg.getConfig('mys', 'pushNews')
|
||||
let gids = this.gids()
|
||||
|
||||
let game = gids == 1 ? 'bbb' : gids == 2 ? 'gs' : gids == 3 ? 'bb' : gids == 4 ? 'wd' : gids == 6 ? 'sr' : 'zzz'
|
||||
let game =
|
||||
gids == 1
|
||||
? 'bbb'
|
||||
: gids == 2
|
||||
? 'gs'
|
||||
: gids == 3
|
||||
? 'bb'
|
||||
: gids == 4
|
||||
? 'wd'
|
||||
: gids == 6
|
||||
? 'sr'
|
||||
: 'zzz'
|
||||
let type = `${game}announceGroup`
|
||||
let typeName = '公告'
|
||||
if (this.e.msg.includes('资讯')) {
|
||||
|
@ -175,7 +190,9 @@ export class mysNews extends plugin {
|
|||
} else {
|
||||
model = '关闭'
|
||||
msg += `${model}`
|
||||
cfg[type][this.e.self_id] = lodash.difference(cfg[type][this.e.self_id], [this.e.group_id])
|
||||
cfg[type][this.e.self_id] = lodash.difference(cfg[type][this.e.self_id], [
|
||||
this.e.group_id
|
||||
])
|
||||
if (lodash.isEmpty(cfg[type][this.e.self_id]))
|
||||
delete cfg[type][this.e.self_id]
|
||||
}
|
||||
|
@ -188,7 +205,7 @@ export class mysNews extends plugin {
|
|||
}
|
||||
|
||||
gids() {
|
||||
let msg = this.e.msg.replace(/[#公告资讯活动开启关闭推送列表0-9]/g, '');
|
||||
let msg = this.e.msg.replace(/[#公告资讯活动开启关闭推送列表0-9]/g, '')
|
||||
switch (msg) {
|
||||
case '崩坏三':
|
||||
case '崩三':
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import { plugin } from 'yunzai/core'
|
||||
import { PayData, renderImg } from '../model/payLogData.js'
|
||||
import {NoteUser} from 'yunzai/mys'
|
||||
import { NoteUser } from 'yunzai/mys'
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import yaml from 'yaml'
|
||||
export class payLog extends plugin {
|
||||
dirPath = path.resolve('./data/payLog/')
|
||||
authKey = ''
|
||||
constructor () {
|
||||
constructor() {
|
||||
/**
|
||||
name: '充值记录',
|
||||
dsc: '充值记录,消费记录,充值统计,消费统计',
|
||||
|
@ -36,7 +36,7 @@ export class payLog extends plugin {
|
|||
})
|
||||
}
|
||||
|
||||
async payLog (e) {
|
||||
async payLog(e) {
|
||||
// 判断是否存有已经生成的数据
|
||||
if (!fs.readdirSync(this.dirPath, 'utf-8').includes(e.user_id + '.yaml')) {
|
||||
// 如果没有则判断是否已经缓存了authkey,这个主要针对使用抽卡链接的,和苹果用户
|
||||
|
@ -74,7 +74,7 @@ export class payLog extends plugin {
|
|||
}
|
||||
|
||||
// 获取authKey
|
||||
async getAuthKey () {
|
||||
async getAuthKey() {
|
||||
// 判断是否为群聊发送
|
||||
if (this.e.isGroup) {
|
||||
return false
|
||||
|
@ -109,13 +109,21 @@ export class payLog extends plugin {
|
|||
|
||||
// 存储数据
|
||||
await this.writeData(imgData)
|
||||
await redis.setEx(`Yz:genshin:mys:qq-uid:${this.e.user_id}`, 3600 * 24 * 30, imgData.uid)
|
||||
await redis.setEx(`Yz:genshin:payLog:${imgData.uid}`, 3600 * 24, this.authKey)
|
||||
await redis.setEx(
|
||||
`Yz:genshin:mys:qq-uid:${this.e.user_id}`,
|
||||
3600 * 24 * 30,
|
||||
imgData.uid
|
||||
)
|
||||
await redis.setEx(
|
||||
`Yz:genshin:payLog:${imgData.uid}`,
|
||||
3600 * 24,
|
||||
this.authKey
|
||||
)
|
||||
return true
|
||||
}
|
||||
|
||||
/** 更新充值统计 */
|
||||
async updatePayLog (e) {
|
||||
async updatePayLog(e) {
|
||||
// 读一下uid
|
||||
let uid = await redis.get(`Yz:genshin:mys:qq-uid:${this.e.user_id}`)
|
||||
if (uid) {
|
||||
|
@ -123,7 +131,9 @@ export class payLog extends plugin {
|
|||
if (mainUid) uid = mainUid
|
||||
// 读米游社链接的authkey
|
||||
// 读抽卡链接的authkey
|
||||
this.authKey = await redis.get(`Yz:genshin:payLog:${uid}`) || await redis.get(`Yz:genshin:gachaLog:url:${uid}`)
|
||||
this.authKey =
|
||||
(await redis.get(`Yz:genshin:payLog:${uid}`)) ||
|
||||
(await redis.get(`Yz:genshin:gachaLog:url:${uid}`))
|
||||
if (this.authKey) {
|
||||
this.reply('正在获取数据,可能需要30s')
|
||||
let imgData = await new PayData(this.authKey).filtrateData()
|
||||
|
@ -136,32 +146,34 @@ export class payLog extends plugin {
|
|||
}
|
||||
return true
|
||||
} else {
|
||||
this.reply(['请私聊发送米游社链接,可以发送【#充值统计帮助】查看链接教程',
|
||||
segment.button([
|
||||
{ text: "充值帮助", callback: "#充值统计帮助" },
|
||||
])])
|
||||
this.reply([
|
||||
'请私聊发送米游社链接,可以发送【#充值统计帮助】查看链接教程',
|
||||
segment.button([{ text: '充值帮助', callback: '#充值统计帮助' }])
|
||||
])
|
||||
}
|
||||
} else {
|
||||
this.reply(['请私聊发送米游社链接,可以发送【#充值统计帮助】查看链接教程',
|
||||
segment.button([
|
||||
{ text: "充值帮助", callback: "#充值统计帮助" },
|
||||
])])
|
||||
this.reply([
|
||||
'请私聊发送米游社链接,可以发送【#充值统计帮助】查看链接教程',
|
||||
segment.button([{ text: '充值帮助', callback: '#充值统计帮助' }])
|
||||
])
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
payLogHelp (e) {
|
||||
e.reply('安卓教程: https://b23.tv/K5qfLad\n苹果用户可【先】发送最新获取的抽卡记录链接,【再】发送【#充值记录】或【#更新充值统计】来获取(注:通过抽卡链接获取充值记录大概率已失效)')
|
||||
payLogHelp(e) {
|
||||
e.reply(
|
||||
'安卓教程: https://b23.tv/K5qfLad\n苹果用户可【先】发送最新获取的抽卡记录链接,【再】发送【#充值记录】或【#更新充值统计】来获取(注:通过抽卡链接获取充值记录大概率已失效)'
|
||||
)
|
||||
}
|
||||
|
||||
/** 判断主uid,若没有则返回false,有则返回主uid */
|
||||
async isMain (id, game = 'gs') {
|
||||
async isMain(id, game = 'gs') {
|
||||
let user = await NoteUser.create(id)
|
||||
return user.getCkUid(game)
|
||||
}
|
||||
|
||||
/** 存储数据 */
|
||||
async writeData (imgData) {
|
||||
async writeData(imgData) {
|
||||
let userPath = this.dirPath + '/' + this.e.user_id + '.yaml'
|
||||
if (fs.readdirSync(this.dirPath).includes(`${this.e.user_id}.yaml`)) {
|
||||
let data = fs.readFileSync(userPath, 'utf-8')
|
||||
|
|
96
apps/role.ts
96
apps/role.ts
|
@ -1,6 +1,6 @@
|
|||
import { plugin } from 'yunzai/core'
|
||||
import fs from 'node:fs'
|
||||
import { gsCfg} from 'yunzai/mys'
|
||||
import { gsCfg } from 'yunzai/mys'
|
||||
import RoleIndex from '../model/roleIndex.js'
|
||||
import Abyss from '../model/abyss.js'
|
||||
import Weapon from '../model/weapon.js'
|
||||
|
@ -13,38 +13,45 @@ export class role extends plugin {
|
|||
*/
|
||||
super({
|
||||
priority: 200,
|
||||
rule: [{
|
||||
reg: '^(#*角色3|#*角色卡片|角色)$',
|
||||
fnc: 'roleCard'
|
||||
}, {
|
||||
reg: '^#[上期|往期|本期]*(深渊|深境|深境螺旋)[上期|往期|本期]*[ |0-9]*$',
|
||||
fnc: 'abyss'
|
||||
}, {
|
||||
reg: '^#*[上期|往期|本期]*(深渊|深境|深境螺旋)[上期|往期|本期]*[第]*(9|10|11|12|九|十|十一|十二)层[ |0-9]*$',
|
||||
fnc: 'abyssFloor'
|
||||
}, {
|
||||
reg: '^#[五星|四星|5星|4星]*武器[ |0-9]*$',
|
||||
fnc: 'weapon'
|
||||
}, {
|
||||
reg: '^#(宝箱|成就|尘歌壶|家园|探索|探险|声望|探险度|探索度)[ |0-9]*$',
|
||||
fnc: 'roleExplore'
|
||||
}]
|
||||
rule: [
|
||||
{
|
||||
reg: '^(#*角色3|#*角色卡片|角色)$',
|
||||
fnc: 'roleCard'
|
||||
},
|
||||
{
|
||||
reg: '^#[上期|往期|本期]*(深渊|深境|深境螺旋)[上期|往期|本期]*[ |0-9]*$',
|
||||
fnc: 'abyss'
|
||||
},
|
||||
{
|
||||
reg: '^#*[上期|往期|本期]*(深渊|深境|深境螺旋)[上期|往期|本期]*[第]*(9|10|11|12|九|十|十一|十二)层[ |0-9]*$',
|
||||
fnc: 'abyssFloor'
|
||||
},
|
||||
{
|
||||
reg: '^#[五星|四星|5星|4星]*武器[ |0-9]*$',
|
||||
fnc: 'weapon'
|
||||
},
|
||||
{
|
||||
reg: '^#(宝箱|成就|尘歌壶|家园|探索|探险|声望|探险度|探索度)[ |0-9]*$',
|
||||
fnc: 'roleExplore'
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
Object.defineProperty(this, "button", { get() {
|
||||
this.prefix = this.e?.isSr ? "*" : "#"
|
||||
return segment.button([
|
||||
{ text: "角色", callback: `${this.prefix}角色` },
|
||||
{ text: "探索", callback: `${this.prefix}探索` },
|
||||
{ text: "武器", callback: `${this.prefix}武器` },
|
||||
{ text: "深渊", callback: `${this.prefix}深渊` },
|
||||
])
|
||||
}})
|
||||
Object.defineProperty(this, 'button', {
|
||||
get() {
|
||||
this.prefix = this.e?.isSr ? '*' : '#'
|
||||
return segment.button([
|
||||
{ text: '角色', callback: `${this.prefix}角色` },
|
||||
{ text: '探索', callback: `${this.prefix}探索` },
|
||||
{ text: '武器', callback: `${this.prefix}武器` },
|
||||
{ text: '深渊', callback: `${this.prefix}深渊` }
|
||||
])
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** 初始化配置文件 */
|
||||
async init() {
|
||||
|
||||
let pubCk = './plugins/genshin/config/mys.pubCk.yaml'
|
||||
if (!fs.existsSync(pubCk)) {
|
||||
fs.copyFileSync('./plugins/genshin/defSet/mys/pubCk.yaml', pubCk)
|
||||
|
@ -79,7 +86,12 @@ export class role extends plugin {
|
|||
let data = await new Abyss(this.e).getAbyss()
|
||||
if (!data) return
|
||||
|
||||
this.reply([await this.renderImg('genshin', 'html/abyss/abyss', data, { retType: "base64" }), this.button])
|
||||
this.reply([
|
||||
await this.renderImg('genshin', 'html/abyss/abyss', data, {
|
||||
retType: 'base64'
|
||||
}),
|
||||
this.button
|
||||
])
|
||||
}
|
||||
|
||||
/** 深渊十二层 */
|
||||
|
@ -87,7 +99,12 @@ export class role extends plugin {
|
|||
let data = await new Abyss(this.e).getAbyssFloor()
|
||||
if (!data) return
|
||||
|
||||
this.reply([await this.renderImg('genshin', 'html/abyss/abyss-floor', data, { retType: "base64" }), this.button])
|
||||
this.reply([
|
||||
await this.renderImg('genshin', 'html/abyss/abyss-floor', data, {
|
||||
retType: 'base64'
|
||||
}),
|
||||
this.button
|
||||
])
|
||||
}
|
||||
|
||||
/** 武器 */
|
||||
|
@ -95,7 +112,12 @@ export class role extends plugin {
|
|||
let data = await Weapon.get(this.e)
|
||||
if (!data) return
|
||||
|
||||
this.reply([await this.renderImg('genshin', 'html/avatar/weapon', data, { retType: "base64" }), this.button])
|
||||
this.reply([
|
||||
await this.renderImg('genshin', 'html/avatar/weapon', data, {
|
||||
retType: 'base64'
|
||||
}),
|
||||
this.button
|
||||
])
|
||||
}
|
||||
|
||||
/** 角色卡片 */
|
||||
|
@ -103,7 +125,12 @@ export class role extends plugin {
|
|||
let data = await new RoleIndex(this.e).roleCard()
|
||||
if (!data) return
|
||||
|
||||
this.reply([await this.renderImg('genshin', 'html/player/role-card', data, { retType: "base64" }), this.button])
|
||||
this.reply([
|
||||
await this.renderImg('genshin', 'html/player/role-card', data, {
|
||||
retType: 'base64'
|
||||
}),
|
||||
this.button
|
||||
])
|
||||
}
|
||||
|
||||
/** 探险 */
|
||||
|
@ -111,6 +138,11 @@ export class role extends plugin {
|
|||
let data = await new RoleIndex(this.e).roleExplore()
|
||||
if (!data) return
|
||||
|
||||
this.reply([await this.renderImg('genshin', 'html/player/role-explore', data, { retType: "base64" }), this.button])
|
||||
this.reply([
|
||||
await this.renderImg('genshin', 'html/player/role-explore', data, {
|
||||
retType: 'base64'
|
||||
}),
|
||||
this.button
|
||||
])
|
||||
}
|
||||
}
|
||||
|
|
140
apps/setPubCk.ts
140
apps/setPubCk.ts
|
@ -1,12 +1,12 @@
|
|||
import { GSCfg as GsCfg} from "yunzai/mys"
|
||||
import fs from "node:fs"
|
||||
import lodash from "lodash"
|
||||
import fetch from "node-fetch"
|
||||
import YAML from "yaml"
|
||||
import {MysInfo} from "yunzai/mys"
|
||||
import { sleep } from "yunzai/utils"
|
||||
import { GSCfg as GsCfg } from 'yunzai/mys'
|
||||
import fs from 'node:fs'
|
||||
import lodash from 'lodash'
|
||||
import fetch from 'node-fetch'
|
||||
import YAML from 'yaml'
|
||||
import { MysInfo } from 'yunzai/mys'
|
||||
import { sleep } from 'yunzai/utils'
|
||||
export class setPubCk extends plugin {
|
||||
constructor () {
|
||||
constructor() {
|
||||
/**
|
||||
*
|
||||
name: "配置",
|
||||
|
@ -17,66 +17,85 @@ export class setPubCk extends plugin {
|
|||
rule: [
|
||||
{
|
||||
reg: /^#配置c(oo)?k(ie)?$|^#*配置公共查询c(oo)?k(ie)?$/i,
|
||||
fnc: "setPubCk",
|
||||
permission: "master"
|
||||
fnc: 'setPubCk',
|
||||
permission: 'master'
|
||||
},
|
||||
{
|
||||
reg: "^#使用(全部|用户)ck$",
|
||||
fnc: "setUserCk",
|
||||
permission: "master"
|
||||
reg: '^#使用(全部|用户)ck$',
|
||||
fnc: 'setUserCk',
|
||||
permission: 'master'
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
file = "./plugins/genshin/config/mys.pubCk.yaml"
|
||||
|
||||
file = './plugins/genshin/config/mys.pubCk.yaml'
|
||||
|
||||
/** 配置公共ck */
|
||||
async setPubCk () {
|
||||
async setPubCk() {
|
||||
/** 设置上下文,后续接收到内容会执行doRep方法 */
|
||||
this.setContext("pubCk")
|
||||
this.setContext('pubCk')
|
||||
/** 回复 */
|
||||
await this.reply("请发送米游社cookie......\n配置后该ck将会加入公共查询池")
|
||||
await this.reply('请发送米游社cookie......\n配置后该ck将会加入公共查询池')
|
||||
}
|
||||
|
||||
async pubCk () {
|
||||
async pubCk() {
|
||||
let msg = this.e.msg
|
||||
|
||||
if (!(/(ltoken|ltoken_v2)/.test(this.e.msg) && /(ltuid|ltmid_v2|account_mid_v2)/.test(this.e.msg))) {
|
||||
this.e.reply("cookie错误,请发送正确的cookie")
|
||||
if (
|
||||
!(
|
||||
/(ltoken|ltoken_v2)/.test(this.e.msg) &&
|
||||
/(ltuid|ltmid_v2|account_mid_v2)/.test(this.e.msg)
|
||||
)
|
||||
) {
|
||||
this.e.reply('cookie错误,请发送正确的cookie')
|
||||
return true
|
||||
}
|
||||
|
||||
this.finish("pubCk")
|
||||
this.finish('pubCk')
|
||||
|
||||
let ck = msg.replace(/#|"|"/g, "")
|
||||
let ck = msg.replace(/#|"|"/g, '')
|
||||
let param = {}
|
||||
ck.split(";").forEach((v) => {
|
||||
ck.split(';').forEach(v => {
|
||||
// cookie_token_v2,ltoken_v2值也可能有=
|
||||
// let tmp = lodash.trim(v).split("=")
|
||||
let tmp = lodash.trim(v);
|
||||
let index = tmp.indexOf("=");
|
||||
param[tmp.slice(0,index)] = tmp.slice(index+1);
|
||||
let tmp = lodash.trim(v)
|
||||
let index = tmp.indexOf('=')
|
||||
param[tmp.slice(0, index)] = tmp.slice(index + 1)
|
||||
})
|
||||
|
||||
this.ck = ""
|
||||
this.ck = ''
|
||||
lodash.forEach(param, (v, k) => {
|
||||
if (["ltoken", "ltuid", "cookie_token", "account_id", "cookie_token_v2", "account_mid_v2", "ltmid_v2", "ltoken_v2"].includes(k)) {
|
||||
if (
|
||||
[
|
||||
'ltoken',
|
||||
'ltuid',
|
||||
'cookie_token',
|
||||
'account_id',
|
||||
'cookie_token_v2',
|
||||
'account_mid_v2',
|
||||
'ltmid_v2',
|
||||
'ltoken_v2'
|
||||
].includes(k)
|
||||
) {
|
||||
this.ck += `${k}=${v};`
|
||||
}
|
||||
})
|
||||
|
||||
/** 检查ck是否失效 */
|
||||
if (!await this.checkCk()) {
|
||||
logger.mark(`配置公共cookie错误:${this.checkMsg || "cookie错误"}`)
|
||||
await this.e.reply(`配置公共cookie错误:${this.checkMsg || "cookie错误"}`)
|
||||
if (!(await this.checkCk())) {
|
||||
logger.mark(`配置公共cookie错误:${this.checkMsg || 'cookie错误'}`)
|
||||
await this.e.reply(`配置公共cookie错误:${this.checkMsg || 'cookie错误'}`)
|
||||
return
|
||||
}
|
||||
|
||||
this.ltuid = param.ltuid
|
||||
// 判断是否是v2版ck
|
||||
if (param.cookie_token_v2 && (param.account_mid_v2 || param.ltoken_v2) && !(/(\d{4,9})/g).test(this.ltuid)) {
|
||||
if (
|
||||
param.cookie_token_v2 &&
|
||||
(param.account_mid_v2 || param.ltoken_v2) &&
|
||||
!/(\d{4,9})/g.test(this.ltuid)
|
||||
) {
|
||||
// 获取米游社通行证id
|
||||
let userFullInfo = await this.getUserInfo()
|
||||
if (userFullInfo?.data?.user_info) {
|
||||
|
@ -84,18 +103,22 @@ export class setPubCk extends plugin {
|
|||
this.ltuid = userInfo.uid
|
||||
this.ck = `${this.ck}ltuid=${this.ltuid};`
|
||||
} else {
|
||||
logger.mark(`配置公共cookie错误:${userFullInfo.message || "cookie错误"}`)
|
||||
await this.e.reply(`配置公共cookie错误:${userFullInfo.message || "cookie错误"}`)
|
||||
logger.mark(
|
||||
`配置公共cookie错误:${userFullInfo.message || 'cookie错误'}`
|
||||
)
|
||||
await this.e.reply(
|
||||
`配置公共cookie错误:${userFullInfo.message || 'cookie错误'}`
|
||||
)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
let ckArr = GsCfg.getConfig("mys", "pubCk") || []
|
||||
let ckArr = GsCfg.getConfig('mys', 'pubCk') || []
|
||||
|
||||
/** 判断是否重复 */
|
||||
for (let ck of ckArr) {
|
||||
if (ck.includes(this.ltuid)) {
|
||||
await this.e.reply("配置公共cookie错误:该ck已配置")
|
||||
await this.e.reply('配置公共cookie错误:该ck已配置')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@ -108,9 +131,10 @@ export class setPubCk extends plugin {
|
|||
}
|
||||
|
||||
/** 检查ck是否可用 */
|
||||
async checkCk () {
|
||||
let url = "https://api-takumi.mihoyo.com/binding/api/getUserGameRolesByCookie?game_biz=hk4e_cn"
|
||||
let res = await fetch(url, { method: "get", headers: { Cookie: this.ck } })
|
||||
async checkCk() {
|
||||
let url =
|
||||
'https://api-takumi.mihoyo.com/binding/api/getUserGameRolesByCookie?game_biz=hk4e_cn'
|
||||
let res = await fetch(url, { method: 'get', headers: { Cookie: this.ck } })
|
||||
if (!res.ok) return false
|
||||
res = await res.json()
|
||||
if (res.retcode != 0) {
|
||||
|
@ -122,22 +146,22 @@ export class setPubCk extends plugin {
|
|||
}
|
||||
|
||||
// 获取米游社通行证id
|
||||
async getUserInfo (server = "mys") {
|
||||
async getUserInfo(server = 'mys') {
|
||||
try {
|
||||
const that = this
|
||||
let url = {
|
||||
mys: "https://bbs-api.mihoyo.com/user/wapi/getUserFullInfo?gids=2",
|
||||
hoyolab: ""
|
||||
mys: 'https://bbs-api.mihoyo.com/user/wapi/getUserFullInfo?gids=2',
|
||||
hoyolab: ''
|
||||
}
|
||||
let res = await fetch(url[server], {
|
||||
method: "get",
|
||||
method: 'get',
|
||||
headers: {
|
||||
Cookie: that.ck,
|
||||
Accept: "application/json, text/plain, */*",
|
||||
Connection: "keep-alive",
|
||||
Host: "bbs-api.mihoyo.com",
|
||||
Origin: "https://m.bbs.mihoyo.com",
|
||||
Referer: " https://m.bbs.mihoyo.com/"
|
||||
Accept: 'application/json, text/plain, */*',
|
||||
Connection: 'keep-alive',
|
||||
Host: 'bbs-api.mihoyo.com',
|
||||
Origin: 'https://m.bbs.mihoyo.com',
|
||||
Referer: ' https://m.bbs.mihoyo.com/'
|
||||
}
|
||||
})
|
||||
if (!res.ok) return res
|
||||
|
@ -148,21 +172,21 @@ export class setPubCk extends plugin {
|
|||
}
|
||||
}
|
||||
|
||||
save (data) {
|
||||
save(data) {
|
||||
data = YAML.stringify(data)
|
||||
fs.writeFileSync(this.file, data)
|
||||
}
|
||||
|
||||
async setUserCk () {
|
||||
let set = "./plugins/genshin/config/mys.set.yaml"
|
||||
async setUserCk() {
|
||||
let set = './plugins/genshin/config/mys.set.yaml'
|
||||
|
||||
let config = fs.readFileSync(set, "utf8")
|
||||
config = config.replace(/allowUseCookie: [0-1]/g, "allowUseCookie: 1")
|
||||
fs.writeFileSync(set, config, "utf8")
|
||||
let config = fs.readFileSync(set, 'utf8')
|
||||
config = config.replace(/allowUseCookie: [0-1]/g, 'allowUseCookie: 1')
|
||||
fs.writeFileSync(set, config, 'utf8')
|
||||
|
||||
await sleep(500)
|
||||
await MysInfo.initCache(true)
|
||||
|
||||
await this.reply("开启成功,用户ck已加入公共查询ck池")
|
||||
await this.reply('开启成功,用户ck已加入公共查询ck池')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,9 +23,9 @@ export class sevenSaints extends plugin {
|
|||
})
|
||||
|
||||
this.button = segment.button([
|
||||
{ text: "牌组", callback: `#七圣召唤查询牌组` },
|
||||
{ text: "角色牌", callback: `#七圣召唤查询角色牌` },
|
||||
{ text: "行动牌", callback: `#七圣召唤查询行动牌` },
|
||||
{ text: '牌组', callback: `#七圣召唤查询牌组` },
|
||||
{ text: '角色牌', callback: `#七圣召唤查询角色牌` },
|
||||
{ text: '行动牌', callback: `#七圣召唤查询行动牌` }
|
||||
])
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,8 @@ gsCfg.cpCfg('mys', 'set')
|
|||
*/
|
||||
export class strategy extends plugin {
|
||||
path = './temp/strategy'
|
||||
url = 'https://bbs-api.mihoyo.com/post/wapi/getPostFullInCollection?&gids=2&order_type=2&collection_id='
|
||||
url =
|
||||
'https://bbs-api.mihoyo.com/post/wapi/getPostFullInCollection?&gids=2&order_type=2&collection_id='
|
||||
collection_id = [
|
||||
[],
|
||||
// 来源:西风驿站
|
||||
|
@ -34,8 +35,17 @@ export class strategy extends plugin {
|
|||
// 来源:婧枫赛赛
|
||||
[1812949]
|
||||
]
|
||||
source = ['西风驿站', '原神观测枢', '派蒙喵喵屋', 'OH是姜姜呀', '曉K', '坤易', '婧枫赛赛']
|
||||
oss = '?x-oss-process=image//resize,s_1200/quality,q_90/auto-orient,0/interlace,1/format,jpg'
|
||||
source = [
|
||||
'西风驿站',
|
||||
'原神观测枢',
|
||||
'派蒙喵喵屋',
|
||||
'OH是姜姜呀',
|
||||
'曉K',
|
||||
'坤易',
|
||||
'婧枫赛赛'
|
||||
]
|
||||
oss =
|
||||
'?x-oss-process=image//resize,s_1200/quality,q_90/auto-orient,0/interlace,1/format,jpg'
|
||||
constructor() {
|
||||
/**
|
||||
*
|
||||
|
@ -123,7 +133,9 @@ export class strategy extends plugin {
|
|||
|
||||
/** #攻略帮助 */
|
||||
async strategy_help() {
|
||||
await this.e.reply('攻略帮助:\n#心海攻略[1234567]\n#更新早柚攻略[1234567]\n#设置默认攻略[1234567]\n示例: 心海攻略4\n\n攻略来源:\n1——西风驿站\n2——原神观测枢\n3——派蒙喵喵屋\n4——OH是姜姜呀\n5——曉K\n6——坤易\n7——婧枫赛赛(角色配队一图流)')
|
||||
await this.e.reply(
|
||||
'攻略帮助:\n#心海攻略[1234567]\n#更新早柚攻略[1234567]\n#设置默认攻略[1234567]\n示例: 心海攻略4\n\n攻略来源:\n1——西风驿站\n2——原神观测枢\n3——派蒙喵喵屋\n4——OH是姜姜呀\n5——曉K\n6——坤易\n7——婧枫赛赛(角色配队一图流)'
|
||||
)
|
||||
}
|
||||
|
||||
/** #设置默认攻略1 */
|
||||
|
@ -133,7 +145,9 @@ export class strategy extends plugin {
|
|||
let config = fs.readFileSync(set, 'utf8')
|
||||
let num = Number(match[1])
|
||||
if (isNaN(num)) {
|
||||
await this.e.reply('默认攻略设置方式为: \n#设置默认攻略[1234567] \n 请增加数字1-7其中一个')
|
||||
await this.e.reply(
|
||||
'默认攻略设置方式为: \n#设置默认攻略[1234567] \n 请增加数字1-7其中一个'
|
||||
)
|
||||
return
|
||||
}
|
||||
config = config.replace(/defaultSource: [1-7]/g, 'defaultSource: ' + num)
|
||||
|
@ -145,7 +159,9 @@ export class strategy extends plugin {
|
|||
/** 下载攻略图 */
|
||||
async getImg(name, group) {
|
||||
let msyRes = []
|
||||
this.collection_id[group].forEach((id) => msyRes.push(this.getData(this.url + id)))
|
||||
this.collection_id[group].forEach(id =>
|
||||
msyRes.push(this.getData(this.url + id))
|
||||
)
|
||||
|
||||
try {
|
||||
msyRes = await Promise.all(msyRes)
|
||||
|
@ -155,14 +171,14 @@ export class strategy extends plugin {
|
|||
return false
|
||||
}
|
||||
|
||||
let posts = lodash.flatten(lodash.map(msyRes, (item) => item.data.posts))
|
||||
let posts = lodash.flatten(lodash.map(msyRes, item => item.data.posts))
|
||||
let url
|
||||
for (let val of posts) {
|
||||
/** 攻略图个别来源特殊处理 */
|
||||
if (group == 4) {
|
||||
if (val.post.structured_content.includes(name + '】')) {
|
||||
let content = val.post.structured_content.replace(/\\\/\{\}/g, '')
|
||||
let pattern = new RegExp(name + '】.*?image\\\\?":\\\\?"(.*?)\\\\?"'); // 常驻角色兼容
|
||||
let pattern = new RegExp(name + '】.*?image\\\\?":\\\\?"(.*?)\\\\?"') // 常驻角色兼容
|
||||
let imgId = pattern.exec(content)[1]
|
||||
for (let image of val.image_list) {
|
||||
if (image.image_id == imgId) {
|
||||
|
@ -185,15 +201,16 @@ export class strategy extends plugin {
|
|||
}
|
||||
|
||||
if (!url) {
|
||||
this.e.reply([`暂无${name}攻略(${this.source[group - 1]})\n请尝试其他的攻略来源查询\n#攻略帮助,查看说明`, segment.button([
|
||||
{ text: "攻略帮助", callback: "#攻略帮助" },
|
||||
])])
|
||||
this.e.reply([
|
||||
`暂无${name}攻略(${this.source[group - 1]})\n请尝试其他的攻略来源查询\n#攻略帮助,查看说明`,
|
||||
segment.button([{ text: '攻略帮助', callback: '#攻略帮助' }])
|
||||
])
|
||||
return false
|
||||
}
|
||||
|
||||
logger.mark(`${this.e.logFnc} 下载${name}攻略图`)
|
||||
|
||||
if (!await downFile(url + this.oss, this.sfPath)) {
|
||||
if (!(await downFile(url + this.oss, this.sfPath))) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -211,4 +228,4 @@ export class strategy extends plugin {
|
|||
const res = await response.json()
|
||||
return res
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { plugin } from 'yunzai/core'
|
||||
import {MysInfo} from 'yunzai/mys'
|
||||
import { MysInfo } from 'yunzai/mys'
|
||||
import fetch from 'node-fetch'
|
||||
export class takeBirthdayPhoto extends plugin {
|
||||
constructor() {
|
||||
|
@ -17,9 +17,7 @@ export class takeBirthdayPhoto extends plugin {
|
|||
}
|
||||
]
|
||||
})
|
||||
this.button = segment.button([
|
||||
{ text: "留影叙佳期", input: "#留影叙佳期" },
|
||||
])
|
||||
this.button = segment.button([{ text: '留影叙佳期', input: '#留影叙佳期' }])
|
||||
}
|
||||
|
||||
async birthdaystar(e) {
|
||||
|
@ -27,9 +25,13 @@ export class takeBirthdayPhoto extends plugin {
|
|||
if (!uid) return false
|
||||
let ck = await MysInfo.checkUidBing(uid, this.e)
|
||||
if (!ck) {
|
||||
e.reply(['请先绑定ck再使用本功能哦~', segment.button([
|
||||
{ text: "Cookie帮助", callback: "#Cookie帮助" },
|
||||
])], true)
|
||||
e.reply(
|
||||
[
|
||||
'请先绑定ck再使用本功能哦~',
|
||||
segment.button([{ text: 'Cookie帮助', callback: '#Cookie帮助' }])
|
||||
],
|
||||
true
|
||||
)
|
||||
return true
|
||||
}
|
||||
|
||||
|
@ -42,7 +44,11 @@ export class takeBirthdayPhoto extends plugin {
|
|||
return true
|
||||
}
|
||||
|
||||
const birthday_star_list = await this.getBirthdayStar(uid, e_hk4e_token, ck.ck)
|
||||
const birthday_star_list = await this.getBirthdayStar(
|
||||
uid,
|
||||
e_hk4e_token,
|
||||
ck.ck
|
||||
)
|
||||
if (!birthday_star_list) {
|
||||
e.reply(['获取生日角色失败,请稍后再试~', this.button], true)
|
||||
return true
|
||||
|
@ -57,7 +63,12 @@ export class takeBirthdayPhoto extends plugin {
|
|||
for (const role of birthday_star_list) {
|
||||
await e.reply(`正在获取${role.name}的图片,请稍等~`, true)
|
||||
await e.reply(segment.image(role.take_picture))
|
||||
const message = await this.getBirthdayStarImg(uid, e_hk4e_token, ck.ck, role.role_id)
|
||||
const message = await this.getBirthdayStarImg(
|
||||
uid,
|
||||
e_hk4e_token,
|
||||
ck.ck,
|
||||
role.role_id
|
||||
)
|
||||
if (message != 'success') {
|
||||
await e.reply([message, this.button])
|
||||
return true
|
||||
|
@ -66,7 +77,10 @@ export class takeBirthdayPhoto extends plugin {
|
|||
}
|
||||
}
|
||||
} catch (error) {
|
||||
await e.reply([`获取角色留影叙佳期图片失败,可能是ck失效...`, this.button], true)
|
||||
await e.reply(
|
||||
[`获取角色留影叙佳期图片失败,可能是ck失效...`, this.button],
|
||||
true
|
||||
)
|
||||
logger.error(error)
|
||||
}
|
||||
|
||||
|
@ -74,12 +88,14 @@ export class takeBirthdayPhoto extends plugin {
|
|||
}
|
||||
|
||||
async getEHK4EToken(ck, uid) {
|
||||
const url = this.region.includes('cn') ? 'https://api-takumi.mihoyo.com/common/badge/v1/login/account' : 'https://api-os-takumi.mihoyo.com/common/badge/v1/login/account'
|
||||
const url = this.region.includes('cn')
|
||||
? 'https://api-takumi.mihoyo.com/common/badge/v1/login/account'
|
||||
: 'https://api-os-takumi.mihoyo.com/common/badge/v1/login/account'
|
||||
const headers = {
|
||||
Cookie: ck,
|
||||
'Cookie': ck,
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
Referer: 'https://webstatic.mihoyo.com/',
|
||||
Origin: 'https://webstatic.mihoyo.com'
|
||||
'Referer': 'https://webstatic.mihoyo.com/',
|
||||
'Origin': 'https://webstatic.mihoyo.com'
|
||||
}
|
||||
const body = JSON.stringify({
|
||||
uid: Number(uid),
|
||||
|
@ -88,7 +104,9 @@ export class takeBirthdayPhoto extends plugin {
|
|||
region: this.region
|
||||
})
|
||||
let res = await fetch(url, { method: 'POST', body, headers })
|
||||
const e_hk4e_token = res.headers.get('set-cookie').match(/e_hk4e_token=(.*?);/)[1]
|
||||
const e_hk4e_token = res.headers
|
||||
.get('set-cookie')
|
||||
.match(/e_hk4e_token=(.*?);/)[1]
|
||||
res = await res.json()
|
||||
if (res.retcode != 0) {
|
||||
return false
|
||||
|
|
45
apps/user.ts
45
apps/user.ts
|
@ -1,5 +1,5 @@
|
|||
import { plugin } from 'yunzai/core'
|
||||
import { gsCfg} from 'yunzai/mys'
|
||||
import { gsCfg } from 'yunzai/mys'
|
||||
import User from '../model/user.js'
|
||||
export class user extends plugin {
|
||||
User = null
|
||||
|
@ -76,7 +76,10 @@ export class user extends plugin {
|
|||
accept() {
|
||||
if (!this.e.msg) return
|
||||
// 由于手机端米游社网页可能获取不到ltuid 可以尝试在通行证页面获取login_uid
|
||||
if (/(ltoken|ltoken_v2)/.test(this.e.msg) && /(ltuid|login_uid|ltmid_v2)/.test(this.e.msg)) {
|
||||
if (
|
||||
/(ltoken|ltoken_v2)/.test(this.e.msg) &&
|
||||
/(ltuid|login_uid|ltmid_v2)/.test(this.e.msg)
|
||||
) {
|
||||
if (this.e.isGroup) {
|
||||
this.reply('请私聊发送Cookie', false, { at: true })
|
||||
return true
|
||||
|
@ -87,14 +90,14 @@ export class user extends plugin {
|
|||
}
|
||||
|
||||
if (/^#?(原神)?绑定uid$/i.test(this.e.msg)) {
|
||||
this.setContext("saveUid")
|
||||
this.reply("请发送绑定的原神uid", false, { at: true })
|
||||
this.setContext('saveUid')
|
||||
this.reply('请发送绑定的原神uid', false, { at: true })
|
||||
return true
|
||||
}
|
||||
|
||||
if (/^#?星铁绑定uid$/i.test(this.e.msg)) {
|
||||
this.setContext("saveSrUid")
|
||||
this.reply("请发送绑定的星铁uid", false, { at: true })
|
||||
this.setContext('saveSrUid')
|
||||
this.reply('请发送绑定的星铁uid', false, { at: true })
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
@ -104,12 +107,12 @@ export class user extends plugin {
|
|||
if (!this.e.msg) return
|
||||
let uid = this.e.msg.match(/([1-9]|18)[0-9]{8}/g)
|
||||
if (!uid) {
|
||||
this.reply("原神UID输入错误", false, { at: true })
|
||||
this.reply('原神UID输入错误', false, { at: true })
|
||||
return
|
||||
}
|
||||
this.e.msg = "#绑定" + this.e.msg
|
||||
this.e.msg = '#绑定' + this.e.msg
|
||||
this.bingUid()
|
||||
this.finish("saveUid")
|
||||
this.finish('saveUid')
|
||||
}
|
||||
|
||||
/** 绑定星铁uid */
|
||||
|
@ -117,14 +120,14 @@ export class user extends plugin {
|
|||
if (!this.e.msg) return
|
||||
let uid = this.e.msg.match(/([1-9]|18)[0-9]{8}/g)
|
||||
if (!uid) {
|
||||
this.reply("星铁UID输入错误", false, { at: true })
|
||||
this.reply('星铁UID输入错误', false, { at: true })
|
||||
return
|
||||
}
|
||||
this.e.msg = "#星铁绑定" + this.e.msg
|
||||
this.e.msg = '#星铁绑定' + this.e.msg
|
||||
this.e.isSr = true
|
||||
this.e.game = 'sr'
|
||||
this.bingUid()
|
||||
this.finish("saveSrUid")
|
||||
this.finish('saveSrUid')
|
||||
}
|
||||
|
||||
/** 未登录ck */
|
||||
|
@ -134,13 +137,15 @@ export class user extends plugin {
|
|||
|
||||
/** #ck代码 */
|
||||
async ckCode() {
|
||||
await this.reply('javascript:(()=>{prompt(\'\',document.cookie)})();')
|
||||
await this.reply("javascript:(()=>{prompt('',document.cookie)})();")
|
||||
}
|
||||
|
||||
/** ck帮助 */
|
||||
async ckHelp() {
|
||||
let set = gsCfg.getConfig('mys', 'set')
|
||||
await this.reply(`Cookie绑定配置教程:${set.cookieDoc}\n获取Cookie后【私聊发送】进行绑定`)
|
||||
await this.reply(
|
||||
`Cookie绑定配置教程:${set.cookieDoc}\n获取Cookie后【私聊发送】进行绑定`
|
||||
)
|
||||
}
|
||||
|
||||
/** 绑定ck */
|
||||
|
@ -148,7 +153,9 @@ export class user extends plugin {
|
|||
let set = gsCfg.getConfig('mys', 'set')
|
||||
|
||||
if (!this.e.ck) {
|
||||
await this.reply(`请【私聊】发送米游社Cookie,获取教程:\n${set.cookieDoc}`)
|
||||
await this.reply(
|
||||
`请【私聊】发送米游社Cookie,获取教程:\n${set.cookieDoc}`
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -178,9 +185,11 @@ export class user extends plugin {
|
|||
|
||||
async delUid() {
|
||||
let index = this.e.msg.match(/[0-9]{1,2}$/g)
|
||||
if(!index) {
|
||||
this.e.reply(`删除uid请带上序号\n例如:#删除uid1\n发送【#uid】可查看绑定的uid以及对应的序号`)
|
||||
return true;
|
||||
if (!index) {
|
||||
this.e.reply(
|
||||
`删除uid请带上序号\n例如:#删除uid1\n发送【#uid】可查看绑定的uid以及对应的序号`
|
||||
)
|
||||
return true
|
||||
}
|
||||
let uidIdx = index && index[0]
|
||||
let game = this.e
|
||||
|
|
|
@ -12,28 +12,35 @@ export class userAdmin extends plugin {
|
|||
super({
|
||||
event: 'message',
|
||||
priority: 300,
|
||||
rule: [{
|
||||
reg: '^#用户统计$',
|
||||
fnc: 'userAdmin',
|
||||
permission: "master",
|
||||
}, {
|
||||
reg: '^#(刷新|重置)用户(缓存|统计|ck|Ck|CK)$',
|
||||
fnc: 'resetCache',
|
||||
permission: "master",
|
||||
}, {
|
||||
reg: '^#删除(无效|失效)(用户|ck|Ck|CK)$',
|
||||
fnc: 'delDisable',
|
||||
permission: "master",
|
||||
}]
|
||||
rule: [
|
||||
{
|
||||
reg: '^#用户统计$',
|
||||
fnc: 'userAdmin',
|
||||
permission: 'master'
|
||||
},
|
||||
{
|
||||
reg: '^#(刷新|重置)用户(缓存|统计|ck|Ck|CK)$',
|
||||
fnc: 'resetCache',
|
||||
permission: 'master'
|
||||
},
|
||||
{
|
||||
reg: '^#删除(无效|失效)(用户|ck|Ck|CK)$',
|
||||
fnc: 'delDisable',
|
||||
permission: 'master'
|
||||
}
|
||||
]
|
||||
})
|
||||
this.User = new User(e)
|
||||
this.button = segment.button([
|
||||
{ text: "用户统计", callback: "#用户统计" },
|
||||
{ text: "删除无效", callback: "#删除无效用户" },
|
||||
], [
|
||||
{ text: "刷新统计", callback: "#刷新用户统计" },
|
||||
{ text: "重置统计", callback: "#重置用户统计" },
|
||||
])
|
||||
this.button = segment.button(
|
||||
[
|
||||
{ text: '用户统计', callback: '#用户统计' },
|
||||
{ text: '删除无效', callback: '#删除无效用户' }
|
||||
],
|
||||
[
|
||||
{ text: '刷新统计', callback: '#刷新用户统计' },
|
||||
{ text: '重置统计', callback: '#重置用户统计' }
|
||||
]
|
||||
)
|
||||
}
|
||||
|
||||
/** #用户统计$ */
|
||||
|
@ -42,7 +49,12 @@ export class userAdmin extends plugin {
|
|||
if (!data) return true
|
||||
|
||||
/** 生成图片 */
|
||||
this.reply([await this.renderImg('genshin', 'html/admin/userAdmin', data, { retType: "base64" }), this.button])
|
||||
this.reply([
|
||||
await this.renderImg('genshin', 'html/admin/userAdmin', data, {
|
||||
retType: 'base64'
|
||||
}),
|
||||
this.button
|
||||
])
|
||||
}
|
||||
|
||||
/** #刷新用户缓存 / #重置用户缓存 */
|
||||
|
@ -50,11 +62,17 @@ export class userAdmin extends plugin {
|
|||
// 清空老数据
|
||||
const clearData = /重置/.test(this.e.msg)
|
||||
await MysInfo.initCache(true, clearData)
|
||||
this.reply([`用户缓存已${clearData ? '重置' : '刷新'}...\n通过【#用户统计】命令可查看详情`, this.button])
|
||||
this.reply([
|
||||
`用户缓存已${clearData ? '重置' : '刷新'}...\n通过【#用户统计】命令可查看详情`,
|
||||
this.button
|
||||
])
|
||||
}
|
||||
|
||||
async delDisable() {
|
||||
let count = await MysInfo.delDisable()
|
||||
this.reply([count > 0 ? `已删除${count}个无效用户` : '暂无无效用户...', this.button])
|
||||
this.reply([
|
||||
count > 0 ? `已删除${count}个无效用户` : '暂无无效用户...',
|
||||
this.button
|
||||
])
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
title: 导出记录、导入记录
|
||||
desc: 导出导入json抽卡记录
|
||||
- icon: 纠缠之缘
|
||||
title: 十连 十连2 定轨 十连武器
|
||||
title: 十连 十连2 定轨 十连武器
|
||||
desc: 真实模拟抽卡
|
||||
- icon: 浮世
|
||||
title: '刻晴突破、素材、攻略'
|
||||
|
|
|
@ -65,24 +65,24 @@ weapon5:
|
|||
|
||||
# 四星武器
|
||||
weapon4:
|
||||
- 弓藏
|
||||
- 祭礼弓
|
||||
- 绝弦
|
||||
- 西风猎弓
|
||||
- 昭心
|
||||
- 祭礼残章
|
||||
- 流浪乐章
|
||||
- 西风秘典
|
||||
- 西风长枪
|
||||
- 匣里灭辰
|
||||
- 雨裁
|
||||
- 祭礼大剑
|
||||
- 钟剑
|
||||
- 西风大剑
|
||||
- 匣里龙吟
|
||||
- 祭礼剑
|
||||
- 笛剑
|
||||
- 西风剑
|
||||
- 弓藏
|
||||
- 祭礼弓
|
||||
- 绝弦
|
||||
- 西风猎弓
|
||||
- 昭心
|
||||
- 祭礼残章
|
||||
- 流浪乐章
|
||||
- 西风秘典
|
||||
- 西风长枪
|
||||
- 匣里灭辰
|
||||
- 雨裁
|
||||
- 祭礼大剑
|
||||
- 钟剑
|
||||
- 西风大剑
|
||||
- 匣里龙吟
|
||||
- 祭礼剑
|
||||
- 笛剑
|
||||
- 西风剑
|
||||
|
||||
# 三星武器
|
||||
weapon3:
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
- 西风长枪
|
||||
- 流浪乐章
|
||||
- 绝弦
|
||||
endTime: "2024-03-12 14:59:59"
|
||||
endTime: '2024-03-12 14:59:59'
|
||||
- up4:
|
||||
- 嘉明
|
||||
- 珐露珊
|
||||
|
@ -33,7 +33,7 @@
|
|||
- 祭礼大剑
|
||||
- 祭礼残章
|
||||
- 祭礼弓
|
||||
endTime: "2024-02-20 17:59:59"
|
||||
endTime: '2024-02-20 17:59:59'
|
||||
- up4:
|
||||
- 夏沃蕾
|
||||
- 九条裟罗
|
||||
|
@ -51,7 +51,7 @@
|
|||
- 雨裁
|
||||
- 昭心
|
||||
- 弓藏
|
||||
endTime: "2024-01-30 14:59:59"
|
||||
endTime: '2024-01-30 14:59:59'
|
||||
- up4:
|
||||
- 砂糖
|
||||
- 罗莎莉亚
|
||||
|
@ -69,7 +69,7 @@
|
|||
- 笛剑
|
||||
- 匣里灭辰
|
||||
- 西风秘典
|
||||
endTime: "2024-01-09 17:59:59"
|
||||
endTime: '2024-01-09 17:59:59'
|
||||
- up4:
|
||||
- 绮良良
|
||||
- 久岐忍
|
||||
|
@ -87,7 +87,7 @@
|
|||
- 西风长枪
|
||||
- 流浪乐章
|
||||
- 西风猎弓
|
||||
endTime: "2023-12-19 14:59:59"
|
||||
endTime: '2023-12-19 14:59:59'
|
||||
- up4:
|
||||
- 夏洛蒂
|
||||
- 柯莱
|
||||
|
@ -105,7 +105,7 @@
|
|||
- 匣里灭辰
|
||||
- 祭礼残章
|
||||
- 绝弦
|
||||
endTime: "2023-11-28 17:59:59"
|
||||
endTime: '2023-11-28 17:59:59'
|
||||
- up4:
|
||||
- 重云
|
||||
- 托马
|
||||
|
@ -123,7 +123,7 @@
|
|||
- 西风剑
|
||||
- 雨裁
|
||||
- 昭心
|
||||
endTime: "2023-11-07 14:59:59"
|
||||
endTime: '2023-11-07 14:59:59'
|
||||
- up4:
|
||||
- 菲谢尔
|
||||
- 行秋
|
||||
|
@ -141,7 +141,7 @@
|
|||
- 幽夜华尔兹
|
||||
- 西风长枪
|
||||
- 西风秘典
|
||||
endTime: "2023-10-17 17:59:59"
|
||||
endTime: '2023-10-17 17:59:59'
|
||||
- up4:
|
||||
- 菲米尼
|
||||
- 早柚
|
||||
|
@ -159,7 +159,7 @@
|
|||
- 匣里灭辰
|
||||
- 流浪乐章
|
||||
- 弓藏
|
||||
endTime: "2023-09-26 14:59:59"
|
||||
endTime: '2023-09-26 14:59:59'
|
||||
- up4:
|
||||
- 琳妮特
|
||||
- 班尼特
|
||||
|
@ -177,7 +177,7 @@
|
|||
- 西风长枪
|
||||
- 祭礼残章
|
||||
- 祭礼弓
|
||||
endTime: "2023-09-05 17:59:59"
|
||||
endTime: '2023-09-05 17:59:59'
|
||||
- up4:
|
||||
- 珐露珊
|
||||
- 罗莎莉亚
|
||||
|
@ -195,7 +195,7 @@
|
|||
- 钟剑
|
||||
- 匣里灭辰
|
||||
- 西风猎弓
|
||||
endTime: "2023-08-15 14:59:59"
|
||||
endTime: '2023-08-15 14:59:59'
|
||||
- up4:
|
||||
- 米卡
|
||||
- 雷泽
|
||||
|
@ -213,7 +213,7 @@
|
|||
- 雨裁
|
||||
- 西风长枪
|
||||
- 昭心
|
||||
endTime: "2023-07-25 17:59:59"
|
||||
endTime: '2023-07-25 17:59:59'
|
||||
- up4:
|
||||
- 瑶瑶
|
||||
- 鹿野院平藏
|
||||
|
@ -231,7 +231,7 @@
|
|||
- 西风剑
|
||||
- 祭礼大剑
|
||||
- 西风秘典
|
||||
endTime: "2023-07-04 14:59:59"
|
||||
endTime: '2023-07-04 14:59:59'
|
||||
- up4:
|
||||
- 绮良良
|
||||
- 云堇
|
||||
|
@ -249,7 +249,7 @@
|
|||
- 匣里灭辰
|
||||
- 流浪乐章
|
||||
- 弓藏
|
||||
endTime: "2023-06-13 17:59:59"
|
||||
endTime: '2023-06-13 17:59:59'
|
||||
- up4:
|
||||
- 卡维
|
||||
- 坎蒂丝
|
||||
|
@ -267,7 +267,7 @@
|
|||
- 匣里龙吟
|
||||
- 西风长枪
|
||||
- 祭礼弓
|
||||
endTime: "2023-05-23 14:59:59"
|
||||
endTime: '2023-05-23 14:59:59'
|
||||
- up4:
|
||||
- 久岐忍
|
||||
- 多莉
|
||||
|
@ -285,7 +285,7 @@
|
|||
- 匣里灭辰
|
||||
- 祭礼残章
|
||||
- 绝弦
|
||||
endTime: "2023-05-02 17:59:59"
|
||||
endTime: '2023-05-02 17:59:59'
|
||||
- up4:
|
||||
- 米卡
|
||||
- 砂糖
|
||||
|
@ -303,7 +303,7 @@
|
|||
- 钟剑
|
||||
- 西风长枪
|
||||
- 西风猎弓
|
||||
endTime: "2023-04-11 14:59:59"
|
||||
endTime: '2023-04-11 14:59:59'
|
||||
- up4:
|
||||
- 班尼特
|
||||
- 芭芭拉
|
||||
|
@ -321,7 +321,7 @@
|
|||
- 祭礼大剑
|
||||
- 匣里灭辰
|
||||
- 昭心
|
||||
endTime: "2023-03-21 17:59:59"
|
||||
endTime: '2023-03-21 17:59:59'
|
||||
- up4:
|
||||
- 重云
|
||||
- 凝光
|
||||
|
@ -339,7 +339,7 @@
|
|||
- 匣里龙吟
|
||||
- 西风长枪
|
||||
- 祭礼残章
|
||||
endTime: "2023-02-28 14:59:59"
|
||||
endTime: '2023-02-28 14:59:59'
|
||||
- up4:
|
||||
- 辛焱
|
||||
- 云堇
|
||||
|
@ -357,7 +357,7 @@
|
|||
- 雨裁
|
||||
- 流浪乐章
|
||||
- 祭礼弓
|
||||
endTime: "2023-02-07 17:59:59"
|
||||
endTime: '2023-02-07 17:59:59'
|
||||
- up4:
|
||||
- 罗莎莉亚
|
||||
- 早柚
|
||||
|
@ -375,7 +375,7 @@
|
|||
- 匣里龙吟
|
||||
- 西风长枪
|
||||
- 祭礼残章
|
||||
endTime: "2023-01-17 14:59:59"
|
||||
endTime: '2023-01-17 14:59:59'
|
||||
- up4:
|
||||
- 珐露珊
|
||||
- 五郎
|
||||
|
@ -393,7 +393,7 @@
|
|||
- 断浪长鳍
|
||||
- 昭心
|
||||
- 西风猎弓
|
||||
endTime: "2022-12-27 17:59:59"
|
||||
endTime: '2022-12-27 17:59:59'
|
||||
- up4:
|
||||
- 莱依拉
|
||||
- 鹿野院平藏
|
||||
|
@ -411,7 +411,7 @@
|
|||
- 匣里灭辰
|
||||
- 西风秘典
|
||||
- 绝弦
|
||||
endTime: "2022-12-06 14:59:59"
|
||||
endTime: '2022-12-06 14:59:59'
|
||||
- up4:
|
||||
- 班尼特
|
||||
- 雷泽
|
||||
|
@ -429,7 +429,7 @@
|
|||
- 西风长枪
|
||||
- 流浪乐章
|
||||
- 弓藏
|
||||
endTime: "2022-11-18 17:59:59"
|
||||
endTime: '2022-11-18 17:59:59'
|
||||
- up4:
|
||||
- 北斗
|
||||
- 芭芭拉
|
||||
|
@ -447,7 +447,7 @@
|
|||
- 匣里灭辰
|
||||
- 流浪的晚星
|
||||
- 祭礼弓
|
||||
endTime: "2022-11-01 14:59:59"
|
||||
endTime: '2022-11-01 14:59:59'
|
||||
- up4:
|
||||
- 久岐忍
|
||||
- 早柚
|
||||
|
@ -465,7 +465,7 @@
|
|||
- 西风长枪
|
||||
- 祭礼残章
|
||||
- 西风猎弓
|
||||
endTime: "2022-10-14 17:59:59"
|
||||
endTime: '2022-10-14 17:59:59'
|
||||
- up4:
|
||||
- 行秋
|
||||
- 砂糖
|
||||
|
@ -483,7 +483,7 @@
|
|||
- 匣里灭辰
|
||||
- 昭心
|
||||
- 弓藏
|
||||
endTime: "2022-09-27 14:59:59"
|
||||
endTime: '2022-09-27 14:59:59'
|
||||
- up4:
|
||||
- 菲谢尔
|
||||
- 迪奥娜
|
||||
|
@ -501,7 +501,7 @@
|
|||
- 西风长枪
|
||||
- 西风秘典
|
||||
- 绝弦
|
||||
endTime: "2022-09-09 17:59:59"
|
||||
endTime: '2022-09-09 17:59:59'
|
||||
- up4:
|
||||
- 云堇
|
||||
- 辛焱
|
||||
|
@ -519,7 +519,7 @@
|
|||
- 笛剑
|
||||
- 祭礼大剑
|
||||
- 匣里灭辰
|
||||
endTime: "2022-08-23 14:59:59"
|
||||
endTime: '2022-08-23 14:59:59'
|
||||
- up4:
|
||||
- 鹿野院平藏
|
||||
- 凝光
|
||||
|
@ -537,7 +537,7 @@
|
|||
- 雨裁
|
||||
- 西风长枪
|
||||
- 流浪乐章
|
||||
endTime: "2022-08-02 17:59:59"
|
||||
endTime: '2022-08-02 17:59:59'
|
||||
- up4:
|
||||
- 五郎
|
||||
- 重云
|
||||
|
@ -555,7 +555,7 @@
|
|||
- 匣里灭辰
|
||||
- 祭礼残章
|
||||
- 绝弦
|
||||
endTime: "2022-07-12 14:59:59"
|
||||
endTime: '2022-07-12 14:59:59'
|
||||
- up4:
|
||||
- 烟绯
|
||||
- 芭芭拉
|
||||
|
@ -573,7 +573,7 @@
|
|||
- 西风大剑
|
||||
- 昭心
|
||||
- 祭礼弓
|
||||
endTime: "2022-06-21 17:59:59"
|
||||
endTime: '2022-06-21 17:59:59'
|
||||
- up4:
|
||||
- 罗莎莉亚
|
||||
- 早柚
|
||||
|
@ -591,7 +591,7 @@
|
|||
- 西风长枪
|
||||
- 西风秘典
|
||||
- 西风猎弓
|
||||
endTime: "2022-05-31 05:59:59"
|
||||
endTime: '2022-05-31 05:59:59'
|
||||
- up4:
|
||||
- 香菱
|
||||
- 砂糖
|
||||
|
@ -609,7 +609,7 @@
|
|||
- 流浪乐章
|
||||
- 匣里灭辰
|
||||
- 祭礼大剑
|
||||
endTime: "2022-04-19 17:59:59"
|
||||
endTime: '2022-04-19 17:59:59'
|
||||
- up4:
|
||||
- 辛焱
|
||||
- 九条裟罗
|
||||
|
@ -627,7 +627,7 @@
|
|||
- 西风长枪
|
||||
- 恶王丸
|
||||
- 匣里龙吟
|
||||
endTime: "2022-03-29 14:59:59"
|
||||
endTime: '2022-03-29 14:59:59'
|
||||
- up4:
|
||||
- 菲谢尔
|
||||
- 迪奥娜
|
||||
|
@ -645,7 +645,7 @@
|
|||
- 断浪长鳍
|
||||
- 雨裁
|
||||
- 祭礼剑
|
||||
endTime: "2022-03-08 17:59:59"
|
||||
endTime: '2022-03-08 17:59:59'
|
||||
- up4:
|
||||
- 行秋
|
||||
- 烟绯
|
||||
|
@ -663,4 +663,4 @@
|
|||
- 匣里灭辰
|
||||
- 千岩古剑
|
||||
- 西风剑
|
||||
endTime: "2022-02-15 14:59:59"
|
||||
endTime: '2022-02-15 14:59:59'
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# 米游社公共查询ck,支持多个一行一个,横杆空格开头
|
||||
- ltoken=xxx; ltuid=xxx; cookie_token=xxx; account_id=xxx;
|
||||
- ltoken=xxx; ltuid=xxx; cookie_token=xxx; account_id=xxx;
|
||||
- ltoken=xxx; ltuid=xxx; cookie_token=xxx; account_id=xxx;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# 米游社公共推送定时任务,修改需要重启
|
||||
pushTime: 0 0/5 * * * ?
|
||||
pushTime: 0 0/5 * * * ?
|
||||
|
||||
# 最多同时推送条数
|
||||
maxNum: 1
|
||||
|
@ -53,4 +53,4 @@ bbbinfoGroup: {}
|
|||
bbannounceGroup: {}
|
||||
|
||||
#崩坏学园2资讯推送群
|
||||
bbinfoGroup: {}
|
||||
bbinfoGroup: {}
|
||||
|
|
|
@ -3,8 +3,7 @@ allowUseCookie: 1
|
|||
# 默认cookie帮助文档链接地址
|
||||
cookieDoc: https://docs.qq.com/doc/DUWNVQVFTU3liTVlO
|
||||
|
||||
|
||||
# 别名设置权限 0-所有群员都可以添加 1-群管理员才能添加 2-主人才能添加
|
||||
abbrSetAuth: 0
|
||||
# 米游社攻略图默认来源设置 1-西风驿站 2-原神观测枢 3-派蒙喵喵屋 4-OH是姜姜呀
|
||||
defaultSource: 1
|
||||
defaultSource: 1
|
||||
|
|
|
@ -718,7 +718,7 @@
|
|||
- 绝弦
|
||||
name: 神铸赋形
|
||||
- from: '2020-12-01 18:00:00'
|
||||
to: '2020-12-22 14:59:59'
|
||||
to: '2020-12-22 14:59:59'
|
||||
five:
|
||||
- 贯虹之槊
|
||||
- 无工之剑
|
||||
|
|
|
@ -59,4 +59,4 @@
|
|||
- 祭礼弓
|
||||
- 绝弦
|
||||
- 西风猎弓
|
||||
name: 集录池
|
||||
name: 集录池
|
||||
|
|
|
@ -27,4 +27,4 @@ FIGHT_PROP_WIND_ADD_HURT: 风元素伤害加成
|
|||
FIGHT_PROP_ROCK_ADD_HURT: 岩元素伤害加成
|
||||
FIGHT_PROP_GRASS_ADD_HURT: 草元素伤害加成
|
||||
FIGHT_PROP_PHYSICAL_ADD_HURT: 物理伤害加成
|
||||
FIGHT_PROP_HEAL_ADD: 治疗加成
|
||||
FIGHT_PROP_HEAL_ADD: 治疗加成
|
||||
|
|
|
@ -41,4 +41,4 @@ electroculus: 181
|
|||
dendroculus: 271
|
||||
|
||||
# 水神瞳
|
||||
hydroculus: 271
|
||||
hydroculus: 271
|
||||
|
|
|
@ -985,4 +985,3 @@
|
|||
- 老板娘
|
||||
- 裁锦师
|
||||
- 裁缝
|
||||
|
||||
|
|
|
@ -268,4 +268,4 @@
|
|||
1308:
|
||||
- 黄泉
|
||||
1312:
|
||||
- 米沙
|
||||
- 米沙
|
||||
|
|
|
@ -1255,13 +1255,13 @@ Talent:
|
|||
纳西妲:
|
||||
- 1
|
||||
- 2
|
||||
莱依拉:
|
||||
莱依拉:
|
||||
- 1
|
||||
- 2
|
||||
流浪者:
|
||||
- 2
|
||||
- 1
|
||||
珐露珊:
|
||||
珐露珊:
|
||||
- 1
|
||||
- 2
|
||||
艾尔海森:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#数据源于 https://github.com/CRAZYShimakaze/zhenxun_extensive_plugin/blob/main/genshin_role_info/res/json_data/weapon.json
|
||||
Name:
|
||||
Name:
|
||||
'2410593283': 无锋剑
|
||||
'2125206395': 银剑
|
||||
'479076483': 冷刃
|
||||
|
@ -574,4 +574,3 @@ Icon:
|
|||
沙中伟贤的对答: UI_EquipIcon_Pole_Caduceus
|
||||
(test)竿测试: UI_EquipIcon_FishingRod
|
||||
(test)穿模测试: UI_EquipIcon_Bow_Template
|
||||
|
||||
|
|
|
@ -63,8 +63,7 @@ sortName:
|
|||
花海甘露之光: 花海甘露
|
||||
回声之林夜话: 回声之林
|
||||
|
||||
|
||||
actWeapon:
|
||||
actWeapon:
|
||||
- 降临之剑
|
||||
- 掠食者
|
||||
- 嘟嘟可故事集
|
||||
|
|
10
deploy.sh
10
deploy.sh
|
@ -1,10 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# 确保脚本抛出遇到的错误
|
||||
set -e
|
||||
|
||||
git init
|
||||
git add -A
|
||||
git commit -m 'update: 修复引用'
|
||||
|
||||
git push -f git@github.com:yoimiya-kokomi/Miao-Yunzai.git master:genshin
|
2
index.ts
2
index.ts
|
@ -1 +1 @@
|
|||
export * as apps from './apps/index.js'
|
||||
export * as apps from './apps/index.js'
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
import moment from 'moment'
|
||||
import lodash from 'lodash'
|
||||
import base from './base.js'
|
||||
import base from './base.js'
|
||||
import { MysInfo } from 'yunzai/mys'
|
||||
// tudo
|
||||
import { Character } from '#miao.models'
|
||||
|
||||
export default class Abyss extends base {
|
||||
constructor (e) {
|
||||
constructor(e) {
|
||||
super(e)
|
||||
this.model = 'abyss'
|
||||
}
|
||||
|
||||
async getAbyss () {
|
||||
async getAbyss() {
|
||||
let scheduleType = 1
|
||||
if (this.e.msg.includes('上期') || this.e.msg.includes('往期')) {
|
||||
scheduleType = 2
|
||||
|
@ -51,7 +51,7 @@ export default class Abyss extends base {
|
|||
return data
|
||||
}
|
||||
|
||||
abyssData (data) {
|
||||
abyssData(data) {
|
||||
let startTime = moment.unix(data.start_time)
|
||||
let time = Number(startTime.month()) + 1
|
||||
if (startTime.date() >= 15) {
|
||||
|
@ -71,11 +71,20 @@ export default class Abyss extends base {
|
|||
}
|
||||
totalStar = totalStar + '(' + star.join('-') + ')'
|
||||
|
||||
let dataName = ['damage', 'take_damage', 'defeat', 'normal_skill', 'energy_skill']
|
||||
let dataName = [
|
||||
'damage',
|
||||
'take_damage',
|
||||
'defeat',
|
||||
'normal_skill',
|
||||
'energy_skill'
|
||||
]
|
||||
let rankData = []
|
||||
|
||||
for (let val of dataName) {
|
||||
if (lodash.isEmpty(data[`${val}_rank`]) || data[`${val}_rank`].length <= 0) {
|
||||
if (
|
||||
lodash.isEmpty(data[`${val}_rank`]) ||
|
||||
data[`${val}_rank`].length <= 0
|
||||
) {
|
||||
data[`${val}_rank`] = [
|
||||
{
|
||||
value: 0,
|
||||
|
@ -89,7 +98,7 @@ export default class Abyss extends base {
|
|||
rankData[val] = {
|
||||
num: data[`${val}_rank`][0].value,
|
||||
name: char.abbr,
|
||||
icon: char.side,
|
||||
icon: char.side
|
||||
}
|
||||
|
||||
if (rankData[val].num > 1000) {
|
||||
|
@ -117,7 +126,7 @@ export default class Abyss extends base {
|
|||
}
|
||||
|
||||
/** 深渊十二层 */
|
||||
async getAbyssFloor () {
|
||||
async getAbyssFloor() {
|
||||
this.model = 'abyssFloor'
|
||||
let scheduleType = 1
|
||||
if (this.e.msg.includes('上期') || this.e.msg.includes('往期')) {
|
||||
|
@ -166,8 +175,9 @@ export default class Abyss extends base {
|
|||
}
|
||||
}
|
||||
|
||||
getFloor () {
|
||||
let reg = /^#*[上期]*(深渊|深境|深境螺旋)[上期]*[第]*(9|10|11|12|九|十|十一|十二)层[ |0-9]*$/
|
||||
getFloor() {
|
||||
let reg =
|
||||
/^#*[上期]*(深渊|深境|深境螺旋)[上期]*[第]*(9|10|11|12|九|十|十一|十二)层[ |0-9]*$/
|
||||
let floorIndex = this.e.msg.match(reg)
|
||||
|
||||
if (!floorIndex) {
|
||||
|
@ -200,21 +210,24 @@ export default class Abyss extends base {
|
|||
return floorIndex
|
||||
}
|
||||
|
||||
abyssFloorData (floor, index) {
|
||||
abyssFloorData(floor, index) {
|
||||
let roleArr = lodash.keyBy(index.avatars, 'id')
|
||||
let list = []
|
||||
for (let val of floor.levels) {
|
||||
if (!val.battles || val.battles.length < 2) {
|
||||
continue
|
||||
}
|
||||
val.time = moment.unix(val.battles[0].timestamp).format('YYYY-MM-DD HH:mm:ss')
|
||||
val.time = moment
|
||||
.unix(val.battles[0].timestamp)
|
||||
.format('YYYY-MM-DD HH:mm:ss')
|
||||
|
||||
for (let i in val.battles) {
|
||||
for (let j in val.battles[i].avatars) {
|
||||
let char = Character.get(val.battles[i].avatars[j].id)
|
||||
val.battles[i].avatars[j].name = char.abbr
|
||||
val.battles[i].avatars[j].icon = char.face
|
||||
val.battles[i].avatars[j].life = roleArr[val.battles[i].avatars[j].id].actived_constellation_num
|
||||
val.battles[i].avatars[j].life =
|
||||
roleArr[val.battles[i].avatars[j].id].actived_constellation_num
|
||||
}
|
||||
}
|
||||
list.push(val)
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import _ from 'lodash'
|
||||
import { ConfigController as cfg } from 'yunzai/config'
|
||||
|
||||
|
||||
// tudo
|
||||
|
||||
import { Common, Version } from '#miao'
|
||||
|
@ -64,7 +63,7 @@ export default class base {
|
|||
pluResPath: `${this._path}/plugins/genshin/resources/StarRail/`,
|
||||
srtempFile: 'StarRail/',
|
||||
headImg: char?.imgs?.banner,
|
||||
game: 'sr',
|
||||
game: 'sr'
|
||||
}
|
||||
}
|
||||
let char = Character.get('闲云', 'gs')
|
||||
|
@ -75,7 +74,7 @@ export default class base {
|
|||
pluResPath: `${this._path}/plugins/genshin/resources/`,
|
||||
headImg: char?.imgs?.banner,
|
||||
srtempFile: '',
|
||||
game: 'gs',
|
||||
game: 'gs'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,9 +5,10 @@ export default class blueprint extends base {
|
|||
constructor(e) {
|
||||
super(e)
|
||||
}
|
||||
|
||||
|
||||
model = 'blueprint'
|
||||
checkMsg = '设置尘歌壶模数有误\n指令:#尘歌壶模数\n示例:#尘歌壶模数123456\n参数为模数id(10-15位数字)'
|
||||
checkMsg =
|
||||
'设置尘歌壶模数有误\n指令:#尘歌壶模数\n示例:#尘歌壶模数123456\n参数为模数id(10-15位数字)'
|
||||
|
||||
async get(role) {
|
||||
/** 获取绑定uid */
|
||||
|
@ -23,7 +24,11 @@ export default class blueprint extends base {
|
|||
this.mysApi = new MysApi(ck.uid, ck.ck, { log: true })
|
||||
|
||||
/** 获取角色数据 */
|
||||
let blueprint = await this.mysApi.getData('blueprint', { share_code: role, headers: 'https://webstatic.mihoyo.com/ys/event/e20200923adopt_calculator/index.html?bbs_presentation_style=fullscreen&bbs_auth_required=true&mys_source=GameRecord' })
|
||||
let blueprint = await this.mysApi.getData('blueprint', {
|
||||
share_code: role,
|
||||
headers:
|
||||
'https://webstatic.mihoyo.com/ys/event/e20200923adopt_calculator/index.html?bbs_presentation_style=fullscreen&bbs_auth_required=true&mys_source=GameRecord'
|
||||
})
|
||||
/** 获取计算参数 */
|
||||
let body = await this.getBody(blueprint)
|
||||
if (!body) return false
|
||||
|
|
|
@ -31,9 +31,13 @@ export default class Calculator extends base {
|
|||
}
|
||||
|
||||
/** 获取角色数据 */
|
||||
let character = await MysInfo.get(this.e, this.e.isSr ? 'avatarInfo' : 'character', {
|
||||
headers: this.headers
|
||||
})
|
||||
let character = await MysInfo.get(
|
||||
this.e,
|
||||
this.e.isSr ? 'avatarInfo' : 'character',
|
||||
{
|
||||
headers: this.headers
|
||||
}
|
||||
)
|
||||
if (!character || character.retcode !== 0) return false
|
||||
character = character.data
|
||||
|
||||
|
@ -41,7 +45,9 @@ export default class Calculator extends base {
|
|||
await this.getSet()
|
||||
|
||||
/** 获取计算角色 */
|
||||
this.dataCharacter = character[this.e.isSr ? 'avatar_list' : 'avatars'].find((item) => item.id == role.roleId)
|
||||
this.dataCharacter = character[
|
||||
this.e.isSr ? 'avatar_list' : 'avatars'
|
||||
].find(item => item.id == role.roleId)
|
||||
|
||||
/** 获取计算参数 */
|
||||
let body = await this.getBody()
|
||||
|
@ -63,7 +69,9 @@ export default class Calculator extends base {
|
|||
}
|
||||
|
||||
async getSet() {
|
||||
let defSetSkill = this.e.isSr ? '80,80,6,10,10,10'.split(',') : '90,90,10,10,10'.split(',')
|
||||
let defSetSkill = this.e.isSr
|
||||
? '80,80,6,10,10,10'.split(',')
|
||||
: '90,90,10,10,10'.split(',')
|
||||
|
||||
let set = this.e.msg.replace(/#|#|星铁|养成|计算/g, '').trim()
|
||||
|
||||
|
@ -105,7 +113,9 @@ export default class Calculator extends base {
|
|||
let skillList = []
|
||||
if (this.dataCharacter) {
|
||||
/** 角色存在获取技能数据 */
|
||||
let data = this.e.isSr ? { avatar_id: this.role.roleId, tab_from: 'TabOwned' } : { avatar_id: this.role.roleId }
|
||||
let data = this.e.isSr
|
||||
? { avatar_id: this.role.roleId, tab_from: 'TabOwned' }
|
||||
: { avatar_id: this.role.roleId }
|
||||
let detail = await MysInfo.get(this.e, 'detail', {
|
||||
headers: this.headers,
|
||||
...data
|
||||
|
@ -139,8 +149,14 @@ export default class Calculator extends base {
|
|||
this.dataCharacter = {
|
||||
level: 1,
|
||||
name: this.role.name,
|
||||
icon: this.e.isSr ? this.avatar.icon_url : `${this.screenData.pluResPath}img/role/${this.role.name}.png`,
|
||||
rarity: this.e.isSr ? this.avatar.rarity : four.includes(Number(this.role.roleId)) ? 4 : 5
|
||||
icon: this.e.isSr
|
||||
? this.avatar.icon_url
|
||||
: `${this.screenData.pluResPath}img/role/${this.role.name}.png`,
|
||||
rarity: this.e.isSr
|
||||
? this.avatar.rarity
|
||||
: four.includes(Number(this.role.roleId))
|
||||
? 4
|
||||
: 5
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -166,7 +182,7 @@ export default class Calculator extends base {
|
|||
})
|
||||
})
|
||||
} else {
|
||||
skillList = skillList.filter((item) => item.max_level != 1)
|
||||
skillList = skillList.filter(item => item.max_level != 1)
|
||||
|
||||
body = {
|
||||
avatar_id: Number(this.role.roleId),
|
||||
|
@ -218,7 +234,7 @@ export default class Calculator extends base {
|
|||
}
|
||||
}
|
||||
|
||||
skillList = skillList.filter((item) => item.max_level != 1)
|
||||
skillList = skillList.filter(item => item.max_level != 1)
|
||||
this.skillList = skillList
|
||||
return this.e.isSr ? body : { items: [body] }
|
||||
}
|
||||
|
@ -230,7 +246,7 @@ export default class Calculator extends base {
|
|||
})
|
||||
if (!avatarSkill || avatarSkill.retcode !== 0) return false
|
||||
avatarSkill = avatarSkill.data
|
||||
avatarSkill.list.forEach((item) => {
|
||||
avatarSkill.list.forEach(item => {
|
||||
item.level_current = 1
|
||||
})
|
||||
|
||||
|
@ -243,10 +259,12 @@ export default class Calculator extends base {
|
|||
headers: this.headers
|
||||
})
|
||||
if (!computes || computes.retcode !== 0) return false
|
||||
computes = this.e.isSr ? computes.data : computes.data.overall_material_consume
|
||||
computes = this.e.isSr
|
||||
? computes.data
|
||||
: computes.data.overall_material_consume
|
||||
let computeList = {}
|
||||
|
||||
let formart = (num) => {
|
||||
let formart = num => {
|
||||
return num > 10000 ? (num / 10000).toFixed(1) + ' w' : num
|
||||
}
|
||||
if (this.e.isSr) delete computes.coin_id
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import base from './base.js'
|
||||
|
||||
import { MysInfo } from 'yunzai/mys'
|
||||
import { MysInfo } from 'yunzai/mys'
|
||||
|
||||
export default class Deck extends base {
|
||||
constructor(e) {
|
||||
|
@ -41,7 +41,11 @@ export default class Deck extends base {
|
|||
async getcard(id) {
|
||||
let res = {}
|
||||
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 MysInfo.get(this.e, api)).data
|
||||
}
|
||||
this.model = 'deckCard'
|
||||
|
@ -55,5 +59,4 @@ export default class Deck extends base {
|
|||
}
|
||||
return data
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,9 @@ export default class ExportLog extends base {
|
|||
/** 绑定的uid */
|
||||
this.uidKey = `Yz:genshin:mys:qq-uid:${this.userId}`
|
||||
|
||||
this.path = this.e.isSr ? `./data/srJson/${this.e.user_id}/` : `./data/gachaJson/${this.e.user_id}/`
|
||||
this.path = this.e.isSr
|
||||
? `./data/srJson/${this.e.user_id}/`
|
||||
: `./data/gachaJson/${this.e.user_id}/`
|
||||
|
||||
this.game = this.e.game
|
||||
|
||||
|
@ -56,7 +58,10 @@ export default class ExportLog extends base {
|
|||
|
||||
async exportJson() {
|
||||
if (!this.e.isSr) {
|
||||
await downFile('https://api.uigf.org/dict/genshin/chs.json', './temp/uigf/genshin.json')
|
||||
await downFile(
|
||||
'https://api.uigf.org/dict/genshin/chs.json',
|
||||
'./temp/uigf/genshin.json'
|
||||
)
|
||||
}
|
||||
await this.getUid()
|
||||
|
||||
|
@ -80,7 +85,7 @@ export default class ExportLog extends base {
|
|||
export_time: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||
export_timestamp: moment().format('X'),
|
||||
export_app: yunzaiName,
|
||||
export_app_version: cfg.package.version,
|
||||
export_app_version: cfg.package.version
|
||||
},
|
||||
list
|
||||
}
|
||||
|
@ -100,14 +105,12 @@ export default class ExportLog extends base {
|
|||
|
||||
this.e.reply(`导出成功:${this.uid}.json,共${list.length}条 \n请接收文件`)
|
||||
|
||||
if (this.e.group?.sendFile)
|
||||
await this.e.group.sendFile(saveFile)
|
||||
else if (this.e.friend?.sendFile)
|
||||
await this.e.friend.sendFile(saveFile)
|
||||
if (this.e.group?.sendFile) await this.e.group.sendFile(saveFile)
|
||||
else if (this.e.friend?.sendFile) await this.e.friend.sendFile(saveFile)
|
||||
else this.e.reply('导出失败:暂不支持发送文件')
|
||||
|
||||
/** 删除文件 */
|
||||
fs.unlink(saveFile, () => { })
|
||||
fs.unlink(saveFile, () => {})
|
||||
}
|
||||
|
||||
async getUid() {
|
||||
|
@ -227,9 +230,11 @@ export default class ExportLog extends base {
|
|||
}
|
||||
|
||||
/** 删除文件 */
|
||||
fs.unlink(textPath, () => { })
|
||||
fs.unlink(textPath, () => {})
|
||||
|
||||
await this.e.reply(`${this.e.file.name},${this.e.isSr ? '星铁' : '原神'}记录导入成功\n${msg.join('\n')}`)
|
||||
await this.e.reply(
|
||||
`${this.e.file.name},${this.e.isSr ? '星铁' : '原神'}记录导入成功\n${msg.join('\n')}`
|
||||
)
|
||||
}
|
||||
|
||||
dealJson(list) {
|
||||
|
@ -246,7 +251,10 @@ export default class ExportLog extends base {
|
|||
}
|
||||
|
||||
/** 倒序 */
|
||||
if (moment(list[0].time).format('x') < moment(list[list.length - 1].time).format('x')) {
|
||||
if (
|
||||
moment(list[0].time).format('x') <
|
||||
moment(list[list.length - 1].time).format('x')
|
||||
) {
|
||||
list = list.reverse()
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
import base from './base.js'
|
||||
import { gsCfg } from 'yunzai/mys'
|
||||
import { gsCfg } from 'yunzai/mys'
|
||||
import lodash from 'lodash'
|
||||
import moment from 'moment'
|
||||
|
||||
|
||||
// tudo
|
||||
|
||||
|
||||
import { Character, Weapon } from '#miao.models'
|
||||
|
||||
export default class GachaData extends base {
|
||||
|
@ -14,7 +12,7 @@ export default class GachaData extends base {
|
|||
* @param e icqq 消息e
|
||||
* @param e.user_id 用户id
|
||||
*/
|
||||
constructor (e) {
|
||||
constructor(e) {
|
||||
super(e)
|
||||
this.model = 'gacha'
|
||||
/** 卡池 */
|
||||
|
@ -34,7 +32,7 @@ export default class GachaData extends base {
|
|||
this.fourHave = []
|
||||
}
|
||||
|
||||
static async init (e) {
|
||||
static async init(e) {
|
||||
let gacha = new GachaData(e)
|
||||
/** 抽卡类型 */
|
||||
gacha.getTpye()
|
||||
|
@ -46,7 +44,7 @@ export default class GachaData extends base {
|
|||
return gacha
|
||||
}
|
||||
|
||||
static getImg (name, type = 'role') {
|
||||
static getImg(name, type = 'role') {
|
||||
if (type === 'role' || type === '角色') {
|
||||
let char = Character.get(name)
|
||||
return char?.imgs?.gacha || ''
|
||||
|
@ -57,7 +55,7 @@ export default class GachaData extends base {
|
|||
}
|
||||
|
||||
/** 抽卡 */
|
||||
async run () {
|
||||
async run() {
|
||||
let list = this.lottery()
|
||||
|
||||
/** 截图数据 */
|
||||
|
@ -72,7 +70,7 @@ export default class GachaData extends base {
|
|||
return data
|
||||
}
|
||||
|
||||
get key () {
|
||||
get key() {
|
||||
/** 群,私聊分开 */
|
||||
if (this.e.isGroup) {
|
||||
return `${this.prefix}${this.e.group_id}:${this.userId}`
|
||||
|
@ -81,18 +79,21 @@ export default class GachaData extends base {
|
|||
}
|
||||
}
|
||||
|
||||
getTpye () {
|
||||
getTpye() {
|
||||
if (this.e.msg.includes('2')) this.role2 = true
|
||||
if (this.e.msg.includes('武器')) this.type = 'weapon'
|
||||
if (this.e.msg.includes('常驻')) this.type = 'permanent'
|
||||
}
|
||||
|
||||
/** 奖池数据 */
|
||||
async getPool () {
|
||||
async getPool() {
|
||||
let poolArr = gsCfg.getdefSet('gacha', 'pool')
|
||||
poolArr = [...poolArr].reverse()
|
||||
/** 获取设置卡池 */
|
||||
let NowPool = poolArr.find((val) => new Date().getTime() <= new Date(val.endTime).getTime()) || poolArr.pop()
|
||||
let NowPool =
|
||||
poolArr.find(
|
||||
val => new Date().getTime() <= new Date(val.endTime).getTime()
|
||||
) || poolArr.pop()
|
||||
this.NowPool = NowPool
|
||||
|
||||
if (this.type == 'weapon') {
|
||||
|
@ -144,7 +145,7 @@ export default class GachaData extends base {
|
|||
}
|
||||
|
||||
/** 用户数据 */
|
||||
async userData () {
|
||||
async userData() {
|
||||
if (this.user) return this.user
|
||||
|
||||
let user = await redis.get(this.key)
|
||||
|
@ -153,7 +154,12 @@ export default class GachaData extends base {
|
|||
user = JSON.parse(user)
|
||||
/** 重置今日数据 */
|
||||
if (this.getNow() > user.today.expire) {
|
||||
user.today = { star: [], expire: this.getEnd().end4, num: 0, weaponNum: 0 }
|
||||
user.today = {
|
||||
star: [],
|
||||
expire: this.getEnd().end4,
|
||||
num: 0,
|
||||
weaponNum: 0
|
||||
}
|
||||
}
|
||||
/** 重置本周数据 */
|
||||
if (this.getNow() > user.week.expire) {
|
||||
|
@ -184,7 +190,7 @@ export default class GachaData extends base {
|
|||
/**
|
||||
* 抽奖
|
||||
*/
|
||||
lottery (save = true) {
|
||||
lottery(save = true) {
|
||||
/** 十连抽 */
|
||||
for (let i = 1; i <= 10; i++) {
|
||||
this.index = i
|
||||
|
@ -205,12 +211,16 @@ export default class GachaData extends base {
|
|||
if (save) this.saveUser()
|
||||
|
||||
/** 排序 星级,角色,武器 */
|
||||
this.res = lodash.orderBy(this.res, ['star', 'type', 'have', 'index'], ['desc', 'asc', 'asc', 'asc'])
|
||||
this.res = lodash.orderBy(
|
||||
this.res,
|
||||
['star', 'type', 'have', 'index'],
|
||||
['desc', 'asc', 'asc', 'asc']
|
||||
)
|
||||
|
||||
return this.res
|
||||
}
|
||||
|
||||
lottery5 () {
|
||||
lottery5() {
|
||||
/** 是否大保底 */
|
||||
let isBigUP = false
|
||||
let isBing = false
|
||||
|
@ -308,7 +318,7 @@ export default class GachaData extends base {
|
|||
return true
|
||||
}
|
||||
|
||||
lottery4 () {
|
||||
lottery4() {
|
||||
let tmpChance4 = this.def.chance4
|
||||
|
||||
/** 四星保底 */
|
||||
|
@ -379,7 +389,7 @@ export default class GachaData extends base {
|
|||
return true
|
||||
}
|
||||
|
||||
lottery3 () {
|
||||
lottery3() {
|
||||
/** 随机三星武器 */
|
||||
let tmpName = lodash.sample(this.pool.weapon3)
|
||||
this.res.push({
|
||||
|
@ -394,7 +404,7 @@ export default class GachaData extends base {
|
|||
return true
|
||||
}
|
||||
|
||||
probability () {
|
||||
probability() {
|
||||
let tmpChance5 = this.def.chance5
|
||||
|
||||
if (this.type == 'role' || this.type == 'permanent') {
|
||||
|
@ -432,7 +442,10 @@ export default class GachaData extends base {
|
|||
} else if (this.user[this.type].num5 >= 45) {
|
||||
/** 50抽后逐渐增加概率 */
|
||||
tmpChance5 = tmpChance5 + (this.user[this.type].num5 - 45) * 60
|
||||
} else if (this.user[this.type].num5 >= 10 && this.user[this.type].num5 <= 20) {
|
||||
} else if (
|
||||
this.user[this.type].num5 >= 10 &&
|
||||
this.user[this.type].num5 <= 20
|
||||
) {
|
||||
tmpChance5 = tmpChance5 + (this.user[this.type].num5 - 10) * 30
|
||||
}
|
||||
}
|
||||
|
@ -441,7 +454,7 @@ export default class GachaData extends base {
|
|||
}
|
||||
|
||||
/** 获取定轨的武器 */
|
||||
getBingWeapon (sortName = false) {
|
||||
getBingWeapon(sortName = false) {
|
||||
if (this.type != 'weapon') return false
|
||||
|
||||
let name = this.pool.up5[this.user[this.type].type - 1]
|
||||
|
@ -451,7 +464,7 @@ export default class GachaData extends base {
|
|||
return name
|
||||
}
|
||||
|
||||
lotteryInfo () {
|
||||
lotteryInfo() {
|
||||
let info = `累计「${this.user[this.type].num5}抽」`
|
||||
let nowFive = 0
|
||||
let nowFour = 0
|
||||
|
@ -488,21 +501,23 @@ export default class GachaData extends base {
|
|||
lifeNum: this.user[this.type]?.lifeNum || 0
|
||||
}
|
||||
|
||||
logger.debug(`[${poolName}] [五星数:${nowFive}] [${info}] [定轨:${res.lifeNum}]`)
|
||||
logger.debug(
|
||||
`[${poolName}] [五星数:${nowFive}] [${info}] [定轨:${res.lifeNum}]`
|
||||
)
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
async saveUser () {
|
||||
async saveUser() {
|
||||
this.user.today.expire = this.getEnd().end4
|
||||
await redis.setEx(this.key, 3600 * 24 * 14, JSON.stringify(this.user))
|
||||
}
|
||||
|
||||
getNow () {
|
||||
getNow() {
|
||||
return moment().format('X')
|
||||
}
|
||||
|
||||
getEnd () {
|
||||
getEnd() {
|
||||
let end = moment().endOf('day').format('X')
|
||||
let end4 = 3600 * 4
|
||||
if (moment().format('k') < 4) {
|
||||
|
@ -513,7 +528,7 @@ export default class GachaData extends base {
|
|||
return { end, end4 }
|
||||
}
|
||||
|
||||
getWeekEnd () {
|
||||
getWeekEnd() {
|
||||
return Number(moment().day(7).endOf('day').format('X'))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,56 +1,60 @@
|
|||
import base from "./base.js"
|
||||
import fetch from "node-fetch"
|
||||
import lodash from "lodash"
|
||||
import fs from "node:fs"
|
||||
import { downFile, sleep} from 'yunzai/utils'
|
||||
import base from './base.js'
|
||||
import fetch from 'node-fetch'
|
||||
import lodash from 'lodash'
|
||||
import fs from 'node:fs'
|
||||
import { downFile, sleep } from 'yunzai/utils'
|
||||
import { gsCfg } from 'yunzai/mys'
|
||||
|
||||
// tudo
|
||||
|
||||
import { Character, Weapon } from "#miao.models"
|
||||
import { Character, Weapon } from '#miao.models'
|
||||
|
||||
export default class GachaLog extends base {
|
||||
constructor(e) {
|
||||
super(e)
|
||||
this.model = "gachaLog"
|
||||
this.model = 'gachaLog'
|
||||
|
||||
if (!e.isSr && e.msg) e.isSr = /\/(common|hkrpg)\//.test(e.msg)
|
||||
|
||||
this.urlKey = `${this.prefix}url:`
|
||||
/** 绑定的uid */
|
||||
this.uidKey = this.e.isSr ? `Yz:srJson:mys:qq-uid:${this.userId}` : `Yz:genshin:mys:qq-uid:${this.userId}`
|
||||
this.path = this.e.isSr ? `./data/srJson/${this.e.user_id}/` : `./data/gachaJson/${this.e.user_id}/`
|
||||
this.uidKey = this.e.isSr
|
||||
? `Yz:srJson:mys:qq-uid:${this.userId}`
|
||||
: `Yz:genshin:mys:qq-uid:${this.userId}`
|
||||
this.path = this.e.isSr
|
||||
? `./data/srJson/${this.e.user_id}/`
|
||||
: `./data/gachaJson/${this.e.user_id}/`
|
||||
|
||||
const gsPool = [
|
||||
{ type: 301, typeName: "角色" },
|
||||
{ type: 302, typeName: "武器" },
|
||||
{ type: 500, typeName: "集录" },
|
||||
{ type: 200, typeName: "常驻" }
|
||||
{ type: 301, typeName: '角色' },
|
||||
{ type: 302, typeName: '武器' },
|
||||
{ type: 500, typeName: '集录' },
|
||||
{ type: 200, typeName: '常驻' }
|
||||
]
|
||||
|
||||
const srPool = [
|
||||
{ type: 11, typeName: "角色" },
|
||||
{ type: 12, typeName: "光锥" },
|
||||
{ type: 1, typeName: "常驻" },
|
||||
{ type: 2, typeName: "新手" }
|
||||
{ type: 11, typeName: '角色' },
|
||||
{ type: 12, typeName: '光锥' },
|
||||
{ type: 1, typeName: '常驻' },
|
||||
{ type: 2, typeName: '新手' }
|
||||
]
|
||||
|
||||
this.pool = e.isSr ? srPool : gsPool
|
||||
}
|
||||
|
||||
static getIcon(name, type = "role", game = "") {
|
||||
if (type === "role" || type === "角色") {
|
||||
static getIcon(name, type = 'role', game = '') {
|
||||
if (type === 'role' || type === '角色') {
|
||||
let char = Character.get(name, game)
|
||||
if (!char) {
|
||||
console.log("not-found-char", name, game)
|
||||
console.log('not-found-char', name, game)
|
||||
}
|
||||
return char?.imgs?.face || ""
|
||||
} else if (type === "weapon" || type === "武器" || type === "光锥") {
|
||||
return char?.imgs?.face || ''
|
||||
} else if (type === 'weapon' || type === '武器' || type === '光锥') {
|
||||
let weapon = Weapon.get(name, game)
|
||||
if (!weapon) {
|
||||
console.log("not-found-weapon", `[${name}]`, game)
|
||||
console.log('not-found-weapon', `[${name}]`, game)
|
||||
}
|
||||
return weapon?.imgs?.icon || ""
|
||||
return weapon?.imgs?.icon || ''
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,13 +65,13 @@ export default class GachaLog extends base {
|
|||
let param = this.dealUrl(url)
|
||||
if (!param) return
|
||||
|
||||
if (!await this.checkUrl(param)) return
|
||||
if (!(await this.checkUrl(param))) return
|
||||
|
||||
this.e.reply("链接发送成功,数据获取中……")
|
||||
this.e.reply('链接发送成功,数据获取中……')
|
||||
|
||||
/** 制作合并消息 */
|
||||
let MakeMsg = []
|
||||
let tmpMsg = ""
|
||||
let tmpMsg = ''
|
||||
/** 按卡池更新记录 */
|
||||
for (let i in this.pool) {
|
||||
this.type = this.pool[i].type
|
||||
|
@ -79,7 +83,9 @@ export default class GachaLog extends base {
|
|||
if (i <= 1) await sleep(500)
|
||||
}
|
||||
MakeMsg.push(tmpMsg)
|
||||
MakeMsg.push(`\n抽卡记录更新完成,您还可回复\n【${this?.e?.isSr ? "*" : "#"}全部记录】统计全部抽卡数据\n【${this?.e?.isSr ? "*光锥" : "#武器"}记录】统计${this?.e?.isSr ? "星铁光锥" : "武器"}池数据\n【${this?.e?.isSr ? "*" : "#"}角色统计】按卡池统计数据\n【${this?.e?.isSr ? "*" : "#"}导出记录】导出记录数据`)
|
||||
MakeMsg.push(
|
||||
`\n抽卡记录更新完成,您还可回复\n【${this?.e?.isSr ? '*' : '#'}全部记录】统计全部抽卡数据\n【${this?.e?.isSr ? '*光锥' : '#武器'}记录】统计${this?.e?.isSr ? '星铁光锥' : '武器'}池数据\n【${this?.e?.isSr ? '*' : '#'}角色统计】按卡池统计数据\n【${this?.e?.isSr ? '*' : '#'}导出记录】导出记录数据`
|
||||
)
|
||||
await this.e.reply(MakeMsg)
|
||||
|
||||
this.isLogUrl = true
|
||||
|
@ -94,9 +100,9 @@ export default class GachaLog extends base {
|
|||
|
||||
dealUrl(url) {
|
||||
// timestamp=1641338980〈=zh-cn 修复链接有奇怪符号
|
||||
url = url.replace(/〈=/g, "&")
|
||||
if (url.includes("getGachaLog?")) url = url.split("getGachaLog?")[1]
|
||||
if (url.includes("index.html?")) url = url.split("index.html?")[1]
|
||||
url = url.replace(/〈=/g, '&')
|
||||
if (url.includes('getGachaLog?')) url = url.split('getGachaLog?')[1]
|
||||
if (url.includes('index.html?')) url = url.split('index.html?')[1]
|
||||
|
||||
// 处理参数
|
||||
let arr = new URLSearchParams(url).entries()
|
||||
|
@ -107,12 +113,12 @@ export default class GachaLog extends base {
|
|||
}
|
||||
|
||||
if (!params.authkey) {
|
||||
this.e.reply("链接复制错误")
|
||||
this.e.reply('链接复制错误')
|
||||
return false
|
||||
}
|
||||
|
||||
// 去除#/,#/log
|
||||
params.authkey = params.authkey.replace(/#\/|#\/log/g, "")
|
||||
params.authkey = params.authkey.replace(/#\/|#\/log/g, '')
|
||||
|
||||
return params
|
||||
}
|
||||
|
@ -127,17 +133,17 @@ export default class GachaLog extends base {
|
|||
|
||||
let ret = await downFile(fileUrl, textPath)
|
||||
if (!ret) {
|
||||
this.e.reply("下载日志文件错误")
|
||||
this.e.reply('下载日志文件错误')
|
||||
return false
|
||||
}
|
||||
|
||||
// 读取txt文件
|
||||
let txt = fs.readFileSync(textPath, "utf-8")
|
||||
let txt = fs.readFileSync(textPath, 'utf-8')
|
||||
|
||||
let url = txt.match(/auth_appid=webview_gacha(.*)hk4e_cn/)
|
||||
|
||||
/** 删除文件 */
|
||||
fs.unlink(textPath, () => { })
|
||||
fs.unlink(textPath, () => {})
|
||||
|
||||
if (!url || !url[0]) {
|
||||
return false
|
||||
|
@ -151,20 +157,20 @@ export default class GachaLog extends base {
|
|||
let res = await this.logApi({
|
||||
size: 6,
|
||||
authkey: param.authkey,
|
||||
region: this.e.isSr ? "prod_gf_cn" : "cn_gf01"
|
||||
region: this.e.isSr ? 'prod_gf_cn' : 'cn_gf01'
|
||||
})
|
||||
if (!res?.data?.region) {
|
||||
res = await this.logApi({
|
||||
size: 6,
|
||||
authkey: param.authkey,
|
||||
region: this.e.isSr ? "prod_official_usa" : "os_usa"
|
||||
region: this.e.isSr ? 'prod_official_usa' : 'os_usa'
|
||||
})
|
||||
}
|
||||
|
||||
if (res?.data?.region) {
|
||||
param.region = res?.data?.region
|
||||
} else {
|
||||
await this.e.reply("链接复制错误或已失效")
|
||||
await this.e.reply('链接复制错误或已失效')
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
@ -176,28 +182,34 @@ export default class GachaLog extends base {
|
|||
})
|
||||
|
||||
if (res.retcode == -109) {
|
||||
await this.e.reply("2.3版本后,反馈的链接已无法查询!请用安卓方式获取链接")
|
||||
await this.e.reply(
|
||||
'2.3版本后,反馈的链接已无法查询!请用安卓方式获取链接'
|
||||
)
|
||||
return false
|
||||
}
|
||||
|
||||
if (res.retcode == -101) {
|
||||
await this.e.reply("该链接已失效,请重新进入游戏,重新复制链接")
|
||||
await this.e.reply('该链接已失效,请重新进入游戏,重新复制链接')
|
||||
return false
|
||||
}
|
||||
if (res.retcode == 400) {
|
||||
await this.e.reply("获取数据错误")
|
||||
await this.e.reply('获取数据错误')
|
||||
return false
|
||||
}
|
||||
if (res.retcode == -100) {
|
||||
if (this.e.msg.length == 1000) {
|
||||
await this.e.reply("输入法限制,链接复制不完整,请更换输入法复制完整链接")
|
||||
await this.e.reply(
|
||||
'输入法限制,链接复制不完整,请更换输入法复制完整链接'
|
||||
)
|
||||
return false
|
||||
}
|
||||
await this.e.reply("链接不完整,请长按全选复制全部内容(可能输入法复制限制),或者复制的不是历史记录页面链接")
|
||||
await this.e.reply(
|
||||
'链接不完整,请长按全选复制全部内容(可能输入法复制限制),或者复制的不是历史记录页面链接'
|
||||
)
|
||||
return false
|
||||
}
|
||||
if (res.retcode != 0) {
|
||||
await this.e.reply("链接复制错误")
|
||||
await this.e.reply('链接复制错误')
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -210,22 +222,23 @@ export default class GachaLog extends base {
|
|||
|
||||
return true
|
||||
} else {
|
||||
await this.e.reply("暂无数据,请等待记录后再查询")
|
||||
await this.e.reply('暂无数据,请等待记录后再查询')
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
async logApi(param) {
|
||||
// 调用一次接口判断链接是否正确
|
||||
let logUrl = "https://public-operation-hk4e.mihoyo.com/gacha_info/api/getGachaLog?"
|
||||
let logUrl =
|
||||
'https://public-operation-hk4e.mihoyo.com/gacha_info/api/getGachaLog?'
|
||||
/** 国际服 */
|
||||
if (!["cn_gf01", "cn_qd01"].includes(param.region)) {
|
||||
logUrl = "https://hk4e-api-os.hoyoverse.com/gacha_info/api/getGachaLog?"
|
||||
if (!['cn_gf01', 'cn_qd01'].includes(param.region)) {
|
||||
logUrl = 'https://hk4e-api-os.hoyoverse.com/gacha_info/api/getGachaLog?'
|
||||
}
|
||||
|
||||
let logParam = new URLSearchParams({
|
||||
authkey_ver: 1,
|
||||
lang: "zh-cn", // 只支持简体中文
|
||||
lang: 'zh-cn', // 只支持简体中文
|
||||
gacha_type: 301,
|
||||
page: 1,
|
||||
size: 20,
|
||||
|
@ -233,22 +246,24 @@ export default class GachaLog extends base {
|
|||
...param
|
||||
}).toString()
|
||||
if (this.e.isSr) {
|
||||
logUrl = "https://api-takumi.mihoyo.com/common/gacha_record/api/getGachaLog?"
|
||||
if (!["prod_gf_cn", "prod_qd_cn"].includes(param.region)) {
|
||||
logUrl = "https://api-os-takumi.mihoyo.com/common/gacha_record/api/getGachaLog?"
|
||||
logUrl =
|
||||
'https://api-takumi.mihoyo.com/common/gacha_record/api/getGachaLog?'
|
||||
if (!['prod_gf_cn', 'prod_qd_cn'].includes(param.region)) {
|
||||
logUrl =
|
||||
'https://api-os-takumi.mihoyo.com/common/gacha_record/api/getGachaLog?'
|
||||
}
|
||||
logParam = new URLSearchParams({
|
||||
authkey_ver: 1,
|
||||
lang: "zh-cn", // 只支持简体中文
|
||||
lang: 'zh-cn', // 只支持简体中文
|
||||
gacha_type: 11,
|
||||
page: 1,
|
||||
size: 20,
|
||||
game_biz: "hkrpg_cn",
|
||||
game_biz: 'hkrpg_cn',
|
||||
end_id: 0,
|
||||
...param
|
||||
}).toString()
|
||||
}
|
||||
let res = await fetch(logUrl + logParam).catch((err) => {
|
||||
let res = await fetch(logUrl + logParam).catch(err => {
|
||||
logger.error(`[获取抽卡记录失败] ${err}`)
|
||||
})
|
||||
if (!res || !res.ok) {
|
||||
|
@ -264,21 +279,29 @@ export default class GachaLog extends base {
|
|||
if (!authkey) return false
|
||||
|
||||
/** 调一次接口判断是否有效 */
|
||||
let res = await this.logApi({ gacha_type: this.type, authkey, region: this.getServer() })
|
||||
let res = await this.logApi({
|
||||
gacha_type: this.type,
|
||||
authkey,
|
||||
region: this.getServer()
|
||||
})
|
||||
|
||||
/** key过期,或者没有数据 */
|
||||
if (res.retcode !== 0 || !res?.data?.list || res.data.list.length <= 0) {
|
||||
logger.debug(`${this.e.logFnc} ${res.message || "error"}`)
|
||||
logger.debug(`${this.e.logFnc} ${res.message || 'error'}`)
|
||||
return false
|
||||
}
|
||||
|
||||
logger.mark(`${this.e.logFnc}[UID:${this.uid}] 开始获取:${this.typeName}记录...`)
|
||||
logger.mark(
|
||||
`${this.e.logFnc}[UID:${this.uid}] 开始获取:${this.typeName}记录...`
|
||||
)
|
||||
let all = []
|
||||
|
||||
let logJson = this.readJson()
|
||||
/** 第一次获取增加提示 */
|
||||
if (lodash.isEmpty(logJson.list) && this.type === 301) {
|
||||
await this.e.reply(`开始获取${this.typeName}记录,首次获取数据较多,请耐心等待...`)
|
||||
await this.e.reply(
|
||||
`开始获取${this.typeName}记录,首次获取数据较多,请耐心等待...`
|
||||
)
|
||||
}
|
||||
|
||||
let logRes = await this.getAllLog(logJson.ids, authkey)
|
||||
|
@ -318,14 +341,18 @@ export default class GachaLog extends base {
|
|||
}
|
||||
|
||||
if (!res?.data?.list || res.data.list.length <= 0) {
|
||||
logger.mark(`${this.e.logFnc}[UID:${this.uid}] 获取${this.typeName}记录完成,共${Number(page) - 1}页`)
|
||||
logger.mark(
|
||||
`${this.e.logFnc}[UID:${this.uid}] 获取${this.typeName}记录完成,共${Number(page) - 1}页`
|
||||
)
|
||||
return { hasErr: false, list: [] }
|
||||
}
|
||||
|
||||
let list = []
|
||||
for (let val of res.data.list) {
|
||||
if (ids.get(String(val.id))) {
|
||||
logger.mark(`${this.e.logFnc}[UID:${this.uid}] 获取${this.typeName}记录完成,暂无新记录`)
|
||||
logger.mark(
|
||||
`${this.e.logFnc}[UID:${this.uid}] 获取${this.typeName}记录完成,暂无新记录`
|
||||
)
|
||||
return { hasErr: false, list }
|
||||
} else {
|
||||
list.push(val)
|
||||
|
@ -354,7 +381,7 @@ export default class GachaLog extends base {
|
|||
let file = `${this.path}/${this.uid}/${this.type}.json`
|
||||
if (fs.existsSync(file)) {
|
||||
// 获取本地数据 进行数据合并
|
||||
logJson = JSON.parse(fs.readFileSync(file, "utf8"))
|
||||
logJson = JSON.parse(fs.readFileSync(file, 'utf8'))
|
||||
for (let val of logJson) {
|
||||
if (val.id) {
|
||||
ids.set(String(val.id), val.id)
|
||||
|
@ -381,7 +408,7 @@ export default class GachaLog extends base {
|
|||
|
||||
let file = `${this.path}${this.uid}/`
|
||||
|
||||
fs.writeFileSync(`${file}${this.type}.json`, JSON.stringify(data, "", "\t"))
|
||||
fs.writeFileSync(`${file}${this.type}.json`, JSON.stringify(data, '', '\t'))
|
||||
}
|
||||
|
||||
/** #抽卡记录 */
|
||||
|
@ -399,8 +426,8 @@ export default class GachaLog extends base {
|
|||
}
|
||||
|
||||
async getAllGcLogData() {
|
||||
this.model = "gachaAllLog"
|
||||
const poolList = ["角色", this.e?.isSr ? "光锥" : "武器", "集录", "常驻"]
|
||||
this.model = 'gachaAllLog'
|
||||
const poolList = ['角色', this.e?.isSr ? '光锥' : '武器', '集录', '常驻']
|
||||
const logData = []
|
||||
let fiveMaxNum = 0
|
||||
const originalMsg = this.e.msg
|
||||
|
@ -414,17 +441,23 @@ export default class GachaLog extends base {
|
|||
if (fiveMaxNum <= data.fiveLog.length) {
|
||||
fiveMaxNum = data.fiveLog.length
|
||||
}
|
||||
data.max = i === "武器" || i === "光锥" ? 80 : 90
|
||||
data.max = i === '武器' || i === '光锥' ? 80 : 90
|
||||
logData.push(data)
|
||||
}
|
||||
if (logData.length === 0) {
|
||||
this.e.reply(`暂无抽卡记录\n${this.e?.isSr ? "*" : "#"}记录帮助,查看配置说明`, false, { at: true })
|
||||
this.e.reply(
|
||||
`暂无抽卡记录\n${this.e?.isSr ? '*' : '#'}记录帮助,查看配置说明`,
|
||||
false,
|
||||
{ at: true }
|
||||
)
|
||||
return true
|
||||
}
|
||||
for (let i of logData) {
|
||||
let diffNum = fiveMaxNum - i.fiveLog.length
|
||||
if (diffNum > 0) {
|
||||
i.fiveLog = i.fiveLog.concat(new Array(diffNum).fill({ isUp: false, isNull: true }))
|
||||
i.fiveLog = i.fiveLog.concat(
|
||||
new Array(diffNum).fill({ isUp: false, isNull: true })
|
||||
)
|
||||
}
|
||||
}
|
||||
const data = {
|
||||
|
@ -450,36 +483,39 @@ export default class GachaLog extends base {
|
|||
}
|
||||
|
||||
getPool() {
|
||||
let msg = this.e.msg.replace(/#|抽卡|记录|祈愿|分析|池|原神|星铁|崩坏星穹铁道|铁道/g, "")
|
||||
let msg = this.e.msg.replace(
|
||||
/#|抽卡|记录|祈愿|分析|池|原神|星铁|崩坏星穹铁道|铁道/g,
|
||||
''
|
||||
)
|
||||
let type = this.e.isSr ? 11 : 301
|
||||
let typeName = "角色"
|
||||
let typeName = '角色'
|
||||
switch (msg) {
|
||||
case "up":
|
||||
case "抽卡":
|
||||
case "角色":
|
||||
case "抽奖":
|
||||
case 'up':
|
||||
case '抽卡':
|
||||
case '角色':
|
||||
case '抽奖':
|
||||
type = this.e.isSr ? 11 : 301
|
||||
typeName = "角色"
|
||||
typeName = '角色'
|
||||
break
|
||||
case "常驻":
|
||||
case '常驻':
|
||||
type = this.e.isSr ? 1 : 200
|
||||
typeName = "常驻"
|
||||
typeName = '常驻'
|
||||
break
|
||||
case "武器":
|
||||
case '武器':
|
||||
type = this.e.isSr ? 12 : 302
|
||||
typeName = this.e.isSr ? "光锥" : "武器"
|
||||
typeName = this.e.isSr ? '光锥' : '武器'
|
||||
break
|
||||
case "集录":
|
||||
case '集录':
|
||||
type = 500
|
||||
typeName = "集录"
|
||||
typeName = '集录'
|
||||
break
|
||||
case "光锥":
|
||||
case '光锥':
|
||||
type = 12
|
||||
typeName = "光锥"
|
||||
typeName = '光锥'
|
||||
break
|
||||
case "新手":
|
||||
case '新手':
|
||||
type = this.e.isSr ? 2 : 100
|
||||
typeName = "新手"
|
||||
typeName = '新手'
|
||||
break
|
||||
}
|
||||
this.type = type
|
||||
|
@ -489,20 +525,32 @@ export default class GachaLog extends base {
|
|||
|
||||
async getUid() {
|
||||
if (!fs.existsSync(this.path)) {
|
||||
this.e.reply(`暂无抽卡记录\n${this.e?.isSr ? "*" : "#"}记录帮助,查看配置说明`, false, { at: true })
|
||||
this.e.reply(
|
||||
`暂无抽卡记录\n${this.e?.isSr ? '*' : '#'}记录帮助,查看配置说明`,
|
||||
false,
|
||||
{ at: true }
|
||||
)
|
||||
return false
|
||||
}
|
||||
|
||||
let logs = fs.readdirSync(this.path)
|
||||
|
||||
if (lodash.isEmpty(logs)) {
|
||||
this.e.reply(`暂无抽卡记录\n${this.e?.isSr ? "*" : "#"}记录帮助,查看配置说明`, false, { at: true })
|
||||
this.e.reply(
|
||||
`暂无抽卡记录\n${this.e?.isSr ? '*' : '#'}记录帮助,查看配置说明`,
|
||||
false,
|
||||
{ at: true }
|
||||
)
|
||||
return false
|
||||
}
|
||||
|
||||
if (!this.uid) {
|
||||
this.e.at = false
|
||||
this.uid = this?.e?.isSr ? this.e.user?._games?.sr?.uid : this.e.user?._games?.gs?.uid || await this.e.runtime.getUid(this.e) || await redis.get(this.uidKey)
|
||||
this.uid = this?.e?.isSr
|
||||
? this.e.user?._games?.sr?.uid
|
||||
: this.e.user?._games?.gs?.uid ||
|
||||
(await this.e.runtime.getUid(this.e)) ||
|
||||
(await redis.get(this.uidKey))
|
||||
}
|
||||
|
||||
/** 记录有绑定的uid */
|
||||
|
@ -513,7 +561,9 @@ export default class GachaLog extends base {
|
|||
/** 拿修改时间最后的uid */
|
||||
let uidArr = []
|
||||
for (let uid of logs) {
|
||||
let json = this?.e?.isSr ? `${this.path}${uid}/11.json` : `${this.path}${uid}/301.json`
|
||||
let json = this?.e?.isSr
|
||||
? `${this.path}${uid}/11.json`
|
||||
: `${this.path}${uid}/301.json`
|
||||
if (!fs.existsSync(json)) {
|
||||
continue
|
||||
}
|
||||
|
@ -570,7 +620,7 @@ export default class GachaLog extends base {
|
|||
} else {
|
||||
fourLog[val.name] = 1
|
||||
}
|
||||
if (val.item_type == "武器" || val.item_type == "光锥") {
|
||||
if (val.item_type == '武器' || val.item_type == '光锥') {
|
||||
weaponFourNum++
|
||||
}
|
||||
}
|
||||
|
@ -586,7 +636,7 @@ export default class GachaLog extends base {
|
|||
fiveLogNum = 0
|
||||
let isUp = false
|
||||
// 歪了多少个
|
||||
if (val.item_type == "角色") {
|
||||
if (val.item_type == '角色') {
|
||||
if (this.checkIsUp()) {
|
||||
isUp = true
|
||||
} else {
|
||||
|
@ -612,7 +662,7 @@ export default class GachaLog extends base {
|
|||
|
||||
// 删除未知五星
|
||||
for (let i in fiveLog) {
|
||||
if (fiveLog[i].name == "未知") {
|
||||
if (fiveLog[i].name == '未知') {
|
||||
allNum = allNum - fiveLog[i].num
|
||||
fiveLog.splice(i, 1)
|
||||
fiveNum--
|
||||
|
@ -640,35 +690,38 @@ export default class GachaLog extends base {
|
|||
num: fourLog[i]
|
||||
})
|
||||
}
|
||||
four = four.sort((a, b) => { return b.num - a.num })
|
||||
four = four.sort((a, b) => {
|
||||
return b.num - a.num
|
||||
})
|
||||
|
||||
if (four.length <= 0) {
|
||||
four.push({ name: "无", num: 0 })
|
||||
four.push({ name: '无', num: 0 })
|
||||
}
|
||||
|
||||
let fiveAvg = 0
|
||||
let fourAvg = 0
|
||||
if (fiveNum > 0) {
|
||||
fiveAvg = Math.round((allNum - noFiveNum) / fiveNum);
|
||||
fiveAvg = Math.round((allNum - noFiveNum) / fiveNum)
|
||||
}
|
||||
if (fourNum > 0) {
|
||||
fourAvg = Math.round((allNum - noFourNum) / fourNum);
|
||||
fourAvg = Math.round((allNum - noFourNum) / fourNum)
|
||||
}
|
||||
// 有效抽卡
|
||||
let isvalidNum = 0
|
||||
|
||||
if (fiveNum > 0 && fiveNum > wai) {
|
||||
if (fiveLog.length > 0 && !fiveLog[0].isUp) {
|
||||
isvalidNum = Math.round((allNum - noFiveNum - fiveLog[0].num) / (fiveNum - wai));
|
||||
isvalidNum = Math.round(
|
||||
(allNum - noFiveNum - fiveLog[0].num) / (fiveNum - wai)
|
||||
)
|
||||
} else {
|
||||
isvalidNum = Math.round((allNum - noFiveNum) / (fiveNum - wai));
|
||||
isvalidNum = Math.round((allNum - noFiveNum) / (fiveNum - wai))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let upYs = isvalidNum * 160
|
||||
if (upYs >= 10000) {
|
||||
upYs = (upYs / 10000).toFixed(2) + "w"
|
||||
upYs = (upYs / 10000).toFixed(2) + 'w'
|
||||
} else {
|
||||
upYs = upYs.toFixed(0)
|
||||
}
|
||||
|
@ -704,21 +757,35 @@ export default class GachaLog extends base {
|
|||
}
|
||||
|
||||
checkIsUp() {
|
||||
if (["莫娜", "七七", "迪卢克", "琴", "姬子", "杰帕德", "彦卿", "白露", "瓦尔特", "克拉拉", "布洛妮娅"].includes(this.role.name)) {
|
||||
if (
|
||||
[
|
||||
'莫娜',
|
||||
'七七',
|
||||
'迪卢克',
|
||||
'琴',
|
||||
'姬子',
|
||||
'杰帕德',
|
||||
'彦卿',
|
||||
'白露',
|
||||
'瓦尔特',
|
||||
'克拉拉',
|
||||
'布洛妮娅'
|
||||
].includes(this.role.name)
|
||||
) {
|
||||
return false
|
||||
}
|
||||
let role5join = {
|
||||
刻晴: {
|
||||
start: "2021-02-17 18:00:00",
|
||||
end: "2021-03-02 15:59:59"
|
||||
start: '2021-02-17 18:00:00',
|
||||
end: '2021-03-02 15:59:59'
|
||||
},
|
||||
提纳里: {
|
||||
start: "2022-08-24 06:00:00",
|
||||
end: "2022-09-09 17:59:59"
|
||||
start: '2022-08-24 06:00:00',
|
||||
end: '2022-09-09 17:59:59'
|
||||
},
|
||||
迪希雅: {
|
||||
start: "2023-03-01 06:00:00",
|
||||
end: "2023-03-21 17:59:59"
|
||||
start: '2023-03-01 06:00:00',
|
||||
end: '2023-03-21 17:59:59'
|
||||
}
|
||||
}
|
||||
if (lodash.keys(role5join).includes(this.role.name)) {
|
||||
|
@ -741,108 +808,168 @@ export default class GachaLog extends base {
|
|||
const typeName = data.typeName || this.typeName
|
||||
const max = type === 12 || type === 302 ? 80 : 90
|
||||
let line = []
|
||||
let weapon = this.e.isSr ? "光锥" : "武器"
|
||||
let weapon = this.e.isSr ? '光锥' : '武器'
|
||||
//最非,最欧
|
||||
let maxValue, minValue;
|
||||
let maxValue, minValue
|
||||
|
||||
if (data && data.fiveLog) {
|
||||
const filteredFiveLog = data.fiveLog.filter(item => item.num !== 0);
|
||||
const filteredFiveLog = data.fiveLog.filter(item => item.num !== 0)
|
||||
|
||||
if (filteredFiveLog.length > 0) {
|
||||
maxValue = Math.max(...filteredFiveLog.map(item => item.num));
|
||||
minValue = Math.min(...filteredFiveLog.map(item => item.num));
|
||||
maxValue = Math.max(...filteredFiveLog.map(item => item.num))
|
||||
minValue = Math.min(...filteredFiveLog.map(item => item.num))
|
||||
} else {
|
||||
if (data.fiveLog[0]) {
|
||||
maxValue = data.fiveLog[0];
|
||||
minValue = data.fiveLog[0];
|
||||
maxValue = data.fiveLog[0]
|
||||
minValue = data.fiveLog[0]
|
||||
} else {
|
||||
maxValue = 0;
|
||||
minValue = 0;
|
||||
maxValue = 0
|
||||
minValue = 0
|
||||
}
|
||||
}
|
||||
} else {
|
||||
maxValue = 0;
|
||||
minValue = 0;
|
||||
maxValue = 0
|
||||
minValue = 0
|
||||
}
|
||||
|
||||
if ([301, 11].includes(type)) {
|
||||
line = [[
|
||||
{ lable: "未出五星", num: data.noFiveNum, unit: "抽" },
|
||||
{ lable: "五星", num: data.fiveNum, unit: "个" },
|
||||
{ lable: "五星平均", num: data.fiveAvg, unit: "抽", color: data.fiveColor },
|
||||
{ lable: "小保底不歪", num: data.noWaiRate + "%", unit: "" },
|
||||
{ lable: "最非", num: maxValue, unit: "抽" }
|
||||
], [
|
||||
{ lable: "未出四星", num: data.noFourNum, unit: "抽" },
|
||||
{ lable: "五星常驻", num: data.wai, unit: "个" },
|
||||
{ lable: "UP平均", num: data.isvalidNum, unit: "抽" },
|
||||
{ lable: `UP花费${this?.e?.isSr ? "星琼" : "原石"}`, num: data.upYs, unit: "" },
|
||||
{ lable: "最欧", num: minValue, unit: "抽" }
|
||||
]]
|
||||
line = [
|
||||
[
|
||||
{ lable: '未出五星', num: data.noFiveNum, unit: '抽' },
|
||||
{ lable: '五星', num: data.fiveNum, unit: '个' },
|
||||
{
|
||||
lable: '五星平均',
|
||||
num: data.fiveAvg,
|
||||
unit: '抽',
|
||||
color: data.fiveColor
|
||||
},
|
||||
{ lable: '小保底不歪', num: data.noWaiRate + '%', unit: '' },
|
||||
{ lable: '最非', num: maxValue, unit: '抽' }
|
||||
],
|
||||
[
|
||||
{ lable: '未出四星', num: data.noFourNum, unit: '抽' },
|
||||
{ lable: '五星常驻', num: data.wai, unit: '个' },
|
||||
{ lable: 'UP平均', num: data.isvalidNum, unit: '抽' },
|
||||
{
|
||||
lable: `UP花费${this?.e?.isSr ? '星琼' : '原石'}`,
|
||||
num: data.upYs,
|
||||
unit: ''
|
||||
},
|
||||
{ lable: '最欧', num: minValue, unit: '抽' }
|
||||
]
|
||||
]
|
||||
}
|
||||
// 常驻池
|
||||
if ([200, 1].includes(type)) {
|
||||
line = [[
|
||||
{ lable: "未出五星", num: data.noFiveNum, unit: "抽" },
|
||||
{ lable: "五星", num: data.fiveNum, unit: "个" },
|
||||
{ lable: "五星平均", num: data.fiveAvg, unit: "抽", color: data.fiveColor },
|
||||
{ lable: `五星${weapon}`, num: data.weaponNum, unit: "个" },
|
||||
{ lable: "最非", num: maxValue, unit: "抽" }
|
||||
], [
|
||||
{ lable: "未出四星", num: data.noFourNum, unit: "抽" },
|
||||
{ lable: "四星", num: data.fourNum, unit: "个" },
|
||||
{ lable: "四星平均", num: data.fourAvg, unit: "抽" },
|
||||
{ lable: "四星最多", num: data.maxFour.num, unit: data.maxFour.name.slice(0, 4) },
|
||||
{ lable: "最欧", num: minValue, unit: "抽" }
|
||||
]]
|
||||
line = [
|
||||
[
|
||||
{ lable: '未出五星', num: data.noFiveNum, unit: '抽' },
|
||||
{ lable: '五星', num: data.fiveNum, unit: '个' },
|
||||
{
|
||||
lable: '五星平均',
|
||||
num: data.fiveAvg,
|
||||
unit: '抽',
|
||||
color: data.fiveColor
|
||||
},
|
||||
{ lable: `五星${weapon}`, num: data.weaponNum, unit: '个' },
|
||||
{ lable: '最非', num: maxValue, unit: '抽' }
|
||||
],
|
||||
[
|
||||
{ lable: '未出四星', num: data.noFourNum, unit: '抽' },
|
||||
{ lable: '四星', num: data.fourNum, unit: '个' },
|
||||
{ lable: '四星平均', num: data.fourAvg, unit: '抽' },
|
||||
{
|
||||
lable: '四星最多',
|
||||
num: data.maxFour.num,
|
||||
unit: data.maxFour.name.slice(0, 4)
|
||||
},
|
||||
{ lable: '最欧', num: minValue, unit: '抽' }
|
||||
]
|
||||
]
|
||||
}
|
||||
// 武器池
|
||||
if ([302, 12].includes(type)) {
|
||||
line = [[
|
||||
{ lable: "未出五星", num: data.noFiveNum, unit: "抽" },
|
||||
{ lable: "五星", num: data.fiveNum, unit: "个" },
|
||||
{ lable: "五星平均", num: data.fiveAvg, unit: "抽", color: data.fiveColor },
|
||||
{ lable: `四星${weapon}`, num: data.weaponFourNum, unit: "个" },
|
||||
{ lable: "最非", num: maxValue, unit: "抽" }
|
||||
], [
|
||||
{ lable: "未出四星", num: data.noFourNum, unit: "抽" },
|
||||
{ lable: "四星", num: data.fourNum, unit: "个" },
|
||||
{ lable: "四星平均", num: data.fourAvg, unit: "抽" },
|
||||
{ lable: "四星最多", num: data.maxFour.num, unit: data.maxFour.name.slice(0, 4) },
|
||||
{ lable: "最欧", num: minValue, unit: "抽" }
|
||||
]]
|
||||
line = [
|
||||
[
|
||||
{ lable: '未出五星', num: data.noFiveNum, unit: '抽' },
|
||||
{ lable: '五星', num: data.fiveNum, unit: '个' },
|
||||
{
|
||||
lable: '五星平均',
|
||||
num: data.fiveAvg,
|
||||
unit: '抽',
|
||||
color: data.fiveColor
|
||||
},
|
||||
{ lable: `四星${weapon}`, num: data.weaponFourNum, unit: '个' },
|
||||
{ lable: '最非', num: maxValue, unit: '抽' }
|
||||
],
|
||||
[
|
||||
{ lable: '未出四星', num: data.noFourNum, unit: '抽' },
|
||||
{ lable: '四星', num: data.fourNum, unit: '个' },
|
||||
{ lable: '四星平均', num: data.fourAvg, unit: '抽' },
|
||||
{
|
||||
lable: '四星最多',
|
||||
num: data.maxFour.num,
|
||||
unit: data.maxFour.name.slice(0, 4)
|
||||
},
|
||||
{ lable: '最欧', num: minValue, unit: '抽' }
|
||||
]
|
||||
]
|
||||
}
|
||||
// 集录池
|
||||
if ([500].includes(type)) {
|
||||
line = [[
|
||||
{ lable: "未出五星", num: data.noFiveNum, unit: "抽" },
|
||||
{ lable: "五星", num: data.fiveNum, unit: "个" },
|
||||
{ lable: "五星平均", num: data.fiveAvg, unit: "抽", color: data.fiveColor },
|
||||
{ lable: `四星${weapon}`, num: data.weaponFourNum, unit: "个" },
|
||||
{ lable: "最非", num: maxValue, unit: "抽" }
|
||||
], [
|
||||
{ lable: "未出四星", num: data.noFourNum, unit: "抽" },
|
||||
{ lable: "四星", num: data.fourNum, unit: "个" },
|
||||
{ lable: "四星平均", num: data.fourAvg, unit: "抽" },
|
||||
{ lable: "四星最多", num: data.maxFour.num, unit: data.maxFour.name.slice(0, 4) },
|
||||
{ lable: "最欧", num: minValue, unit: "抽" }
|
||||
]]
|
||||
line = [
|
||||
[
|
||||
{ lable: '未出五星', num: data.noFiveNum, unit: '抽' },
|
||||
{ lable: '五星', num: data.fiveNum, unit: '个' },
|
||||
{
|
||||
lable: '五星平均',
|
||||
num: data.fiveAvg,
|
||||
unit: '抽',
|
||||
color: data.fiveColor
|
||||
},
|
||||
{ lable: `四星${weapon}`, num: data.weaponFourNum, unit: '个' },
|
||||
{ lable: '最非', num: maxValue, unit: '抽' }
|
||||
],
|
||||
[
|
||||
{ lable: '未出四星', num: data.noFourNum, unit: '抽' },
|
||||
{ lable: '四星', num: data.fourNum, unit: '个' },
|
||||
{ lable: '四星平均', num: data.fourAvg, unit: '抽' },
|
||||
{
|
||||
lable: '四星最多',
|
||||
num: data.maxFour.num,
|
||||
unit: data.maxFour.name.slice(0, 4)
|
||||
},
|
||||
{ lable: '最欧', num: minValue, unit: '抽' }
|
||||
]
|
||||
]
|
||||
}
|
||||
// 新手池
|
||||
if ([100, 2].includes(type)) {
|
||||
line = [[
|
||||
{ lable: "未出五星", num: data.noFiveNum, unit: "抽" },
|
||||
{ lable: "五星", num: data.fiveNum, unit: "个" },
|
||||
{ lable: "五星平均", num: data.fiveAvg, unit: "抽", color: data.fiveColor },
|
||||
{ lable: `五星${weapon}`, num: data.weaponNum, unit: "个" },
|
||||
{ lable: "最非", num: maxValue, unit: "抽" }
|
||||
], [
|
||||
{ lable: "未出四星", num: data.noFourNum, unit: "抽" },
|
||||
{ lable: "四星", num: data.fourNum, unit: "个" },
|
||||
{ lable: "四星平均", num: data.fourAvg, unit: "抽" },
|
||||
{ lable: "四星最多", num: data.maxFour.num, unit: data.maxFour.name.slice(0, 4) },
|
||||
{ lable: "最欧", num: minValue, unit: "抽" }
|
||||
]]
|
||||
line = [
|
||||
[
|
||||
{ lable: '未出五星', num: data.noFiveNum, unit: '抽' },
|
||||
{ lable: '五星', num: data.fiveNum, unit: '个' },
|
||||
{
|
||||
lable: '五星平均',
|
||||
num: data.fiveAvg,
|
||||
unit: '抽',
|
||||
color: data.fiveColor
|
||||
},
|
||||
{ lable: `五星${weapon}`, num: data.weaponNum, unit: '个' },
|
||||
{ lable: '最非', num: maxValue, unit: '抽' }
|
||||
],
|
||||
[
|
||||
{ lable: '未出四星', num: data.noFourNum, unit: '抽' },
|
||||
{ lable: '四星', num: data.fourNum, unit: '个' },
|
||||
{ lable: '四星平均', num: data.fourAvg, unit: '抽' },
|
||||
{
|
||||
lable: '四星最多',
|
||||
num: data.maxFour.num,
|
||||
unit: data.maxFour.name.slice(0, 4)
|
||||
},
|
||||
{ lable: '最欧', num: minValue, unit: '抽' }
|
||||
]
|
||||
]
|
||||
}
|
||||
let hasMore = false
|
||||
// if (this.e.isGroup && data.fiveLog.length > 48) {
|
||||
|
@ -868,21 +995,21 @@ export default class GachaLog extends base {
|
|||
|
||||
getServer() {
|
||||
switch (String(this.uid).slice(0, -8)) {
|
||||
case "1":
|
||||
case "2":
|
||||
return this.e.isSr ? "prod_gf_cn" : "cn_gf01" // 官服
|
||||
case "5":
|
||||
return this.e.isSr ? "prod_qd_cn" : "cn_qd01" // B服
|
||||
case "6":
|
||||
return this.e.isSr ? "prod_official_usa" : "os_usa" // 美服
|
||||
case "7":
|
||||
return this.e.isSr ? "prod_official_euro" : "os_euro" // 欧服
|
||||
case "8":
|
||||
case "18":
|
||||
return this.e.isSr ? "prod_official_asia" : "os_asia" // 亚服
|
||||
case "9":
|
||||
return this.e.isSr ? "prod_official_cht" : "os_cht" // 港澳台服
|
||||
case '1':
|
||||
case '2':
|
||||
return this.e.isSr ? 'prod_gf_cn' : 'cn_gf01' // 官服
|
||||
case '5':
|
||||
return this.e.isSr ? 'prod_qd_cn' : 'cn_qd01' // B服
|
||||
case '6':
|
||||
return this.e.isSr ? 'prod_official_usa' : 'os_usa' // 美服
|
||||
case '7':
|
||||
return this.e.isSr ? 'prod_official_euro' : 'os_euro' // 欧服
|
||||
case '8':
|
||||
case '18':
|
||||
return this.e.isSr ? 'prod_official_asia' : 'os_asia' // 亚服
|
||||
case '9':
|
||||
return this.e.isSr ? 'prod_official_cht' : 'os_cht' // 港澳台服
|
||||
}
|
||||
return "cn_gf01"
|
||||
return 'cn_gf01'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
import { GSCfg} from 'yunzai/mys'
|
||||
export default GSCfg
|
||||
import { GSCfg } from 'yunzai/mys'
|
||||
export default GSCfg
|
||||
|
|
197
model/ledger.ts
197
model/ledger.ts
|
@ -9,18 +9,25 @@ export default class Ledger extends base {
|
|||
super(e)
|
||||
this.e = e
|
||||
this.model = 'ledger'
|
||||
if (this.e.msg?.includes('星琼'))
|
||||
this.e.isSr = true
|
||||
if (this.e.msg?.includes('星琼')) this.e.isSr = true
|
||||
|
||||
this.color = ['#73a9c6', '#d56565', '#70b2b4', '#bd9a5a', '#739970', '#7a6da7', '#597ea0']
|
||||
this.color = [
|
||||
'#73a9c6',
|
||||
'#d56565',
|
||||
'#70b2b4',
|
||||
'#bd9a5a',
|
||||
'#739970',
|
||||
'#7a6da7',
|
||||
'#597ea0'
|
||||
]
|
||||
this.action = {
|
||||
"other": 0,
|
||||
"adventure_reward": 1,
|
||||
"space_reward": 2,
|
||||
"daily_reward": 3,
|
||||
"abyss_reward": 4,
|
||||
"mail_reward": 5,
|
||||
"event_reward": 6
|
||||
other: 0,
|
||||
adventure_reward: 1,
|
||||
space_reward: 2,
|
||||
daily_reward: 3,
|
||||
abyss_reward: 4,
|
||||
mail_reward: 5,
|
||||
event_reward: 6
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,7 +49,20 @@ export default class Ledger extends base {
|
|||
getMonth() {
|
||||
let month = this.e.msg.replace(/#|原石|月|札记|星铁|星琼/g, '')
|
||||
let NowMonth = Number(moment().month()) + 1
|
||||
let monthData = ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二']
|
||||
let monthData = [
|
||||
'一',
|
||||
'二',
|
||||
'三',
|
||||
'四',
|
||||
'五',
|
||||
'六',
|
||||
'七',
|
||||
'八',
|
||||
'九',
|
||||
'十',
|
||||
'十一',
|
||||
'十二'
|
||||
]
|
||||
if (month) {
|
||||
if (isNaN(month)) {
|
||||
for (let i in monthData) {
|
||||
|
@ -63,17 +83,27 @@ export default class Ledger extends base {
|
|||
}
|
||||
|
||||
// 获取前三个月
|
||||
let monthArr = [11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].splice(NowMonth - 1, 3)
|
||||
let monthArr = [11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].splice(
|
||||
NowMonth - 1,
|
||||
3
|
||||
)
|
||||
if (!monthArr.includes(Number(month))) {
|
||||
this.e.reply('札记仅支持查询最近三个月的数据')
|
||||
return false
|
||||
}
|
||||
if ((NowMonth >= 3 && month > NowMonth) || (NowMonth < 3 && month > NowMonth && month <= 9 + month)) {
|
||||
if (
|
||||
(NowMonth >= 3 && month > NowMonth) ||
|
||||
(NowMonth < 3 && month > NowMonth && month <= 9 + month)
|
||||
) {
|
||||
month = NowMonth
|
||||
}
|
||||
if (this.e.isSr) {
|
||||
this.NowMonth = moment().year().toString() + (NowMonth < 10 ? '0' : '') + NowMonth.toString()
|
||||
this.month = moment().year().toString() + (month < 10 ? '0' : '') + month.toString()
|
||||
this.NowMonth =
|
||||
moment().year().toString() +
|
||||
(NowMonth < 10 ? '0' : '') +
|
||||
NowMonth.toString()
|
||||
this.month =
|
||||
moment().year().toString() + (month < 10 ? '0' : '') + month.toString()
|
||||
this.srmonth = month
|
||||
} else {
|
||||
this.NowMonth = NowMonth
|
||||
|
@ -94,29 +124,39 @@ export default class Ledger extends base {
|
|||
let mora = this.e.isSr ? 'current_rails_pass' : 'current_mora'
|
||||
let last_mora = this.e.isSr ? 'last_rails_pass' : 'last_mora'
|
||||
|
||||
ledgerInfo.month_data.gacha = (ledgerInfo.month_data[gacha] / 160).toFixed(0)
|
||||
ledgerInfo.month_data.last_gacha = (ledgerInfo.month_data[last_gacha] / 160).toFixed(0)
|
||||
ledgerInfo.month_data.gacha = (ledgerInfo.month_data[gacha] / 160).toFixed(
|
||||
0
|
||||
)
|
||||
ledgerInfo.month_data.last_gacha = (
|
||||
ledgerInfo.month_data[last_gacha] / 160
|
||||
).toFixed(0)
|
||||
if (ledgerInfo.month_data[gacha] > 10000) {
|
||||
ledgerInfo.month_data[gacha] = (ledgerInfo.month_data[gacha] / 10000).toFixed(2) + ' w'
|
||||
ledgerInfo.month_data[gacha] =
|
||||
(ledgerInfo.month_data[gacha] / 10000).toFixed(2) + ' w'
|
||||
}
|
||||
if (ledgerInfo.month_data[last_gacha] > 10000) {
|
||||
ledgerInfo.month_data[last_gacha] = (ledgerInfo.month_data[last_gacha] / 10000).toFixed(2) + ' w'
|
||||
ledgerInfo.month_data[last_gacha] =
|
||||
(ledgerInfo.month_data[last_gacha] / 10000).toFixed(2) + ' w'
|
||||
}
|
||||
if (ledgerInfo.month_data[mora] > 10000) {
|
||||
ledgerInfo.month_data[mora] = (ledgerInfo.month_data[mora] / 10000).toFixed(1) + ' w'
|
||||
ledgerInfo.month_data[mora] =
|
||||
(ledgerInfo.month_data[mora] / 10000).toFixed(1) + ' w'
|
||||
}
|
||||
if (ledgerInfo.month_data[last_mora] > 10000) {
|
||||
ledgerInfo.month_data[last_mora] = (ledgerInfo.month_data[last_mora] / 10000).toFixed(1) + ' w'
|
||||
ledgerInfo.month_data[last_mora] =
|
||||
(ledgerInfo.month_data[last_mora] / 10000).toFixed(1) + ' w'
|
||||
}
|
||||
if (ledgerInfo.day_data[gacha] > 10000) {
|
||||
ledgerInfo.day_data[gacha] = (ledgerInfo.day_data[gacha] / 10000).toFixed(1) + ' w'
|
||||
ledgerInfo.day_data[gacha] =
|
||||
(ledgerInfo.day_data[gacha] / 10000).toFixed(1) + ' w'
|
||||
}
|
||||
if (ledgerInfo.day_data[mora] > 10000) {
|
||||
ledgerInfo.day_data[mora] = (ledgerInfo.day_data[mora] / 10000).toFixed(1) + ' w'
|
||||
ledgerInfo.day_data[mora] =
|
||||
(ledgerInfo.day_data[mora] / 10000).toFixed(1) + ' w'
|
||||
}
|
||||
|
||||
ledgerInfo.color = []
|
||||
ledgerInfo.month_data.group_by.forEach((item) => {
|
||||
ledgerInfo.month_data.group_by.forEach(item => {
|
||||
if (this.e.isSr) {
|
||||
item.color = this.color[this.action[item.action]]
|
||||
item.action_name = item.action_name.slice(0, 4)
|
||||
|
@ -131,7 +171,13 @@ export default class Ledger extends base {
|
|||
|
||||
let icon = ''
|
||||
if (this.e.isSr)
|
||||
icon = lodash.sample(fs.readdirSync(`${this._path}/plugins/genshin/resources/StarRail/img/role`).filter(file => file.endsWith('.webp')))
|
||||
icon = lodash.sample(
|
||||
fs
|
||||
.readdirSync(
|
||||
`${this._path}/plugins/genshin/resources/StarRail/img/role`
|
||||
)
|
||||
.filter(file => file.endsWith('.webp'))
|
||||
)
|
||||
|
||||
let week = [
|
||||
'星期日',
|
||||
|
@ -146,7 +192,8 @@ export default class Ledger extends base {
|
|||
return {
|
||||
saveId: this.e.uid,
|
||||
uid: this.e.uid,
|
||||
day, icon,
|
||||
day,
|
||||
icon,
|
||||
srday: `${week[moment().day()]}`,
|
||||
nowDay: moment(new Date()).format('YYYY年MM月DD日'),
|
||||
...ledgerInfo,
|
||||
|
@ -177,7 +224,10 @@ export default class Ledger extends base {
|
|||
let NowMonth = Number(moment().month()) + 1
|
||||
|
||||
// 获取前三个月
|
||||
let monthArr = [11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].splice(NowMonth - 1, 3)
|
||||
let monthArr = [11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].splice(
|
||||
NowMonth - 1,
|
||||
3
|
||||
)
|
||||
|
||||
for (let month of monthArr) {
|
||||
let year = NowYear
|
||||
|
@ -188,14 +238,24 @@ export default class Ledger extends base {
|
|||
|
||||
if (!NoteData[year]) NoteData[year] = {}
|
||||
|
||||
if (NoteData[year][month] && NowMonth != month && NoteData[year][month].isUpdate) continue
|
||||
if (
|
||||
NoteData[year][month] &&
|
||||
NowMonth != month &&
|
||||
NoteData[year][month].isUpdate
|
||||
)
|
||||
continue
|
||||
|
||||
let ledgerInfo
|
||||
if (NowMonth == month && this.e.nowData && this.e.nowData?.data?.data_month == NowMonth) {
|
||||
if (
|
||||
NowMonth == month &&
|
||||
this.e.nowData &&
|
||||
this.e.nowData?.data?.data_month == NowMonth
|
||||
) {
|
||||
ledgerInfo = this.e.nowData
|
||||
} else {
|
||||
let months = month
|
||||
if (this.e.isSr) months = String(year) + (month < 10 ? '0' : '') + String(month)
|
||||
if (this.e.isSr)
|
||||
months = String(year) + (month < 10 ? '0' : '') + String(month)
|
||||
|
||||
ledgerInfo = await this.ysLedger(ck, months, isTask)
|
||||
if (!ledgerInfo) continue
|
||||
|
@ -221,7 +281,13 @@ export default class Ledger extends base {
|
|||
if (isTask) {
|
||||
let mysApi = new MysApi(ck.uid, ck.ck, { log: false }, this.e?.isSr)
|
||||
ledgerInfo = await mysApi.getData('ys_ledger', { month })
|
||||
ledgerInfo = await new MysInfo(this.e).checkCode(ledgerInfo, 'ys_ledger', mysApi, { month }, isTask)
|
||||
ledgerInfo = await new MysInfo(this.e).checkCode(
|
||||
ledgerInfo,
|
||||
'ys_ledger',
|
||||
mysApi,
|
||||
{ month },
|
||||
isTask
|
||||
)
|
||||
} else {
|
||||
ledgerInfo = await MysInfo.get(this.e, 'ys_ledger', { month })
|
||||
}
|
||||
|
@ -234,12 +300,20 @@ export default class Ledger extends base {
|
|||
async ledgerTask(manual) {
|
||||
let cks = (await GsCfg.getBingCk(this.e?.isSr ? 'sr' : 'gs')).ck
|
||||
let uids = lodash.map(cks, 'uid')
|
||||
let finishTime = moment().add(uids.length * 0.7, 's').format('MM-DD HH:mm:ss')
|
||||
logger.mark(`${this.e?.isSr ? '开拓月历' : '札记'}ck:${uids.length}个,预计需要${this.countTime(uids.length)} ${finishTime} 完成`)
|
||||
let finishTime = moment()
|
||||
.add(uids.length * 0.7, 's')
|
||||
.format('MM-DD HH:mm:ss')
|
||||
logger.mark(
|
||||
`${this.e?.isSr ? '开拓月历' : '札记'}ck:${uids.length}个,预计需要${this.countTime(uids.length)} ${finishTime} 完成`
|
||||
)
|
||||
|
||||
if (manual) {
|
||||
await this.e.reply(`开始任务:保存${this.e?.isSr ? '星琼' : '原石'}数据,完成前请勿重复执行`)
|
||||
await this.e.reply(`${this.e?.isSr ? '开拓月历' : '札记'}ck:${uids.length}个\n预计需要:${this.countTime(uids.length)}\n完成时间:${finishTime}`)
|
||||
await this.e.reply(
|
||||
`开始任务:保存${this.e?.isSr ? '星琼' : '原石'}数据,完成前请勿重复执行`
|
||||
)
|
||||
await this.e.reply(
|
||||
`${this.e?.isSr ? '开拓月历' : '札记'}ck:${uids.length}个\n预计需要:${this.countTime(uids.length)}\n完成时间:${finishTime}`
|
||||
)
|
||||
}
|
||||
|
||||
for (const uid of uids) {
|
||||
|
@ -306,19 +380,31 @@ export default class Ledger extends base {
|
|||
}
|
||||
// console.log(NoteData)
|
||||
if (!NoteData || lodash.isEmpty(NoteData)) {
|
||||
this.e.reply(this.e?.isSr ? ['暂无星琼数据,请先发送 *星琼', segment.button([
|
||||
{ text: "星琼", input: "*星琼" },
|
||||
])] : ['暂无原石数据,请先发送 #原石', segment.button([
|
||||
{ text: "原石", input: "#原石" },
|
||||
])], false, { at: true })
|
||||
this.e.reply(
|
||||
this.e?.isSr
|
||||
? [
|
||||
'暂无星琼数据,请先发送 *星琼',
|
||||
segment.button([{ text: '星琼', input: '*星琼' }])
|
||||
]
|
||||
: [
|
||||
'暂无原石数据,请先发送 #原石',
|
||||
segment.button([{ text: '原石', input: '#原石' }])
|
||||
],
|
||||
false,
|
||||
{ at: true }
|
||||
)
|
||||
return false
|
||||
}
|
||||
NoteData = NoteData[nowYear]
|
||||
if (!NoteData) {
|
||||
this.e.reply(`uid:${uid} ${nowYear}年无${this.e?.isSr ? '星琼' : '原石'}统计数据!`, false, { at: true })
|
||||
this.e.reply(
|
||||
`uid:${uid} ${nowYear}年无${this.e?.isSr ? '星琼' : '原石'}统计数据!`,
|
||||
false,
|
||||
{ at: true }
|
||||
)
|
||||
return false
|
||||
}
|
||||
lodash.forEach(NoteData, (val) => {
|
||||
lodash.forEach(NoteData, val => {
|
||||
val.year = nowYear
|
||||
})
|
||||
/** 处理数据 */
|
||||
|
@ -330,9 +416,13 @@ export default class Ledger extends base {
|
|||
let yearText
|
||||
if (!nowYear) {
|
||||
// 获取总长度
|
||||
if (NoteData && Object.keys(NoteData) && Object.keys(NoteData).length > 0) {
|
||||
if (
|
||||
NoteData &&
|
||||
Object.keys(NoteData) &&
|
||||
Object.keys(NoteData).length > 0
|
||||
) {
|
||||
let len = 0
|
||||
Object.keys(NoteData).forEach((year) => {
|
||||
Object.keys(NoteData).forEach(year => {
|
||||
let yearData = NoteData[year]
|
||||
len += Object.keys(yearData).length
|
||||
})
|
||||
|
@ -371,12 +461,15 @@ export default class Ledger extends base {
|
|||
|
||||
let Primogems = this.e.isSr ? 'current_hcoin' : 'current_primogems'
|
||||
let Mora = this.e.isSr ? 'current_rails_pass' : 'current_mora'
|
||||
lodash.forEach(NoteData, (val) => {
|
||||
lodash.forEach(NoteData, val => {
|
||||
data.allPrimogems += val.month_data[Primogems]
|
||||
data.allMora += val.month_data[Mora]
|
||||
// 柱状图数据
|
||||
if (this.e.isSr)
|
||||
val.data_month = val.data_month.slice(-2, -1) == '0' ? val.data_month.slice(-1) : val.data_month.slice(-2)
|
||||
val.data_month =
|
||||
val.data_month.slice(-2, -1) == '0'
|
||||
? val.data_month.slice(-1)
|
||||
: val.data_month.slice(-2)
|
||||
|
||||
data.primogemsMonth.push({
|
||||
value: val.month_data[Primogems],
|
||||
|
@ -410,10 +503,14 @@ export default class Ledger extends base {
|
|||
return Number(item.year) * 100 + Number(item.month)
|
||||
})
|
||||
|
||||
let groupBy = lodash(NoteData).map('month_data').map('group_by').flatMap().value()
|
||||
let groupBy = lodash(NoteData)
|
||||
.map('month_data')
|
||||
.map('group_by')
|
||||
.flatMap()
|
||||
.value()
|
||||
|
||||
if (this.e.isSr)
|
||||
groupBy.forEach((item) => {
|
||||
groupBy.forEach(item => {
|
||||
item.action_id = this.action[item.action]
|
||||
item.action = item.action_name.slice(0, 4)
|
||||
})
|
||||
|
@ -431,13 +528,13 @@ export default class Ledger extends base {
|
|||
}
|
||||
}
|
||||
|
||||
pieData = lodash.flatMap(pieData, (item) => {
|
||||
pieData = lodash.flatMap(pieData, item => {
|
||||
return item
|
||||
})
|
||||
pieData = lodash.orderBy(pieData, ['num'], ['desc'])
|
||||
|
||||
data.color = []
|
||||
pieData.forEach((item) => {
|
||||
pieData.forEach(item => {
|
||||
data.color.push(this.color[item.action_id])
|
||||
})
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import base from './base.js'
|
||||
import lodash from 'lodash'
|
||||
import fs from 'node:fs'
|
||||
import {gsCfg} from 'yunzai/mys'
|
||||
import { gsCfg } from 'yunzai/mys'
|
||||
import moment from 'moment'
|
||||
import GachaLog from './gachaLog.js'
|
||||
|
||||
export default class LogCount extends base {
|
||||
constructor (e) {
|
||||
constructor(e) {
|
||||
super(e)
|
||||
this.model = 'logCount'
|
||||
|
||||
|
@ -26,7 +26,18 @@ export default class LogCount extends base {
|
|||
/** 五星角色 */
|
||||
this.role5 = ['刻晴', '莫娜', '七七', '迪卢克', '琴', '提纳里', '迪希雅']
|
||||
/** 五星武器 */
|
||||
this.weapon5 = ['阿莫斯之弓', '天空之翼', '天空之卷', '天空之脊', '天空之傲', '天空之刃', '四风原典', '和璞鸢', '狼的末路', '风鹰剑']
|
||||
this.weapon5 = [
|
||||
'阿莫斯之弓',
|
||||
'天空之翼',
|
||||
'天空之卷',
|
||||
'天空之脊',
|
||||
'天空之傲',
|
||||
'天空之刃',
|
||||
'四风原典',
|
||||
'和璞鸢',
|
||||
'狼的末路',
|
||||
'风鹰剑'
|
||||
]
|
||||
if (e.isSr) {
|
||||
/** 绑定的uid */
|
||||
this.uidKey = `Yz:srJson:mys:qq-uid:${this.userId}`
|
||||
|
@ -39,14 +50,30 @@ export default class LogCount extends base {
|
|||
{ type: 2, typeName: '新手' }
|
||||
]
|
||||
/** 五星角色 */
|
||||
this.role5 = ['姬子', '杰帕德', '彦卿', '白露', '瓦尔特', '克拉拉', '布洛妮娅']
|
||||
this.role5 = [
|
||||
'姬子',
|
||||
'杰帕德',
|
||||
'彦卿',
|
||||
'白露',
|
||||
'瓦尔特',
|
||||
'克拉拉',
|
||||
'布洛妮娅'
|
||||
]
|
||||
/** 五星武器 */
|
||||
this.weapon5 = ['银河铁道之夜', '无可取代的东西', '但战斗还未结束', '以世界之名', '制胜的瞬间', '如泥酣眠', '时节不居']
|
||||
this.weapon5 = [
|
||||
'银河铁道之夜',
|
||||
'无可取代的东西',
|
||||
'但战斗还未结束',
|
||||
'以世界之名',
|
||||
'制胜的瞬间',
|
||||
'如泥酣眠',
|
||||
'时节不居'
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
// 读取本地json
|
||||
readJson () {
|
||||
readJson() {
|
||||
let logJson = []
|
||||
let ids = []
|
||||
let file = `${this.path}/${this.uid}/${this.type}.json`
|
||||
|
@ -64,7 +91,7 @@ export default class LogCount extends base {
|
|||
}
|
||||
|
||||
/** #抽卡统计 */
|
||||
async count () {
|
||||
async count() {
|
||||
/** 卡池 */
|
||||
this.getPool()
|
||||
|
||||
|
@ -87,8 +114,11 @@ export default class LogCount extends base {
|
|||
}
|
||||
}
|
||||
|
||||
getPool () {
|
||||
let msg = this.e.msg.replace(/#|抽卡|记录|祈愿|分析|池|原神|星铁|崩坏星穹铁道|铁道|抽卡|统计|池/g, '')
|
||||
getPool() {
|
||||
let msg = this.e.msg.replace(
|
||||
/#|抽卡|记录|祈愿|分析|池|原神|星铁|崩坏星穹铁道|铁道|抽卡|统计|池/g,
|
||||
''
|
||||
)
|
||||
this.type = this.e.isSr ? 11 : 301
|
||||
this.typeName = '角色'
|
||||
switch (msg) {
|
||||
|
@ -122,22 +152,34 @@ export default class LogCount extends base {
|
|||
}
|
||||
}
|
||||
|
||||
async getUid () {
|
||||
async getUid() {
|
||||
if (!fs.existsSync(this.path)) {
|
||||
this.e.reply(`暂无抽卡记录\n${this.e?.isSr ? '*' : '#'}记录帮助,查看配置说明`, false, { at: true })
|
||||
this.e.reply(
|
||||
`暂无抽卡记录\n${this.e?.isSr ? '*' : '#'}记录帮助,查看配置说明`,
|
||||
false,
|
||||
{ at: true }
|
||||
)
|
||||
return false
|
||||
}
|
||||
|
||||
let logs = fs.readdirSync(this.path)
|
||||
|
||||
if (lodash.isEmpty(logs)) {
|
||||
this.e.reply(`暂无抽卡记录\n${this.e?.isSr ? '*' : '#'}记录帮助,查看配置说明`, false, { at: true })
|
||||
this.e.reply(
|
||||
`暂无抽卡记录\n${this.e?.isSr ? '*' : '#'}记录帮助,查看配置说明`,
|
||||
false,
|
||||
{ at: true }
|
||||
)
|
||||
return false
|
||||
}
|
||||
|
||||
if (!this.uid) {
|
||||
this.e.at = false
|
||||
this.uid = this?.e?.isSr ? this.e.user?._games?.sr?.uid : this.e.user?._games?.gs?.uid || await this.e.runtime.getUid(this.e) || await redis.get(this.uidKey)
|
||||
this.uid = this?.e?.isSr
|
||||
? this.e.user?._games?.sr?.uid
|
||||
: this.e.user?._games?.gs?.uid ||
|
||||
(await this.e.runtime.getUid(this.e)) ||
|
||||
(await redis.get(this.uidKey))
|
||||
}
|
||||
|
||||
/** 记录有绑定的uid */
|
||||
|
@ -172,7 +214,7 @@ export default class LogCount extends base {
|
|||
return uidArr[0].uid
|
||||
}
|
||||
|
||||
getPoolCfg () {
|
||||
getPoolCfg() {
|
||||
let poolCfg = gsCfg.getdefSet('pool', this.type)
|
||||
|
||||
poolCfg.forEach(v => {
|
||||
|
@ -184,7 +226,7 @@ export default class LogCount extends base {
|
|||
}
|
||||
|
||||
/** 统计计算记录 */
|
||||
analyseHistory () {
|
||||
analyseHistory() {
|
||||
let all = this.readJson().list
|
||||
let game = this.e?.game
|
||||
|
||||
|
@ -216,8 +258,12 @@ export default class LogCount extends base {
|
|||
list: [],
|
||||
name: poolCfg[i].name,
|
||||
five: poolCfg[i].five,
|
||||
start: moment(poolCfg[i].from, 'YYYY-MM-DD HH:mm:ss').format('YYYY-MM-DD'),
|
||||
end: moment(poolCfg[i].to, 'YYYY-MM-DD HH:mm:ss').format('YYYY-MM-DD')
|
||||
start: moment(poolCfg[i].from, 'YYYY-MM-DD HH:mm:ss').format(
|
||||
'YYYY-MM-DD'
|
||||
),
|
||||
end: moment(poolCfg[i].to, 'YYYY-MM-DD HH:mm:ss').format(
|
||||
'YYYY-MM-DD'
|
||||
)
|
||||
}
|
||||
} else {
|
||||
pool[poolCfg[i].start].count++
|
||||
|
@ -273,9 +319,7 @@ export default class LogCount extends base {
|
|||
line++
|
||||
pool[i].role = {}
|
||||
|
||||
pool[i].five = pool[i].five
|
||||
.map((v) => sortName[v] ?? v)
|
||||
.join('、')
|
||||
pool[i].five = pool[i].five.map(v => sortName[v] ?? v).join('、')
|
||||
for (let val of pool[i].list) {
|
||||
if (!pool[i].role[val.name]) {
|
||||
pool[i].role[val.name] = {
|
||||
|
@ -293,14 +337,18 @@ export default class LogCount extends base {
|
|||
|
||||
// 排序
|
||||
for (let j in pool[i].role) {
|
||||
let sort = (pool[i].role[j].rank_type - 3) * 1000 + pool[i].role[j].count
|
||||
let sort =
|
||||
(pool[i].role[j].rank_type - 3) * 1000 + pool[i].role[j].count
|
||||
if (this.role5.includes(pool[i].role[j].name)) {
|
||||
sort--
|
||||
}
|
||||
if (this.weapon5.includes(pool[i].role[j].name)) {
|
||||
sort--
|
||||
}
|
||||
if (pool[i].role[j].item_type == '角色' && pool[i].role[j].rank_type == 5) {
|
||||
if (
|
||||
pool[i].role[j].item_type == '角色' &&
|
||||
pool[i].role[j].rank_type == 5
|
||||
) {
|
||||
sort += 1000
|
||||
}
|
||||
pool[i].role[j].sort = sort
|
||||
|
|
311
model/mysNews.ts
311
model/mysNews.ts
|
@ -2,12 +2,12 @@ import base from './base.js'
|
|||
import fetch from 'node-fetch'
|
||||
import lodash from 'lodash'
|
||||
|
||||
import {puppeteer} from 'yunzai/utils'
|
||||
import { puppeteer } from 'yunzai/utils'
|
||||
import * as common from 'yunzai/core'
|
||||
|
||||
import { sleep } from 'yunzai/utils'
|
||||
|
||||
import { gsCfg} from 'yunzai/mys'
|
||||
import { gsCfg } from 'yunzai/mys'
|
||||
import YAML from 'yaml'
|
||||
import fs from 'fs'
|
||||
|
||||
|
@ -31,7 +31,11 @@ export default class MysNews extends base {
|
|||
typeName = '活动'
|
||||
}
|
||||
|
||||
const res = await this.postData('getNewsList', { gids: gid, page_size: this.e.msg.includes('列表') ? 5 : 20, type })
|
||||
const res = await this.postData('getNewsList', {
|
||||
gids: gid,
|
||||
page_size: this.e.msg.includes('列表') ? 5 : 20,
|
||||
type
|
||||
})
|
||||
if (!res) return
|
||||
|
||||
const data = res.data.list
|
||||
|
@ -44,7 +48,9 @@ export default class MysNews extends base {
|
|||
if (this.e.msg.includes('列表')) {
|
||||
this.model = 'mysNews-list'
|
||||
data.forEach(element => {
|
||||
element.post.created_at = new Date(element.post.created_at * 1000).toLocaleString()
|
||||
element.post.created_at = new Date(
|
||||
element.post.created_at * 1000
|
||||
).toLocaleString()
|
||||
})
|
||||
|
||||
param = {
|
||||
|
@ -54,9 +60,14 @@ export default class MysNews extends base {
|
|||
game,
|
||||
typeName
|
||||
}
|
||||
|
||||
} else {
|
||||
const page = this.e.msg.replace(/#|#|官方|星铁|原神|崩坏三|崩三|绝区零|崩坏二|崩二|崩坏学园二|未定|未定事件簿|公告|资讯|活动/g, '').trim() || 1
|
||||
const page =
|
||||
this.e.msg
|
||||
.replace(
|
||||
/#|#|官方|星铁|原神|崩坏三|崩三|绝区零|崩坏二|崩二|崩坏学园二|未定|未定事件簿|公告|资讯|活动/g,
|
||||
''
|
||||
)
|
||||
.trim() || 1
|
||||
if (page > data.length) {
|
||||
await this.e.reply('目前只查前20条最新的公告,请输入1-20之间的整数。')
|
||||
return true
|
||||
|
@ -68,7 +79,10 @@ export default class MysNews extends base {
|
|||
}
|
||||
|
||||
const img = await this.render(param)
|
||||
return this.replyMsg(img, `${game}${typeName}:${param?.data?.post?.subject || `米游社${game}${typeName}列表`}`)
|
||||
return this.replyMsg(
|
||||
img,
|
||||
`${game}${typeName}:${param?.data?.post?.subject || `米游社${game}${typeName}列表`}`
|
||||
)
|
||||
}
|
||||
|
||||
render(param) {
|
||||
|
@ -76,7 +90,11 @@ export default class MysNews extends base {
|
|||
}
|
||||
|
||||
async newsDetail(postId, gid) {
|
||||
const res = await this.postData('getPostFull', { gids: gid, read: 1, post_id: postId })
|
||||
const res = await this.postData('getPostFull', {
|
||||
gids: gid,
|
||||
read: 1,
|
||||
post_id: postId
|
||||
})
|
||||
if (!res) return
|
||||
|
||||
const data = await this.detalData(res.data.post, gid)
|
||||
|
@ -100,7 +118,8 @@ export default class MysNews extends base {
|
|||
host = 'https://bbs-api.miyoushe.com/post/wapi/searchPosts?'
|
||||
break
|
||||
case 'userInstantSearchPosts':
|
||||
host = 'https://bbs-api.miyoushe.com/painter/api/user_instant/search/list?'
|
||||
host =
|
||||
'https://bbs-api.miyoushe.com/painter/api/user_instant/search/list?'
|
||||
break
|
||||
// 帖子详情
|
||||
case 'getPostFull':
|
||||
|
@ -120,8 +139,9 @@ export default class MysNews extends base {
|
|||
async postData(type, data) {
|
||||
const url = this.postApi(type, data)
|
||||
const headers = {
|
||||
Referer: 'https://www.miyoushe.com',
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36'
|
||||
'Referer': 'https://www.miyoushe.com',
|
||||
'User-Agent':
|
||||
'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36'
|
||||
}
|
||||
let response
|
||||
try {
|
||||
|
@ -132,7 +152,9 @@ export default class MysNews extends base {
|
|||
}
|
||||
|
||||
if (!response.ok) {
|
||||
logger.error(`[米游社接口错误][${type}] ${response.status} ${response.statusText}`)
|
||||
logger.error(
|
||||
`[米游社接口错误][${type}] ${response.status} ${response.statusText}`
|
||||
)
|
||||
return false
|
||||
}
|
||||
const res = await response.json()
|
||||
|
@ -143,9 +165,7 @@ export default class MysNews extends base {
|
|||
let json
|
||||
try {
|
||||
json = JSON.parse(data.post.content)
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
} catch (error) {}
|
||||
|
||||
if (typeof json == 'object') {
|
||||
if (json.imgs && json.imgs.length > 0) {
|
||||
|
@ -155,32 +175,47 @@ export default class MysNews extends base {
|
|||
}
|
||||
} else {
|
||||
for (const img of data.post.images) {
|
||||
data.post.content = data.post.content.replace(img, img + '?x-oss-process=image//resize,s_600/quality,q_80/auto-orient,0/interlace,1/format,jpg')
|
||||
data.post.content = data.post.content.replace(
|
||||
img,
|
||||
img +
|
||||
'?x-oss-process=image//resize,s_600/quality,q_80/auto-orient,0/interlace,1/format,jpg'
|
||||
)
|
||||
}
|
||||
|
||||
if (!emoticon) {
|
||||
emoticon = await this.mysEmoticon(gid)
|
||||
}
|
||||
|
||||
data.post.content = data.post.content.replace(/_\([^)]*\)/g, function (t, e) {
|
||||
t = t.replace(/_\(|\)/g, '')
|
||||
if (emoticon.has(t)) {
|
||||
return `<img class="emoticon-image" src="${emoticon.get(t)}"/>`
|
||||
} else {
|
||||
return ''
|
||||
data.post.content = data.post.content.replace(
|
||||
/_\([^)]*\)/g,
|
||||
function (t, e) {
|
||||
t = t.replace(/_\(|\)/g, '')
|
||||
if (emoticon.has(t)) {
|
||||
return `<img class="emoticon-image" src="${emoticon.get(t)}"/>`
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
})
|
||||
)
|
||||
|
||||
const arrEntities = { lt: '<', gt: '>', nbsp: ' ', amp: '&', quot: '"' }
|
||||
data.post.content = data.post.content.replace(/&(lt|gt|nbsp|amp|quot);/ig, function (all, t) {
|
||||
return arrEntities[t]
|
||||
})
|
||||
data.post.content = data.post.content.replace(
|
||||
/&(lt|gt|nbsp|amp|quot);/gi,
|
||||
function (all, t) {
|
||||
return arrEntities[t]
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
data.post.created_time = new Date(data.post.created_at * 1000).toLocaleString()
|
||||
data.post.created_time = new Date(
|
||||
data.post.created_at * 1000
|
||||
).toLocaleString()
|
||||
|
||||
for (const i in data.stat) {
|
||||
data.stat[i] = data.stat[i] > 10000 ? (data.stat[i] / 10000).toFixed(2) + '万' : data.stat[i]
|
||||
data.stat[i] =
|
||||
data.stat[i] > 10000
|
||||
? (data.stat[i] / 10000).toFixed(2) + '万'
|
||||
: data.stat[i]
|
||||
}
|
||||
|
||||
return data
|
||||
|
@ -222,7 +257,11 @@ export default class MysNews extends base {
|
|||
|
||||
msg = lodash.trim(msg, page)
|
||||
|
||||
let res = await this.postData('searchPosts', { gids: 2, size: 20, keyword: msg })
|
||||
let res = await this.postData('searchPosts', {
|
||||
gids: 2,
|
||||
size: 20,
|
||||
keyword: msg
|
||||
})
|
||||
if (!res) return
|
||||
|
||||
if (res?.data?.posts.length <= 0) {
|
||||
|
@ -253,7 +292,13 @@ export default class MysNews extends base {
|
|||
}
|
||||
|
||||
async mysEstimate(keyword, uid) {
|
||||
let res = await this.postData('userInstantSearchPosts', { keyword, uid, size: 20, offset: 0, sort_type: 2 })
|
||||
let res = await this.postData('userInstantSearchPosts', {
|
||||
keyword,
|
||||
uid,
|
||||
size: 20,
|
||||
offset: 0,
|
||||
sort_type: 2
|
||||
})
|
||||
let postList = res?.data?.list
|
||||
if (postList.length <= 0) {
|
||||
await this.e.reply('暂无数据')
|
||||
|
@ -270,7 +315,12 @@ export default class MysNews extends base {
|
|||
const img = await this.render(param)
|
||||
|
||||
if (img.length > 1) {
|
||||
img.push(segment.image(param.data.post.images[0] + '?x-oss-process=image//resize,s_600/quality,q_80/auto-orient,0/interlace,1/format,jpg'))
|
||||
img.push(
|
||||
segment.image(
|
||||
param.data.post.images[0] +
|
||||
'?x-oss-process=image//resize,s_600/quality,q_80/auto-orient,0/interlace,1/format,jpg'
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
return this.replyMsg(img, `${param.data.post.subject}`)
|
||||
|
@ -292,16 +342,41 @@ export default class MysNews extends base {
|
|||
this.maxNum = cfg.maxNum
|
||||
|
||||
for (let gid of [1, 2, 3, 4, 6, 8]) {
|
||||
let type = gid == 1 ? 'bbb' : gid == 2 ? 'gs' : gid == 3 ? 'bb' : gid == 4 ? 'wd' : gid == 6 ? 'sr' : 'zzz'
|
||||
let type =
|
||||
gid == 1
|
||||
? 'bbb'
|
||||
: gid == 2
|
||||
? 'gs'
|
||||
: gid == 3
|
||||
? 'bb'
|
||||
: gid == 4
|
||||
? 'wd'
|
||||
: gid == 6
|
||||
? 'sr'
|
||||
: 'zzz'
|
||||
|
||||
let news = []
|
||||
if (!lodash.isEmpty(cfg[`${type}announceGroup`])) {
|
||||
let anno = await this.postData('getNewsList', { gids: gid, page_size: 10, type: 1 })
|
||||
if (anno) anno.data.list.forEach(v => { news.push({ ...v, typeName: '公告', post_id: v.post.post_id }) })
|
||||
let anno = await this.postData('getNewsList', {
|
||||
gids: gid,
|
||||
page_size: 10,
|
||||
type: 1
|
||||
})
|
||||
if (anno)
|
||||
anno.data.list.forEach(v => {
|
||||
news.push({ ...v, typeName: '公告', post_id: v.post.post_id })
|
||||
})
|
||||
}
|
||||
if (!lodash.isEmpty(cfg[`${type}infoGroup`])) {
|
||||
let info = await this.postData('getNewsList', { gids: gid, page_size: 10, type: 3 })
|
||||
if (info) info.data.list.forEach(v => { news.push({ ...v, typeName: '资讯', post_id: v.post.post_id }) })
|
||||
let info = await this.postData('getNewsList', {
|
||||
gids: gid,
|
||||
page_size: 10,
|
||||
type: 3
|
||||
})
|
||||
if (info)
|
||||
info.data.list.forEach(v => {
|
||||
news.push({ ...v, typeName: '资讯', post_id: v.post.post_id })
|
||||
})
|
||||
}
|
||||
|
||||
if (news.length <= 0) continue
|
||||
|
@ -314,36 +389,61 @@ export default class MysNews extends base {
|
|||
this.e.isGroup = true
|
||||
this.pushGroup = []
|
||||
for (let val of news) {
|
||||
if (Number(now - val.post.created_at) > interval)
|
||||
continue
|
||||
if (cfg.banWord[type] && new RegExp(cfg.banWord[type]).test(val.post.subject))
|
||||
if (Number(now - val.post.created_at) > interval) continue
|
||||
if (
|
||||
cfg.banWord[type] &&
|
||||
new RegExp(cfg.banWord[type]).test(val.post.subject)
|
||||
)
|
||||
continue
|
||||
if (val.typeName == '公告')
|
||||
for (let botId in cfg[`${type}announceGroup`])
|
||||
for (let groupId of cfg[`${type}announceGroup`][botId])
|
||||
await this.sendNews(botId, groupId, val.typeName, val.post.post_id, gid)
|
||||
await this.sendNews(
|
||||
botId,
|
||||
groupId,
|
||||
val.typeName,
|
||||
val.post.post_id,
|
||||
gid
|
||||
)
|
||||
if (val.typeName == '资讯')
|
||||
for (let botId in cfg[`${type}infoGroup`])
|
||||
for (let groupId of cfg[`${type}infoGroup`][botId])
|
||||
await this.sendNews(botId, groupId, val.typeName, val.post.post_id, gid)
|
||||
await this.sendNews(
|
||||
botId,
|
||||
groupId,
|
||||
val.typeName,
|
||||
val.post.post_id,
|
||||
gid
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async ActivityPush() {
|
||||
let now = new Date()
|
||||
now = now.getHours();
|
||||
if(now < 10) return
|
||||
now = now.getHours()
|
||||
if (now < 10) return
|
||||
let pushGroupList
|
||||
try {
|
||||
pushGroupList = YAML.parse(fs.readFileSync(`./plugins/genshin/config/mys.pushNews.yaml`, `utf8`))
|
||||
pushGroupList = YAML.parse(
|
||||
fs.readFileSync(`./plugins/genshin/config/mys.pushNews.yaml`, `utf8`)
|
||||
)
|
||||
} catch (error) {
|
||||
logger.error(`[米游社活动到期推送] 活动到期预警推送失败:无法获取配置文件信息\n${error}`)
|
||||
logger.error(
|
||||
`[米游社活动到期推送] 活动到期预警推送失败:无法获取配置文件信息\n${error}`
|
||||
)
|
||||
return
|
||||
}
|
||||
if((!pushGroupList.gsActivityPush || pushGroupList.gsActivityPush == {}) && (!pushGroupList.srActivityPush || pushGroupList.srActivityPush == {})) return
|
||||
if (
|
||||
(!pushGroupList.gsActivityPush || pushGroupList.gsActivityPush == {}) &&
|
||||
(!pushGroupList.srActivityPush || pushGroupList.srActivityPush == {})
|
||||
)
|
||||
return
|
||||
let BotidList = []
|
||||
let ActivityPushYaml = {...pushGroupList.gsActivityPush, ...pushGroupList.srActivityPush}
|
||||
let ActivityPushYaml = {
|
||||
...pushGroupList.gsActivityPush,
|
||||
...pushGroupList.srActivityPush
|
||||
}
|
||||
for (let item in ActivityPushYaml) {
|
||||
BotidList.push(item)
|
||||
}
|
||||
|
@ -351,34 +451,66 @@ export default class MysNews extends base {
|
|||
let srActivityList = await this.getSrActivity()
|
||||
let ActivityList = []
|
||||
for (let item of srActivityList) {
|
||||
ActivityList.push({ game: `sr`, subtitle: item.title, banner: item.img, title: item.title, end_time: item.end_time })
|
||||
ActivityList.push({
|
||||
game: `sr`,
|
||||
subtitle: item.title,
|
||||
banner: item.img,
|
||||
title: item.title,
|
||||
end_time: item.end_time
|
||||
})
|
||||
}
|
||||
for (let item of gsActivityList) {
|
||||
ActivityList.push({ game: 'gs', subtitle: item.subtitle, banner: item.banner, title: item.title, end_time: item.end_time})
|
||||
ActivityList.push({
|
||||
game: 'gs',
|
||||
subtitle: item.subtitle,
|
||||
banner: item.banner,
|
||||
title: item.title,
|
||||
end_time: item.end_time
|
||||
})
|
||||
}
|
||||
if(ActivityList.length === 0) return
|
||||
if (ActivityList.length === 0) return
|
||||
for (let item of BotidList) {
|
||||
let redisapgl = await redis.get(`Yz:apgl:${item}`)
|
||||
let date = await this.getDate()
|
||||
redisapgl = JSON.parse(redisapgl)
|
||||
if(!redisapgl || redisapgl.date !== date) {
|
||||
if (!redisapgl || redisapgl.date !== date) {
|
||||
redisapgl = {
|
||||
date,
|
||||
GroupList: ActivityPushYaml[item]
|
||||
}
|
||||
}
|
||||
if(!Array.isArray(redisapgl.GroupList) || redisapgl.GroupList.length == 0) continue
|
||||
if(!Bot[item]) {
|
||||
if (
|
||||
!Array.isArray(redisapgl.GroupList) ||
|
||||
redisapgl.GroupList.length == 0
|
||||
)
|
||||
continue
|
||||
if (!Bot[item]) {
|
||||
redisapgl.GroupList.shift()
|
||||
await redis.set(`Yz:apgl:${item}`, JSON.stringify(redisapgl))
|
||||
continue
|
||||
}
|
||||
for (let a of ActivityList) {
|
||||
if((!pushGroupList.srActivityPush || !pushGroupList.srActivityPush[item] || !pushGroupList.srActivityPush[item].includes(redisapgl.GroupList[0])) && a.game === `sr`) continue
|
||||
if((!pushGroupList.gsActivityPush || !pushGroupList.gsActivityPush[item] || !pushGroupList.gsActivityPush[item].includes(redisapgl.GroupList[0])) && a.game === `gs`) continue
|
||||
if (
|
||||
(!pushGroupList.srActivityPush ||
|
||||
!pushGroupList.srActivityPush[item] ||
|
||||
!pushGroupList.srActivityPush[item].includes(
|
||||
redisapgl.GroupList[0]
|
||||
)) &&
|
||||
a.game === `sr`
|
||||
)
|
||||
continue
|
||||
if (
|
||||
(!pushGroupList.gsActivityPush ||
|
||||
!pushGroupList.gsActivityPush[item] ||
|
||||
!pushGroupList.gsActivityPush[item].includes(
|
||||
redisapgl.GroupList[0]
|
||||
)) &&
|
||||
a.game === `gs`
|
||||
)
|
||||
continue
|
||||
let pushGame
|
||||
if(a.game === `sr`) pushGame = `星铁`
|
||||
if(a.game === `gs`) pushGame = `原神`
|
||||
if (a.game === `sr`) pushGame = `星铁`
|
||||
if (a.game === `gs`) pushGame = `原神`
|
||||
let endDt = a.end_time
|
||||
endDt = endDt.replace(/\s/, `T`)
|
||||
let todayt = new Date()
|
||||
|
@ -392,10 +524,19 @@ export default class MysNews extends base {
|
|||
`\n活动剩余时间:${sydate.days}天${sydate.hours}小时${sydate.minutes}分钟${sydate.seconds}秒`,
|
||||
`\n活动结束时间:${a.end_time}`
|
||||
]
|
||||
logger.mark(`[米游社活动到期推送] 开始推送 ${item}:${redisapgl.GroupList[0]} ${a.subtitle}`)
|
||||
logger.mark(
|
||||
`[米游社活动到期推送] 开始推送 ${item}:${redisapgl.GroupList[0]} ${a.subtitle}`
|
||||
)
|
||||
await sleep(5000)
|
||||
Bot[item].pickGroup(redisapgl.GroupList[0]).sendMsg(msgList)
|
||||
.then(() => {}).catch((err) => logger.error(`[米游社活动到期推送] ${item}:${redisapgl.GroupList[0]} 推送失败,错误信息${err}`))
|
||||
Bot[item]
|
||||
.pickGroup(redisapgl.GroupList[0])
|
||||
.sendMsg(msgList)
|
||||
.then(() => {})
|
||||
.catch(err =>
|
||||
logger.error(
|
||||
`[米游社活动到期推送] ${item}:${redisapgl.GroupList[0]} 推送失败,错误信息${err}`
|
||||
)
|
||||
)
|
||||
}
|
||||
redisapgl.GroupList.shift()
|
||||
await redis.set(`Yz:apgl:${item}`, JSON.stringify(redisapgl))
|
||||
|
@ -403,16 +544,18 @@ export default class MysNews extends base {
|
|||
return
|
||||
}
|
||||
async getDate() {
|
||||
const currentDate = new Date();
|
||||
const year = currentDate.getFullYear();
|
||||
const month = (currentDate.getMonth() + 1).toString().padStart(2, '0');
|
||||
const day = currentDate.getDate().toString().padStart(2, '0');
|
||||
const currentDate = new Date()
|
||||
const year = currentDate.getFullYear()
|
||||
const month = (currentDate.getMonth() + 1).toString().padStart(2, '0')
|
||||
const day = currentDate.getDate().toString().padStart(2, '0')
|
||||
return `${year}-${month}-${day}`
|
||||
}
|
||||
async getGsActivity() {
|
||||
let gshd
|
||||
try {
|
||||
gshd = await fetch(`https://hk4e-api.mihoyo.com/common/hk4e_cn/announcement/api/getAnnList?game=hk4e&game_biz=hk4e_cn&lang=zh-cn&bundle_id=hk4e_cn&platform=pc®ion=cn_gf01&level=55&uid=100000000`)
|
||||
gshd = await fetch(
|
||||
`https://hk4e-api.mihoyo.com/common/hk4e_cn/announcement/api/getAnnList?game=hk4e&game_biz=hk4e_cn&lang=zh-cn&bundle_id=hk4e_cn&platform=pc®ion=cn_gf01&level=55&uid=100000000`
|
||||
)
|
||||
gshd = await gshd.json()
|
||||
} catch {
|
||||
return []
|
||||
|
@ -420,7 +563,12 @@ export default class MysNews extends base {
|
|||
let hdlist = []
|
||||
let result = []
|
||||
for (let item of gshd.data.list[1].list) {
|
||||
if(item.tag_label.includes(`活动`) && !item.title.includes(`传说任务`) && !item.title.includes(`游戏公告`)) hdlist.push(item)
|
||||
if (
|
||||
item.tag_label.includes(`活动`) &&
|
||||
!item.title.includes(`传说任务`) &&
|
||||
!item.title.includes(`游戏公告`)
|
||||
)
|
||||
hdlist.push(item)
|
||||
}
|
||||
for (let item of hdlist) {
|
||||
let endDt = item.end_time
|
||||
|
@ -428,14 +576,16 @@ export default class MysNews extends base {
|
|||
let todayt = new Date()
|
||||
endDt = new Date(endDt)
|
||||
let sydate = await this.calculateRemainingTime(todayt, endDt)
|
||||
if(sydate.days <= 1) result.push(item)
|
||||
if (sydate.days <= 1) result.push(item)
|
||||
}
|
||||
return result
|
||||
}
|
||||
async getSrActivity() {
|
||||
let srhd
|
||||
try {
|
||||
srhd = await fetch(`https://hkrpg-api.mihoyo.com/common/hkrpg_cn/announcement/api/getAnnList?game=hkrpg&game_biz=hkrpg_cn&lang=zh-cn&auth_appid=announcement&authkey_ver=1&bundle_id=hkrpg_cn&channel_id=1&level=65&platform=pc®ion=prod_gf_cn&sdk_presentation_style=fullscreen&sdk_screen_transparent=true&sign_type=2&uid=100000000`)
|
||||
srhd = await fetch(
|
||||
`https://hkrpg-api.mihoyo.com/common/hkrpg_cn/announcement/api/getAnnList?game=hkrpg&game_biz=hkrpg_cn&lang=zh-cn&auth_appid=announcement&authkey_ver=1&bundle_id=hkrpg_cn&channel_id=1&level=65&platform=pc®ion=prod_gf_cn&sdk_presentation_style=fullscreen&sdk_screen_transparent=true&sign_type=2&uid=100000000`
|
||||
)
|
||||
srhd = await srhd.json()
|
||||
} catch {
|
||||
return []
|
||||
|
@ -456,14 +606,16 @@ export default class MysNews extends base {
|
|||
return result
|
||||
}
|
||||
async calculateRemainingTime(startDate, endDate) {
|
||||
const difference = endDate - startDate;
|
||||
const difference = endDate - startDate
|
||||
|
||||
const days = Math.floor(difference / (1000 * 60 * 60 * 24));
|
||||
const hours = Math.floor((difference % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
||||
const minutes = Math.floor((difference % (1000 * 60 * 60)) / (1000 * 60));
|
||||
const seconds = Math.floor((difference % (1000 * 60)) / 1000);
|
||||
const days = Math.floor(difference / (1000 * 60 * 60 * 24))
|
||||
const hours = Math.floor(
|
||||
(difference % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)
|
||||
)
|
||||
const minutes = Math.floor((difference % (1000 * 60 * 60)) / (1000 * 60))
|
||||
const seconds = Math.floor((difference % (1000 * 60)) / 1000)
|
||||
|
||||
return { days, hours, minutes, seconds };
|
||||
return { days, hours, minutes, seconds }
|
||||
}
|
||||
async sendNews(botId, groupId, typeName, postId, gid) {
|
||||
if (!this.pushGroup[groupId]) this.pushGroup[groupId] = 0
|
||||
|
@ -492,10 +644,15 @@ export default class MysNews extends base {
|
|||
}
|
||||
|
||||
this.pushGroup[groupId]++
|
||||
await redis.set(`${this.key}${botId}:${groupId}:${postId}`, '1', { EX: 3600 * 10 })
|
||||
await redis.set(`${this.key}${botId}:${groupId}:${postId}`, '1', {
|
||||
EX: 3600 * 10
|
||||
})
|
||||
// 随机延迟10-90秒
|
||||
await sleep(lodash.random(10000, 90000))
|
||||
const msg = await this.replyMsg(this[postId].img, `${game}${typeName}推送:${this[postId].title}`)
|
||||
const msg = await this.replyMsg(
|
||||
this[postId].img,
|
||||
`${game}${typeName}推送:${this[postId].title}`
|
||||
)
|
||||
return this.e.group.sendMsg(msg)
|
||||
}
|
||||
|
||||
|
@ -516,4 +673,4 @@ export default class MysNews extends base {
|
|||
}
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,26 +2,25 @@ import moment from 'moment'
|
|||
import lodash from 'lodash'
|
||||
import base from './base.js'
|
||||
|
||||
import { MysInfo, } from 'yunzai/mys'
|
||||
|
||||
import { MysInfo } from 'yunzai/mys'
|
||||
|
||||
// tudo
|
||||
|
||||
import { Character } from '#miao.models'
|
||||
|
||||
export default class Note extends base {
|
||||
constructor (e) {
|
||||
constructor(e) {
|
||||
super(e)
|
||||
this.model = 'dailyNote'
|
||||
}
|
||||
|
||||
/** 生成体力图片 */
|
||||
static async get (e) {
|
||||
static async get(e) {
|
||||
let note = new Note(e)
|
||||
return await note.getData()
|
||||
}
|
||||
|
||||
async getData () {
|
||||
async getData() {
|
||||
let device_fp = await MysInfo.get(this.e, 'getFp')
|
||||
let headers = { 'x-rpc-device_fp': device_fp?.data?.device_fp }
|
||||
|
||||
|
@ -47,7 +46,7 @@ export default class Note extends base {
|
|||
}
|
||||
}
|
||||
|
||||
noteSr (res) {
|
||||
noteSr(res) {
|
||||
let { data } = res
|
||||
let nowDay = moment().date()
|
||||
let nowUnix = Number(moment().format('X'))
|
||||
|
@ -62,7 +61,8 @@ export default class Note extends base {
|
|||
resinMaxTime = hours + '小时' + minutes + '分钟' + seconds + '秒'
|
||||
// 精确到秒。。。。
|
||||
if (day > 0) {
|
||||
resinMaxTime = day + '天' + hours + '小时' + minutes + '分钟' + seconds + '秒'
|
||||
resinMaxTime =
|
||||
day + '天' + hours + '小时' + minutes + '分钟' + seconds + '秒'
|
||||
} else if (hours > 0) {
|
||||
resinMaxTime = hours + '小时' + minutes + '分钟' + seconds + '秒'
|
||||
} else if (minutes > 0) {
|
||||
|
@ -70,7 +70,7 @@ export default class Note extends base {
|
|||
} else if (seconds > 0) {
|
||||
resinMaxTime = seconds + '秒'
|
||||
}
|
||||
if ((day > 0) || (hours > 0) || (seconds > 0)) {
|
||||
if (day > 0 || hours > 0 || seconds > 0) {
|
||||
let total_seconds = 3600 * hours + 60 * minutes + seconds
|
||||
const now = new Date()
|
||||
const dateTimes = now.getTime() + total_seconds * 1000
|
||||
|
@ -85,21 +85,36 @@ export default class Note extends base {
|
|||
resinMaxTime += recoverTimeStr
|
||||
}
|
||||
}
|
||||
data.bfStamina = data.current_stamina / data.max_stamina * 100 + '%'
|
||||
data.bfStamina = (data.current_stamina / data.max_stamina) * 100 + '%'
|
||||
/** 派遣 */
|
||||
for (let item of data.expeditions) {
|
||||
let d = moment.duration(item.remaining_time, 'seconds')
|
||||
let day = Math.floor(d.asDays())
|
||||
let hours = d.hours()
|
||||
let minutes = d.minutes()
|
||||
item.dateTime = ([day + '天', hours + '时', minutes + '分'].filter(v => !['0天', '0时', '0分'].includes(v))).join('')
|
||||
item.bfTime = (72000 - item.remaining_time) / 72000 * 100 + '%'
|
||||
item.dateTime = [day + '天', hours + '时', minutes + '分']
|
||||
.filter(v => !['0天', '0时', '0分'].includes(v))
|
||||
.join('')
|
||||
item.bfTime = ((72000 - item.remaining_time) / 72000) * 100 + '%'
|
||||
if (item.avatars.length == 1) {
|
||||
item.avatars.push('派遣头像')
|
||||
}
|
||||
}
|
||||
// 标识属性图标~
|
||||
let iconChar = lodash.sample(['希儿', '白露', '艾丝妲', '布洛妮娅', '姬子', '卡芙卡', '克拉拉', '停云', '佩拉', '黑塔', '希露瓦', '银狼'])
|
||||
let iconChar = lodash.sample([
|
||||
'希儿',
|
||||
'白露',
|
||||
'艾丝妲',
|
||||
'布洛妮娅',
|
||||
'姬子',
|
||||
'卡芙卡',
|
||||
'克拉拉',
|
||||
'停云',
|
||||
'佩拉',
|
||||
'黑塔',
|
||||
'希露瓦',
|
||||
'银狼'
|
||||
])
|
||||
let char = Character.get(iconChar, 'gs')
|
||||
let week = [
|
||||
'星期日',
|
||||
|
@ -122,7 +137,7 @@ export default class Note extends base {
|
|||
}
|
||||
}
|
||||
|
||||
noteData (res) {
|
||||
noteData(res) {
|
||||
let { data } = res
|
||||
|
||||
let nowDay = moment().date()
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
import {puppeteer} from 'yunzai/utils'
|
||||
import { puppeteer } from 'yunzai/utils'
|
||||
import fetch from 'node-fetch'
|
||||
import moment from 'moment'
|
||||
import moment from 'moment'
|
||||
import fs from 'fs'
|
||||
import base from './base.js'
|
||||
|
||||
|
@ -10,7 +9,7 @@ if (!fs.existsSync('./data/payLog/')) {
|
|||
}
|
||||
|
||||
export class PayData {
|
||||
constructor (authKey = '') {
|
||||
constructor(authKey = '') {
|
||||
this.#authkey = encodeURIComponent(authKey)
|
||||
}
|
||||
|
||||
|
@ -19,7 +18,7 @@ export class PayData {
|
|||
#authkey = ''
|
||||
|
||||
/** 获取原始支付数据 */
|
||||
async getOringinalData (id = '') {
|
||||
async getOringinalData(id = '') {
|
||||
let res = await fetch(this.getUrl() + id, this.headers)
|
||||
let ret = await res.json()
|
||||
let check = this.checkResult(ret)
|
||||
|
@ -40,7 +39,7 @@ export class PayData {
|
|||
}
|
||||
|
||||
/** 获取大月卡数据 */
|
||||
async getPrimogemLog (id = '') {
|
||||
async getPrimogemLog(id = '') {
|
||||
let res = await fetch(this.getUrl('getPrimogemLog') + id, this.headers)
|
||||
let ret = await res.json()
|
||||
let check = this.checkResult(ret)
|
||||
|
@ -73,21 +72,25 @@ export class PayData {
|
|||
if (data?.uid) {
|
||||
return data
|
||||
}
|
||||
return {errorMsg: '获取失败,可能是链接已过期或不正确'}
|
||||
return { errorMsg: '获取失败,可能是链接已过期或不正确' }
|
||||
}
|
||||
|
||||
checkResult(ret) {
|
||||
if (ret?.retcode === -101 || ret?.retcode === -100) {
|
||||
return ret.retcode === -101 ? {errorMsg: '您的链接过期,请重新获取'} : {errorMsg: '链接不正确,请重新获取'}
|
||||
return ret.retcode === -101
|
||||
? { errorMsg: '您的链接过期,请重新获取' }
|
||||
: { errorMsg: '链接不正确,请重新获取' }
|
||||
}
|
||||
if (/unknown auth appid/.test(ret?.message)) {
|
||||
return {errorMsg: '抽卡或其他链接现已无法获取充值记录,请发送客服页面的链接!'}
|
||||
return {
|
||||
errorMsg: '抽卡或其他链接现已无法获取充值记录,请发送客服页面的链接!'
|
||||
}
|
||||
}
|
||||
return {errorMsg: ''}
|
||||
return { errorMsg: '' }
|
||||
}
|
||||
|
||||
/** 对原始数据进行筛选,组合 */
|
||||
async filtrateData () {
|
||||
async filtrateData() {
|
||||
// 由于新接口不返回uid了,所以先查询出用户信息
|
||||
const userInfo = await this.getUserInfo()
|
||||
if (userInfo?.errorMsg) return userInfo
|
||||
|
@ -99,7 +102,7 @@ export class PayData {
|
|||
await this.getPrimogemLog()
|
||||
// 判断零氪党的情况
|
||||
if (this.#oringinData.length === 0) {
|
||||
return {errorMsg: '未获取到您的任何充值数据'}
|
||||
return { errorMsg: '未获取到您的任何充值数据' }
|
||||
}
|
||||
// 将原始数据按id排序
|
||||
this.#oringinData = this.#oringinData.sort((a, b) => {
|
||||
|
@ -157,7 +160,7 @@ export class PayData {
|
|||
|
||||
headers = {
|
||||
headers: {
|
||||
accept: 'application/json, text/plain, */*',
|
||||
'accept': 'application/json, text/plain, */*',
|
||||
'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
|
||||
'sec-fetch-dest': 'empty',
|
||||
'sec-fetch-mode': 'cors',
|
||||
|
@ -176,9 +179,15 @@ export class PayData {
|
|||
* @returns {string}
|
||||
*/
|
||||
getUrl(api = 'getCrystalLog') {
|
||||
const baseUrl = 'https://hk4e-api.mihoyo.com/common/hk4e_self_help_query/User'
|
||||
const isUserInfo = api === 'getUserInfo', isCrystalLog = api === 'getCrystalLog'
|
||||
const url = isUserInfo ? '/GetUserInfo' : isCrystalLog ? '/GetCrystalLog' : '/GetPrimogemLog'
|
||||
const baseUrl =
|
||||
'https://hk4e-api.mihoyo.com/common/hk4e_self_help_query/User'
|
||||
const isUserInfo = api === 'getUserInfo',
|
||||
isCrystalLog = api === 'getCrystalLog'
|
||||
const url = isUserInfo
|
||||
? '/GetUserInfo'
|
||||
: isCrystalLog
|
||||
? '/GetCrystalLog'
|
||||
: '/GetPrimogemLog'
|
||||
let params = ''
|
||||
params += '?selfquery_type=1'
|
||||
params += '&sign_type=2'
|
||||
|
@ -209,11 +218,11 @@ export class PayData {
|
|||
|
||||
export class HtmlData extends base {
|
||||
/**
|
||||
* @param data 数据
|
||||
* @param data.monthData 月份数据
|
||||
* @param data.crystal 总结晶数
|
||||
*/
|
||||
constructor (data = {}) {
|
||||
* @param data 数据
|
||||
* @param data.monthData 月份数据
|
||||
* @param data.crystal 总结晶数
|
||||
*/
|
||||
constructor(data = {}) {
|
||||
super()
|
||||
this.monthData = data.monthData
|
||||
this.crystal = data.crystal
|
||||
|
@ -229,17 +238,20 @@ export class HtmlData extends base {
|
|||
price = [68, 30, 648, 328, 198, 98, 30, 6]
|
||||
|
||||
/** 柱形图数据 */
|
||||
getBarData () {
|
||||
getBarData() {
|
||||
return this.monthData.map(v => {
|
||||
return {
|
||||
type: v.month,
|
||||
sales: v.payNum.reduce((sum, val, index) => sum + val * this.price[index], 0)
|
||||
sales: v.payNum.reduce(
|
||||
(sum, val, index) => sum + val * this.price[index],
|
||||
0
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** 顶部数据 */
|
||||
getTopData (crystal = 0) {
|
||||
getTopData(crystal = 0) {
|
||||
const maxMonth = this.maxcConsumption()
|
||||
const sum = this.sumConsumption()
|
||||
return [
|
||||
|
@ -264,7 +276,7 @@ export class HtmlData extends base {
|
|||
}
|
||||
|
||||
/** 饼图数据 */
|
||||
getPieData () {
|
||||
getPieData() {
|
||||
const data = this.sumConsumption()
|
||||
let pieData = []
|
||||
data.forEach((val, index) => {
|
||||
|
@ -280,7 +292,7 @@ export class HtmlData extends base {
|
|||
}
|
||||
|
||||
/** 消费最多月 */
|
||||
maxcConsumption () {
|
||||
maxcConsumption() {
|
||||
return this.getBarData().sort((a, b) => {
|
||||
if (a.sales < b.sales) {
|
||||
return 1
|
||||
|
@ -291,7 +303,7 @@ export class HtmlData extends base {
|
|||
}
|
||||
|
||||
/** 每种消费的总数 */
|
||||
sumConsumption () {
|
||||
sumConsumption() {
|
||||
let sum = {
|
||||
小月卡: 0,
|
||||
大月卡: 0,
|
||||
|
@ -320,7 +332,7 @@ export class HtmlData extends base {
|
|||
}
|
||||
}
|
||||
|
||||
export async function renderImg (data) {
|
||||
export async function renderImg(data) {
|
||||
const htmlData = new HtmlData(data)
|
||||
const imgDatas = {
|
||||
...htmlData.screenData,
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
import base from './base.js'
|
||||
|
||||
import { MysInfo, gsCfg } from 'yunzai/mys'
|
||||
import { MysInfo, gsCfg } from 'yunzai/mys'
|
||||
import lodash from 'lodash'
|
||||
|
||||
export default class RoleBag extends base {
|
||||
constructor (e) {
|
||||
constructor(e) {
|
||||
super(e)
|
||||
this.model = 'roleBag'
|
||||
}
|
||||
|
||||
static async get (e) {
|
||||
static async get(e) {
|
||||
let roleBag = new RoleBag(e)
|
||||
return await roleBag.getData()
|
||||
}
|
||||
|
||||
/** #武器 */
|
||||
async getData (e) {
|
||||
async getData(e) {
|
||||
let res = await MysInfo.get(this.e, 'character')
|
||||
|
||||
if (!res || res.retcode !== 0) return false
|
||||
|
@ -37,7 +37,7 @@ export default class RoleBag extends base {
|
|||
return data
|
||||
}
|
||||
|
||||
dealData (avatars) {
|
||||
dealData(avatars) {
|
||||
let type = 'all'
|
||||
if (avatars.length > 8) {
|
||||
if (/(.*)(四星|4星)(.*)/.test(this.e.msg)) {
|
||||
|
@ -63,7 +63,11 @@ export default class RoleBag extends base {
|
|||
continue
|
||||
}
|
||||
|
||||
val.sort = rarity * 100000 + val.actived_constellation_num * 10000 + val.level * 100 + (val.id - 10000000)
|
||||
val.sort =
|
||||
rarity * 100000 +
|
||||
val.actived_constellation_num * 10000 +
|
||||
val.level * 100 +
|
||||
(val.id - 10000000)
|
||||
|
||||
// 增加神里排序
|
||||
if (val.id == 10000002) {
|
||||
|
@ -96,7 +100,11 @@ export default class RoleBag extends base {
|
|||
list.push(val)
|
||||
}
|
||||
|
||||
list = lodash.chain(list).orderBy(['sortLevel'], ['desc']).orderBy(['sort'], ['desc']).value()
|
||||
list = lodash
|
||||
.chain(list)
|
||||
.orderBy(['sortLevel'], ['desc'])
|
||||
.orderBy(['sort'], ['desc'])
|
||||
.value()
|
||||
|
||||
let num = list.length
|
||||
|
||||
|
|
|
@ -21,7 +21,9 @@ export default class RoleDetail extends base {
|
|||
|
||||
async getDetail() {
|
||||
let character = await MysInfo.get(this.e, 'character')
|
||||
let detail = await MysInfo.get(this.e, 'detail', { avatar_id: this.e.roleId })
|
||||
let detail = await MysInfo.get(this.e, 'detail', {
|
||||
avatar_id: this.e.roleId
|
||||
})
|
||||
|
||||
if (!character || character.retcode !== 0) return false
|
||||
|
||||
|
@ -34,7 +36,7 @@ export default class RoleDetail extends base {
|
|||
skill = this.getSkill(detail.data, avatar)
|
||||
}
|
||||
|
||||
if (!await this.checkImg(avatar.name)) return false
|
||||
if (!(await this.checkImg(avatar.name))) return false
|
||||
|
||||
/** 截图数据 */
|
||||
let data = {
|
||||
|
@ -127,7 +129,18 @@ export default class RoleDetail extends base {
|
|||
if (lodash.random(0, 100) > 50) {
|
||||
bg = 3
|
||||
}
|
||||
} else if (['芭芭拉', '凝光', '刻晴', '琴', '菲谢尔', '迪卢克', '丽莎', '神里绫华'].includes(avatars.name)) {
|
||||
} else if (
|
||||
[
|
||||
'芭芭拉',
|
||||
'凝光',
|
||||
'刻晴',
|
||||
'琴',
|
||||
'菲谢尔',
|
||||
'迪卢克',
|
||||
'丽莎',
|
||||
'神里绫华'
|
||||
].includes(avatars.name)
|
||||
) {
|
||||
if (avatars.costumes && avatars.costumes.length >= 1) {
|
||||
bg = 3
|
||||
}
|
||||
|
@ -151,7 +164,9 @@ export default class RoleDetail extends base {
|
|||
async noAvatar() {
|
||||
let msg = ''
|
||||
if (this.isBing) {
|
||||
let randFace = lodash.sample([26, 111, 110, 173, 177, 36, 37, 5, 9, 267, 264, 262, 265])
|
||||
let randFace = lodash.sample([
|
||||
26, 111, 110, 173, 177, 36, 37, 5, 9, 267, 264, 262, 265
|
||||
])
|
||||
msg = [`\n尚未拥有${this.e.roleName}`, segment.face(randFace)]
|
||||
} else {
|
||||
msg = '\n请先在米游社展示该角色'
|
||||
|
@ -227,7 +242,8 @@ export default class RoleDetail extends base {
|
|||
}
|
||||
|
||||
async getData() {
|
||||
let url = 'https://bbs-api.mihoyo.com/post/wapi/getPostFullInCollection?&gids=2&collection_id=1057503'
|
||||
let url =
|
||||
'https://bbs-api.mihoyo.com/post/wapi/getPostFullInCollection?&gids=2&collection_id=1057503'
|
||||
|
||||
try {
|
||||
let ret = await fetch(url, { method: 'get' })
|
||||
|
@ -242,7 +258,9 @@ export default class RoleDetail extends base {
|
|||
|
||||
async downImg(name, arr) {
|
||||
let ret = []
|
||||
arr.forEach((v, k) => ret.push(downFile(v, `${this.path}${name}${++k}.png`)))
|
||||
arr.forEach((v, k) =>
|
||||
ret.push(downFile(v, `${this.path}${name}${++k}.png`))
|
||||
)
|
||||
|
||||
try {
|
||||
ret = await Promise.all(ret)
|
||||
|
|
|
@ -4,7 +4,6 @@ import lodash from 'lodash'
|
|||
import moment from 'moment'
|
||||
import fs from 'node:fs'
|
||||
|
||||
|
||||
// tudo
|
||||
|
||||
import { Character } from '#miao.models'
|
||||
|
@ -113,7 +112,8 @@ export default class RoleIndex extends base {
|
|||
// id倒序,最新出的角色拍前面
|
||||
avatars[i].sort = rarity * 100000 + liveNum * 10000 + level * 100 + id
|
||||
|
||||
avatars[i].weapon.showName = this.wother.sortName[avatars[i].weapon.name] ?? avatars[i].weapon.name
|
||||
avatars[i].weapon.showName =
|
||||
this.wother.sortName[avatars[i].weapon.name] ?? avatars[i].weapon.name
|
||||
|
||||
avatars[i].costumesLogo = ''
|
||||
if (avatars[i].costumes && avatars[i].costumes.length >= 1) {
|
||||
|
@ -135,7 +135,7 @@ export default class RoleIndex extends base {
|
|||
stats.common_chest_number +
|
||||
stats.magic_chest_number) /
|
||||
this.all_chest) *
|
||||
100,
|
||||
100,
|
||||
1
|
||||
)
|
||||
|
||||
|
@ -152,9 +152,17 @@ export default class RoleIndex extends base {
|
|||
|
||||
let line = [
|
||||
[
|
||||
{ lable: '成就', num: stats.achievement_number, extra: this.lable.achievement },
|
||||
{
|
||||
lable: '成就',
|
||||
num: stats.achievement_number,
|
||||
extra: this.lable.achievement
|
||||
},
|
||||
{ lable: '角色数', num: stats.avatar_number, extra: this.lable.avatar },
|
||||
{ lable: '等级', num: resIndex?.role?.level ?? 0, extra: this.lable.level },
|
||||
{
|
||||
lable: '等级',
|
||||
num: resIndex?.role?.level ?? 0,
|
||||
extra: this.lable.level
|
||||
},
|
||||
{
|
||||
lable: '总宝箱',
|
||||
num:
|
||||
|
@ -166,7 +174,6 @@ export default class RoleIndex extends base {
|
|||
extra: this.all_chest
|
||||
},
|
||||
{
|
||||
|
||||
lable: '获取率',
|
||||
num: afterPercentage,
|
||||
color:
|
||||
|
@ -180,14 +187,30 @@ export default class RoleIndex extends base {
|
|||
? '#c04851'
|
||||
: afterPercentage.substr(0, 1) == 'S'
|
||||
? '#f86b1d'
|
||||
: '',
|
||||
: ''
|
||||
}
|
||||
],
|
||||
[
|
||||
{ lable: '华丽宝箱', num: stats.luxurious_chest_number, extra: this.lable.luxurious_chest },
|
||||
{ lable: '珍贵宝箱', num: stats.precious_chest_number, extra: this.lable.precious_chest },
|
||||
{ lable: '精致宝箱', num: stats.exquisite_chest_number, extra: this.lable.exquisite_chest },
|
||||
{ lable: '普通宝箱', num: stats.common_chest_number, extra: this.lable.common_chest }
|
||||
{
|
||||
lable: '华丽宝箱',
|
||||
num: stats.luxurious_chest_number,
|
||||
extra: this.lable.luxurious_chest
|
||||
},
|
||||
{
|
||||
lable: '珍贵宝箱',
|
||||
num: stats.precious_chest_number,
|
||||
extra: this.lable.precious_chest
|
||||
},
|
||||
{
|
||||
lable: '精致宝箱',
|
||||
num: stats.exquisite_chest_number,
|
||||
extra: this.lable.exquisite_chest
|
||||
},
|
||||
{
|
||||
lable: '普通宝箱',
|
||||
num: stats.common_chest_number,
|
||||
extra: this.lable.common_chest
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
|
@ -289,7 +312,13 @@ export default class RoleIndex extends base {
|
|||
}
|
||||
totalStar = totalStar + '(' + star.join('-') + ')'
|
||||
|
||||
let dataName = ['damage', 'take_damage', 'defeat', 'normal_skill', 'energy_skill']
|
||||
let dataName = [
|
||||
'damage',
|
||||
'take_damage',
|
||||
'defeat',
|
||||
'normal_skill',
|
||||
'energy_skill'
|
||||
]
|
||||
let data = []
|
||||
let tmpRole = []
|
||||
for (let val of dataName) {
|
||||
|
@ -311,7 +340,10 @@ export default class RoleIndex extends base {
|
|||
data[val].num += ' w'
|
||||
}
|
||||
|
||||
if (tmpRole.length < 4 && !tmpRole.includes(resAbyss[`${val}_rank`][0].avatar_id)) {
|
||||
if (
|
||||
tmpRole.length < 4 &&
|
||||
!tmpRole.includes(resAbyss[`${val}_rank`][0].avatar_id)
|
||||
) {
|
||||
tmpRole.push(resAbyss[`${val}_rank`][0].avatar_id)
|
||||
}
|
||||
}
|
||||
|
@ -341,7 +373,10 @@ export default class RoleIndex extends base {
|
|||
}
|
||||
|
||||
dayCount(num) {
|
||||
let daysDifference = Math.floor((new Date() - new Date('2020-09-15')) / (1000 * 60 * 60 * 24)) + 1
|
||||
let daysDifference =
|
||||
Math.floor(
|
||||
(new Date() - new Date('2020-09-15')) / (1000 * 60 * 60 * 24)
|
||||
) + 1
|
||||
let days = Math.floor(num)
|
||||
let msg = '活跃天数:' + days + `/${daysDifference}天`
|
||||
return msg
|
||||
|
@ -382,17 +417,23 @@ export default class RoleIndex extends base {
|
|||
{ lable: '精致宝箱', num: stats.exquisite_chest_number },
|
||||
{ lable: '普通宝箱', num: stats.common_chest_number },
|
||||
{ lable: '奇馈宝箱', num: stats.magic_chest_number },
|
||||
{ lable: '传送点', num: stats.way_point_number },
|
||||
{ lable: '传送点', num: stats.way_point_number }
|
||||
]
|
||||
]
|
||||
|
||||
let explor1 = []
|
||||
let explor2 = []
|
||||
|
||||
res.world_explorations = lodash.orderBy(res.world_explorations, ['id'], ['desc'])
|
||||
res.world_explorations = lodash.orderBy(
|
||||
res.world_explorations,
|
||||
['id'],
|
||||
['desc']
|
||||
)
|
||||
|
||||
for (let val of res.world_explorations) {
|
||||
val.name = this.areaName[val.id] ? this.areaName[val.id] : lodash.truncate(val.name, { length: 6 })
|
||||
val.name = this.areaName[val.id]
|
||||
? this.areaName[val.id]
|
||||
: lodash.truncate(val.name, { length: 6 })
|
||||
|
||||
let tmp = { lable: val.name, num: `${val.exploration_percentage / 10}%` }
|
||||
|
||||
|
@ -454,7 +495,7 @@ export default class RoleIndex extends base {
|
|||
if (!res || res[0].retcode !== 0) return false
|
||||
|
||||
let ret = []
|
||||
res.forEach((v) => ret.push(v.data))
|
||||
res.forEach(v => ret.push(v.data))
|
||||
|
||||
return this.roleExploreData(ret)
|
||||
}
|
||||
|
@ -470,7 +511,7 @@ export default class RoleIndex extends base {
|
|||
stats.common_chest_number +
|
||||
stats.magic_chest_number) *
|
||||
100) /
|
||||
this.all_chest,
|
||||
this.all_chest,
|
||||
2
|
||||
)
|
||||
|
||||
|
@ -478,22 +519,37 @@ export default class RoleIndex extends base {
|
|||
percentage < 60
|
||||
? 'D'
|
||||
: (percentage < 70
|
||||
? 'C'
|
||||
: percentage < 80
|
||||
? 'B'
|
||||
: percentage < 90
|
||||
? 'A'
|
||||
: 'S') + `[${percentage}%]`
|
||||
? 'C'
|
||||
: percentage < 80
|
||||
? 'B'
|
||||
: percentage < 90
|
||||
? 'A'
|
||||
: 'S') + `[${percentage}%]`
|
||||
|
||||
let daysDifference = Math.floor((new Date() - new Date('2020-09-15')) / (1000 * 60 * 60 * 24)) + 1
|
||||
let daysDifference =
|
||||
Math.floor(
|
||||
(new Date() - new Date('2020-09-15')) / (1000 * 60 * 60 * 24)
|
||||
) + 1
|
||||
|
||||
let line = [
|
||||
[
|
||||
{ lable: '角色数', num: stats.avatar_number, extra: this.lable.avatar },
|
||||
{ lable: '传送点', num: stats.way_point_number, extra: this.lable.way_point },
|
||||
{
|
||||
lable: '传送点',
|
||||
num: stats.way_point_number,
|
||||
extra: this.lable.way_point
|
||||
},
|
||||
{ lable: '秘境', num: stats.domain_number, extra: this.lable.domain },
|
||||
{ lable: '成就', num: stats.achievement_number, extra: this.lable.achievement },
|
||||
{ lable: '活跃天数', num: stats.active_day_number, extra: `${daysDifference}` }
|
||||
{
|
||||
lable: '成就',
|
||||
num: stats.achievement_number,
|
||||
extra: this.lable.achievement
|
||||
},
|
||||
{
|
||||
lable: '活跃天数',
|
||||
num: stats.active_day_number,
|
||||
extra: `${daysDifference}`
|
||||
}
|
||||
],
|
||||
[
|
||||
{ lable: '深境螺旋', num: stats.spiral_abyss },
|
||||
|
@ -521,25 +577,65 @@ export default class RoleIndex extends base {
|
|||
? '#c04851'
|
||||
: afterPercentage.substr(0, 1) == 'S'
|
||||
? '#f86b1d'
|
||||
: '',
|
||||
: ''
|
||||
},
|
||||
{ lable: '普通宝箱', num: stats.common_chest_number, extra: this.lable.common_chest },
|
||||
{ lable: '精致宝箱', num: stats.exquisite_chest_number, extra: this.lable.exquisite_chest },
|
||||
{
|
||||
lable: '普通宝箱',
|
||||
num: stats.common_chest_number,
|
||||
extra: this.lable.common_chest
|
||||
},
|
||||
{
|
||||
lable: '精致宝箱',
|
||||
num: stats.exquisite_chest_number,
|
||||
extra: this.lable.exquisite_chest
|
||||
}
|
||||
],
|
||||
[
|
||||
{ lable: '珍贵宝箱', num: stats.precious_chest_number, extra: this.lable.precious_chest },
|
||||
{ lable: '华丽宝箱', num: stats.luxurious_chest_number, extra: this.lable.luxurious_chest },
|
||||
{ lable: '奇馈宝箱', num: stats.magic_chest_number, extra: this.lable.magic_chest },
|
||||
{ lable: '风神瞳', num: stats.anemoculus_number, extra: this.lable.anemoculus },
|
||||
{ lable: '岩神瞳', num: stats.geoculus_number, extra: this.lable.geoculus }
|
||||
{
|
||||
lable: '珍贵宝箱',
|
||||
num: stats.precious_chest_number,
|
||||
extra: this.lable.precious_chest
|
||||
},
|
||||
{
|
||||
lable: '华丽宝箱',
|
||||
num: stats.luxurious_chest_number,
|
||||
extra: this.lable.luxurious_chest
|
||||
},
|
||||
{
|
||||
lable: '奇馈宝箱',
|
||||
num: stats.magic_chest_number,
|
||||
extra: this.lable.magic_chest
|
||||
},
|
||||
{
|
||||
lable: '风神瞳',
|
||||
num: stats.anemoculus_number,
|
||||
extra: this.lable.anemoculus
|
||||
},
|
||||
{
|
||||
lable: '岩神瞳',
|
||||
num: stats.geoculus_number,
|
||||
extra: this.lable.geoculus
|
||||
}
|
||||
],
|
||||
[
|
||||
{ lable: '雷神瞳', num: stats.electroculus_number, extra: this.lable.electroculus },
|
||||
{ lable: '草神瞳', num: stats.dendroculus_number, extra: this.lable.dendroculus },
|
||||
{ lable: '水神瞳', num: stats.hydroculus_number, extra: this.lable.hydroculus },
|
||||
{
|
||||
lable: '雷神瞳',
|
||||
num: stats.electroculus_number,
|
||||
extra: this.lable.electroculus
|
||||
},
|
||||
{
|
||||
lable: '草神瞳',
|
||||
num: stats.dendroculus_number,
|
||||
extra: this.lable.dendroculus
|
||||
},
|
||||
{
|
||||
lable: '水神瞳',
|
||||
num: stats.hydroculus_number,
|
||||
extra: this.lable.hydroculus
|
||||
},
|
||||
{ lable: '火神瞳', num: `${dsz}`, extra: 0 },
|
||||
{ lable: '冰神瞳', num: `${dsz}`, extra: 0 }
|
||||
],
|
||||
]
|
||||
]
|
||||
// 尘歌壶
|
||||
if (resIndex.homes && resIndex.homes.length > 0) {
|
||||
|
@ -552,13 +648,19 @@ export default class RoleIndex extends base {
|
|||
])
|
||||
}
|
||||
|
||||
resIndex.world_explorations = lodash.orderBy(resIndex.world_explorations, ['id'], ['desc'])
|
||||
resIndex.world_explorations = lodash.orderBy(
|
||||
resIndex.world_explorations,
|
||||
['id'],
|
||||
['desc']
|
||||
)
|
||||
|
||||
let explor = []
|
||||
for (let val of resIndex.world_explorations) {
|
||||
if ([7, 11, 12, 13].includes(val.id)) continue
|
||||
|
||||
val.name = this.areaName[val.id] ? this.areaName[val.id] : lodash.truncate(val.name, { length: 6 })
|
||||
val.name = this.areaName[val.id]
|
||||
? this.areaName[val.id]
|
||||
: lodash.truncate(val.name, { length: 6 })
|
||||
|
||||
let tmp = {
|
||||
name: val.name,
|
||||
|
@ -580,9 +682,12 @@ export default class RoleIndex extends base {
|
|||
let oidArr = [7]
|
||||
if (val.id == 10) oidArr = [13, 12, 11]
|
||||
for (let oid of oidArr) {
|
||||
let underground = lodash.find(resIndex.world_explorations, function (o) {
|
||||
return o.id == oid
|
||||
})
|
||||
let underground = lodash.find(
|
||||
resIndex.world_explorations,
|
||||
function (o) {
|
||||
return o.id == oid
|
||||
}
|
||||
)
|
||||
if (underground) {
|
||||
tmp.line.push({
|
||||
name: this.areaName[underground.id],
|
||||
|
@ -592,7 +697,11 @@ export default class RoleIndex extends base {
|
|||
}
|
||||
}
|
||||
|
||||
if (['雪山', '稻妻', '层岩巨渊', '须弥', '枫丹', '沉玉谷'].includes(val.name)) {
|
||||
if (
|
||||
['雪山', '稻妻', '层岩巨渊', '须弥', '枫丹', '沉玉谷'].includes(
|
||||
val.name
|
||||
)
|
||||
) {
|
||||
if (val.offerings[0].name.includes('流明石')) {
|
||||
val.offerings[0].name = '流明石'
|
||||
}
|
||||
|
@ -646,7 +755,7 @@ export default class RoleIndex extends base {
|
|||
let character = fs.readdirSync(path + 'character/')
|
||||
let weapon = fs.readdirSync(path + 'weapon/')
|
||||
|
||||
let nameSet = (v) => {
|
||||
let nameSet = v => {
|
||||
let name = v.split('.')
|
||||
imgFile[name[0]] = v
|
||||
}
|
||||
|
|
348
model/user.ts
348
model/user.ts
|
@ -7,7 +7,6 @@ import { promisify } from 'node:util'
|
|||
import YAML from 'yaml'
|
||||
import { UserGameDB, sequelize } from 'yunzai/db'
|
||||
|
||||
|
||||
// tudo
|
||||
|
||||
import { Data } from '#miao'
|
||||
|
@ -47,25 +46,31 @@ export default class User extends base {
|
|||
this.e.ck = this.ck
|
||||
}
|
||||
if (!this.e.ck) {
|
||||
await this.e.reply(`请【私聊】发送米游社Cookie,获取教程:\n${set.cookieDoc}`)
|
||||
await this.e.reply(
|
||||
`请【私聊】发送米游社Cookie,获取教程:\n${set.cookieDoc}`
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
let ckStr = this.e.ck.replace(/#|'|"/g, '')
|
||||
let param = {}
|
||||
ckStr.split(';').forEach((v) => {
|
||||
ckStr.split(';').forEach(v => {
|
||||
// 处理分割特殊cookie_token
|
||||
let tmp = lodash.trim(v).replace('=', '~').split('~')
|
||||
param[tmp[0]] = tmp[1]
|
||||
})
|
||||
|
||||
if (!param.cookie_token && !param.cookie_token_v2) {
|
||||
await this.e.reply('发送Cookie不完整\n请退出米游社【重新登录】,刷新完整Cookie')
|
||||
await this.e.reply(
|
||||
'发送Cookie不完整\n请退出米游社【重新登录】,刷新完整Cookie'
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
// TODO:独立的mys数据,不走缓存ltuid
|
||||
let mys = await MysUser.create(param.ltuid || param.ltuid_v2 || param.account_id_v2 || param.ltmid_v2)
|
||||
let mys = await MysUser.create(
|
||||
param.ltuid || param.ltuid_v2 || param.account_id_v2 || param.ltmid_v2
|
||||
)
|
||||
if (!mys) {
|
||||
await this.e.reply('发送Cookie不完整或数据错误')
|
||||
return
|
||||
|
@ -74,7 +79,8 @@ export default class User extends base {
|
|||
data.ck = `ltoken=${param.ltoken};ltuid=${param.ltuid || param.login_uid};cookie_token=${param.cookie_token || param.cookie_token_v2}; account_id=${param.ltuid || param.login_uid};`
|
||||
let flagV2 = false
|
||||
|
||||
if (param.cookie_token_v2 && (param.account_mid_v2 || param.ltmid_v2)) { //
|
||||
if (param.cookie_token_v2 && (param.account_mid_v2 || param.ltmid_v2)) {
|
||||
//
|
||||
// account_mid_v2 为版本必须带的字段,不带的话会一直提示绑定cookie失败 请重新登录
|
||||
flagV2 = true
|
||||
data.ck = `ltuid=${param.ltuid || param.login_uid || param.ltuid_v2};account_mid_v2=${param.account_mid_v2};cookie_token_v2=${param.cookie_token_v2};ltoken_v2=${param.ltoken_v2};ltmid_v2=${param.ltmid_v2};`
|
||||
|
@ -83,7 +89,8 @@ export default class User extends base {
|
|||
data.ck += ` mi18nLang=${param.mi18nLang};`
|
||||
}
|
||||
/** 拼接ck */
|
||||
data.ltuid = param.ltuid || param.ltuid_v2 || param.account_id_v2 || param.ltmid_v2
|
||||
data.ltuid =
|
||||
param.ltuid || param.ltuid_v2 || param.account_id_v2 || param.ltmid_v2
|
||||
|
||||
/** 米游币签到字段 */
|
||||
data.login_ticket = param.login_ticket ?? ''
|
||||
|
@ -96,7 +103,9 @@ export default class User extends base {
|
|||
logger.mark(`绑定Cookie错误1:${this.checkMsg || 'Cookie错误'}`)
|
||||
// 清除mys数据
|
||||
mys._delCache()
|
||||
return await this.e.reply(`绑定Cookie失败:${this.checkMsg || 'Cookie错误'}`)
|
||||
return await this.e.reply(
|
||||
`绑定Cookie失败:${this.checkMsg || 'Cookie错误'}`
|
||||
)
|
||||
}
|
||||
|
||||
// 判断data.ltuid是否是数字
|
||||
|
@ -109,7 +118,9 @@ export default class User extends base {
|
|||
this.ck = `${this.ck}ltuid=${this.ltuid};`
|
||||
} else {
|
||||
logger.mark(`绑定Cookie错误2:${userFullInfo.message || 'Cookie错误'}`)
|
||||
return await this.e.reply(`绑定Cookie失败:${userFullInfo.message || 'Cookie错误'}`)
|
||||
return await this.e.reply(
|
||||
`绑定Cookie失败:${userFullInfo.message || 'Cookie错误'}`
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -137,19 +148,23 @@ export default class User extends base {
|
|||
'【#练度统计】角色列表数据',
|
||||
'【#面板】【#更新面板】面板信息'
|
||||
)
|
||||
button.push([
|
||||
{ text: '#uid', callback: '#uid' },
|
||||
{ text: '#我的ck', callback: '#我的ck' },
|
||||
{ text: '#删除ck', callback: '#删除ck' }
|
||||
], [
|
||||
{ text: '#体力', callback: '#体力' },
|
||||
{ text: '#原石', callback: '#原石' },
|
||||
{ text: '#原石统计', callback: '#原石统计' }
|
||||
], [
|
||||
{ text: '#练度统计', callback: '#练度统计' },
|
||||
{ text: '#面板', callback: '#面板' },
|
||||
{ text: '#更新面板', callback: '#更新面板' }
|
||||
])
|
||||
button.push(
|
||||
[
|
||||
{ text: '#uid', callback: '#uid' },
|
||||
{ text: '#我的ck', callback: '#我的ck' },
|
||||
{ text: '#删除ck', callback: '#删除ck' }
|
||||
],
|
||||
[
|
||||
{ text: '#体力', callback: '#体力' },
|
||||
{ text: '#原石', callback: '#原石' },
|
||||
{ text: '#原石统计', callback: '#原石统计' }
|
||||
],
|
||||
[
|
||||
{ text: '#练度统计', callback: '#练度统计' },
|
||||
{ text: '#面板', callback: '#面板' },
|
||||
{ text: '#更新面板', callback: '#更新面板' }
|
||||
]
|
||||
)
|
||||
}
|
||||
if (mys.hasGame('sr')) {
|
||||
msg.push(
|
||||
|
@ -162,20 +177,28 @@ export default class User extends base {
|
|||
'【*练度统计】角色列表数据',
|
||||
'【*面板】【*更新面板】面板信息'
|
||||
)
|
||||
button.push([
|
||||
{ text: '*uid', callback: '*uid' },
|
||||
{ text: '*删除ck', callback: '*删除ck' },
|
||||
{ text: '*体力', callback: '*体力' }
|
||||
], [
|
||||
{ text: '*星琼', callback: '*星琼' },
|
||||
{ text: '*星琼统计', callback: '*星琼统计' },
|
||||
{ text: '*练度统计', callback: '*练度统计' }
|
||||
], [
|
||||
{ text: '*面板', callback: '*面板' },
|
||||
{ text: '*更新面板', callback: '*更新面板' }
|
||||
])
|
||||
button.push(
|
||||
[
|
||||
{ text: '*uid', callback: '*uid' },
|
||||
{ text: '*删除ck', callback: '*删除ck' },
|
||||
{ text: '*体力', callback: '*体力' }
|
||||
],
|
||||
[
|
||||
{ text: '*星琼', callback: '*星琼' },
|
||||
{ text: '*星琼统计', callback: '*星琼统计' },
|
||||
{ text: '*练度统计', callback: '*练度统计' }
|
||||
],
|
||||
[
|
||||
{ text: '*面板', callback: '*面板' },
|
||||
{ text: '*更新面板', callback: '*更新面板' }
|
||||
]
|
||||
)
|
||||
}
|
||||
msg = await common.makeForwardMsg(this.e, [[msg.join('\n'), segment.button(...button)]], '绑定成功:使用命令说明')
|
||||
msg = await common.makeForwardMsg(
|
||||
this.e,
|
||||
[[msg.join('\n'), segment.button(...button)]],
|
||||
'绑定成功:使用命令说明'
|
||||
)
|
||||
await this.e.reply(msg)
|
||||
}
|
||||
|
||||
|
@ -190,7 +213,7 @@ export default class User extends base {
|
|||
// 判断是原神还是星铁
|
||||
let user = await this.user()
|
||||
// 获取当前uid
|
||||
let uidData = user.getUidData('', game = game, this.e)
|
||||
let uidData = user.getUidData('', (game = game), this.e)
|
||||
if (!uidData || uidData.type !== 'ck' || !uidData.ltuid) {
|
||||
return `删除失败:当前的UID${uidData?.uid}无CK信息`
|
||||
}
|
||||
|
@ -218,16 +241,18 @@ export default class User extends base {
|
|||
let game = this.e
|
||||
let uidList = user.getUidList(game)
|
||||
if (index > uidList.length) {
|
||||
return await this.e.reply(['uid序号输入错误', segment.button([
|
||||
{ text: '删除uid', input: '#删除uid' }
|
||||
])])
|
||||
return await this.e.reply([
|
||||
'uid序号输入错误',
|
||||
segment.button([{ text: '删除uid', input: '#删除uid' }])
|
||||
])
|
||||
}
|
||||
index = Number(index) - 1
|
||||
let uidObj = uidList[index]
|
||||
if (uidObj.type === 'ck') {
|
||||
return await this.e.reply(['CK对应UID无法直接删除,请通过【#删除ck】命令来删除', segment.button([
|
||||
{ text: '删除ck', callback: '#删除ck' }
|
||||
])])
|
||||
return await this.e.reply([
|
||||
'CK对应UID无法直接删除,请通过【#删除ck】命令来删除',
|
||||
segment.button([{ text: '删除ck', callback: '#删除ck' }])
|
||||
])
|
||||
}
|
||||
await user.delRegUid(uidObj.uid, game)
|
||||
return await this.showUid()
|
||||
|
@ -238,22 +263,27 @@ export default class User extends base {
|
|||
let user = await this.user()
|
||||
let msg = []
|
||||
let typeMap = { ck: 'CK Uid', reg: '绑定 Uid' }
|
||||
lodash.forEach({ gs: '原神 (#uid)', sr: '星穹铁道 (*uid)' }, (gameName, game) => {
|
||||
let uidList = user.getUidList(game)
|
||||
let currUid = user.getUid(game)
|
||||
msg.push(`【${gameName}】`)
|
||||
if (uidList.length === 0) {
|
||||
msg.push(`暂无,通过${game === 'gs' ? '#' : '*'}绑定123456789来绑定UID`)
|
||||
return true
|
||||
}
|
||||
lodash.forEach(uidList, (ds, idx) => {
|
||||
let tmp = `${++idx}: ${ds.uid} (${typeMap[ds.type]})`
|
||||
if (currUid * 1 === ds.uid * 1) {
|
||||
tmp += ' ☑'
|
||||
lodash.forEach(
|
||||
{ gs: '原神 (#uid)', sr: '星穹铁道 (*uid)' },
|
||||
(gameName, game) => {
|
||||
let uidList = user.getUidList(game)
|
||||
let currUid = user.getUid(game)
|
||||
msg.push(`【${gameName}】`)
|
||||
if (uidList.length === 0) {
|
||||
msg.push(
|
||||
`暂无,通过${game === 'gs' ? '#' : '*'}绑定123456789来绑定UID`
|
||||
)
|
||||
return true
|
||||
}
|
||||
msg.push(tmp)
|
||||
})
|
||||
})
|
||||
lodash.forEach(uidList, (ds, idx) => {
|
||||
let tmp = `${++idx}: ${ds.uid} (${typeMap[ds.type]})`
|
||||
if (currUid * 1 === ds.uid * 1) {
|
||||
tmp += ' ☑'
|
||||
}
|
||||
msg.push(tmp)
|
||||
})
|
||||
}
|
||||
)
|
||||
msg.unshift('通过【#uid+序号】来切换uid,【#删除uid+序号】删除uid')
|
||||
await this.e.reply(msg.join('\n'))
|
||||
}
|
||||
|
@ -261,17 +291,20 @@ export default class User extends base {
|
|||
/** #uid */
|
||||
async showUid() {
|
||||
let user = await this.user()
|
||||
let uids = [{
|
||||
key: 'gs',
|
||||
name: '原神'
|
||||
}, {
|
||||
key: 'sr',
|
||||
name: '星穹铁道'
|
||||
}]
|
||||
lodash.forEach(uids, (ds) => {
|
||||
let uids = [
|
||||
{
|
||||
key: 'gs',
|
||||
name: '原神'
|
||||
},
|
||||
{
|
||||
key: 'sr',
|
||||
name: '星穹铁道'
|
||||
}
|
||||
]
|
||||
lodash.forEach(uids, ds => {
|
||||
ds.uidList = user.getUidList(ds.key)
|
||||
ds.uid = user.getUid(ds.key)
|
||||
lodash.forEach(ds.uidList, (uidDs) => {
|
||||
lodash.forEach(ds.uidList, uidDs => {
|
||||
let player = Player.create(uidDs.uid, ds.key)
|
||||
if (player) {
|
||||
uidDs.name = player.name
|
||||
|
@ -282,26 +315,39 @@ export default class User extends base {
|
|||
}
|
||||
})
|
||||
})
|
||||
return this.e.reply([await this.e.runtime.render('genshin', 'html/user/uid-list', { uids }, { retType: 'base64' }), segment.button([
|
||||
{ text: '绑定UID', input: '#绑定uid' },
|
||||
{ text: '切换UID', input: '#uid' },
|
||||
{ text: '删除UID', input: '#删除uid' }
|
||||
], [
|
||||
{ text: '角色', callback: '#角色' },
|
||||
{ text: '探索', callback: '#探索' },
|
||||
{ text: '武器', callback: '#武器' },
|
||||
{ text: '深渊', callback: '#深渊' }
|
||||
], [
|
||||
{ text: '统计', callback: '#练度统计' },
|
||||
{ text: '面板', callback: '#面板' },
|
||||
{ text: '体力', callback: '#体力' },
|
||||
{ text: '原石', callback: '#原石' }
|
||||
], [
|
||||
{ text: '留影', callback: '#留影叙佳期' },
|
||||
{ text: '七圣', callback: '#七圣召唤查询牌组' },
|
||||
{ text: '抽卡', callback: '#抽卡记录' },
|
||||
{ text: '充值', callback: '#充值记录' }
|
||||
])])
|
||||
return this.e.reply([
|
||||
await this.e.runtime.render(
|
||||
'genshin',
|
||||
'html/user/uid-list',
|
||||
{ uids },
|
||||
{ retType: 'base64' }
|
||||
),
|
||||
segment.button(
|
||||
[
|
||||
{ text: '绑定UID', input: '#绑定uid' },
|
||||
{ text: '切换UID', input: '#uid' },
|
||||
{ text: '删除UID', input: '#删除uid' }
|
||||
],
|
||||
[
|
||||
{ text: '角色', callback: '#角色' },
|
||||
{ text: '探索', callback: '#探索' },
|
||||
{ text: '武器', callback: '#武器' },
|
||||
{ text: '深渊', callback: '#深渊' }
|
||||
],
|
||||
[
|
||||
{ text: '统计', callback: '#练度统计' },
|
||||
{ text: '面板', callback: '#面板' },
|
||||
{ text: '体力', callback: '#体力' },
|
||||
{ text: '原石', callback: '#原石' }
|
||||
],
|
||||
[
|
||||
{ text: '留影', callback: '#留影叙佳期' },
|
||||
{ text: '七圣', callback: '#七圣召唤查询牌组' },
|
||||
{ text: '抽卡', callback: '#抽卡记录' },
|
||||
{ text: '充值', callback: '#充值记录' }
|
||||
]
|
||||
)
|
||||
])
|
||||
}
|
||||
|
||||
/** 切换uid */
|
||||
|
@ -310,9 +356,10 @@ export default class User extends base {
|
|||
let game = this.e
|
||||
let uidList = user.getUidList(game)
|
||||
if (index > uidList.length) {
|
||||
return await this.e.reply(['uid序号输入错误', segment.button([
|
||||
{ text: '切换uid', input: '#uid' }
|
||||
])])
|
||||
return await this.e.reply([
|
||||
'uid序号输入错误',
|
||||
segment.button([{ text: '切换uid', input: '#uid' }])
|
||||
])
|
||||
}
|
||||
index = Number(index) - 1
|
||||
user.setMainUid(index, game)
|
||||
|
@ -345,7 +392,7 @@ export default class User extends base {
|
|||
}
|
||||
|
||||
let param = {}
|
||||
ck.cookie.split(';').forEach((v) => {
|
||||
ck.cookie.split(';').forEach(v => {
|
||||
let tmp = lodash.trim(v).split('=')
|
||||
param[tmp[0]] = tmp[1]
|
||||
})
|
||||
|
@ -384,7 +431,7 @@ export default class User extends base {
|
|||
fs.rmdirSync('./data/MysCookie/')
|
||||
return
|
||||
}
|
||||
files.forEach((v) => promises.push(readFile(`${dir}${v}`, 'utf8')))
|
||||
files.forEach(v => promises.push(readFile(`${dir}${v}`, 'utf8')))
|
||||
const res = await Promise.all(promises)
|
||||
let ret = {}
|
||||
for (let v of res) {
|
||||
|
@ -405,10 +452,13 @@ export default class User extends base {
|
|||
|
||||
async loadOldUid() {
|
||||
// 从DB中导入
|
||||
await sequelize.query('delete from UserGames where userId is null or data is null', {})
|
||||
await sequelize.query(
|
||||
'delete from UserGames where userId is null or data is null',
|
||||
{}
|
||||
)
|
||||
let games = await UserGameDB.findAll()
|
||||
let count = 0
|
||||
await Data.forEach(games, async (game) => {
|
||||
await Data.forEach(games, async game => {
|
||||
if (!game.userId) {
|
||||
game.destroy()
|
||||
return true
|
||||
|
@ -416,7 +466,7 @@ export default class User extends base {
|
|||
count++
|
||||
let user = await NoteUser.create(game.userId)
|
||||
if (game.userId && game.data) {
|
||||
lodash.forEach(game.data, (ds) => {
|
||||
lodash.forEach(game.data, ds => {
|
||||
let { uid } = ds
|
||||
user.addRegUid(uid, game.game, false)
|
||||
})
|
||||
|
@ -441,7 +491,10 @@ export default class User extends base {
|
|||
}
|
||||
redis.del(key)
|
||||
}
|
||||
await sequelize.query('delete from Users where (ltuids is null or ltuids=\'\') and games is null', {})
|
||||
await sequelize.query(
|
||||
"delete from Users where (ltuids is null or ltuids='') and games is null",
|
||||
{}
|
||||
)
|
||||
console.log('load Uid Data Done...')
|
||||
}
|
||||
|
||||
|
@ -463,7 +516,9 @@ export default class User extends base {
|
|||
device,
|
||||
ltuid,
|
||||
uids: {},
|
||||
type: /America Server|Europe Server|Asia Server/.test(region) ? 'hoyolab' : 'mys'
|
||||
type: /America Server|Europe Server|Asia Server/.test(region)
|
||||
? 'hoyolab'
|
||||
: 'mys'
|
||||
}
|
||||
let tmp = ltuids[ltuid]
|
||||
let game = region === '星穹列车' ? 'sr' : 'gs'
|
||||
|
@ -491,8 +546,7 @@ export default class User extends base {
|
|||
try {
|
||||
let src = `./data/MysCookie/${qq}.yaml`
|
||||
let dest = `./temp/MysCookieBak/${qq}.yaml`
|
||||
await fs.promises.unlink(dest).catch((_) => {
|
||||
})
|
||||
await fs.promises.unlink(dest).catch(_ => {})
|
||||
await fs.promises.copyFile(src, dest)
|
||||
await fs.promises.unlink(src)
|
||||
} catch (err) {
|
||||
|
@ -507,9 +561,10 @@ export default class User extends base {
|
|||
async myCk() {
|
||||
let user = await this.user()
|
||||
if (!user.hasCk) {
|
||||
this.e.reply(['当前尚未绑定Cookie', segment.button([
|
||||
{ text: '帮助', input: '#Cookie帮助' }
|
||||
])])
|
||||
this.e.reply([
|
||||
'当前尚未绑定Cookie',
|
||||
segment.button([{ text: '帮助', input: '#Cookie帮助' }])
|
||||
])
|
||||
}
|
||||
let mys = user.getMysUser(this.e)
|
||||
if (mys) {
|
||||
|
@ -521,7 +576,11 @@ export default class User extends base {
|
|||
async checkCkStatus() {
|
||||
let user = await this.user()
|
||||
if (!user.hasCk) {
|
||||
await this.e.reply(`\n未绑定CK,当前绑定uid:${user.uid || '无'}`, false, { at: true })
|
||||
await this.e.reply(
|
||||
`\n未绑定CK,当前绑定uid:${user.uid || '无'}`,
|
||||
false,
|
||||
{ at: true }
|
||||
)
|
||||
return true
|
||||
}
|
||||
let uid = user.uid * 1
|
||||
|
@ -530,10 +589,12 @@ export default class User extends base {
|
|||
let checkRet = await user.checkCk()
|
||||
let cks = []
|
||||
lodash.forEach(checkRet, (ds, idx) => {
|
||||
let tmp = [`\n#${idx + 1}: [CK:${ds.ltuid}] - 【${ds.status === 0 ? '正常' : '失效'}】`]
|
||||
let tmp = [
|
||||
`\n#${idx + 1}: [CK:${ds.ltuid}] - 【${ds.status === 0 ? '正常' : '失效'}】`
|
||||
]
|
||||
if (ds.uids && ds.uids.length > 0) {
|
||||
let dsUids = []
|
||||
lodash.forEach(ds.uids, (u) => {
|
||||
lodash.forEach(ds.uids, u => {
|
||||
dsUids.push(u * 1 === uid ? `☑${u}` : u)
|
||||
})
|
||||
tmp.push(`绑定UID: [ ${dsUids.join(', ')} ]`)
|
||||
|
@ -547,11 +608,18 @@ export default class User extends base {
|
|||
cks.push(`当前生效uid:${uid}\n通过【#uid】命令可查看并切换UID`)
|
||||
}
|
||||
|
||||
await this.e.reply([cks.join('\n----\n'), segment.button([
|
||||
{ text: '绑定UID', input: '#绑定uid' },
|
||||
{ text: '切换UID', input: '#uid' },
|
||||
{ text: '删除UID', input: '#删除uid' }
|
||||
])], false, { at: true })
|
||||
await this.e.reply(
|
||||
[
|
||||
cks.join('\n----\n'),
|
||||
segment.button([
|
||||
{ text: '绑定UID', input: '#绑定uid' },
|
||||
{ text: '切换UID', input: '#uid' },
|
||||
{ text: '删除UID', input: '#删除uid' }
|
||||
])
|
||||
],
|
||||
false,
|
||||
{ at: true }
|
||||
)
|
||||
}
|
||||
|
||||
async userAdmin() {
|
||||
|
@ -580,7 +648,9 @@ export default class User extends base {
|
|||
if (/主/.test(msg)) {
|
||||
let mainId = await redis.get(`Yz:NoteUser:mainId:${id}`)
|
||||
if (!mainId) {
|
||||
e.reply('当前用户没有主用户,在主用户中通过【#绑定用户】可进行绑定...')
|
||||
e.reply(
|
||||
'当前用户没有主用户,在主用户中通过【#绑定用户】可进行绑定...'
|
||||
)
|
||||
return true
|
||||
}
|
||||
let subIds = await Data.getCacheJSON(`Yz:NoteUser:subIds:${mainId}`)
|
||||
|
@ -612,20 +682,34 @@ export default class User extends base {
|
|||
if (!idRet[2]) {
|
||||
// 子用户绑定
|
||||
if (currId === mainId) {
|
||||
if (originalUserId && originalUserId !== mainId && mainUserId === mainId) {
|
||||
if (
|
||||
originalUserId &&
|
||||
originalUserId !== mainId &&
|
||||
mainUserId === mainId
|
||||
) {
|
||||
e.reply('当前账户已完成绑定...')
|
||||
} else {
|
||||
e.reply('请切换到需要绑定的子用户并发送绑定命令...')
|
||||
}
|
||||
return true
|
||||
}
|
||||
let verify = (Math.floor(100000000 + Math.random() * 100000000)).toString()
|
||||
await redis.set(`Yz:NoteUser:verify:${mainId}`, verify + '||' + currId, { EX: 300 })
|
||||
e.reply([`此账号将作为子用户,绑定至主用户:${mainId}`,
|
||||
'成功绑定后,此用户输入的命令,将视作主用户命令,使用主用户的CK与UID等信息',
|
||||
'如需继续绑定,请在5分钟内,使用主账户发送以下命令:', '',
|
||||
`#接受绑定子用户[${mainId}][${verify}]`
|
||||
].join('\n'))
|
||||
let verify = Math.floor(
|
||||
100000000 + Math.random() * 100000000
|
||||
).toString()
|
||||
await redis.set(
|
||||
`Yz:NoteUser:verify:${mainId}`,
|
||||
verify + '||' + currId,
|
||||
{ EX: 300 }
|
||||
)
|
||||
e.reply(
|
||||
[
|
||||
`此账号将作为子用户,绑定至主用户:${mainId}`,
|
||||
'成功绑定后,此用户输入的命令,将视作主用户命令,使用主用户的CK与UID等信息',
|
||||
'如需继续绑定,请在5分钟内,使用主账户发送以下命令:',
|
||||
'',
|
||||
`#接受绑定子用户[${mainId}][${verify}]`
|
||||
].join('\n')
|
||||
)
|
||||
return true
|
||||
} else {
|
||||
// 接受绑定
|
||||
|
@ -633,7 +717,7 @@ export default class User extends base {
|
|||
e.reply('请切换到主用户并发送接受绑定的命令...')
|
||||
return true
|
||||
}
|
||||
let verify = await redis.get(`Yz:NoteUser:verify:${mainId}`) || ''
|
||||
let verify = (await redis.get(`Yz:NoteUser:verify:${mainId}`)) || ''
|
||||
verify = verify.split('||')
|
||||
if (!verify || verify[0] !== idRet[2] || !verify[1]) {
|
||||
e.reply('校验失败,请发送【#绑定用户】重新开始绑定流程')
|
||||
|
@ -642,11 +726,15 @@ export default class User extends base {
|
|||
}
|
||||
let subId = verify[1]
|
||||
await redis.del(`Yz:NoteUser:verify:${mainId}`)
|
||||
await redis.set(`Yz:NoteUser:mainId:${subId}`, mainId, { EX: 3600 * 24 * 365 })
|
||||
await redis.set(`Yz:NoteUser:mainId:${subId}`, mainId, {
|
||||
EX: 3600 * 24 * 365
|
||||
})
|
||||
let subIds = await Data.getCacheJSON(`Yz:NoteUser:subIds:${mainId}`)
|
||||
subIds[subId] = 'true'
|
||||
await Data.setCacheJSON(`Yz:NoteUser:subIds:${mainId}`, subIds)
|
||||
e.reply('绑定成功,绑定的子用户可使用主用户的UID/CK等信息\n请勿接受不是自己用户的绑定,如需解绑可通过【#解绑子用户】进行解绑')
|
||||
e.reply(
|
||||
'绑定成功,绑定的子用户可使用主用户的UID/CK等信息\n请勿接受不是自己用户的绑定,如需解绑可通过【#解绑子用户】进行解绑'
|
||||
)
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
|
@ -654,11 +742,17 @@ export default class User extends base {
|
|||
e.reply('当前账户已有绑定的主账户,请使用主账户发起绑定...')
|
||||
return true
|
||||
}
|
||||
e.reply(['将此账号作为【主用户】,绑定其他子用户。', '',
|
||||
'可在多个QQ或频道间打通用户信息,子用户会使用主用户的CK与UID等信息',
|
||||
'注意:请勿接受不是自己用户的绑定!',
|
||||
'请【切换至需要绑定的子用户】并发送以下命令,获得验证命令...', '',
|
||||
`#绑定主用户[${id}]`].join('\n'))
|
||||
e.reply(
|
||||
[
|
||||
'将此账号作为【主用户】,绑定其他子用户。',
|
||||
'',
|
||||
'可在多个QQ或频道间打通用户信息,子用户会使用主用户的CK与UID等信息',
|
||||
'注意:请勿接受不是自己用户的绑定!',
|
||||
'请【切换至需要绑定的子用户】并发送以下命令,获得验证命令...',
|
||||
'',
|
||||
`#绑定主用户[${id}]`
|
||||
].join('\n')
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import base from './base.js'
|
||||
import { MysInfo } from 'yunzai/mys'
|
||||
import {gsCfg} from 'yunzai/mys'
|
||||
import { gsCfg } from 'yunzai/mys'
|
||||
import lodash from 'lodash'
|
||||
|
||||
// tudo
|
||||
|
@ -11,7 +11,7 @@ export default class WeaponModel extends base {
|
|||
constructor(e) {
|
||||
super(e)
|
||||
}
|
||||
|
||||
|
||||
model = 'weapon'
|
||||
|
||||
static async get(e) {
|
||||
|
@ -114,7 +114,11 @@ export default class WeaponModel extends base {
|
|||
}
|
||||
|
||||
// 重新排序
|
||||
ret = lodash.chain(ret).orderBy(['firstSort'], ['desc']).orderBy(['sort'], ['desc']).value()
|
||||
ret = lodash
|
||||
.chain(ret)
|
||||
.orderBy(['firstSort'], ['desc'])
|
||||
.orderBy(['sort'], ['desc'])
|
||||
.value()
|
||||
|
||||
return { list: ret, count }
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"name": "system-plugin",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"format": "prettier --write ."
|
||||
},
|
||||
"devDependencies": {
|
||||
"prettier": "^3.0.3"
|
||||
}
|
||||
}
|
|
@ -6,8 +6,8 @@
|
|||
font-family: sans-serif;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "tttgbnumber";
|
||||
src: url("../../font/tttgbnumber.ttf");
|
||||
font-family: 'tttgbnumber';
|
||||
src: url('../../font/tttgbnumber.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
|||
}
|
||||
.head_box {
|
||||
border-radius: 15px 50px 50px 15px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
padding: 35px 40px;
|
||||
position: relative;
|
||||
box-shadow: 0 5px 10px 0 rgb(0 0 0 / 15%);
|
||||
|
@ -116,14 +116,14 @@ body {
|
|||
display: table-cell;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
}
|
||||
.newscard-time {
|
||||
font-size: 16px;
|
||||
color: #999;
|
||||
line-height: 1;
|
||||
margin-top: 14px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
}
|
||||
.newscard-cover {
|
||||
margin-top: 10px;
|
||||
|
@ -146,7 +146,7 @@ body {
|
|||
}
|
||||
.logo {
|
||||
font-size: 14px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
text-align: center;
|
||||
color: #7994a7;
|
||||
}
|
||||
|
|
|
@ -1,51 +1,56 @@
|
|||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<link rel="shortcut icon" href="#" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{pluResPath}}html/mysNews-list/mysNews-list.css"
|
||||
/>
|
||||
<link rel="preload" href="{{pluResPath}}font/tttgbnumber.ttf" as="font" />
|
||||
</head>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<link rel="shortcut icon" href="#" />
|
||||
<link rel="stylesheet" type="text/css" href="{{pluResPath}}html/mysNews-list/mysNews-list.css" />
|
||||
<link rel="preload" href="{{pluResPath}}font/tttgbnumber.ttf" as="font" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container" id="container">
|
||||
<div class="container">
|
||||
<div class="head_box">
|
||||
<h1>米游社·{{game}}{{typeName}}列表</h1>
|
||||
</div>
|
||||
<div class="body_box">
|
||||
<div class="data_box">
|
||||
{{each data data iCount}}
|
||||
{{if iCount == data.length - 1}}
|
||||
<div class="newscard" style="border-bottom: 0px">
|
||||
{{else}}
|
||||
<div class="newscard">
|
||||
{{/if}}
|
||||
<div class="newscard-left">
|
||||
<div style="height:100%;display:table;width:100%">
|
||||
<span class="newscard-num">{{iCount + 1}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="newscard-info">
|
||||
<h3 class="newscard-title">{{data.post.subject}}</h3>
|
||||
<div class="newscard-content">{{data.post.content}}</div>
|
||||
<div class="newscard-time">{{data.post.created_at}}</div>
|
||||
</div>
|
||||
<div class="newscard-cover">
|
||||
<div class="newscard-img"
|
||||
style='background-image: url("{{data.post.images[0]}}?x-oss-process=image/resize,s_200/quality,q_80/auto-orient,0/interlace,1/format,jpg");'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
<body>
|
||||
<div class="container" id="container">
|
||||
<div class="container">
|
||||
<div class="head_box">
|
||||
<h1>米游社·{{game}}{{typeName}}列表</h1>
|
||||
</div>
|
||||
<div class="body_box">
|
||||
<div class="data_box">
|
||||
{{each data data iCount}} {{if iCount == data.length - 1}}
|
||||
<div class="newscard" style="border-bottom: 0px">
|
||||
{{else}}
|
||||
<div class="newscard">
|
||||
{{/if}}
|
||||
<div class="newscard-left">
|
||||
<div style="height: 100%; display: table; width: 100%">
|
||||
<span class="newscard-num">{{iCount + 1}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="newscard-info">
|
||||
<h3 class="newscard-title">{{data.post.subject}}</h3>
|
||||
<div class="newscard-content">{{data.post.content}}</div>
|
||||
<div class="newscard-time">{{data.post.created_at}}</div>
|
||||
</div>
|
||||
<div class="newscard-cover">
|
||||
<div
|
||||
class="newscard-img"
|
||||
style='background-image: url("{{data.post.images[0]}}?x-oss-process=image/resize,s_200/quality,q_80/auto-orient,0/interlace,1/format,jpg");'
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="logo">
|
||||
详情内容使用【#{{game}}{{typeName}}】加上序号查看,如【#{{game}}{{typeName}}2】
|
||||
</div>
|
||||
<div class="logo">Created By {{yzName}}</div>
|
||||
</div>
|
||||
<div class="logo">详情内容使用【#{{game}}{{typeName}}】加上序号查看,如【#{{game}}{{typeName}}2】</div>
|
||||
<div class="logo">Created By {{yzName}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript"></script>
|
||||
|
||||
</html>
|
||||
</body>
|
||||
<script type="text/javascript"></script>
|
||||
</html>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,10 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<link rel="shortcut icon" href="#" />
|
||||
<link rel="stylesheet" type="text/css" href="{{pluResPath}}html/mysNews/mysNews.css"/>
|
||||
<link rel="preload" href="{{pluResPath.replace('StarRail/', '')}}script/qrcode.min.js" as="script"/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{pluResPath}}html/mysNews/mysNews.css"
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="{{pluResPath.replace('StarRail/', '')}}script/qrcode.min.js"
|
||||
as="script"
|
||||
/>
|
||||
</head>
|
||||
<body>
|
||||
<svg style="display: none">
|
||||
|
@ -44,7 +52,10 @@
|
|||
<div class="account-info">
|
||||
<div class="mhy-account-title">
|
||||
{{data.user.nickname}}
|
||||
<img src="https://img-static.mihoyo.com/level/level{{data.user.level_exp.level}}.png" class="mhy-img-icon account-title" />
|
||||
<img
|
||||
src="https://img-static.mihoyo.com/level/level{{data.user.level_exp.level}}.png"
|
||||
class="mhy-img-icon account-title"
|
||||
/>
|
||||
|
||||
{{if data.user?.certification?.type == 1}}
|
||||
<img
|
||||
|
@ -53,9 +64,14 @@
|
|||
/>
|
||||
{{/if}}
|
||||
</div>
|
||||
<p class="account-label">{{data.user?.certification?.label || ""}}</p>
|
||||
<p class="account-label">
|
||||
{{data.user?.certification?.label || ""}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="mhy-follow-button sm-btn android-margin" id="qrcode"></div>
|
||||
<div
|
||||
class="mhy-follow-button sm-btn android-margin"
|
||||
id="qrcode"
|
||||
></div>
|
||||
<img class="mhy-logo" src="{{pluResPath}}html/mysNews/mys.png" />
|
||||
</div>
|
||||
<div class="mhy-article-page__header">
|
||||
|
@ -66,17 +82,25 @@
|
|||
<div class="mhy-article-page-info">
|
||||
<div class="mhy-article-page-info__from">
|
||||
<span>来自版块:</span>
|
||||
<a href="" class="mhy-router-link mhy-article-page-info__from-name" target="_blank">{{data?.forum?.name || ""}} </a>
|
||||
<a
|
||||
href=""
|
||||
class="mhy-router-link mhy-article-page-info__from-name"
|
||||
target="_blank"
|
||||
>{{data?.forum?.name || ""}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="mhy-article-page-info__count">
|
||||
<div class="mhy-article-page-info__count-item">
|
||||
<i class="mhy-icon iconfont icon-liulanshu"></i> <span title="">{{data.stat.view_num}}</span>
|
||||
<i class="mhy-icon iconfont icon-liulanshu"></i>
|
||||
<span title="">{{data.stat.view_num}}</span>
|
||||
</div>
|
||||
<div class="mhy-article-page-info__count-item">
|
||||
<i class="mhy-icon iconfont icon-dianzan"></i> <span title="">{{data.stat.like_num}}</span>
|
||||
<i class="mhy-icon iconfont icon-dianzan"></i>
|
||||
<span title="">{{data.stat.like_num}}</span>
|
||||
</div>
|
||||
<div class="mhy-article-page-info__count-item mhy-clickable">
|
||||
<i class="mhy-icon iconfont icon-liuyanshu"></i> <span title="">{{data.stat.reply_num}}</span>
|
||||
<i class="mhy-icon iconfont icon-liuyanshu"></i>
|
||||
<span title="">{{data.stat.reply_num}}</span>
|
||||
</div>
|
||||
<!-- <div class="mhy-article-page-info__count-item">
|
||||
<i class="mhy-icon iconfont icon-shoucang"></i> <span title="">{{data.stat.bookmark_num}}</span>
|
||||
|
@ -89,7 +113,9 @@
|
|||
</div>
|
||||
<div class="mhy-article-page__content">
|
||||
<div class="mhy-img-text-article ql-container ql-snow">
|
||||
<div class="data_box mhy-img-text-article__content ql-editor">{{@dataConent}}</div>
|
||||
<div class="data_box mhy-img-text-article__content ql-editor">
|
||||
{{@dataConent}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mhy-article-page__footer">
|
||||
|
@ -97,7 +123,11 @@
|
|||
<div class="mhy-topic-label-selector">
|
||||
{{each data.topics val}}
|
||||
<div class="mhy-topic-label mhy-topic-label-selector__item">
|
||||
<a href="" class="mhy-router-link mhy-topic-label__link" target="_blank">
|
||||
<a
|
||||
href=""
|
||||
class="mhy-router-link mhy-topic-label__link"
|
||||
target="_blank"
|
||||
>
|
||||
<span>{{val.name}}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -123,13 +153,16 @@
|
|||
<!-- <div class="logo">Created By {{yzName}}</div> -->
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript" src="{{pluResPath.replace('StarRail/', '')}}script/qrcode.min.js"></script>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{pluResPath.replace('StarRail/', '')}}script/qrcode.min.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
var qrcode = new QRCode(document.getElementById("qrcode"), {
|
||||
text: "https://bbs.mihoyo.com/ys/article/{{data.post.post_id}}", // 内容可以是文字,链接,邮箱
|
||||
var qrcode = new QRCode(document.getElementById('qrcode'), {
|
||||
text: 'https://bbs.mihoyo.com/ys/article/{{data.post.post_id}}', // 内容可以是文字,链接,邮箱
|
||||
width: 130, //设置宽度
|
||||
height: 130, // 设置高度
|
||||
correctLevel: QRCode.CorrectLevel.H, // 设置容错级别,上面有介绍
|
||||
});
|
||||
correctLevel: QRCode.CorrectLevel.H // 设置容错级别,上面有介绍
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@font-face {
|
||||
font-family: "tttgbnumber";
|
||||
src: url("../../font/tttgbnumber.ttf");
|
||||
font-family: 'tttgbnumber';
|
||||
src: url('../../font/tttgbnumber.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
@ -13,7 +13,10 @@
|
|||
body {
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
font-family: PingFangSC-Medium, PingFang SC, sans-serif;
|
||||
font-family:
|
||||
PingFangSC-Medium,
|
||||
PingFang SC,
|
||||
sans-serif;
|
||||
width: 400px;
|
||||
/*height: 265px;*/
|
||||
transform: scale(2);
|
||||
|
@ -21,7 +24,7 @@ body {
|
|||
}
|
||||
.container {
|
||||
width: 400px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
padding: 7px;
|
||||
}
|
||||
.page {
|
||||
|
@ -30,16 +33,16 @@ body {
|
|||
/* margin: 7px; */
|
||||
}
|
||||
.bg12 {
|
||||
background: url("../../img/abyss/floor12.png") 0% 0% / 100% no-repeat #1d2a4a;
|
||||
background: url('../../img/abyss/floor12.png') 0% 0% / 100% no-repeat #1d2a4a;
|
||||
}
|
||||
.bg11 {
|
||||
background: url("../../img/abyss/floor11.png") 0% 0% / 100% no-repeat #072550;
|
||||
background: url('../../img/abyss/floor11.png') 0% 0% / 100% no-repeat #072550;
|
||||
}
|
||||
.bg10 {
|
||||
background: url("../../img/abyss/floor10.png") 0% 0% / 100% no-repeat #382024;
|
||||
background: url('../../img/abyss/floor10.png') 0% 0% / 100% no-repeat #382024;
|
||||
}
|
||||
.bg9 {
|
||||
background: url("../../img/abyss/floor9.png") 0% 0% / 100% no-repeat #292b59;
|
||||
background: url('../../img/abyss/floor9.png') 0% 0% / 100% no-repeat #292b59;
|
||||
}
|
||||
.border {
|
||||
border-radius: 7px;
|
||||
|
@ -199,6 +202,6 @@ body {
|
|||
border-radius: 2px;
|
||||
padding: 0px 3px;
|
||||
border-radius: 3px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
}
|
||||
/*# sourceMappingURL=abyss-floor.css.map */
|
||||
/*# sourceMappingURL=abyss-floor.css.map */
|
||||
|
|
|
@ -1,59 +1,81 @@
|
|||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||
<link rel="shortcut icon" href="#"/>
|
||||
<link rel="stylesheet" type="text/css" href="{{_res_path}}html/abyss/abyss-floor.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" id="container">
|
||||
<div class="page bg{{floorIndex}}">
|
||||
<div class="border"></div>
|
||||
<div class="header">
|
||||
<div>
|
||||
<div class="uid">ID:{{uid}}</div>
|
||||
<div class="title">深境第{{floorIndex}}层</div>
|
||||
</div>
|
||||
<div class="star">
|
||||
<img src="{{_res_path}}img/abyss/star.png"/>
|
||||
<span>{{floor.star}}/{{floor.max_star}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="room-list">
|
||||
{{ each list val}}
|
||||
<div class="floor">
|
||||
<div class="floor-header">
|
||||
<span class="index">第{{val.index}}间</span>
|
||||
<span class="date">{{val.time}}</span>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<link rel="shortcut icon" href="#" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{_res_path}}html/abyss/abyss-floor.css"
|
||||
/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" id="container">
|
||||
<div class="page bg{{floorIndex}}">
|
||||
<div class="border"></div>
|
||||
<div class="header">
|
||||
<div>
|
||||
<div class="uid">ID:{{uid}}</div>
|
||||
<div class="title">深境第{{floorIndex}}层</div>
|
||||
</div>
|
||||
<div class="star">
|
||||
<img src="{{_res_path}}img/abyss/star.png" />
|
||||
<span>{{floor.star}}/{{floor.max_star}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="role-box">
|
||||
{{ each val.battles vv}}
|
||||
<div class="roles">
|
||||
{{ each vv.avatars v}}
|
||||
<div class="item">
|
||||
{{ if v.life>0}}
|
||||
<span class="life life{{v.life}}">{{v.life}}命</span>
|
||||
{{/if}}
|
||||
<img class="role_img bg{{v.rarity}}" src="{{_miao_path}}{{v.icon}}" onerror="whenError(this)"/>
|
||||
<div class="desc">Lv.{{v.level}}</div>
|
||||
<img class="fill_img" src="{{_res_path}}img/other/fill.png"/>
|
||||
</div>
|
||||
{{/each}}
|
||||
<div class="split-text split-text-{{vv.index}}">{{if vv.index==1 }}上{{else}}下{{/if}}半</div>
|
||||
<div class="room-list">
|
||||
{{ each list val}}
|
||||
<div class="floor">
|
||||
<div class="floor-header">
|
||||
<span class="index">第{{val.index}}间</span>
|
||||
<span class="date">{{val.time}}</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="role-box">
|
||||
{{ each val.battles vv}}
|
||||
<div class="roles">
|
||||
{{ each vv.avatars v}}
|
||||
<div class="item">
|
||||
{{ if v.life>0}}
|
||||
<span class="life life{{v.life}}">{{v.life}}命</span>
|
||||
{{/if}}
|
||||
<img
|
||||
class="role_img bg{{v.rarity}}"
|
||||
src="{{_miao_path}}{{v.icon}}"
|
||||
onerror="whenError(this)"
|
||||
/>
|
||||
<div class="desc">Lv.{{v.level}}</div>
|
||||
<img
|
||||
class="fill_img"
|
||||
src="{{_res_path}}img/other/fill.png"
|
||||
/>
|
||||
</div>
|
||||
{{/each}}
|
||||
<div class="split-text split-text-{{vv.index}}">
|
||||
{{if vv.index==1 }}上{{else}}下{{/if}}半
|
||||
</div>
|
||||
</div>
|
||||
{{ /each}}
|
||||
</div>
|
||||
<div class="star-box">
|
||||
<img
|
||||
class="{{if val.star<1 }}nostar{{/if}}"
|
||||
src="{{_res_path}}img/abyss/star.png"
|
||||
/>
|
||||
<img
|
||||
class="{{if val.star<2 }}nostar{{/if}}"
|
||||
src="{{_res_path}}img/abyss/star.png"
|
||||
/>
|
||||
<img
|
||||
class="{{if val.star<3 }}nostar{{/if}}"
|
||||
src="{{_res_path}}img/abyss/star.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
{{ /each}}
|
||||
</div>
|
||||
<div class="star-box">
|
||||
<img class="{{if val.star<1 }}nostar{{/if}}" src="{{_res_path}}img/abyss/star.png"/>
|
||||
<img class="{{if val.star<2 }}nostar{{/if}}" src="{{_res_path}}img/abyss/star.png"/>
|
||||
<img class="{{if val.star<3 }}nostar{{/if}}" src="{{_res_path}}img/abyss/star.png"/>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@font-face {
|
||||
font-family: "tttgbnumber";
|
||||
src: url("../../font/tttgbnumber.ttf");
|
||||
font-family: 'tttgbnumber';
|
||||
src: url('../../font/tttgbnumber.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
@ -13,15 +13,18 @@
|
|||
body {
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
font-family: PingFangSC-Medium, PingFang SC, sans-serif;
|
||||
font-family:
|
||||
PingFangSC-Medium,
|
||||
PingFang SC,
|
||||
sans-serif;
|
||||
width: 400px;
|
||||
/*height: 265px;*/
|
||||
transform: scale(2.0);
|
||||
transform: scale(2);
|
||||
transform-origin: 0 0;
|
||||
}
|
||||
.container {
|
||||
width: 400px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
padding: 7px;
|
||||
}
|
||||
.page {
|
||||
|
@ -30,16 +33,20 @@ body {
|
|||
/* margin: 7px; */
|
||||
}
|
||||
.bg12 {
|
||||
background: url("../../img/abyss/floor12.png") 0% 0% / 100% no-repeat rgb(29, 42, 74);
|
||||
background: url('../../img/abyss/floor12.png') 0% 0% / 100% no-repeat
|
||||
rgb(29, 42, 74);
|
||||
}
|
||||
.bg11 {
|
||||
background: url("../../img/abyss/floor11.png") 0% 0% / 100% no-repeat rgb(7, 37, 80);
|
||||
background: url('../../img/abyss/floor11.png') 0% 0% / 100% no-repeat
|
||||
rgb(7, 37, 80);
|
||||
}
|
||||
.bg10 {
|
||||
background: url("../../img/abyss/floor10.png") 0% 0% / 100% no-repeat rgb(56, 32, 36);
|
||||
background: url('../../img/abyss/floor10.png') 0% 0% / 100% no-repeat
|
||||
rgb(56, 32, 36);
|
||||
}
|
||||
.bg9 {
|
||||
background: url("../../img/abyss/floor9.png") 0% 0% / 100% no-repeat rgb(41, 43, 89);
|
||||
background: url('../../img/abyss/floor9.png') 0% 0% / 100% no-repeat
|
||||
rgb(41, 43, 89);
|
||||
}
|
||||
.border {
|
||||
border-radius: 7px;
|
||||
|
@ -200,5 +207,5 @@ body {
|
|||
border-radius: 2px;
|
||||
padding: 0px 3px;
|
||||
border-radius: 3px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@font-face {
|
||||
font-family: "tttgbnumber";
|
||||
src: url("../../font/tttgbnumber.ttf");
|
||||
font-family: 'tttgbnumber';
|
||||
src: url('../../font/tttgbnumber.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
@ -13,7 +13,10 @@
|
|||
body {
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
font-family: PingFangSC-Medium, PingFang SC, sans-serif;
|
||||
font-family:
|
||||
PingFangSC-Medium,
|
||||
PingFang SC,
|
||||
sans-serif;
|
||||
width: 400px;
|
||||
/*height: 265px;*/
|
||||
transform: scale(1.8);
|
||||
|
@ -26,7 +29,7 @@ body {
|
|||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
padding: 7px 0 0 0;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
}
|
||||
.row {
|
||||
width: 100%;
|
||||
|
@ -169,6 +172,6 @@ body {
|
|||
border-radius: 2px;
|
||||
padding: 0px 3px;
|
||||
border-radius: 3px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
}
|
||||
/*# sourceMappingURL=abyss.css.map */
|
||||
/*# sourceMappingURL=abyss.css.map */
|
||||
|
|
|
@ -1,76 +1,95 @@
|
|||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||
<link rel="shortcut icon" href="#"/>
|
||||
<link rel="stylesheet" type="text/css" href="{{_res_path}}html/abyss/abyss.css"/>
|
||||
<link rel="preload" href="{{_miao_path}}/font/tttgbnumber.ttf" as="font">
|
||||
<link rel="preload" href="{{_res_path}}img/other/bg5.png" as="image">
|
||||
<link rel="preload" href="{{_res_path}}img/other/bg4.png" as="image">
|
||||
<link rel="preload" href="{{_res_path}}img/other/bg105.png" as="image">
|
||||
<link rel="preload" href="{{_res_path}}img/abyss/bg.png" as="image">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" id="container">
|
||||
<div class="row">
|
||||
<div class="item">
|
||||
<div>ID:{{uid}}</div>
|
||||
<div>时间:{{time}}</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div>最深抵达:{{max_floor}}</div>
|
||||
<div>星数:{{total_star}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="role">
|
||||
<div class="title">出战角色</div>
|
||||
<div class="list">
|
||||
{{each list val}}
|
||||
<div class="item">
|
||||
{{ if val.life>0}}
|
||||
<span class="life life{{val.life}}">{{val.life}}命</span>
|
||||
{{/if}}
|
||||
<img
|
||||
class="role_img bg{{val.rarity}}"
|
||||
src="{{_miao_path}}{{val.icon}}"
|
||||
onerror="whenError(this,'role')"
|
||||
/>
|
||||
<div class="desc">{{val.value}}次</div>
|
||||
<img class="fill_img" src="{{_res_path}}img/other/fill.png"/>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<link rel="shortcut icon" href="#" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{_res_path}}html/abyss/abyss.css"
|
||||
/>
|
||||
<link rel="preload" href="{{_miao_path}}/font/tttgbnumber.ttf" as="font" />
|
||||
<link rel="preload" href="{{_res_path}}img/other/bg5.png" as="image" />
|
||||
<link rel="preload" href="{{_res_path}}img/other/bg4.png" as="image" />
|
||||
<link rel="preload" href="{{_res_path}}img/other/bg105.png" as="image" />
|
||||
<link rel="preload" href="{{_res_path}}img/abyss/bg.png" as="image" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" id="container">
|
||||
<div class="row">
|
||||
<div class="item">
|
||||
<div>ID:{{uid}}</div>
|
||||
<div>时间:{{time}}</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div>最深抵达:{{max_floor}}</div>
|
||||
<div>星数:{{total_star}}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<div class="title">战斗数据</div>
|
||||
<div class="row">
|
||||
<div class="item">战斗次数:{{total_battle_times}}次</div>
|
||||
<div class="item">
|
||||
最多击破:{{defeat.num}}
|
||||
<span class="line-icon" style="background-image:url({{_miao_path}}{{defeat.icon}})"></span>
|
||||
<div class="role">
|
||||
<div class="title">出战角色</div>
|
||||
<div class="list">
|
||||
{{each list val}}
|
||||
<div class="item">
|
||||
{{ if val.life>0}}
|
||||
<span class="life life{{val.life}}">{{val.life}}命</span>
|
||||
{{/if}}
|
||||
<img
|
||||
class="role_img bg{{val.rarity}}"
|
||||
src="{{_miao_path}}{{val.icon}}"
|
||||
onerror="whenError(this,'role')"
|
||||
/>
|
||||
<div class="desc">{{val.value}}次</div>
|
||||
<img class="fill_img" src="{{_res_path}}img/other/fill.png" />
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<div class="title">战斗数据</div>
|
||||
<div class="row">
|
||||
<div class="item">战斗次数:{{total_battle_times}}次</div>
|
||||
<div class="item">
|
||||
最多击破:{{defeat.num}}
|
||||
<span
|
||||
class="line-icon"
|
||||
style="background-image:url({{_miao_path}}{{defeat.icon}})"
|
||||
></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row two">
|
||||
<div class="item">
|
||||
承受伤害:{{take_damage.num}}
|
||||
<span
|
||||
class="line-icon"
|
||||
style="background-image:url({{_miao_path}}{{take_damage.icon}})"
|
||||
></span>
|
||||
</div>
|
||||
<div class="item">
|
||||
元素战技:{{normal_skill.num}}
|
||||
<span
|
||||
class="line-icon"
|
||||
style="background-image:url({{_miao_path}}{{normal_skill.icon}})"
|
||||
></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="item">
|
||||
最强一击:{{damage.num}}
|
||||
<span
|
||||
class="line-icon"
|
||||
style="background-image:url({{_miao_path}}{{damage.icon}})"
|
||||
></span>
|
||||
</div>
|
||||
<div class="item">
|
||||
元素爆发:{{energy_skill.num}}
|
||||
<span
|
||||
class="line-icon"
|
||||
style="background-image:url({{_miao_path}}{{energy_skill.icon}})"
|
||||
></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row two">
|
||||
<div class="item">
|
||||
承受伤害:{{take_damage.num}}
|
||||
<span class="line-icon" style="background-image:url({{_miao_path}}{{take_damage.icon}})"></span>
|
||||
</div>
|
||||
<div class="item">
|
||||
元素战技:{{normal_skill.num}}
|
||||
<span class="line-icon" style="background-image:url({{_miao_path}}{{normal_skill.icon}})"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="item">
|
||||
最强一击:{{damage.num}}
|
||||
<span class="line-icon" style="background-image:url({{_miao_path}}{{damage.icon}})"></span>
|
||||
</div>
|
||||
<div class="item">
|
||||
元素爆发:{{energy_skill.num}}
|
||||
<span class="line-icon" style="background-image:url({{_miao_path}}{{energy_skill.icon}})"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@font-face {
|
||||
font-family: "tttgbnumber";
|
||||
src: url("../../font/tttgbnumber.ttf");
|
||||
font-family: 'tttgbnumber';
|
||||
src: url('../../font/tttgbnumber.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
@ -15,7 +15,10 @@
|
|||
body {
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
font-family: PingFangSC-Medium, PingFang SC, sans-serif;
|
||||
font-family:
|
||||
PingFangSC-Medium,
|
||||
PingFang SC,
|
||||
sans-serif;
|
||||
width: 400px;
|
||||
/*height: 265px;*/
|
||||
transform: scale(1.8);
|
||||
|
@ -29,7 +32,7 @@ body {
|
|||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
padding: 7px 0 0 0;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
}
|
||||
|
||||
.row {
|
||||
|
@ -199,5 +202,5 @@ body {
|
|||
border-radius: 2px;
|
||||
padding: 0px 3px;
|
||||
border-radius: 3px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@font-face {
|
||||
font-family: "tttgbnumber";
|
||||
src: url("../../font/tttgbnumber.ttf");
|
||||
font-family: 'tttgbnumber';
|
||||
src: url('../../font/tttgbnumber.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
@ -13,19 +13,26 @@
|
|||
body {
|
||||
font-size: 18px;
|
||||
color: #1e1f20;
|
||||
font-family: PingFangSC-Medium, PingFang SC, sans-serif;
|
||||
font-family:
|
||||
PingFangSC-Medium,
|
||||
PingFang SC,
|
||||
sans-serif;
|
||||
transform-origin: 0 0;
|
||||
width: 530px;
|
||||
background: url("../../img/userAdmin/bg.jpg") top left no-repeat #0a1720;
|
||||
background: url('../../img/userAdmin/bg.jpg') top left no-repeat #0a1720;
|
||||
background-size: 530px auto;
|
||||
}
|
||||
.container {
|
||||
width: 530px;
|
||||
padding: 20px 15px 15px 15px;
|
||||
color: #caced9;
|
||||
background: url("../../img/userAdmin/footer.png") bottom left no-repeat;
|
||||
background: url('../../img/userAdmin/footer.png') bottom left no-repeat;
|
||||
background-size: 530px auto;
|
||||
font-family: tttgbnumber, PingFangSC-Medium, PingFang SC, sans-serif;
|
||||
font-family:
|
||||
tttgbnumber,
|
||||
PingFangSC-Medium,
|
||||
PingFang SC,
|
||||
sans-serif;
|
||||
}
|
||||
.stat {
|
||||
height: 270px;
|
||||
|
@ -106,7 +113,9 @@ body {
|
|||
background: rgba(10, 23, 32, 0.7);
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 0 1px 0 #caced9 inset, 2px 2px 5px 0 rgba(30, 30, 30, 0.7);
|
||||
box-shadow:
|
||||
0 0 1px 0 #caced9 inset,
|
||||
2px 2px 5px 0 rgba(30, 30, 30, 0.7);
|
||||
}
|
||||
.uids .uid {
|
||||
font-size: 12px;
|
||||
|
@ -168,7 +177,9 @@ body {
|
|||
background: rgba(10, 23, 32, 0.7);
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 0 1px 0 #caced9 inset, 2px 2px 5px 0 rgba(30, 30, 30, 0.7);
|
||||
box-shadow:
|
||||
0 0 1px 0 #caced9 inset,
|
||||
2px 2px 5px 0 rgba(30, 30, 30, 0.7);
|
||||
}
|
||||
.notice ul {
|
||||
padding: 10px 10px 10px 30px;
|
||||
|
@ -189,4 +200,4 @@ body {
|
|||
text-align: center;
|
||||
margin: 10px 0 0;
|
||||
}
|
||||
/*# sourceMappingURL=userAdmin.css.map */
|
||||
/*# sourceMappingURL=userAdmin.css.map */
|
||||
|
|
|
@ -1,83 +1,99 @@
|
|||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||
<link rel="shortcut icon" href="#"/>
|
||||
<link rel="stylesheet" type="text/css" href="{{pluResPath}}html/admin/userAdmin.css"/>
|
||||
</head>
|
||||
<body id="container">
|
||||
<div class="container">
|
||||
<div class="stat">
|
||||
<div class="total">{{count.last}}</div>
|
||||
<ul class="detail">
|
||||
<li>
|
||||
<strong>
|
||||
<b>总用户量</b>
|
||||
<i>用户CK+系统CK</i>
|
||||
</strong>
|
||||
<span>{{count.total}}</span>
|
||||
</li>
|
||||
{{set mysCount = servs?.mys?.count }}
|
||||
<li>
|
||||
<strong>
|
||||
<b>米游社</b>
|
||||
<i>可用CK / 失效CK</i>
|
||||
</strong>
|
||||
<span>{{mysCount?.total}}
|
||||
<i>({{mysCount?.normal}}/{{mysCount?.disable}})</i>
|
||||
</span>
|
||||
</li>
|
||||
{{set hoyoCount = servs?.hoyolab?.count }}
|
||||
<li>
|
||||
<strong>
|
||||
<b>HoyoLab</b>
|
||||
<i>可用CK / 失效CK</i>
|
||||
</strong>
|
||||
<span>{{hoyoCount?.normal}}
|
||||
<i>({{hoyoCount?.normal}}/{{hoyoCount?.disable}})</i>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="cookie-type">{{mysCount.last}} / {{hoyoCount.last}}</div>
|
||||
</div>
|
||||
{{set servName = {mys:'米游社', hoyolab:'HoyoLab'} }}
|
||||
{{set uidLimit = 60 }}
|
||||
{{each servs servData servKey}}
|
||||
<div class="cont-title">{{servName[servKey]}}-CK列表 (请求次数 / CK-Ltuid)</div>
|
||||
<div class="uids">
|
||||
{{set listLen = servData.list.length }}
|
||||
{{if listLen > 0 }}
|
||||
{{each servData.list uid idx}} {{if idx < uidLimit}}
|
||||
<div class="uid type-{{uid.num<60 ? '0':'4'}}">
|
||||
<div class="uid-inner">
|
||||
<span>{{uid.num>60 ? "×" : uid.num}}</span>
|
||||
{{uid.ltuid}}
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<link rel="shortcut icon" href="#" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{pluResPath}}html/admin/userAdmin.css"
|
||||
/>
|
||||
</head>
|
||||
<body id="container">
|
||||
<div class="container">
|
||||
<div class="stat">
|
||||
<div class="total">{{count.last}}</div>
|
||||
<ul class="detail">
|
||||
<li>
|
||||
<strong>
|
||||
<b>总用户量</b>
|
||||
<i>用户CK+系统CK</i>
|
||||
</strong>
|
||||
<span>{{count.total}}</span>
|
||||
</li>
|
||||
{{set mysCount = servs?.mys?.count }}
|
||||
<li>
|
||||
<strong>
|
||||
<b>米游社</b>
|
||||
<i>可用CK / 失效CK</i>
|
||||
</strong>
|
||||
<span
|
||||
>{{mysCount?.total}}
|
||||
<i>({{mysCount?.normal}}/{{mysCount?.disable}})</i>
|
||||
</span>
|
||||
</li>
|
||||
{{set hoyoCount = servs?.hoyolab?.count }}
|
||||
<li>
|
||||
<strong>
|
||||
<b>HoyoLab</b>
|
||||
<i>可用CK / 失效CK</i>
|
||||
</strong>
|
||||
<span
|
||||
>{{hoyoCount?.normal}}
|
||||
<i>({{hoyoCount?.normal}}/{{hoyoCount?.disable}})</i>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="cookie-type">{{mysCount.last}} / {{hoyoCount.last}}</div>
|
||||
</div>
|
||||
{{set process = 100 - uid.num/30*100 }}
|
||||
<div class="uid-process" style="left:-{{ process<0?0:process }}%"></div>
|
||||
{{set servName = {mys:'米游社', hoyolab:'HoyoLab'} }} {{set uidLimit = 60
|
||||
}} {{each servs servData servKey}}
|
||||
<div class="cont-title">
|
||||
{{servName[servKey]}}-CK列表 (请求次数 / CK-Ltuid)
|
||||
</div>
|
||||
<div class="uids">
|
||||
{{set listLen = servData.list.length }} {{if listLen > 0 }} {{each
|
||||
servData.list uid idx}} {{if idx < uidLimit}}
|
||||
<div class="uid type-{{uid.num<60 ? '0':'4'}}">
|
||||
<div class="uid-inner">
|
||||
<span>{{uid.num>60 ? "×" : uid.num}}</span>
|
||||
{{uid.ltuid}}
|
||||
</div>
|
||||
{{set process = 100 - uid.num/30*100 }}
|
||||
<div
|
||||
class="uid-process"
|
||||
style="left:-{{ process<0?0:process }}%"
|
||||
></div>
|
||||
</div>
|
||||
{{/if}} {{/each}} {{if listLen > uidLimit}}
|
||||
<div class="uid uid-tips">还有{{listLen-uidLimit}}个CK记录...</div>
|
||||
{{/if}} {{else}}
|
||||
<div class="uid uid-tips">暂无</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
<div class="notice">
|
||||
<ul>
|
||||
<li>本页面统计的用户数量为CK(通行证 ltuid)数量</li>
|
||||
<li>
|
||||
已默认开启全部CK的使用,系统将全局最优化使用查询CK,可大幅降低CK使用次数消耗
|
||||
</li>
|
||||
<li>查询注册CK的用户及今日已查询过的uid,不会重复消耗查询次数</li>
|
||||
<li>预计剩余查询次数为预计值,仅供参考</li>
|
||||
<li><span>【常用命令】</span></li>
|
||||
<li>
|
||||
<span>#刷新用户缓存</span>: 保留当前请求次数统计,重新加载所有ck文件
|
||||
</li>
|
||||
<li>
|
||||
<span>#重置用户缓存</span>: 强制重置查询数据,会清空本日请求次数统计
|
||||
</li>
|
||||
<li>
|
||||
<span>#删除无效用户</span>:
|
||||
删除当前所有请求失效的用户的CK数据,暂不会删除公共CK
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="copyright">Created By {{yzName}}</div>
|
||||
</div>
|
||||
{{/if}} {{/each}}
|
||||
{{if listLen > uidLimit}}
|
||||
<div class="uid uid-tips">还有{{listLen-uidLimit}}个CK记录...</div>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<div class="uid uid-tips">暂无</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
<div class="notice">
|
||||
<ul>
|
||||
<li>本页面统计的用户数量为CK(通行证 ltuid)数量</li>
|
||||
<li>已默认开启全部CK的使用,系统将全局最优化使用查询CK,可大幅降低CK使用次数消耗</li>
|
||||
<li>查询注册CK的用户及今日已查询过的uid,不会重复消耗查询次数</li>
|
||||
<li>预计剩余查询次数为预计值,仅供参考</li>
|
||||
<li><span>【常用命令】</span>
|
||||
<li><span>#刷新用户缓存</span>: 保留当前请求次数统计,重新加载所有ck文件</li>
|
||||
<li><span>#重置用户缓存</span>: 强制重置查询数据,会清空本日请求次数统计</li>
|
||||
<li><span>#删除无效用户</span>: 删除当前所有请求失效的用户的CK数据,暂不会删除公共CK</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="copyright">Created By {{yzName}}</div>
|
||||
</div>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@font-face {
|
||||
font-family: "tttgbnumber";
|
||||
src: url("../../font/tttgbnumber.ttf");
|
||||
font-family: 'tttgbnumber';
|
||||
src: url('../../font/tttgbnumber.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
@ -15,10 +15,13 @@
|
|||
body {
|
||||
font-size: 18px;
|
||||
color: #1e1f20;
|
||||
font-family: PingFangSC-Medium, PingFang SC, sans-serif;
|
||||
font-family:
|
||||
PingFangSC-Medium,
|
||||
PingFang SC,
|
||||
sans-serif;
|
||||
transform-origin: 0 0;
|
||||
width: 530px;
|
||||
background: url("../../img/userAdmin/bg.jpg") top left no-repeat #0a1720;
|
||||
background: url('../../img/userAdmin/bg.jpg') top left no-repeat #0a1720;
|
||||
background-size: 530px auto;
|
||||
}
|
||||
|
||||
|
@ -26,9 +29,13 @@ body {
|
|||
width: 530px;
|
||||
padding: 20px 15px 15px 15px;
|
||||
color: #caced9;
|
||||
background: url("../../img/userAdmin/footer.png") bottom left no-repeat;
|
||||
background: url('../../img/userAdmin/footer.png') bottom left no-repeat;
|
||||
background-size: 530px auto;
|
||||
font-family: tttgbnumber, PingFangSC-Medium, PingFang SC, sans-serif;
|
||||
font-family:
|
||||
tttgbnumber,
|
||||
PingFangSC-Medium,
|
||||
PingFang SC,
|
||||
sans-serif;
|
||||
}
|
||||
|
||||
.stat {
|
||||
|
@ -36,7 +43,6 @@ body {
|
|||
position: relative;
|
||||
|
||||
.total {
|
||||
|
||||
font-size: 45px;
|
||||
width: 190px;
|
||||
height: 50px;
|
||||
|
@ -65,7 +71,8 @@ body {
|
|||
text-align: right;
|
||||
width: 100px;
|
||||
|
||||
i, b {
|
||||
i,
|
||||
b {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
@ -119,10 +126,12 @@ body {
|
|||
.uids {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
background: rgba(10, 23, 32, .7);
|
||||
background: rgba(10, 23, 32, 0.7);
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 0 1px 0 #caced9 inset, 2px 2px 5px 0 rgba(30, 30, 30, .7);
|
||||
box-shadow:
|
||||
0 0 1px 0 #caced9 inset,
|
||||
2px 2px 5px 0 rgba(30, 30, 30, 0.7);
|
||||
|
||||
.uid {
|
||||
font-size: 12px;
|
||||
|
@ -151,7 +160,7 @@ body {
|
|||
|
||||
&.uid-tips {
|
||||
width: 100%;
|
||||
background: rgba(50, 50, 50, .5)
|
||||
background: rgba(50, 50, 50, 0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -193,10 +202,12 @@ body {
|
|||
|
||||
.notice {
|
||||
margin-top: 15px;
|
||||
background: rgba(10, 23, 32, .7);
|
||||
background: rgba(10, 23, 32, 0.7);
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 0 1px 0 #caced9 inset, 2px 2px 5px 0 rgba(30, 30, 30, .7);
|
||||
box-shadow:
|
||||
0 0 1px 0 #caced9 inset,
|
||||
2px 2px 5px 0 rgba(30, 30, 30, 0.7);
|
||||
|
||||
ul {
|
||||
padding: 10px 10px 10px 30px;
|
||||
|
@ -207,7 +218,7 @@ body {
|
|||
padding-bottom: 3px 0;
|
||||
|
||||
span {
|
||||
background: rgba(50, 50, 50, .5);
|
||||
background: rgba(50, 50, 50, 0.5);
|
||||
padding: 0 5px;
|
||||
border-radius: 4px;
|
||||
margin: 0 5px;
|
||||
|
@ -220,4 +231,4 @@ body {
|
|||
.copyright {
|
||||
text-align: center;
|
||||
margin: 10px 0 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@font-face {
|
||||
font-family: "tttgbnumber";
|
||||
src: url("../../font/tttgbnumber.ttf");
|
||||
font-family: 'tttgbnumber';
|
||||
src: url('../../font/tttgbnumber.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
@ -14,7 +14,10 @@ body {
|
|||
font-size: 12px;
|
||||
color: #1e1f20;
|
||||
max-width: 580px;
|
||||
font-family: PingFangSC-Medium, PingFang SC, sans-serif;
|
||||
font-family:
|
||||
PingFangSC-Medium,
|
||||
PingFang SC,
|
||||
sans-serif;
|
||||
transform: scale(1.5);
|
||||
transform-origin: 0 0;
|
||||
}
|
||||
|
@ -46,7 +49,7 @@ body {
|
|||
margin-left: 17px;
|
||||
}
|
||||
.uid:before {
|
||||
content: " ";
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
width: 5px;
|
||||
height: 24px;
|
||||
|
@ -65,7 +68,7 @@ body {
|
|||
font-family: tttgbnumber;
|
||||
margin-right: 6px;
|
||||
margin-bottom: 8px;
|
||||
background: #F6F7F8;
|
||||
background: #f6f7f8;
|
||||
/* color: #61666D; */
|
||||
padding: 0px 10px 2px 6px;
|
||||
border-radius: 12px;
|
||||
|
@ -185,7 +188,7 @@ body {
|
|||
width: 100%;
|
||||
height: 18px;
|
||||
font-size: 14px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
}
|
||||
.role_name {
|
||||
overflow: hidden;
|
||||
|
@ -207,7 +210,7 @@ body {
|
|||
border-radius: 2px;
|
||||
padding: 1px 4px;
|
||||
border-radius: 3px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
}
|
||||
.life1 {
|
||||
background-color: #62a8ea;
|
||||
|
@ -251,4 +254,4 @@ body {
|
|||
font-size: 12px;
|
||||
color: #7f858a;
|
||||
}
|
||||
/*# sourceMappingURL=weapon.css.map */
|
||||
/*# sourceMappingURL=weapon.css.map */
|
||||
|
|
|
@ -1,78 +1,98 @@
|
|||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||
<link rel="shortcut icon" href="#"/>
|
||||
<link rel="stylesheet" type="text/css" href="{{_res_path}}html/avatar/weapon.css"/>
|
||||
</head>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<link rel="shortcut icon" href="#" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{_res_path}}html/avatar/weapon.css"
|
||||
/>
|
||||
</head>
|
||||
|
||||
<body {{ if list.length
|
||||
<=8}}class="list8" {{/if}}>
|
||||
<div class="container" id="container">
|
||||
<div class="main_box">
|
||||
<div class="base_info">
|
||||
<div class="uid">ID: {{uid}}</div>
|
||||
{{ if list.length>8 }}
|
||||
<div class="lab">
|
||||
<div class="lab-item">
|
||||
<div class="lab-item-5"></div>
|
||||
<div class="lab-item-text">五星:{{count.five}}</div>
|
||||
</div>
|
||||
<div class="lab-item">
|
||||
<div class="lab-item-4"></div>
|
||||
<div class="lab-item-text">四星:{{count.four}}</div>
|
||||
</div>
|
||||
<div class="lab-item">
|
||||
<div class="lab-item-3"></div>
|
||||
<div class="lab-item-text">三星:{{count.three}}</div>
|
||||
</div>
|
||||
<div class="lab-item">
|
||||
<div class="lab-item-weapon"><img src="{{_res_path}}img/gacha/items/单手剑.png"></div>
|
||||
<div class="lab-item-text">单手剑:{{count['单手剑']}}</div>
|
||||
</div>
|
||||
<div class="lab-item">
|
||||
<div class="lab-item-weapon"><img src="{{_res_path}}img/gacha/items/大剑.png"></div>
|
||||
<div class="lab-item-text">双手剑:{{count['双手剑']}}</div>
|
||||
</div>
|
||||
<div class="lab-item">
|
||||
<div class="lab-item-weapon"><img src="{{_res_path}}img/gacha/items/弓.png"></div>
|
||||
<div class="lab-item-text">弓:{{count['弓']}}</div>
|
||||
</div>
|
||||
<div class="lab-item">
|
||||
<div class="lab-item-weapon"><img src="{{_res_path}}img/gacha/items/枪.png"></div>
|
||||
<div class="lab-item-text">枪:{{count['长柄武器']}}</div>
|
||||
</div>
|
||||
<div class="lab-item">
|
||||
<div class="lab-item-weapon"><img src="{{_res_path}}img/gacha/items/法器.png"></div>
|
||||
<div class="lab-item-text">法器:{{count['法器']}}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="item_box">
|
||||
{{each list val}}
|
||||
<div class="item">
|
||||
<span class="user item-icon" style="background-image:url({{_miao_path}}{{val.role_icon}})"></span>
|
||||
<div class="role_box">
|
||||
{{ if val.affix_level>1}}
|
||||
<span class="life life{{val.affix_level}}">
|
||||
{{val.affix_level}}
|
||||
</span>
|
||||
{{ var isShortList = list.length <= 8 }}
|
||||
|
||||
<body class="{{ isShortList ? 'list8' : '' }}">
|
||||
<div class="container" id="container">
|
||||
<div class="main_box">
|
||||
<div class="base_info">
|
||||
<div class="uid">ID: {{uid}}</div>
|
||||
{{ if list.length>8 }}
|
||||
<div class="lab">
|
||||
<div class="lab-item">
|
||||
<div class="lab-item-5"></div>
|
||||
<div class="lab-item-text">五星:{{count.five}}</div>
|
||||
</div>
|
||||
<div class="lab-item">
|
||||
<div class="lab-item-4"></div>
|
||||
<div class="lab-item-text">四星:{{count.four}}</div>
|
||||
</div>
|
||||
<div class="lab-item">
|
||||
<div class="lab-item-3"></div>
|
||||
<div class="lab-item-text">三星:{{count.three}}</div>
|
||||
</div>
|
||||
<div class="lab-item">
|
||||
<div class="lab-item-weapon">
|
||||
<img src="{{_res_path}}img/gacha/items/单手剑.png" />
|
||||
</div>
|
||||
<div class="lab-item-text">单手剑:{{count['单手剑']}}</div>
|
||||
</div>
|
||||
<div class="lab-item">
|
||||
<div class="lab-item-weapon">
|
||||
<img src="{{_res_path}}img/gacha/items/大剑.png" />
|
||||
</div>
|
||||
<div class="lab-item-text">双手剑:{{count['双手剑']}}</div>
|
||||
</div>
|
||||
<div class="lab-item">
|
||||
<div class="lab-item-weapon">
|
||||
<img src="{{_res_path}}img/gacha/items/弓.png" />
|
||||
</div>
|
||||
<div class="lab-item-text">弓:{{count['弓']}}</div>
|
||||
</div>
|
||||
<div class="lab-item">
|
||||
<div class="lab-item-weapon">
|
||||
<img src="{{_res_path}}img/gacha/items/枪.png" />
|
||||
</div>
|
||||
<div class="lab-item-text">枪:{{count['长柄武器']}}</div>
|
||||
</div>
|
||||
<div class="lab-item">
|
||||
<div class="lab-item-weapon">
|
||||
<img src="{{_res_path}}img/gacha/items/法器.png" />
|
||||
</div>
|
||||
<div class="lab-item-text">法器:{{count['法器']}}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="bg{{val.rarity}}"></div>
|
||||
<img class="role_img" src="{{_miao_path}}{{val.icon}}" onerror="whenError(this)"/>
|
||||
<div class="desc">Lv.{{val.level}}</div>
|
||||
<img class="fill_img" src="{{_res_path}}img/other/fill.png"/>
|
||||
</div>
|
||||
<div class="role_name">{{val.showName}}</div>
|
||||
<div class="item_box">
|
||||
{{each list val}}
|
||||
<div class="item">
|
||||
<span
|
||||
class="user item-icon"
|
||||
style="background-image:url({{_miao_path}}{{val.role_icon}})"
|
||||
></span>
|
||||
<div class="role_box">
|
||||
{{ if val.affix_level>1}}
|
||||
<span class="life life{{val.affix_level}}">
|
||||
{{val.affix_level}}
|
||||
</span>
|
||||
{{/if}}
|
||||
<div class="bg{{val.rarity}}"></div>
|
||||
<img
|
||||
class="role_img"
|
||||
src="{{_miao_path}}{{val.icon}}"
|
||||
onerror="whenError(this)"
|
||||
/>
|
||||
<div class="desc">Lv.{{val.level}}</div>
|
||||
<img class="fill_img" src="{{_res_path}}img/other/fill.png" />
|
||||
</div>
|
||||
<div class="role_name">{{val.showName}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
<div class="tips">*仅显现已装备的武器</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
<div class="tips">*仅显现已装备的武器</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
|
||||
</body>
|
||||
<script type="text/javascript"></script>
|
||||
</html>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@font-face {
|
||||
font-family: "tttgbnumber";
|
||||
src: url("../../font/tttgbnumber.ttf");
|
||||
font-family: 'tttgbnumber';
|
||||
src: url('../../font/tttgbnumber.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
@ -16,7 +16,10 @@ body {
|
|||
font-size: 12px;
|
||||
color: #1e1f20;
|
||||
max-width: 580px;
|
||||
font-family: PingFangSC-Medium, PingFang SC, sans-serif;
|
||||
font-family:
|
||||
PingFangSC-Medium,
|
||||
PingFang SC,
|
||||
sans-serif;
|
||||
transform: scale(1.5);
|
||||
transform-origin: 0 0;
|
||||
}
|
||||
|
@ -54,7 +57,7 @@ body {
|
|||
}
|
||||
|
||||
.uid:before {
|
||||
content: " ";
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
width: 5px;
|
||||
height: 24px;
|
||||
|
@ -75,7 +78,7 @@ body {
|
|||
font-family: tttgbnumber;
|
||||
margin-right: 6px;
|
||||
margin-bottom: 8px;
|
||||
background: #F6F7F8;
|
||||
background: #f6f7f8;
|
||||
/* color: #61666D; */
|
||||
padding: 0px 10px 2px 6px;
|
||||
border-radius: 12px;
|
||||
|
@ -211,7 +214,7 @@ body {
|
|||
width: 100%;
|
||||
height: 18px;
|
||||
font-size: 14px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
}
|
||||
|
||||
.role_name {
|
||||
|
@ -235,7 +238,7 @@ body {
|
|||
border-radius: 2px;
|
||||
padding: 1px 4px;
|
||||
border-radius: 3px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
}
|
||||
|
||||
.life1 {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@font-face {
|
||||
font-family: "tttgbnumber";
|
||||
src: url("../../font/tttgbnumber.ttf");
|
||||
font-family: 'tttgbnumber';
|
||||
src: url('../../font/tttgbnumber.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
@ -52,22 +52,22 @@ body {
|
|||
color: #fff;
|
||||
padding: 3px 6px;
|
||||
border-radius: 7px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
background-color: #a57f72;
|
||||
box-shadow: 0 3px 6px 0 rgb(132 93 90 / 40%);
|
||||
}
|
||||
.codeCenter{
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 194px;
|
||||
font-size: 20px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
padding: 3px 6px;
|
||||
border-radius: 7px;
|
||||
font-family: "tttgbnumber";
|
||||
background-color: #a57f72;
|
||||
box-shadow: 0 3px 6px 0 rgb(132 93 90 / 40%);
|
||||
.codeCenter {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 194px;
|
||||
font-size: 20px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
padding: 3px 6px;
|
||||
border-radius: 7px;
|
||||
font-family: 'tttgbnumber';
|
||||
background-color: #a57f72;
|
||||
box-shadow: 0 3px 6px 0 rgb(132 93 90 / 40%);
|
||||
}
|
||||
.topLeft {
|
||||
position: absolute;
|
||||
|
@ -79,7 +79,7 @@ body {
|
|||
color: #fff;
|
||||
padding: 3px 6px;
|
||||
border-radius: 7px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
background-color: #a57f72;
|
||||
box-shadow: 0 3px 6px 0 rgb(132 93 90 / 40%);
|
||||
}
|
||||
|
@ -314,7 +314,11 @@ body {
|
|||
/* box-shadow: 0 5px 10px 0 rgb(0 0 0 / 10%); */
|
||||
border-radius: 3px;
|
||||
font-family: tttgbnumber;
|
||||
background: linear-gradient(1turn, hsla(25, 23%, 67%, 0.4), hsla(25, 23%, 67%, 0.2));
|
||||
background: linear-gradient(
|
||||
1turn,
|
||||
hsla(25, 23%, 67%, 0.4),
|
||||
hsla(25, 23%, 67%, 0.2)
|
||||
);
|
||||
display: flex;
|
||||
color: #8c7770;
|
||||
font-weight: bold;
|
||||
|
@ -362,22 +366,22 @@ body {
|
|||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.long{
|
||||
width: 100%;
|
||||
.long {
|
||||
width: 100%;
|
||||
}
|
||||
.isTalent{
|
||||
margin-left: -10px;
|
||||
.isTalent {
|
||||
margin-left: -10px;
|
||||
}
|
||||
.cailiao_img{
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin-right: 10px;
|
||||
background-position: 50%;
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAEXElEQVRYhc2ZO2tUQRTHz5l73WQlGhHETlDEQhALG20kxEJLW2trv4SIYCOCHyTYWSh2CmIR7CwsbK1CFNxsdufIvM887mN3bx4Lm53XPfObM/8zM3eCRAQ7r5/fQIRXALANAOeBfxABEXUBogAUJi+wMmkhQrmodL5SZbq8AqwECNtGVJVpq8sqWya0PfessiPQtAeBAIQTOZvuTg8mz+48evwN3715cVPK+WcA2IT0k8JqwyXYkPewFkAIC2fLXVpY8GAjDEzZAnTgqMGJ4N9kf2+rlnL+UsEqT8v5PGOOnA3KUF4aF4eMbm+LeML4AFlzZtQ5yKbrMyO4fPU6bFy4OB6Nz74VAPBA1bXBKoN6pBiXmhnwGDks+p5NiX4EGTiyQVl7ttyBz2eH8PvXTwO/vn67BoCNlT0a/fA892iDV5E9FT0TepgdHupfgWKt7g/LO+sCLUM0grJRIfARBue4AWTAQ+i0FdQCpaCQeDW0iXlq13Dp6W8LqAIEZF5sAuXtQ32tlg4oBtTx6rQRNHFizdfats5z0DLEMjqN+sNyPQGpP1C7hfm06DSVmZcYOQ/7bTQHLRkI/Q+h0x6g7oeMl2uzHeLAOl0woDLQMBj3hIJVu3Ht9vFBdMoHF4H302kJ1Nsk0t8a3WnpSHTK46I0/YnEsrbIeK2HReLhok47Dig56HI6zWYtihXS39od606DTtvsaw9LaYNOnVHZA+2gbBY6QRbTaWafQZPTsDtQe2snqNOyHG29lCBN0FVew8et08ZBFRwltYel2em0LE6BTtvqwa8SzMNdOiqDDqfTNkcQSSBp12H9UsmmIvdqt04jkF46XcwRClZB1wpWBd7R6LRnQDWChjbew14SS+u0axnsr9Oo/0Re5IPO3RVg26iXCSju1VUDFqwk7Drsd7pEe5kOC4aG1GnpiOtPa14SaknTV0iFhl3T3wjK2/bXabO8jIcBpNk4BNvpVtLpoueOzlljNsjudMK9cZwCnRZB7R8ZDj/JxnGCOs37YAmS9gBvrzjT6Y81PbBOi6CFAfnmbONA/xK6nE7bd8hkMD2nP662qwRI+05n72QXDpjeO+CCoOns2aReJXzQIQ+64QOKWW3VaQk0rBJOEv6dbnWdpoelHDQfXGjeAGo/5iUUnCQaAi41dsQ6LYG6MgoeRnv4aZv+49FpBJvUU7SsRReCK+q0CArMIYuB+pyJOethFC2gw+i0EzTpJ+3beNhcaE9B4KgejWCu/pfQufAH2OL0FwMqzjfpNM+yVtrDtC9ms9muKr505RrUozXmoeBJjLTs/nNk23gAHrgIoRqbYdE5JQwpOIoNQAgXdB/w+6f398bnNj+iwLGfSgrDInK/tlCSvUmUfjF3917qcKLLeZ6X6XR41qeVbVWnuyrUmavWPSC6K25tPfwy+bu/PZtOvxLJg0ZYfRx1sKoDc9cVwdntMwXVg/KwKh2AFKgftH4ug/1DQDsK9v6Tpz/+A+D9r7rzum/YAAAAAElFTkSuQmCC);
|
||||
.cailiao_img {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin-right: 10px;
|
||||
background-position: 50%;
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAEXElEQVRYhc2ZO2tUQRTHz5l73WQlGhHETlDEQhALG20kxEJLW2trv4SIYCOCHyTYWSh2CmIR7CwsbK1CFNxsdufIvM887mN3bx4Lm53XPfObM/8zM3eCRAQ7r5/fQIRXALANAOeBfxABEXUBogAUJi+wMmkhQrmodL5SZbq8AqwECNtGVJVpq8sqWya0PfessiPQtAeBAIQTOZvuTg8mz+48evwN3715cVPK+WcA2IT0k8JqwyXYkPewFkAIC2fLXVpY8GAjDEzZAnTgqMGJ4N9kf2+rlnL+UsEqT8v5PGOOnA3KUF4aF4eMbm+LeML4AFlzZtQ5yKbrMyO4fPU6bFy4OB6Nz74VAPBA1bXBKoN6pBiXmhnwGDks+p5NiX4EGTiyQVl7ttyBz2eH8PvXTwO/vn67BoCNlT0a/fA892iDV5E9FT0TepgdHupfgWKt7g/LO+sCLUM0grJRIfARBue4AWTAQ+i0FdQCpaCQeDW0iXlq13Dp6W8LqAIEZF5sAuXtQ32tlg4oBtTx6rQRNHFizdfats5z0DLEMjqN+sNyPQGpP1C7hfm06DSVmZcYOQ/7bTQHLRkI/Q+h0x6g7oeMl2uzHeLAOl0woDLQMBj3hIJVu3Ht9vFBdMoHF4H302kJ1Nsk0t8a3WnpSHTK46I0/YnEsrbIeK2HReLhok47Dig56HI6zWYtihXS39od606DTtvsaw9LaYNOnVHZA+2gbBY6QRbTaWafQZPTsDtQe2snqNOyHG29lCBN0FVew8et08ZBFRwltYel2em0LE6BTtvqwa8SzMNdOiqDDqfTNkcQSSBp12H9UsmmIvdqt04jkF46XcwRClZB1wpWBd7R6LRnQDWChjbew14SS+u0axnsr9Oo/0Re5IPO3RVg26iXCSju1VUDFqwk7Drsd7pEe5kOC4aG1GnpiOtPa14SaknTV0iFhl3T3wjK2/bXabO8jIcBpNk4BNvpVtLpoueOzlljNsjudMK9cZwCnRZB7R8ZDj/JxnGCOs37YAmS9gBvrzjT6Y81PbBOi6CFAfnmbONA/xK6nE7bd8hkMD2nP662qwRI+05n72QXDpjeO+CCoOns2aReJXzQIQ+64QOKWW3VaQk0rBJOEv6dbnWdpoelHDQfXGjeAGo/5iUUnCQaAi41dsQ6LYG6MgoeRnv4aZv+49FpBJvUU7SsRReCK+q0CArMIYuB+pyJOethFC2gw+i0EzTpJ+3beNhcaE9B4KgejWCu/pfQufAH2OL0FwMqzjfpNM+yVtrDtC9ms9muKr505RrUozXmoeBJjLTs/nNk23gAHrgIoRqbYdE5JQwpOIoNQAgXdB/w+6f398bnNj+iwLGfSgrDInK/tlCSvUmUfjF3917qcKLLeZ6X6XR41qeVbVWnuyrUmavWPSC6K25tPfwy+bu/PZtOvxLJg0ZYfRx1sKoDc9cVwdntMwXVg/KwKh2AFKgftH4ug/1DQDsK9v6Tpz/+A+D9r7rzum/YAAAAAElFTkSuQmCC);
|
||||
}
|
||||
.cailiao_item_img {
|
||||
width: 50px;
|
||||
|
@ -392,14 +396,14 @@ body {
|
|||
}
|
||||
.biye {
|
||||
text-align: center;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
line-height: 30px;
|
||||
color: #91837a;
|
||||
}
|
||||
|
||||
.logo {
|
||||
font-size: 14px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
text-align: center;
|
||||
color: #7994a7;
|
||||
}
|
||||
|
@ -423,7 +427,7 @@ body {
|
|||
border-radius: 2px;
|
||||
padding: 1px 5px;
|
||||
border-radius: 3px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
}
|
||||
.life1 {
|
||||
background-color: #62a8ea;
|
||||
|
@ -442,4 +446,4 @@ body {
|
|||
}
|
||||
.life6 {
|
||||
background-color: #ff5722;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,49 +1,53 @@
|
|||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<link rel="shortcut icon" href="#" />
|
||||
<link rel="stylesheet" type="text/css" href="{{pluResPath}}html/blueprint/blueprint.css" />
|
||||
<!-- <link rel="stylesheet" type="text/css" href="blueprint.css" /> -->
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" id="container">
|
||||
<div class="info_box">
|
||||
<div class="uidRight">
|
||||
<span>UID : {{uid}}</span>
|
||||
</div>
|
||||
<div class="codeCenter">
|
||||
<span>模数ID : {{share_code}}</span>
|
||||
</div>
|
||||
<div class="topLeft">
|
||||
<span>尘歌壶模数养成计算</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="data_box">
|
||||
<div class="role_separate_line">所需模具</div>
|
||||
<div class="cailiao_box">
|
||||
{{each blueprint.data.list item}}
|
||||
<div class="cailiao_item">
|
||||
<div class="cailiao_img">
|
||||
<img class="cailiao_item_img" src="{{item.icon_url}}"/>
|
||||
</div>
|
||||
<div class="cailiao_item_title ">{{item.name}} x {{item.num}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
<div class="role_separate_line">所需消耗</div>
|
||||
<div class="cailiao_box">
|
||||
{{each computes item}}
|
||||
<div class="cailiao_item">
|
||||
<div class="cailiao_img">
|
||||
<img class="cailiao_item_img" src="{{item.icon}}"/>
|
||||
</div>
|
||||
<div class="cailiao_item_title">{{item.name}} x {{item.num}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript"></script>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<link rel="shortcut icon" href="#" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{pluResPath}}html/blueprint/blueprint.css"
|
||||
/>
|
||||
<!-- <link rel="stylesheet" type="text/css" href="blueprint.css" /> -->
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" id="container">
|
||||
<div class="info_box">
|
||||
<div class="uidRight">
|
||||
<span>UID : {{uid}}</span>
|
||||
</div>
|
||||
<div class="codeCenter">
|
||||
<span>模数ID : {{share_code}}</span>
|
||||
</div>
|
||||
<div class="topLeft">
|
||||
<span>尘歌壶模数养成计算</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="data_box">
|
||||
<div class="role_separate_line">所需模具</div>
|
||||
<div class="cailiao_box">
|
||||
{{each blueprint.data.list item}}
|
||||
<div class="cailiao_item">
|
||||
<div class="cailiao_img">
|
||||
<img class="cailiao_item_img" src="{{item.icon_url}}" />
|
||||
</div>
|
||||
<div class="cailiao_item_title">{{item.name}} x {{item.num}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
<div class="role_separate_line">所需消耗</div>
|
||||
<div class="cailiao_box">
|
||||
{{each computes item}}
|
||||
<div class="cailiao_item">
|
||||
<div class="cailiao_img">
|
||||
<img class="cailiao_item_img" src="{{item.icon}}" />
|
||||
</div>
|
||||
<div class="cailiao_item_title">{{item.name}} x {{item.num}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript"></script>
|
||||
</html>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,130 +1,159 @@
|
|||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
||||
<link rel="shortcut icon" href="#"/>
|
||||
<link rel="stylesheet" type="text/css" href="{{_res_path}}html/calculator/calculator-gs.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" id="container">
|
||||
<div class="info_box">
|
||||
<div class="uidRight">
|
||||
<span>UID : {{uid}}</span>
|
||||
</div>
|
||||
<div class="topLeft">
|
||||
<span>角色养成计算</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="head_box">
|
||||
<div class="item">
|
||||
<div class="role_box">
|
||||
{{ if dataCharacter.actived_constellation_num>0}}
|
||||
<span class="life life{{dataCharacter.actived_constellation_num}}"> {{dataCharacter.actived_constellation_num}}命</span>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<link rel="shortcut icon" href="#" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{_res_path}}html/calculator/calculator-gs.css"
|
||||
/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" id="container">
|
||||
<div class="info_box">
|
||||
<div class="uidRight">
|
||||
<span>UID : {{uid}}</span>
|
||||
</div>
|
||||
<div class="topLeft">
|
||||
<span>角色养成计算</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="head_box">
|
||||
<div class="item">
|
||||
<div class="role_box">
|
||||
{{ if dataCharacter.actived_constellation_num>0}}
|
||||
<span class="life life{{dataCharacter.actived_constellation_num}}">
|
||||
{{dataCharacter.actived_constellation_num}}命</span
|
||||
>
|
||||
{{/if}}
|
||||
<div class="bg{{dataCharacter.rarity}}">
|
||||
<img
|
||||
class="role_img"
|
||||
src="{{dataCharacter.icon}}"
|
||||
onerror="whenError(this)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="role_name">
|
||||
{{dataCharacter.name}}
|
||||
<div class="role_LV">
|
||||
Lv.{{dataCharacter.level}}
|
||||
<span class="jt"></span> Lv.{{setSkill[0]}}
|
||||
</div>
|
||||
</div>
|
||||
{{ if dataCharacter.weapon}}
|
||||
<div class="weapon_box">
|
||||
<div class="weapon_bg{{dataCharacter.weapon.rarity}}">
|
||||
<img
|
||||
class="weapon_img"
|
||||
src="{{dataCharacter.weapon.icon}}"
|
||||
onerror="whenError(this)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="weapon_name">
|
||||
{{dataCharacter.weapon.name}}
|
||||
<div class="weapon_LV">
|
||||
Lv.{{dataCharacter.weapon.level}}
|
||||
<span class="jt"></span> Lv.{{setSkill[1]}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{each skillList skill i}}
|
||||
<div class="skill">
|
||||
<div class="skillimg">
|
||||
<img class="skillimgC" src="{{skill.icon}}" />
|
||||
</div>
|
||||
<div class="skillname">
|
||||
{{skill.name}}
|
||||
<div class="skillLv">Lv.10</div>
|
||||
</div>
|
||||
<div class="skillRight">
|
||||
<div class="skillNow">{{skill.level_current}}</div>
|
||||
<div class="skillJt"><span class="jt"></span></div>
|
||||
<div class="skillNow">{{setSkill[i+2]}}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{if computes.avatar_consume.length + computes.avatar_skill_consume.length
|
||||
+ computes.weapon_consume.length > 0}}
|
||||
<div class="data_box">
|
||||
{{if computes.avatar_consume.length > 0}}
|
||||
<div class="role_top">
|
||||
<div class="role_top_name">{{dataCharacter.name}}</div>
|
||||
<div class="role_top_LV">
|
||||
Lv.{{dataCharacter.level}}
|
||||
<span class="jt"></span> Lv.{{setSkill[0]}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="role_separate_line">角色消耗</div>
|
||||
<div class="cailiao_box">
|
||||
{{each computes.avatar_consume avatar_consume}}
|
||||
<div
|
||||
class="cailiao_item {{if computes.avatar_consume.length>2 && avatar_consume.name == `摩拉`}}long{{/if}}"
|
||||
>
|
||||
<div class="cailiao_img">
|
||||
<img class="cailiao_item_img" src="{{avatar_consume.icon}}" />
|
||||
</div>
|
||||
<div class="cailiao_item_title">
|
||||
{{avatar_consume.name}} x {{avatar_consume.num}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}} {{if computes.avatar_skill_consume.length > 0}}
|
||||
<div class="role_separate_line">天赋消耗</div>
|
||||
<div class="cailiao_box">
|
||||
{{each computes.avatar_skill_consume avatar_skill_consume}}
|
||||
<div
|
||||
class="cailiao_item {{if avatar_skill_consume.name == `摩拉`}}long{{/if}}"
|
||||
>
|
||||
<div class="cailiao_img">
|
||||
<img
|
||||
class="cailiao_item_img"
|
||||
src="{{avatar_skill_consume.icon}}"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="cailiao_item_title {{if avatar_skill_consume.isTalent}}isTalent{{/if}}"
|
||||
>
|
||||
{{avatar_skill_consume.name}} x {{avatar_skill_consume.num}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}} {{if computes.weapon_consume.length > 0}}
|
||||
<div class="role_top">
|
||||
<div class="role_top_name">{{dataCharacter.weapon.name}}</div>
|
||||
<div class="role_top_LV">
|
||||
Lv.{{dataCharacter.weapon.level}}
|
||||
<span class="jt"></span> Lv.{{setSkill[1]}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="role_separate"></div>
|
||||
<div class="cailiao_box">
|
||||
{{each computes.weapon_consume weapon_consume}}
|
||||
<div class="cailiao_item">
|
||||
<div class="cailiao_img">
|
||||
<img class="cailiao_item_img" src="{{weapon_consume.icon}}" />
|
||||
</div>
|
||||
<div class="cailiao_item_title">
|
||||
{{weapon_consume.name}} x {{weapon_consume.num}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="bg{{dataCharacter.rarity}}">
|
||||
<img class="role_img" src="{{dataCharacter.icon}}" onerror="whenError(this)"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="role_name">
|
||||
{{dataCharacter.name}}
|
||||
<div class="role_LV">Lv.{{dataCharacter.level}} <span class="jt"></span> Lv.{{setSkill[0]}}</div>
|
||||
</div>
|
||||
{{ if dataCharacter.weapon}}
|
||||
<div class="weapon_box">
|
||||
<div class="weapon_bg{{dataCharacter.weapon.rarity}}">
|
||||
<img class="weapon_img"
|
||||
src="{{dataCharacter.weapon.icon}}"
|
||||
onerror="whenError(this)"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="weapon_name">
|
||||
{{dataCharacter.weapon.name}}
|
||||
<div class="weapon_LV">Lv.{{dataCharacter.weapon.level}} <span class="jt"></span> Lv.{{setSkill[1]}}</div>
|
||||
{{else}}
|
||||
<div class="data_box">
|
||||
<div class="biye">毕业了,下一位 !</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{each skillList skill i}}
|
||||
<div class="skill">
|
||||
<div class="skillimg">
|
||||
<img class="skillimgC"
|
||||
src="{{skill.icon}}"/>
|
||||
</div>
|
||||
<div class="skillname">
|
||||
{{skill.name}}
|
||||
<div class="skillLv">Lv.10</div>
|
||||
</div>
|
||||
<div class="skillRight">
|
||||
<div class="skillNow"> {{skill.level_current}}</div>
|
||||
<div class="skillJt"><span class="jt"></span></div>
|
||||
<div class="skillNow"> {{setSkill[i+2]}}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
|
||||
</div>
|
||||
{{if computes.avatar_consume.length + computes.avatar_skill_consume.length + computes.weapon_consume.length > 0}}
|
||||
<div class="data_box">
|
||||
{{if computes.avatar_consume.length > 0}}
|
||||
<div class="role_top">
|
||||
<div class="role_top_name">{{dataCharacter.name}}</div>
|
||||
<div class="role_top_LV">Lv.{{dataCharacter.level}} <span class="jt"></span> Lv.{{setSkill[0]}}</div>
|
||||
</div>
|
||||
<div class="role_separate_line">角色消耗</div>
|
||||
<div class="cailiao_box">
|
||||
{{each computes.avatar_consume avatar_consume}}
|
||||
<div class="cailiao_item {{if computes.avatar_consume.length>2 && avatar_consume.name == `摩拉`}}long{{/if}}">
|
||||
<div class="cailiao_img">
|
||||
<img class="cailiao_item_img" src="{{avatar_consume.icon}}"/>
|
||||
</div>
|
||||
<div class="cailiao_item_title">{{avatar_consume.name}} x {{avatar_consume.num}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if computes.avatar_skill_consume.length > 0}}
|
||||
<div class="role_separate_line">天赋消耗</div>
|
||||
<div class="cailiao_box">
|
||||
{{each computes.avatar_skill_consume avatar_skill_consume}}
|
||||
<div class="cailiao_item {{if avatar_skill_consume.name == `摩拉`}}long{{/if}}">
|
||||
<div class="cailiao_img">
|
||||
<img class="cailiao_item_img" src="{{avatar_skill_consume.icon}}"/>
|
||||
</div>
|
||||
<div class="cailiao_item_title {{if avatar_skill_consume.isTalent}}isTalent{{/if}}">{{avatar_skill_consume.name}} x
|
||||
{{avatar_skill_consume.num}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if computes.weapon_consume.length > 0}}
|
||||
<div class="role_top">
|
||||
<div class="role_top_name">{{dataCharacter.weapon.name}}</div>
|
||||
<div class="role_top_LV">Lv.{{dataCharacter.weapon.level}} <span class="jt"></span> Lv.{{setSkill[1]}}</div>
|
||||
</div>
|
||||
<div class="role_separate"></div>
|
||||
<div class="cailiao_box">
|
||||
{{each computes.weapon_consume weapon_consume}}
|
||||
<div class="cailiao_item">
|
||||
<div class="cailiao_img">
|
||||
<img class="cailiao_item_img" src="{{weapon_consume.icon}}"/>
|
||||
</div>
|
||||
<div class="cailiao_item_title">{{weapon_consume.name}} x {{weapon_consume.num}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="data_box">
|
||||
<div class="biye">毕业了,下一位 !</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@font-face {
|
||||
font-family: "tttgbnumber";
|
||||
src: url("../../font/tttgbnumber.ttf");
|
||||
font-family: 'tttgbnumber';
|
||||
src: url('../../font/tttgbnumber.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ body {
|
|||
color: #fff;
|
||||
padding: 3px 6px;
|
||||
border-radius: 7px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
background-color: #a57f72;
|
||||
box-shadow: 0 3px 6px 0 rgb(132 93 90 / 40%);
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ body {
|
|||
color: #fff;
|
||||
padding: 3px 6px;
|
||||
border-radius: 7px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
background-color: #a57f72;
|
||||
box-shadow: 0 3px 6px 0 rgb(132 93 90 / 40%);
|
||||
}
|
||||
|
@ -302,7 +302,11 @@ body {
|
|||
/* box-shadow: 0 5px 10px 0 rgb(0 0 0 / 10%); */
|
||||
border-radius: 3px;
|
||||
font-family: tttgbnumber;
|
||||
background: linear-gradient(1turn, hsla(25, 23%, 67%, 0.4), hsla(25, 23%, 67%, 0.2));
|
||||
background: linear-gradient(
|
||||
1turn,
|
||||
hsla(25, 23%, 67%, 0.4),
|
||||
hsla(25, 23%, 67%, 0.2)
|
||||
);
|
||||
display: flex;
|
||||
color: #8c7770;
|
||||
font-weight: bold;
|
||||
|
@ -350,22 +354,22 @@ body {
|
|||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.long{
|
||||
width: 100%;
|
||||
.long {
|
||||
width: 100%;
|
||||
}
|
||||
.isTalent{
|
||||
margin-left: -10px;
|
||||
.isTalent {
|
||||
margin-left: -10px;
|
||||
}
|
||||
.cailiao_img{
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin-right: 10px;
|
||||
background-position: 50%;
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAEXElEQVRYhc2ZO2tUQRTHz5l73WQlGhHETlDEQhALG20kxEJLW2trv4SIYCOCHyTYWSh2CmIR7CwsbK1CFNxsdufIvM887mN3bx4Lm53XPfObM/8zM3eCRAQ7r5/fQIRXALANAOeBfxABEXUBogAUJi+wMmkhQrmodL5SZbq8AqwECNtGVJVpq8sqWya0PfessiPQtAeBAIQTOZvuTg8mz+48evwN3715cVPK+WcA2IT0k8JqwyXYkPewFkAIC2fLXVpY8GAjDEzZAnTgqMGJ4N9kf2+rlnL+UsEqT8v5PGOOnA3KUF4aF4eMbm+LeML4AFlzZtQ5yKbrMyO4fPU6bFy4OB6Nz74VAPBA1bXBKoN6pBiXmhnwGDks+p5NiX4EGTiyQVl7ttyBz2eH8PvXTwO/vn67BoCNlT0a/fA892iDV5E9FT0TepgdHupfgWKt7g/LO+sCLUM0grJRIfARBue4AWTAQ+i0FdQCpaCQeDW0iXlq13Dp6W8LqAIEZF5sAuXtQ32tlg4oBtTx6rQRNHFizdfats5z0DLEMjqN+sNyPQGpP1C7hfm06DSVmZcYOQ/7bTQHLRkI/Q+h0x6g7oeMl2uzHeLAOl0woDLQMBj3hIJVu3Ht9vFBdMoHF4H302kJ1Nsk0t8a3WnpSHTK46I0/YnEsrbIeK2HReLhok47Dig56HI6zWYtihXS39od606DTtvsaw9LaYNOnVHZA+2gbBY6QRbTaWafQZPTsDtQe2snqNOyHG29lCBN0FVew8et08ZBFRwltYel2em0LE6BTtvqwa8SzMNdOiqDDqfTNkcQSSBp12H9UsmmIvdqt04jkF46XcwRClZB1wpWBd7R6LRnQDWChjbew14SS+u0axnsr9Oo/0Re5IPO3RVg26iXCSju1VUDFqwk7Drsd7pEe5kOC4aG1GnpiOtPa14SaknTV0iFhl3T3wjK2/bXabO8jIcBpNk4BNvpVtLpoueOzlljNsjudMK9cZwCnRZB7R8ZDj/JxnGCOs37YAmS9gBvrzjT6Y81PbBOi6CFAfnmbONA/xK6nE7bd8hkMD2nP662qwRI+05n72QXDpjeO+CCoOns2aReJXzQIQ+64QOKWW3VaQk0rBJOEv6dbnWdpoelHDQfXGjeAGo/5iUUnCQaAi41dsQ6LYG6MgoeRnv4aZv+49FpBJvUU7SsRReCK+q0CArMIYuB+pyJOethFC2gw+i0EzTpJ+3beNhcaE9B4KgejWCu/pfQufAH2OL0FwMqzjfpNM+yVtrDtC9ms9muKr505RrUozXmoeBJjLTs/nNk23gAHrgIoRqbYdE5JQwpOIoNQAgXdB/w+6f398bnNj+iwLGfSgrDInK/tlCSvUmUfjF3917qcKLLeZ6X6XR41qeVbVWnuyrUmavWPSC6K25tPfwy+bu/PZtOvxLJg0ZYfRx1sKoDc9cVwdntMwXVg/KwKh2AFKgftH4ug/1DQDsK9v6Tpz/+A+D9r7rzum/YAAAAAElFTkSuQmCC);
|
||||
.cailiao_img {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin-right: 10px;
|
||||
background-position: 50%;
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAEXElEQVRYhc2ZO2tUQRTHz5l73WQlGhHETlDEQhALG20kxEJLW2trv4SIYCOCHyTYWSh2CmIR7CwsbK1CFNxsdufIvM887mN3bx4Lm53XPfObM/8zM3eCRAQ7r5/fQIRXALANAOeBfxABEXUBogAUJi+wMmkhQrmodL5SZbq8AqwECNtGVJVpq8sqWya0PfessiPQtAeBAIQTOZvuTg8mz+48evwN3715cVPK+WcA2IT0k8JqwyXYkPewFkAIC2fLXVpY8GAjDEzZAnTgqMGJ4N9kf2+rlnL+UsEqT8v5PGOOnA3KUF4aF4eMbm+LeML4AFlzZtQ5yKbrMyO4fPU6bFy4OB6Nz74VAPBA1bXBKoN6pBiXmhnwGDks+p5NiX4EGTiyQVl7ttyBz2eH8PvXTwO/vn67BoCNlT0a/fA892iDV5E9FT0TepgdHupfgWKt7g/LO+sCLUM0grJRIfARBue4AWTAQ+i0FdQCpaCQeDW0iXlq13Dp6W8LqAIEZF5sAuXtQ32tlg4oBtTx6rQRNHFizdfats5z0DLEMjqN+sNyPQGpP1C7hfm06DSVmZcYOQ/7bTQHLRkI/Q+h0x6g7oeMl2uzHeLAOl0woDLQMBj3hIJVu3Ht9vFBdMoHF4H302kJ1Nsk0t8a3WnpSHTK46I0/YnEsrbIeK2HReLhok47Dig56HI6zWYtihXS39od606DTtvsaw9LaYNOnVHZA+2gbBY6QRbTaWafQZPTsDtQe2snqNOyHG29lCBN0FVew8et08ZBFRwltYel2em0LE6BTtvqwa8SzMNdOiqDDqfTNkcQSSBp12H9UsmmIvdqt04jkF46XcwRClZB1wpWBd7R6LRnQDWChjbew14SS+u0axnsr9Oo/0Re5IPO3RVg26iXCSju1VUDFqwk7Drsd7pEe5kOC4aG1GnpiOtPa14SaknTV0iFhl3T3wjK2/bXabO8jIcBpNk4BNvpVtLpoueOzlljNsjudMK9cZwCnRZB7R8ZDj/JxnGCOs37YAmS9gBvrzjT6Y81PbBOi6CFAfnmbONA/xK6nE7bd8hkMD2nP662qwRI+05n72QXDpjeO+CCoOns2aReJXzQIQ+64QOKWW3VaQk0rBJOEv6dbnWdpoelHDQfXGjeAGo/5iUUnCQaAi41dsQ6LYG6MgoeRnv4aZv+49FpBJvUU7SsRReCK+q0CArMIYuB+pyJOethFC2gw+i0EzTpJ+3beNhcaE9B4KgejWCu/pfQufAH2OL0FwMqzjfpNM+yVtrDtC9ms9muKr505RrUozXmoeBJjLTs/nNk23gAHrgIoRqbYdE5JQwpOIoNQAgXdB/w+6f398bnNj+iwLGfSgrDInK/tlCSvUmUfjF3917qcKLLeZ6X6XR41qeVbVWnuyrUmavWPSC6K25tPfwy+bu/PZtOvxLJg0ZYfRx1sKoDc9cVwdntMwXVg/KwKh2AFKgftH4ug/1DQDsK9v6Tpz/+A+D9r7rzum/YAAAAAElFTkSuQmCC);
|
||||
}
|
||||
.cailiao_item_img {
|
||||
width: 50px;
|
||||
|
@ -380,14 +384,14 @@ body {
|
|||
}
|
||||
.biye {
|
||||
text-align: center;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
line-height: 30px;
|
||||
color: #91837a;
|
||||
}
|
||||
|
||||
.logo {
|
||||
font-size: 14px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
text-align: center;
|
||||
color: #7994a7;
|
||||
}
|
||||
|
@ -411,7 +415,7 @@ body {
|
|||
border-radius: 2px;
|
||||
padding: 1px 5px;
|
||||
border-radius: 3px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
}
|
||||
.life1 {
|
||||
background-color: #62a8ea;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,133 +1,162 @@
|
|||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<link rel="shortcut icon" href="#" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{_res_path}}html/calculator/calculator-sr.css"
|
||||
/>
|
||||
</head>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<link rel="shortcut icon" href="#" />
|
||||
<link rel="stylesheet" type="text/css" href="{{_res_path}}html/calculator/calculator-sr.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" id="container">
|
||||
<div class="info_box">
|
||||
<div class="uidRight">
|
||||
<span>UID : {{uid}}</span>
|
||||
</div>
|
||||
<div class="topLeft">
|
||||
<span>角色养成计算</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="head_box">
|
||||
<div class="item">
|
||||
<div class="role_box">
|
||||
{{ if dataCharacter.rank>0}}
|
||||
<span class="life life{{dataCharacter.rank}}">
|
||||
{{dataCharacter.rank}}命</span
|
||||
>
|
||||
{{/if}}
|
||||
<div class="bg{{dataCharacter.rarity}}">
|
||||
<img
|
||||
class="role_img"
|
||||
src="{{dataCharacter.icon}}"
|
||||
onerror="whenError(this)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="role_name">
|
||||
{{dataCharacter.name}}
|
||||
<div class="role_LV">
|
||||
Lv.{{dataCharacter.level}}
|
||||
<span class="jt"></span> Lv.{{setSkill[0]}}
|
||||
</div>
|
||||
</div>
|
||||
{{ if dataCharacter.equip}}
|
||||
<div class="weapon_box">
|
||||
<div class="weapon_bg{{dataCharacter.equip.rarity}}">
|
||||
<img
|
||||
class="weapon_img"
|
||||
src="{{dataCharacter.equip.icon}}"
|
||||
onerror="whenError(this)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="weapon_name">
|
||||
{{dataCharacter.equip.name}}
|
||||
<div class="weapon_LV">
|
||||
Lv.{{dataCharacter.equip.level}} <span class="jt"></span>
|
||||
Lv.{{setSkill[1]}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<body>
|
||||
<div class="container" id="container">
|
||||
<div class="info_box">
|
||||
<div class="uidRight">
|
||||
<span>UID : {{uid}}</span>
|
||||
</div>
|
||||
<div class="topLeft">
|
||||
<span>角色养成计算</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="head_box">
|
||||
<div class="item">
|
||||
<div class="role_box">
|
||||
{{ if dataCharacter.rank>0}}
|
||||
<span class="life life{{dataCharacter.rank}}">
|
||||
{{dataCharacter.rank}}命</span>
|
||||
{{/if}}
|
||||
<div class="bg{{dataCharacter.rarity}}">
|
||||
<img class="role_img" src="{{dataCharacter.icon}}" onerror="whenError(this)" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="role_name">
|
||||
{{dataCharacter.name}}
|
||||
<div class="role_LV">Lv.{{dataCharacter.level}} <span class="jt"></span> Lv.{{setSkill[0]}}</div>
|
||||
</div>
|
||||
{{ if dataCharacter.equip}}
|
||||
<div class="weapon_box">
|
||||
<div class="weapon_bg{{dataCharacter.equip.rarity}}">
|
||||
<img class="weapon_img" src="{{dataCharacter.equip.icon}}" onerror="whenError(this)" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="weapon_name">
|
||||
{{dataCharacter.equip.name}}
|
||||
<div class="weapon_LV">Lv.{{dataCharacter.equip.level}} <span class="jt"></span>
|
||||
Lv.{{setSkill[1]}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{each skillList skill i}}
|
||||
<div class="skill">
|
||||
<div class="skillimg">
|
||||
<img class="skillimgC" src="{{skill.item_url}}" />
|
||||
</div>
|
||||
<div class="skillname">
|
||||
{{ if skill.anchor=="Point01"}}普通攻击{{else if skill.anchor=="Point02"}}战技{{else if skill.anchor=="Point03"}}终结技{{else}}天赋{{/if}}
|
||||
<div class="skillLv">Lv.{{skill.max_level}}</div>
|
||||
</div>
|
||||
<div class="skillRight">
|
||||
<div class="skillNow"> {{skill.cur_level}} </div>
|
||||
<div class="skillJt"><span class="jt"></span></div>
|
||||
<div class="skillNow"> {{setSkill[i+2]}} </div>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
|
||||
</div>
|
||||
{{if computes.avatar_consume?.length + computes.skill_consume?.length + computes.equipment_consume?.length > 0}}
|
||||
<div class="data_box">
|
||||
{{if computes.avatar_consume.length > 0}}
|
||||
<div class="role_top">
|
||||
<div class="role_top_name">{{dataCharacter.name}}</div>
|
||||
<div class="role_top_LV">Lv.{{dataCharacter.level}} <span class="jt"></span> Lv.{{setSkill[0]}}</div>
|
||||
</div>
|
||||
<div class="role_separate_line">角色消耗</div>
|
||||
<div class="cailiao_box">
|
||||
{{each computes.avatar_consume avatar_consume}}
|
||||
<div
|
||||
class="cailiao_item {{if computes.avatar_consume.length>2 && avatar_consume.item_name == `信用点`}}long{{/if}}">
|
||||
<div class="cailiao_img">
|
||||
<img class="cailiao_item_img" src="{{avatar_consume.item_url}}" />
|
||||
</div>
|
||||
<div class="cailiao_item_title">{{avatar_consume.item_name}} x {{avatar_consume.num}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if computes.skill_consume.length > 0}}
|
||||
<div class="role_separate_line">行迹消耗</div>
|
||||
<div class="cailiao_box">
|
||||
{{each computes.skill_consume skill_consume}}
|
||||
<div class="cailiao_item {{if skill_consume.item_name == `信用点`}}long{{/if}}">
|
||||
<div class="cailiao_img">
|
||||
<img class="cailiao_item_img" src="{{skill_consume.item_url}}" />
|
||||
</div>
|
||||
<div class="cailiao_item_title {{if skill_consume.isTalent}}isTalent{{/if}}">
|
||||
{{skill_consume.item_name}} x {{skill_consume.num}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if computes.equipment_consume.length > 0}}
|
||||
<div class="role_top">
|
||||
<div class="role_top_name">{{dataCharacter.equip.name}}</div>
|
||||
<div class="role_top_LV">Lv.{{dataCharacter.equip.level}} <span class="jt"></span>
|
||||
Lv.{{setSkill[1]}}</div>
|
||||
</div>
|
||||
<div class="role_separate"></div>
|
||||
<div class="cailiao_box">
|
||||
{{each computes.equipment_consume equipment_consume}}
|
||||
<div class="cailiao_item">
|
||||
<div class="cailiao_img">
|
||||
<img class="cailiao_item_img" src="{{equipment_consume.item_url}}" />
|
||||
</div>
|
||||
<div class="cailiao_item_title">{{equipment_consume.item_name}} x {{equipment_consume.num}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="data_box">
|
||||
<div class="biye">毕业了,下一位 !</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</body>
|
||||
{{each skillList skill i}}
|
||||
<div class="skill">
|
||||
<div class="skillimg">
|
||||
<img class="skillimgC" src="{{skill.item_url}}" />
|
||||
</div>
|
||||
<div class="skillname">
|
||||
{{ if skill.anchor=="Point01"}}普通攻击{{else if
|
||||
skill.anchor=="Point02"}}战技{{else if
|
||||
skill.anchor=="Point03"}}终结技{{else}}天赋{{/if}}
|
||||
<div class="skillLv">Lv.{{skill.max_level}}</div>
|
||||
</div>
|
||||
<div class="skillRight">
|
||||
<div class="skillNow">{{skill.cur_level}}</div>
|
||||
<div class="skillJt"><span class="jt"></span></div>
|
||||
<div class="skillNow">{{setSkill[i+2]}}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{if computes.avatar_consume?.length + computes.skill_consume?.length +
|
||||
computes.equipment_consume?.length > 0}}
|
||||
<div class="data_box">
|
||||
{{if computes.avatar_consume.length > 0}}
|
||||
<div class="role_top">
|
||||
<div class="role_top_name">{{dataCharacter.name}}</div>
|
||||
<div class="role_top_LV">
|
||||
Lv.{{dataCharacter.level}}
|
||||
<span class="jt"></span> Lv.{{setSkill[0]}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="role_separate_line">角色消耗</div>
|
||||
<div class="cailiao_box">
|
||||
{{each computes.avatar_consume avatar_consume}}
|
||||
<div
|
||||
class="cailiao_item {{if computes.avatar_consume.length>2 && avatar_consume.item_name == `信用点`}}long{{/if}}"
|
||||
>
|
||||
<div class="cailiao_img">
|
||||
<img class="cailiao_item_img" src="{{avatar_consume.item_url}}" />
|
||||
</div>
|
||||
<div class="cailiao_item_title">
|
||||
{{avatar_consume.item_name}} x {{avatar_consume.num}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}} {{if computes.skill_consume.length > 0}}
|
||||
<div class="role_separate_line">行迹消耗</div>
|
||||
<div class="cailiao_box">
|
||||
{{each computes.skill_consume skill_consume}}
|
||||
<div
|
||||
class="cailiao_item {{if skill_consume.item_name == `信用点`}}long{{/if}}"
|
||||
>
|
||||
<div class="cailiao_img">
|
||||
<img class="cailiao_item_img" src="{{skill_consume.item_url}}" />
|
||||
</div>
|
||||
<div
|
||||
class="cailiao_item_title {{if skill_consume.isTalent}}isTalent{{/if}}"
|
||||
>
|
||||
{{skill_consume.item_name}} x {{skill_consume.num}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}} {{if computes.equipment_consume.length > 0}}
|
||||
<div class="role_top">
|
||||
<div class="role_top_name">{{dataCharacter.equip.name}}</div>
|
||||
<div class="role_top_LV">
|
||||
Lv.{{dataCharacter.equip.level}}
|
||||
<span class="jt"></span> Lv.{{setSkill[1]}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="role_separate"></div>
|
||||
<div class="cailiao_box">
|
||||
{{each computes.equipment_consume equipment_consume}}
|
||||
<div class="cailiao_item">
|
||||
<div class="cailiao_img">
|
||||
<img
|
||||
class="cailiao_item_img"
|
||||
src="{{equipment_consume.item_url}}"
|
||||
/>
|
||||
</div>
|
||||
<div class="cailiao_item_title">
|
||||
{{equipment_consume.item_name}} x {{equipment_consume.num}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="data_box">
|
||||
<div class="biye">毕业了,下一位 !</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
@font-face {
|
||||
font-family: "tttgbnumber";
|
||||
src: url("../../font/tttgbnumber.ttf");
|
||||
font-family: 'tttgbnumber';
|
||||
src: url('../../font/tttgbnumber.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
@ -15,7 +15,10 @@
|
|||
body {
|
||||
font-size: 18px;
|
||||
color: #1e1f20;
|
||||
font-family: PingFangSC-Medium, PingFang SC, sans-serif;
|
||||
font-family:
|
||||
PingFangSC-Medium,
|
||||
PingFang SC,
|
||||
sans-serif;
|
||||
transform: scale(2);
|
||||
transform-origin: 0 0;
|
||||
}
|
||||
|
@ -179,14 +182,14 @@ body {
|
|||
|
||||
.logo {
|
||||
font-size: 12px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
text-align: center;
|
||||
color: #7994a7;
|
||||
}
|
||||
|
||||
.bottom-msg {
|
||||
font-size: 12px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
text-align: center;
|
||||
color: #7994a7;
|
||||
margin-bottom: 5px;
|
||||
|
@ -215,4 +218,4 @@ body {
|
|||
padding: 3px 10px;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
z-index: 20;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,84 +1,90 @@
|
|||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<link rel="shortcut icon" href="#" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{_res_path}}html/deck/deck.css"
|
||||
/>
|
||||
<link rel="preload" href="{{_res_path}}font/tttgbnumber.ttf" as="font" />
|
||||
<link rel="preload" href="{{_res_path}}img/other/bg5.png" as="image" />
|
||||
<link rel="preload" href="{{_res_path}}img/other/bg4.png" as="image" />
|
||||
<link rel="preload" href="{{_res_path}}img/other/bg105.png" as="image" />
|
||||
<link rel="preload" href="{{_res_path}}img/abyss/bg.png" as="image" />
|
||||
{{@headStyle}}
|
||||
</head>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<link rel="shortcut icon" href="#" />
|
||||
<link rel="stylesheet" type="text/css" href="{{_res_path}}html/deck/deck.css" />
|
||||
<link rel="preload" href="{{_res_path}}font/tttgbnumber.ttf" as="font">
|
||||
<link rel="preload" href="{{_res_path}}img/other/bg5.png" as="image">
|
||||
<link rel="preload" href="{{_res_path}}img/other/bg4.png" as="image">
|
||||
<link rel="preload" href="{{_res_path}}img/other/bg105.png" as="image">
|
||||
<link rel="preload" href="{{_res_path}}img/abyss/bg.png" as="image">
|
||||
{{@headStyle}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container" id="container">
|
||||
<div class="head_box">
|
||||
<div class="role-name">
|
||||
{{nickname}} lv:{{level}}
|
||||
<body>
|
||||
<div class="container" id="container">
|
||||
<div class="head_box">
|
||||
<div class="role-name">{{nickname}} lv:{{level}}</div>
|
||||
<div class="id_text">UID: {{uid}}</div>
|
||||
<img class="genshin_logo" src="{{_res_path}}img/other/原神.png" />
|
||||
</div>
|
||||
<div class="id_text">
|
||||
UID: {{uid}}
|
||||
</div>
|
||||
<img class="genshin_logo" src="{{_res_path}}img/other/原神.png" />
|
||||
</div>
|
||||
<div style="height: 11px;"></div>
|
||||
<div style="height: 11px"></div>
|
||||
|
||||
<div class="basicInfo">
|
||||
<div class="tab_lable">角色牌详情</div>
|
||||
<div style="height: 10px;"></div>
|
||||
<div class="avatar_covers">
|
||||
{{each Data.avatar_cards val}}
|
||||
<div class="card-wrapper">
|
||||
<div class="overlay">
|
||||
<img src="{{_res_path}}img/deck/边框.png" alt="">
|
||||
</div>
|
||||
<div class="overlay">
|
||||
<div class="rq-container">
|
||||
<img src="{{_res_path}}img/deck/容器.png" alt="">
|
||||
<div class="basicInfo">
|
||||
<div class="tab_lable">角色牌详情</div>
|
||||
<div style="height: 10px"></div>
|
||||
<div class="avatar_covers">
|
||||
{{each Data.avatar_cards val}}
|
||||
<div class="card-wrapper">
|
||||
<div class="overlay">
|
||||
<img src="{{_res_path}}img/deck/边框.png" alt="" />
|
||||
</div>
|
||||
<div class="hp-container">
|
||||
<img src="{{_res_path}}img/deck/{{val.hp}}.png" alt="">
|
||||
<div class="overlay">
|
||||
<div class="rq-container">
|
||||
<img src="{{_res_path}}img/deck/容器.png" alt="" />
|
||||
</div>
|
||||
<div class="hp-container">
|
||||
<img src="{{_res_path}}img/deck/{{val.hp}}.png" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<img src="{{val.image}}" alt="" />
|
||||
</div>
|
||||
<img src="{{val.image}}" alt="">
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="basicInfo">
|
||||
<div class="tab_lable">行动牌详情</div>
|
||||
<div style="height: 10px;"></div>
|
||||
<div class="action_covers">
|
||||
{{each Data.action_cards val}}
|
||||
<div class="card-wrapper">
|
||||
<div class="overlay">
|
||||
<span>
|
||||
<div class="num_lable">{{val.num}}</div>
|
||||
</span>
|
||||
<img src="{{_res_path}}img/deck/边框.png" alt="">
|
||||
</div>
|
||||
<div class="cost-wrapper">
|
||||
{{each val.action_cost vals}}
|
||||
<div class="ty-container">
|
||||
<img src="{{_res_path}}img/deck/{{vals.cost_type}}.png" alt="" style="position: absolute; z-index: 1;">
|
||||
<div class="basicInfo">
|
||||
<div class="tab_lable">行动牌详情</div>
|
||||
<div style="height: 10px"></div>
|
||||
<div class="action_covers">
|
||||
{{each Data.action_cards val}}
|
||||
<div class="card-wrapper">
|
||||
<div class="overlay">
|
||||
<span>
|
||||
<div class="num_lable">{{val.num}}</div>
|
||||
</span>
|
||||
<img src="{{_res_path}}img/deck/边框.png" alt="" />
|
||||
</div>
|
||||
<div class="va-container">
|
||||
<img src="{{_res_path}}img/deck/{{vals.cost_value}}.png" alt="" style="position: absolute; z-index: 2;">
|
||||
<div class="cost-wrapper">
|
||||
{{each val.action_cost vals}}
|
||||
<div class="ty-container">
|
||||
<img
|
||||
src="{{_res_path}}img/deck/{{vals.cost_type}}.png"
|
||||
alt=""
|
||||
style="position: absolute; z-index: 1"
|
||||
/>
|
||||
</div>
|
||||
<div class="va-container">
|
||||
<img
|
||||
src="{{_res_path}}img/deck/{{vals.cost_value}}.png"
|
||||
alt=""
|
||||
style="position: absolute; z-index: 2"
|
||||
/>
|
||||
</div>
|
||||
<div style="height: 150px"></div>
|
||||
{{/each}}
|
||||
</div>
|
||||
<div style="height: 150px;"></div>
|
||||
{{/each}}
|
||||
<img src="{{val.image}}" alt="" />
|
||||
</div>
|
||||
<img src="{{val.image}}" alt="">
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
<div class="logo">Created By {{yzName}}</div>
|
||||
</div>
|
||||
|
||||
<div class="logo">Created By {{yzName}}</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@font-face {
|
||||
font-family: "tttgbnumber";
|
||||
src: url("../../font/tttgbnumber.ttf");
|
||||
font-family: 'tttgbnumber';
|
||||
src: url('../../font/tttgbnumber.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
@ -15,7 +15,10 @@
|
|||
body {
|
||||
font-size: 18px;
|
||||
color: #1e1f20;
|
||||
font-family: PingFangSC-Medium, PingFang SC, sans-serif;
|
||||
font-family:
|
||||
PingFangSC-Medium,
|
||||
PingFang SC,
|
||||
sans-serif;
|
||||
transform: scale(2);
|
||||
transform-origin: 0 0;
|
||||
}
|
||||
|
@ -128,7 +131,7 @@ body {
|
|||
height: 34px;
|
||||
padding: 2px;
|
||||
border-radius: 5px;
|
||||
background: rgba(0, 0, 0, .6);
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
overflow: hidden;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
@ -144,7 +147,6 @@ body {
|
|||
.item .text_box .weapon_img {
|
||||
width: 100%;
|
||||
transform: scale(1.2, 1.2);
|
||||
|
||||
}
|
||||
|
||||
.item .text_box .weapon_name_box {
|
||||
|
@ -282,7 +284,6 @@ body {
|
|||
height: auto;
|
||||
}
|
||||
|
||||
|
||||
.overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
@ -293,7 +294,7 @@ body {
|
|||
|
||||
.logo {
|
||||
font-size: 12px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
text-align: center;
|
||||
color: #7994a7;
|
||||
}
|
||||
|
@ -389,4 +390,4 @@ body {
|
|||
height: 40px;
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,122 +1,129 @@
|
|||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<link rel="shortcut icon" href="#" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{pluResPath}}html/deckCard/deckCard.css"
|
||||
/>
|
||||
<link rel="preload" href="{{pluResPath}}font/tttgbnumber.ttf" as="font" />
|
||||
<link rel="preload" href="{{pluResPath}}img/other/bg5.png" as="image" />
|
||||
<link rel="preload" href="{{pluResPath}}img/other/bg4.png" as="image" />
|
||||
<link rel="preload" href="{{pluResPath}}img/other/bg105.png" as="image" />
|
||||
<link rel="preload" href="{{pluResPath}}img/abyss/bg.png" as="image" />
|
||||
{{@headStyle}}
|
||||
</head>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<link rel="shortcut icon" href="#" />
|
||||
<link rel="stylesheet" type="text/css" href="{{pluResPath}}html/deckCard/deckCard.css" />
|
||||
<link rel="preload" href="{{pluResPath}}font/tttgbnumber.ttf" as="font">
|
||||
<link rel="preload" href="{{pluResPath}}img/other/bg5.png" as="image">
|
||||
<link rel="preload" href="{{pluResPath}}img/other/bg4.png" as="image">
|
||||
<link rel="preload" href="{{pluResPath}}img/other/bg105.png" as="image">
|
||||
<link rel="preload" href="{{pluResPath}}img/abyss/bg.png" as="image">
|
||||
{{@headStyle}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container" id="container">
|
||||
<div class="head_box">
|
||||
<div class="id_text">
|
||||
{{basicInfo.nickname}}
|
||||
<body>
|
||||
<div class="container" id="container">
|
||||
<div class="head_box">
|
||||
<div class="id_text">{{basicInfo.nickname}}</div>
|
||||
<div class="id_text">UID: {{uid}}</div>
|
||||
<img class="genshin_logo" src="{{pluResPath}}img/other/原神.png" />
|
||||
</div>
|
||||
<div class="id_text">
|
||||
UID: {{uid}}
|
||||
</div>
|
||||
<img class="genshin_logo" src="{{pluResPath}}img/other/原神.png" />
|
||||
</div>
|
||||
<div style="height: 11px;"></div>
|
||||
<div style="height: 11px"></div>
|
||||
|
||||
<div class="basicInfo">
|
||||
{{if basicInfo.level>0}}
|
||||
<div class="tab_lable">七圣召唤</div>
|
||||
<div class="basicInfo_header">
|
||||
<div class="basicInfo_icon"><span>{{basicInfo.level}}</span></div>
|
||||
<div class="basicInfo_right">
|
||||
<div class="item">
|
||||
<div>已收集角色牌</div>
|
||||
<div>{{basicInfo.avatar_card_num_gained}}/{{basicInfo.avatar_card_num_total}}</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div>已收集行动牌</div>
|
||||
<div>{{basicInfo.action_card_num_gained}}/{{basicInfo.action_card_num_total}}</div>
|
||||
<div class="basicInfo">
|
||||
{{if basicInfo.level>0}}
|
||||
<div class="tab_lable">七圣召唤</div>
|
||||
<div class="basicInfo_header">
|
||||
<div class="basicInfo_icon"><span>{{basicInfo.level}}</span></div>
|
||||
<div class="basicInfo_right">
|
||||
<div class="item">
|
||||
<div>已收集角色牌</div>
|
||||
<div>
|
||||
{{basicInfo.avatar_card_num_gained}}/{{basicInfo.avatar_card_num_total}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div>已收集行动牌</div>
|
||||
<div>
|
||||
{{basicInfo.action_card_num_gained}}/{{basicInfo.action_card_num_total}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{if !avatar_cardList && !action_cardList}}
|
||||
<div class="logo">请绑定cookie后查看更多信息</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{if !avatar_cardList && !action_cardList}}
|
||||
<div class="logo">请绑定cookie后查看更多信息</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
<div style="height: 5px;"></div>
|
||||
<div style="height: 5px"></div>
|
||||
|
||||
{{if avatar_cardList}}
|
||||
<div class="basicInfo">
|
||||
<div class="tab_lable">角色牌详情</div>
|
||||
<div style="height: 10px;"></div>
|
||||
<div class="avatar_covers">
|
||||
{{each avatar_cardList.card_list val}}
|
||||
{{if val.num>0}}
|
||||
<div class="card-wrapper">
|
||||
<div class="overlay">
|
||||
<img src="{{pluResPath}}img/deck/边框.png" alt="">
|
||||
<span>
|
||||
<div class="win_lable">{{val.proficiency}}/{{val.use_count}}</div>
|
||||
</span>
|
||||
</div>
|
||||
<div class="overlay">
|
||||
<div class="rq-container">
|
||||
<img src="{{pluResPath}}img/deck/容器.png" alt="">
|
||||
{{if avatar_cardList}}
|
||||
<div class="basicInfo">
|
||||
<div class="tab_lable">角色牌详情</div>
|
||||
<div style="height: 10px"></div>
|
||||
<div class="avatar_covers">
|
||||
{{each avatar_cardList.card_list val}} {{if val.num>0}}
|
||||
<div class="card-wrapper">
|
||||
<div class="overlay">
|
||||
<img src="{{pluResPath}}img/deck/边框.png" alt="" />
|
||||
<span>
|
||||
<div class="win_lable">
|
||||
{{val.proficiency}}/{{val.use_count}}
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
<div class="hp-container">
|
||||
<img src="{{pluResPath}}img/deck/{{val.hp}}.png" alt="">
|
||||
<div class="overlay">
|
||||
<div class="rq-container">
|
||||
<img src="{{pluResPath}}img/deck/容器.png" alt="" />
|
||||
</div>
|
||||
<div class="hp-container">
|
||||
<img src="{{pluResPath}}img/deck/{{val.hp}}.png" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<img src="{{val.image}}" alt="" />
|
||||
</div>
|
||||
<img src="{{val.image}}" alt="">
|
||||
{{/if}} {{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
<div class="logo">左下角为胜利场数/使用次数,仅展示已有角色牌</div>
|
||||
</div>
|
||||
<div class="logo">左下角为胜利场数/使用次数,仅展示已有角色牌</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if action_cardList}}
|
||||
<div class="basicInfo">
|
||||
<div class="tab_lable">行动牌详情</div>
|
||||
<div style="height: 10px;"></div>
|
||||
<div class="action_covers">
|
||||
{{each action_cardList.card_list val}}
|
||||
{{if val.num>0}}
|
||||
<div class="card-wrapper">
|
||||
<div class="overlay">
|
||||
<img src="{{pluResPath}}img/deck/边框.png" alt="">
|
||||
<span>
|
||||
<div class="win_lable">{{val.use_count}}</div>
|
||||
</span>
|
||||
<span>
|
||||
<div class="num_lable">{{val.num}}</div>
|
||||
</span>
|
||||
</div>
|
||||
<div class="cost-wrapper">
|
||||
{{each val.action_cost vals}}
|
||||
<div class="ty-container">
|
||||
<img src="{{pluResPath}}img/deck/{{vals.cost_type}}.png" alt="" style="position: absolute; z-index: 1;">
|
||||
{{/if}} {{if action_cardList}}
|
||||
<div class="basicInfo">
|
||||
<div class="tab_lable">行动牌详情</div>
|
||||
<div style="height: 10px"></div>
|
||||
<div class="action_covers">
|
||||
{{each action_cardList.card_list val}} {{if val.num>0}}
|
||||
<div class="card-wrapper">
|
||||
<div class="overlay">
|
||||
<img src="{{pluResPath}}img/deck/边框.png" alt="" />
|
||||
<span>
|
||||
<div class="win_lable">{{val.use_count}}</div>
|
||||
</span>
|
||||
<span>
|
||||
<div class="num_lable">{{val.num}}</div>
|
||||
</span>
|
||||
</div>
|
||||
<div class="va-container">
|
||||
<img src="{{pluResPath}}img/deck/{{vals.cost_value}}.png" alt="" style="position: absolute; z-index: 2;">
|
||||
<div class="cost-wrapper">
|
||||
{{each val.action_cost vals}}
|
||||
<div class="ty-container">
|
||||
<img
|
||||
src="{{pluResPath}}img/deck/{{vals.cost_type}}.png"
|
||||
alt=""
|
||||
style="position: absolute; z-index: 1"
|
||||
/>
|
||||
</div>
|
||||
<div class="va-container">
|
||||
<img
|
||||
src="{{pluResPath}}img/deck/{{vals.cost_value}}.png"
|
||||
alt=""
|
||||
style="position: absolute; z-index: 2"
|
||||
/>
|
||||
</div>
|
||||
<div style="height: 150px"></div>
|
||||
{{/each}}
|
||||
</div>
|
||||
<div style="height: 150px;"></div>
|
||||
{{/each}}
|
||||
<img src="{{val.image}}" alt="" />
|
||||
</div>
|
||||
<img src="{{val.image}}" alt="">
|
||||
{{/if}} {{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
<div class="logo">左下角为使用次数,仅展示已有行动牌</div>
|
||||
</div>
|
||||
<div class="logo">左下角为使用次数,仅展示已有行动牌</div>
|
||||
{{/if}}
|
||||
<div class="logo">Created By {{yzName}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="logo">Created By {{yzName}}</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@font-face {
|
||||
font-family: "tttgbnumber";
|
||||
src: url("../../font/tttgbnumber.ttf");
|
||||
font-family: 'tttgbnumber';
|
||||
src: url('../../font/tttgbnumber.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
@ -15,7 +15,10 @@
|
|||
body {
|
||||
font-size: 18px;
|
||||
color: #1e1f20;
|
||||
font-family: PingFangSC-Medium, PingFang SC, sans-serif;
|
||||
font-family:
|
||||
PingFangSC-Medium,
|
||||
PingFang SC,
|
||||
sans-serif;
|
||||
transform: scale(2);
|
||||
transform-origin: 0 0;
|
||||
}
|
||||
|
@ -190,14 +193,14 @@ body {
|
|||
|
||||
.logo {
|
||||
font-size: 12px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
text-align: center;
|
||||
color: #7994a7;
|
||||
}
|
||||
|
||||
.bottom-msg {
|
||||
font-size: 12px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
text-align: center;
|
||||
color: #7994a7;
|
||||
margin-bottom: 5px;
|
||||
|
@ -214,4 +217,4 @@ body {
|
|||
padding: 3px 10px;
|
||||
border-radius: 15px 0px 15px 15px;
|
||||
z-index: 20;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,57 +1,57 @@
|
|||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<link rel="shortcut icon" href="#" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{_res_path}}html/deckList/deckList.css"
|
||||
/>
|
||||
<link rel="preload" href="{{_res_path}}font/tttgbnumber.ttf" as="font" />
|
||||
<link rel="preload" href="{{_res_path}}img/other/bg5.png" as="image" />
|
||||
<link rel="preload" href="{{_res_path}}img/other/bg4.png" as="image" />
|
||||
<link rel="preload" href="{{_res_path}}img/other/bg105.png" as="image" />
|
||||
<link rel="preload" href="{{_res_path}}img/abyss/bg.png" as="image" />
|
||||
{{@headStyle}}
|
||||
</head>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<link rel="shortcut icon" href="#" />
|
||||
<link rel="stylesheet" type="text/css" href="{{_res_path}}html/deckList/deckList.css" />
|
||||
<link rel="preload" href="{{_res_path}}font/tttgbnumber.ttf" as="font">
|
||||
<link rel="preload" href="{{_res_path}}img/other/bg5.png" as="image">
|
||||
<link rel="preload" href="{{_res_path}}img/other/bg4.png" as="image">
|
||||
<link rel="preload" href="{{_res_path}}img/other/bg105.png" as="image">
|
||||
<link rel="preload" href="{{_res_path}}img/abyss/bg.png" as="image">
|
||||
{{@headStyle}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container" id="container">
|
||||
<div class="head_box">
|
||||
<div class="role-name">
|
||||
{{nickname}} lv:{{level}}
|
||||
<body>
|
||||
<div class="container" id="container">
|
||||
<div class="head_box">
|
||||
<div class="role-name">{{nickname}} lv:{{level}}</div>
|
||||
<div class="id_text">UID: {{uid}}</div>
|
||||
<img class="genshin_logo" src="{{_res_path}}img/other/原神.png" />
|
||||
</div>
|
||||
<div class="id_text">
|
||||
UID: {{uid}}
|
||||
</div>
|
||||
<img class="genshin_logo" src="{{_res_path}}img/other/原神.png" />
|
||||
</div>
|
||||
<div style="height: 12px;"></div>
|
||||
<div style="height: 12px"></div>
|
||||
|
||||
{{each Data vals}}
|
||||
<div class="basicInfo">
|
||||
<div class="tab_lable">七圣卡组{{vals.id}} 使用#七圣查询卡组{{vals.id}}查看详情</div>
|
||||
<div style="height: 10px;"></div>
|
||||
<div class="avatar_covers">
|
||||
{{each vals.avatar_cards val}}
|
||||
<div class="card-wrapper">
|
||||
<div class="overlay">
|
||||
<img src="{{_res_path}}img/deck/边框.png" alt="">
|
||||
</div>
|
||||
<div class="overlay">
|
||||
<div class="rq-container">
|
||||
<img src="{{_res_path}}img/deck/容器.png" alt="">
|
||||
</div>
|
||||
<div class="hp-container">
|
||||
<img src="{{_res_path}}img/deck/{{val.hp}}.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<img src="{{val.image}}" alt="">
|
||||
{{each Data vals}}
|
||||
<div class="basicInfo">
|
||||
<div class="tab_lable">
|
||||
七圣卡组{{vals.id}} 使用#七圣查询卡组{{vals.id}}查看详情
|
||||
</div>
|
||||
<div style="height: 10px"></div>
|
||||
<div class="avatar_covers">
|
||||
{{each vals.avatar_cards val}}
|
||||
<div class="card-wrapper">
|
||||
<div class="overlay">
|
||||
<img src="{{_res_path}}img/deck/边框.png" alt="" />
|
||||
</div>
|
||||
<div class="overlay">
|
||||
<div class="rq-container">
|
||||
<img src="{{_res_path}}img/deck/容器.png" alt="" />
|
||||
</div>
|
||||
<div class="hp-container">
|
||||
<img src="{{_res_path}}img/deck/{{val.hp}}.png" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<img src="{{val.image}}" alt="" />
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/each}}
|
||||
<div class="logo">Created By {{yzName}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
<div class="logo">Created By {{yzName}}</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -39,4 +39,4 @@ body,
|
|||
box-shadow: none !important;
|
||||
background: none !important;
|
||||
}
|
||||
/*# sourceMappingURL=gacha-all-log.css.map */
|
||||
/*# sourceMappingURL=gacha-all-log.css.map */
|
||||
|
|
|
@ -1,30 +1,34 @@
|
|||
{{extend genshinLayout}}
|
||||
|
||||
{{block 'css'}}
|
||||
<link rel="stylesheet" type="text/css" href="{{_res_path}}html/gacha/gacha-log.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="{{_res_path}}html/gacha/gacha-all-log.css"/>
|
||||
{{extend genshinLayout}} {{block 'css'}}
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{_res_path}}html/gacha/gacha-log.css"
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{_res_path}}html/gacha/gacha-all-log.css"
|
||||
/>
|
||||
<style>
|
||||
.container {
|
||||
width: 1200px;
|
||||
}
|
||||
</style>
|
||||
{{/block}}
|
||||
|
||||
{{block 'main'}}
|
||||
{{each data log}}
|
||||
{{/block}} {{block 'main'}} {{each data log}}
|
||||
<div class="info_box">
|
||||
<div class="head_box">
|
||||
<div class="id_text">
|
||||
ID: {{log.uid}}
|
||||
</div>
|
||||
<div class="id_text">ID: {{log.uid}}</div>
|
||||
<h2 class="day_text">
|
||||
{{log.allNum}}抽
|
||||
<span class="label label_{{type}}">{{log.typeName}}池</span>
|
||||
</h2>
|
||||
{{if game === 'gs'}}
|
||||
<img class="genshin_logo" src="{{pluResPath}}img/other/原神.png"/>
|
||||
<img class="genshin_logo" src="{{pluResPath}}img/other/原神.png" />
|
||||
{{else}}
|
||||
<img class="starrail_logo" src="{{pluResPath}}/StarRail/img/other/logo.png"/>
|
||||
<img
|
||||
class="starrail_logo"
|
||||
src="{{pluResPath}}/StarRail/img/other/logo.png"
|
||||
/>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="data_box">
|
||||
|
@ -33,7 +37,9 @@
|
|||
<div class="data_line">
|
||||
{{each val item}}
|
||||
<div class="data_line_item">
|
||||
<div class="num">{{item.num}}<span class="unit">{{item.unit}}</span></div>
|
||||
<div class="num">
|
||||
{{item.num}}<span class="unit">{{item.unit}}</span>
|
||||
</div>
|
||||
<div class="lable">{{item.lable}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
|
@ -47,18 +53,22 @@
|
|||
<div class="card_list">
|
||||
{{each log.fiveLog val}}
|
||||
<div
|
||||
class="item {{val.isNull?'isNull':''}} star5 {{val.num<=10?'gold': (val.num<log.max*0.5 ? 'good' : (val.num<log.max*0.83) ? 'normal': 'bad')}}">
|
||||
class="item {{val.isNull?'isNull':''}} star5 {{val.num<=10?'gold': (val.num<log.max*0.5 ? 'good' : (val.num<log.max*0.83) ? 'normal': 'bad')}}"
|
||||
>
|
||||
{{ if val.isUp && typeName == '角色' }}
|
||||
<span class="minimum">UP</span>
|
||||
{{/if}}
|
||||
{{ if val.isNull }}
|
||||
{{/if}} {{ if val.isNull }}
|
||||
<div class="role"></div>
|
||||
<div class="num_name">{{val.num}}</div>
|
||||
{{/if}}
|
||||
{{ if !val.isNull }}
|
||||
<span class="role_img" style="background-image:url({{_miao_path}}{{val.icon}})"></span>
|
||||
{{/if}} {{ if !val.isNull }}
|
||||
<span
|
||||
class="role_img"
|
||||
style="background-image:url({{_miao_path}}{{val.icon}})"
|
||||
></span>
|
||||
<!-- <div class="num">{{val.num}}</div>-->
|
||||
<div class="num_name {{val.num<=10?'gold': (val.num<log.max*0.5 ? 'good' : (val.num<log.max*0.83) ? 'normal': 'bad')}}">
|
||||
<div
|
||||
class="num_name {{val.num<=10?'gold': (val.num<log.max*0.5 ? 'good' : (val.num<log.max*0.83) ? 'normal': 'bad')}}"
|
||||
>
|
||||
{{val.num}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -67,5 +77,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/block}}
|
||||
{{/each}} {{/block}}
|
||||
|
|
|
@ -25,7 +25,8 @@ body {
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
body, .container {
|
||||
body,
|
||||
.container {
|
||||
width: inherit;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,12 +39,12 @@
|
|||
background-color: #eb6a4b;
|
||||
}
|
||||
.label_12 {
|
||||
background-color: #E69449;
|
||||
background-color: #e69449;
|
||||
}
|
||||
.label_1 {
|
||||
background-color: #757CC8;
|
||||
background-color: #757cc8;
|
||||
}
|
||||
.label_2 {
|
||||
background-color: #75c895;
|
||||
}
|
||||
/*# sourceMappingURL=gacha-log-sr.css.map */
|
||||
/*# sourceMappingURL=gacha-log-sr.css.map */
|
||||
|
|
|
@ -47,11 +47,11 @@
|
|||
}
|
||||
|
||||
.label_12 {
|
||||
background-color: #E69449;
|
||||
background-color: #e69449;
|
||||
}
|
||||
|
||||
.label_1 {
|
||||
background-color: #757CC8;
|
||||
background-color: #757cc8;
|
||||
}
|
||||
|
||||
.label_2 {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
@font-face {
|
||||
font-family: "tttgbnumber";
|
||||
src: url("../../font/tttgbnumber.ttf");
|
||||
font-family: 'tttgbnumber';
|
||||
src: url('../../font/tttgbnumber.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "HYWenHei-55W";
|
||||
src: url("../../font/HYWenHei-55W.ttf");
|
||||
font-family: 'HYWenHei-55W';
|
||||
src: url('../../font/HYWenHei-55W.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
@ -19,7 +19,10 @@
|
|||
body {
|
||||
font-size: 18px;
|
||||
color: #1e1f20;
|
||||
font-family: PingFangSC-Medium, PingFang SC, sans-serif;
|
||||
font-family:
|
||||
PingFangSC-Medium,
|
||||
PingFang SC,
|
||||
sans-serif;
|
||||
transform: scale(1.5);
|
||||
transform-origin: 0 0;
|
||||
width: 465px;
|
||||
|
@ -66,7 +69,7 @@ body {
|
|||
}
|
||||
.logo {
|
||||
font-size: 12px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
text-align: center;
|
||||
color: #7994a7;
|
||||
position: relative;
|
||||
|
@ -88,7 +91,7 @@ body {
|
|||
background: #d4b98c;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
font-family: "HYWenHei-55W";
|
||||
font-family: 'HYWenHei-55W';
|
||||
padding: 3px 10px;
|
||||
border-radius: 15px 0px 15px 15px;
|
||||
z-index: 20;
|
||||
|
@ -178,7 +181,7 @@ body {
|
|||
padding: 1px 5px;
|
||||
border-radius: 3px;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
}
|
||||
.card_list .item .name,
|
||||
.card_list .item .num_name {
|
||||
|
@ -193,7 +196,7 @@ body {
|
|||
line-height: 18px;
|
||||
}
|
||||
.card_list .item .num_name {
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
font-size: 16px;
|
||||
}
|
||||
.base_info {
|
||||
|
@ -202,7 +205,7 @@ body {
|
|||
margin: 5px 10px;
|
||||
}
|
||||
.uid:before {
|
||||
content: " ";
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
width: 5px;
|
||||
height: 24px;
|
||||
|
@ -215,10 +218,10 @@ body {
|
|||
background-color: #eb6a4b;
|
||||
}
|
||||
.label_302 {
|
||||
background-color: #E69449;
|
||||
background-color: #e69449;
|
||||
}
|
||||
.label_200 {
|
||||
background-color: #757CC8;
|
||||
background-color: #757cc8;
|
||||
}
|
||||
.label {
|
||||
color: #555;
|
||||
|
@ -277,7 +280,7 @@ body {
|
|||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 15px;
|
||||
font-family: "HYWenHei-55W";
|
||||
font-family: 'HYWenHei-55W';
|
||||
color: #7d7d7d;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
@ -297,7 +300,7 @@ body {
|
|||
color: #12d88c;
|
||||
}
|
||||
.blue {
|
||||
color: #4169E1;
|
||||
color: #4169e1;
|
||||
}
|
||||
.purple {
|
||||
color: #7500ff;
|
||||
|
@ -313,7 +316,7 @@ body {
|
|||
border-radius: 3px;
|
||||
padding: 1px 3px;
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
}
|
||||
.hasMore {
|
||||
font-size: 12px;
|
||||
|
@ -336,4 +339,4 @@ body {
|
|||
background: #9d3333;
|
||||
color: #fff;
|
||||
}
|
||||
/*# sourceMappingURL=gacha-log.css.map */
|
||||
/*# sourceMappingURL=gacha-log.css.map */
|
||||
|
|
|
@ -1,26 +1,30 @@
|
|||
{{extend genshinLayout}}
|
||||
|
||||
{{block 'css'}}
|
||||
<link rel="stylesheet" type="text/css" href="{{_res_path}}html/gacha/gacha-log.css"/>
|
||||
{{extend genshinLayout}} {{block 'css'}}
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{_res_path}}html/gacha/gacha-log.css"
|
||||
/>
|
||||
{{if game === 'sr'}}
|
||||
<link rel="stylesheet" type="text/css" href="{{_res_path}}html/gacha/gacha-log-sr.css"/>
|
||||
{{/if}}
|
||||
{{/block}}
|
||||
|
||||
{{block 'main'}}
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{_res_path}}html/gacha/gacha-log-sr.css"
|
||||
/>
|
||||
{{/if}} {{/block}} {{block 'main'}}
|
||||
<div class="info_box">
|
||||
<div class="head_box">
|
||||
<div class="id_text">
|
||||
ID: {{uid}}
|
||||
</div>
|
||||
<div class="id_text">ID: {{uid}}</div>
|
||||
<h2 class="day_text">
|
||||
{{allNum}}抽
|
||||
<span class="label label_{{type}}">{{typeName}}池</span>
|
||||
</h2>
|
||||
{{if game === 'gs'}}
|
||||
<img class="genshin_logo" src="{{_res_path}}img/other/原神.png"/>
|
||||
<img class="genshin_logo" src="{{_res_path}}img/other/原神.png" />
|
||||
{{else}}
|
||||
<img class="starrail_logo" src="{{pluResPath}}StarRail/img/other/logo.png"/>
|
||||
<img
|
||||
class="starrail_logo"
|
||||
src="{{pluResPath}}StarRail/img/other/logo.png"
|
||||
/>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="data_box">
|
||||
|
@ -29,7 +33,9 @@
|
|||
<div class="data_line">
|
||||
{{each val item}}
|
||||
<div class="data_line_item">
|
||||
<div class="num">{{item.num}}<span class="unit">{{item.unit}}</span></div>
|
||||
<div class="num">
|
||||
{{item.num}}<span class="unit">{{item.unit}}</span>
|
||||
</div>
|
||||
<div class="lable">{{item.lable}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
|
@ -43,13 +49,22 @@
|
|||
</div>
|
||||
<div class="card_list">
|
||||
{{each fiveLog val}}
|
||||
<div class="item star5 {{val.num<=10?'gold': (val.num<max*0.5 ? 'good' : (val.num<max*0.83) ? 'normal': 'bad')}}">
|
||||
<div
|
||||
class="item star5 {{val.num<=10?'gold': (val.num<max*0.5 ? 'good' : (val.num<max*0.83) ? 'normal': 'bad')}}"
|
||||
>
|
||||
{{ if val.isUp && typeName == '角色' }}
|
||||
<span class="minimum">UP</span>
|
||||
{{/if}}
|
||||
<span class="role_img" style="background-image:url({{_miao_path}}{{val.icon}})"></span>
|
||||
<span
|
||||
class="role_img"
|
||||
style="background-image:url({{_miao_path}}{{val.icon}})"
|
||||
></span>
|
||||
<!-- <div class="num">{{val.num}}</div>-->
|
||||
<div class="num_name {{val.num<=10?'gold': (val.num<max*0.5 ? 'good' : (val.num<max*0.83) ? 'normal': 'bad')}}">{{val.num}}</div>
|
||||
<div
|
||||
class="num_name {{val.num<=10?'gold': (val.num<max*0.5 ? 'good' : (val.num<max*0.83) ? 'normal': 'bad')}}"
|
||||
>
|
||||
{{val.num}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
@font-face {
|
||||
font-family: "tttgbnumber";
|
||||
src: url("../../font/tttgbnumber.ttf");
|
||||
font-family: 'tttgbnumber';
|
||||
src: url('../../font/tttgbnumber.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "HYWenHei-55W";
|
||||
src: url("../../font/HYWenHei-55W.ttf");
|
||||
font-family: 'HYWenHei-55W';
|
||||
src: url('../../font/HYWenHei-55W.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
@ -21,7 +21,10 @@
|
|||
body {
|
||||
font-size: 18px;
|
||||
color: #1e1f20;
|
||||
font-family: PingFangSC-Medium, PingFang SC, sans-serif;
|
||||
font-family:
|
||||
PingFangSC-Medium,
|
||||
PingFang SC,
|
||||
sans-serif;
|
||||
transform: scale(1.5);
|
||||
transform-origin: 0 0;
|
||||
width: 465px;
|
||||
|
@ -75,14 +78,13 @@ body {
|
|||
|
||||
.logo {
|
||||
font-size: 12px;
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
text-align: center;
|
||||
color: #7994a7;
|
||||
position: relative;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
|
||||
.data_box {
|
||||
border-radius: 15px;
|
||||
margin-top: 20px;
|
||||
|
@ -191,7 +193,6 @@ body {
|
|||
}
|
||||
|
||||
.card_list .item.star4 {
|
||||
|
||||
background-image: url(../../img/other/bg4.png);
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
|
@ -209,7 +210,7 @@ body {
|
|||
padding: 1px 5px;
|
||||
border-radius: 3px;
|
||||
background: rgb(0 0 0 / 50%);
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
}
|
||||
|
||||
.card_list .item .name,
|
||||
|
@ -226,7 +227,7 @@ body {
|
|||
}
|
||||
|
||||
.card_list .item .num_name {
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
|
@ -237,7 +238,7 @@ body {
|
|||
}
|
||||
|
||||
.uid:before {
|
||||
content: " ";
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
width: 5px;
|
||||
height: 24px;
|
||||
|
@ -252,11 +253,11 @@ body {
|
|||
}
|
||||
|
||||
.label_302 {
|
||||
background-color: #E69449;
|
||||
background-color: #e69449;
|
||||
}
|
||||
|
||||
.label_200 {
|
||||
background-color: #757CC8;
|
||||
background-color: #757cc8;
|
||||
}
|
||||
|
||||
.label {
|
||||
|
@ -300,7 +301,6 @@ body {
|
|||
border-radius: 100%;
|
||||
transform: scale(1.5);
|
||||
-webkit-transform: scale(1.5);
|
||||
|
||||
}
|
||||
|
||||
.ritem .role_text {
|
||||
|
@ -350,7 +350,7 @@ body {
|
|||
}
|
||||
|
||||
.blue {
|
||||
color: #4169E1;
|
||||
color: #4169e1;
|
||||
}
|
||||
|
||||
.purple {
|
||||
|
@ -368,7 +368,7 @@ body {
|
|||
border-radius: 3px;
|
||||
padding: 1px 3px;
|
||||
background-color: rgb(0 0 0 / 80%);
|
||||
font-family: "tttgbnumber";
|
||||
font-family: 'tttgbnumber';
|
||||
}
|
||||
|
||||
.hasMore {
|
||||
|
@ -377,7 +377,6 @@ body {
|
|||
color: #7f858a;
|
||||
}
|
||||
|
||||
|
||||
.gold {
|
||||
background: #ffeb73;
|
||||
color: #6f4b00;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
@font-face {
|
||||
font-family: 'tttgbnumber';
|
||||
src: url("../../font/tttgbnumber.ttf");
|
||||
src: url('../../font/tttgbnumber.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "YS";
|
||||
src: url("../../font/HYWenHei-55W.ttf");
|
||||
font-family: 'YS';
|
||||
src: url('../../font/HYWenHei-55W.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
@ -165,7 +165,9 @@ body {
|
|||
left: 18px;
|
||||
top: 246px;
|
||||
z-index: 120;
|
||||
box-shadow: 0px 10px 20px #ffffffb3, 0px -10px 20px #ffffffb3;
|
||||
box-shadow:
|
||||
0px 10px 20px #ffffffb3,
|
||||
0px -10px 20px #ffffffb3;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.item-starlight {
|
||||
|
@ -201,4 +203,4 @@ body {
|
|||
white-space: nowrap;
|
||||
font-family: YS, 'HYWenHei-55W', 'Noto Sans CJK SC', SimHei, sans-serif;
|
||||
}
|
||||
/*# sourceMappingURL=gacha-trial.css.map */
|
||||
/*# sourceMappingURL=gacha-trial.css.map */
|
||||
|
|
|
@ -1,68 +1,94 @@
|
|||
{{extend genshinLayout}}
|
||||
|
||||
{{block 'css'}}
|
||||
<link rel="stylesheet" type="text/css" href="{{_res_path}}html/gacha/gacha-trial.css"/>
|
||||
{{/block}}
|
||||
|
||||
{{block 'main'}}
|
||||
{{if nowFive < 4}}
|
||||
{{extend genshinLayout}} {{block 'css'}}
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{_res_path}}html/gacha/gacha-trial.css"
|
||||
/>
|
||||
{{/block}} {{block 'main'}} {{if nowFive < 4}}
|
||||
<div class="info-bg info-name">{{name}}</div>
|
||||
<div class="info-bg info-count">{{info}}</div>
|
||||
{{if isWeapon}}
|
||||
{{if bingWeapon}}
|
||||
{{if isWeapon}} {{if bingWeapon}}
|
||||
<div class="info-bg poor-info">定轨:{{bingWeapon}}</div>
|
||||
<div class="info-bg poor-bing">命定值:{{lifeNum}}</div>
|
||||
{{/if}}
|
||||
{{else if poolName}}
|
||||
{{/if}} {{else if poolName}}
|
||||
<div class="info-bg poor-info">{{poolName}}</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
<div class="list-box">
|
||||
{{each list}}
|
||||
<div class="item">
|
||||
<div class="item-bg-box">
|
||||
<img class="item-bg" src="{{_res_path}}img/gacha/items/bg.png"/>
|
||||
{{if $value.type=='weapon' && $value.star==5}}
|
||||
<img class="item-bg-weapon" src="{{_res_path}}img/gacha/items/bgWeapon.png"/>
|
||||
{{/if}}
|
||||
{{/if}} {{/if}}
|
||||
<div>
|
||||
<div class="list-box">
|
||||
{{each list}}
|
||||
<div class="item">
|
||||
<div class="item-bg-box">
|
||||
<img class="item-bg" src="{{_res_path}}img/gacha/items/bg.png" />
|
||||
{{if $value.type=='weapon' && $value.star==5}}
|
||||
<img
|
||||
class="item-bg-weapon"
|
||||
src="{{_res_path}}img/gacha/items/bgWeapon.png"
|
||||
/>
|
||||
{{/if}}
|
||||
</div>
|
||||
<img
|
||||
class="item-shadow"
|
||||
src="{{_res_path}}img/gacha/items/shadow-{{$value.star}}{{$value.rand ? '-' + $value.rand : ''}}.png"
|
||||
/>
|
||||
<img class="item-shadow2" src="{{_res_path}}img/gacha/items/bg2.png" />
|
||||
{{if $value.type=='weapon'}}
|
||||
<div class="item-weapon-box">
|
||||
<span
|
||||
class="item-character-img"
|
||||
style="background-image:url({{_miao_path}}{{$value.imgFile}})"
|
||||
></span>
|
||||
</div>
|
||||
{{else}}
|
||||
<div
|
||||
class="item-img-box {{if $value.have && $value.type == 'role'}}fiveHave{{/if}}"
|
||||
>
|
||||
<span
|
||||
class="item-character-img"
|
||||
style="background-image:url({{_miao_path}}{{$value.imgFile}})"
|
||||
></span>
|
||||
</div>
|
||||
{{/if}} {{if $value.star==5 && nowFive < 4 && !$value.have }}
|
||||
<div class="times">「{{$value.num}}抽」</div>
|
||||
{{/if}} {{if $value.have && $value.type == 'role'}} {{if $value.star ==
|
||||
5}}
|
||||
<img
|
||||
class="item-starGold"
|
||||
src="{{_res_path}}img/gacha/items/星尘金.png"
|
||||
/>
|
||||
<img
|
||||
class="item-starlight"
|
||||
src="{{_res_path}}img/gacha/items/星辉10.png"
|
||||
/>
|
||||
{{else}}
|
||||
<img
|
||||
class="item-starGold"
|
||||
src="{{_res_path}}img/gacha/items/星尘紫.png"
|
||||
/>
|
||||
<img
|
||||
class="item-starlight"
|
||||
src="{{_res_path}}img/gacha/items/星辉2.png"
|
||||
/>
|
||||
{{/if}} {{else}} {{if $value.element }}
|
||||
<img
|
||||
class="item-element"
|
||||
src="{{_res_path}}img/gacha/items/{{$value.element}}.png"
|
||||
/>
|
||||
{{/if}} {{if $value.star }}
|
||||
<img
|
||||
class="item-star"
|
||||
src="{{_res_path}}img/gacha/items/s-{{$value.star}}.png"
|
||||
/>
|
||||
{{/if}} {{/if}}
|
||||
</div>
|
||||
<img class="item-shadow" src="{{_res_path}}img/gacha/items/shadow-{{$value.star}}{{$value.rand ? '-' + $value.rand : ''}}.png"/>
|
||||
<img class="item-shadow2" src="{{_res_path}}img/gacha/items/bg2.png"/>
|
||||
{{if $value.type=='weapon'}}
|
||||
<div class="item-weapon-box">
|
||||
<span class="item-character-img" style="background-image:url({{_miao_path}}{{$value.imgFile}})"></span>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="item-img-box {{if $value.have && $value.type == 'role'}}fiveHave{{/if}}">
|
||||
<span class="item-character-img" style="background-image:url({{_miao_path}}{{$value.imgFile}})"></span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if $value.star==5 && nowFive < 4 && !$value.have }}
|
||||
<div class="times">「{{$value.num}}抽」</div>
|
||||
{{/if}}
|
||||
{{if $value.have && $value.type == 'role'}}
|
||||
{{if $value.star == 5}}
|
||||
<img class="item-starGold" src="{{_res_path}}img/gacha/items/星尘金.png"/>
|
||||
<img class="item-starlight" src="{{_res_path}}img/gacha/items/星辉10.png"/>
|
||||
{{else}}
|
||||
<img class="item-starGold" src="{{_res_path}}img/gacha/items/星尘紫.png"/>
|
||||
<img class="item-starlight" src="{{_res_path}}img/gacha/items/星辉2.png"/>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{if $value.element }}
|
||||
<img class="item-element" src="{{_res_path}}img/gacha/items/{{$value.element}}.png"/>
|
||||
{{/if}}
|
||||
{{if $value.star }}
|
||||
<img class="item-star" src="{{_res_path}}img/gacha/items/s-{{$value.star}}.png"/>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
<svg viewBox="0 0 302.22 1333.94" height="0" width="0">
|
||||
<clipPath id="wishframe" transform="scale(0.003308 0.00074965)" clipPathUnits="objectBoundingBox">
|
||||
<clipPath
|
||||
id="wishframe"
|
||||
transform="scale(0.003308 0.00074965)"
|
||||
clipPathUnits="objectBoundingBox"
|
||||
>
|
||||
<path
|
||||
d="M0.01 168.12l0 -9.64c4.32,-21.34 12,-32.33 25.46,-25.58 -2.35,-10.3 -1.53,-26.06 5.79,-25.96 19.18,0.25 29.95,-3.14 40.24,-13.16 -4.5,-66.43 51.39,-54.26 79.61,-93.78l0 0c28.22,39.52 84.1,27.34 79.61,93.78 10.29,10.02 21.06,13.41 40.24,13.16 7.32,-0.1 8.13,15.66 5.79,25.96 13.46,-6.75 21.14,4.24 25.46,25.58l0 9.64 0.01 0 0 1004.21 -0.01 0 0 3.13c-4.32,21.34 -12,32.33 -25.46,25.58 2.35,10.3 1.53,26.06 -5.79,25.96 -19.18,-0.25 -29.95,3.14 -40.24,13.16 4.5,66.43 -51.39,54.26 -79.61,93.78l0 0c-28.22,-39.52 -84.1,-27.34 -79.61,-93.78 -10.29,-10.02 -21.06,-13.41 -40.24,-13.16 -7.32,0.1 -8.13,-15.66 -5.79,-25.96 -13.46,6.75 -21.14,-4.24 -25.46,-25.58l0 -3.13 -0.01 0 0 -1004.21 0.01 0z"
|
||||
/>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
@font-face {
|
||||
font-family: 'tttgbnumber';
|
||||
src: url("../../font/tttgbnumber.ttf");
|
||||
src: url('../../font/tttgbnumber.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "YS";
|
||||
src: url("../../font/HYWenHei-55W.ttf");
|
||||
font-family: 'YS';
|
||||
src: url('../../font/HYWenHei-55W.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
@ -190,7 +190,9 @@ body {
|
|||
left: 18px;
|
||||
top: 246px;
|
||||
z-index: 120;
|
||||
box-shadow: 0px 10px 20px #ffffffb3,0px -10px 20px #ffffffb3;
|
||||
box-shadow:
|
||||
0px 10px 20px #ffffffb3,
|
||||
0px -10px 20px #ffffffb3;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue