增加`星穹铁道记录`获取以及优化ck绑定逻辑支持同时绑定星穹铁道
|
@ -356,6 +356,9 @@ class PluginsLoader {
|
||||||
case 'text':
|
case 'text':
|
||||||
/** 中文#转为英文 */
|
/** 中文#转为英文 */
|
||||||
val.text = val.text.replace(/#|井/g, '#').trim()
|
val.text = val.text.replace(/#|井/g, '#').trim()
|
||||||
|
if(/星铁|崩坏星穹铁道|铁道|星轨|星穹铁道|\/common\//.test(val.text)){
|
||||||
|
e.isSr = true
|
||||||
|
}
|
||||||
if (e.msg) {
|
if (e.msg) {
|
||||||
e.msg += val.text
|
e.msg += val.text
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -32,7 +32,7 @@ export class gcLog extends plugin {
|
||||||
fnc: 'logJson'
|
fnc: 'logJson'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
reg: '^#*(抽卡|抽奖|角色|武器|常驻|up)池*(记录|祈愿|分析)$',
|
reg: '^#*(原神|星铁|崩坏星穹铁道|铁道)?(抽卡|抽奖|角色|武器|常驻|up|新手|光锥)池*(记录|祈愿|分析)$',
|
||||||
fnc: 'getLog'
|
fnc: 'getLog'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -48,7 +48,7 @@ export class gcLog extends plugin {
|
||||||
fnc: 'helpPort'
|
fnc: 'helpPort'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
reg: '^#*(抽卡|抽奖|角色|武器|常驻|up)池*统计$',
|
reg: '^#*(原神|星铁|崩坏星穹铁道|铁道)?(抽卡|抽奖|角色|武器|常驻|up|新手|光锥)池*统计$',
|
||||||
fnc: 'logCount'
|
fnc: 'logCount'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -58,9 +58,11 @@ export class gcLog extends plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
async init () {
|
async init () {
|
||||||
let file = './data/gachaJson'
|
let file = ['./data/gachaJson','./data/srJson','./temp/html/StarRail']
|
||||||
if (!fs.existsSync(file)) {
|
for(let i of file){
|
||||||
fs.mkdirSync(file)
|
if (!fs.existsSync(i)) {
|
||||||
|
fs.mkdirSync(i)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,8 +97,12 @@ export class gcLog extends plugin {
|
||||||
|
|
||||||
let data = await new GachaLog(this.e).logUrl()
|
let data = await new GachaLog(this.e).logUrl()
|
||||||
if (!data) return
|
if (!data) return
|
||||||
|
let url='gachaLog'
|
||||||
let img = await puppeteer.screenshot('gachaLog', data)
|
if(this.e.isSr){
|
||||||
|
data.tplFile='./plugins/genshin/resources/StarRail/html/gachaLog/gachaLog.html'
|
||||||
|
url='StarRail/gachaLog'
|
||||||
|
}
|
||||||
|
let img = await puppeteer.screenshot(url, data)
|
||||||
if (img) await this.reply(img)
|
if (img) await this.reply(img)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,8 +124,12 @@ export class gcLog extends plugin {
|
||||||
if (!data) return false
|
if (!data) return false
|
||||||
|
|
||||||
if (typeof data != 'object') return
|
if (typeof data != 'object') return
|
||||||
|
let url='gachaLog'
|
||||||
let img = await puppeteer.screenshot('gachaLog', data)
|
if(this.e.isSr){
|
||||||
|
data.tplFile='./plugins/genshin/resources/StarRail/html/gachaLog/gachaLog.html'
|
||||||
|
url='StarRail/gachaLog'
|
||||||
|
}
|
||||||
|
let img = await puppeteer.screenshot(url, data)
|
||||||
if (img) await this.reply(img)
|
if (img) await this.reply(img)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,8 +137,12 @@ export class gcLog extends plugin {
|
||||||
async getLog () {
|
async getLog () {
|
||||||
let data = await new GachaLog(this.e).getLogData()
|
let data = await new GachaLog(this.e).getLogData()
|
||||||
if (!data) return
|
if (!data) return
|
||||||
|
let url='gachaLog'
|
||||||
let img = await puppeteer.screenshot('gachaLog', data)
|
if(this.e.isSr){
|
||||||
|
data.tplFile='./plugins/genshin/resources/StarRail/html/gachaLog/gachaLog.html'
|
||||||
|
url='StarRail/gachaLog'
|
||||||
|
}
|
||||||
|
let img = await puppeteer.screenshot(url, data)
|
||||||
if (img) await this.reply(img)
|
if (img) await this.reply(img)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,7 +153,7 @@ export class gcLog extends plugin {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let friend = this.e.bot.fl.get(Number(this.e.user_id))
|
let friend = Bot.fl.get(Number(this.e.user_id))
|
||||||
if (!friend) {
|
if (!friend) {
|
||||||
await this.reply('无法发送文件,请先添加好友')
|
await this.reply('无法发送文件,请先添加好友')
|
||||||
return
|
return
|
||||||
|
@ -201,8 +215,12 @@ export class gcLog extends plugin {
|
||||||
async logCount () {
|
async logCount () {
|
||||||
let data = await new LogCount(this.e).count()
|
let data = await new LogCount(this.e).count()
|
||||||
if (!data) return
|
if (!data) return
|
||||||
|
let url='logCount'
|
||||||
let img = await puppeteer.screenshot('logCount', data)
|
if(this.e.isSr){
|
||||||
|
data.tplFile='./plugins/genshin/resources/StarRail/html/logCount/logCount.html'
|
||||||
|
url='StarRail/logCount'
|
||||||
|
}
|
||||||
|
let img = await puppeteer.screenshot(url, data)
|
||||||
if (img) await this.reply(img)
|
if (img) await this.reply(img)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
- from: '2020-4-26 08:00:00'
|
||||||
|
to: '2050-09-15 17:59:59'
|
||||||
|
five:
|
||||||
|
- 常驻池
|
||||||
|
four: []
|
||||||
|
name: 常驻池
|
|
@ -0,0 +1,6 @@
|
||||||
|
- from: '2020-09-15 06:00:00'
|
||||||
|
to: '2050-09-15 17:59:59'
|
||||||
|
five:
|
||||||
|
- 新手池
|
||||||
|
four: []
|
||||||
|
name: 新手池
|
|
@ -0,0 +1,9 @@
|
||||||
|
- from: '2023-04-26 08:00:00'
|
||||||
|
to: '2023-05-17 16:00:00'
|
||||||
|
five:
|
||||||
|
- 希儿
|
||||||
|
four:
|
||||||
|
- 娜塔莎
|
||||||
|
- 虎克
|
||||||
|
- 佩拉
|
||||||
|
name: 蝶立锋锷
|
|
@ -0,0 +1,9 @@
|
||||||
|
- from: '2023-04-26 08:00:00'
|
||||||
|
to: '2023-05-17 16:00:00'
|
||||||
|
five:
|
||||||
|
- 于夜色中
|
||||||
|
four:
|
||||||
|
- 一场术后对话
|
||||||
|
- 晚安与睡颜
|
||||||
|
- 鼬鼠党欢迎你
|
||||||
|
name: 流光定影
|
|
@ -0,0 +1,6 @@
|
||||||
|
- from: '2023-04-26 08:00:00'
|
||||||
|
to: '2050-09-15 17:59:59'
|
||||||
|
five:
|
||||||
|
- 新手池
|
||||||
|
four: []
|
||||||
|
name: 新手池
|
|
@ -1,3 +1,13 @@
|
||||||
|
- from: '2023-05-02 18:00:00'
|
||||||
|
to: '2023-05-23 14:59:59'
|
||||||
|
five:
|
||||||
|
- 白术
|
||||||
|
- 甘雨
|
||||||
|
four:
|
||||||
|
- 卡维
|
||||||
|
- 坎蒂丝
|
||||||
|
- 菲谢尔
|
||||||
|
name: 心珠循琅|浮生孰来
|
||||||
- from: '2023-04-12 06:00:00'
|
- from: '2023-04-12 06:00:00'
|
||||||
to: '2023-05-02 17:59:59'
|
to: '2023-05-02 17:59:59'
|
||||||
five:
|
five:
|
||||||
|
|
|
@ -1,3 +1,15 @@
|
||||||
|
- from: '2023-05-02 18:00:00'
|
||||||
|
to: '2023-05-23 14:59:59'
|
||||||
|
five:
|
||||||
|
- 碧落之珑
|
||||||
|
- 阿莫斯之弓
|
||||||
|
four:
|
||||||
|
- 玛海菈的水色
|
||||||
|
- 流浪的晚星
|
||||||
|
- 匣里龙吟
|
||||||
|
- 西风长枪
|
||||||
|
- 祭礼弓
|
||||||
|
name: 神铸赋形
|
||||||
- from: '2023-04-12 06:00:00'
|
- from: '2023-04-12 06:00:00'
|
||||||
to: '2023-05-02 17:59:59'
|
to: '2023-05-02 17:59:59'
|
||||||
five:
|
five:
|
||||||
|
|
|
@ -6,7 +6,7 @@ import common from '../../../lib/common/common.js'
|
||||||
import gsCfg from './gsCfg.js'
|
import gsCfg from './gsCfg.js'
|
||||||
|
|
||||||
export default class GachaLog extends base {
|
export default class GachaLog extends base {
|
||||||
constructor (e) {
|
constructor(e) {
|
||||||
super(e)
|
super(e)
|
||||||
this.model = 'gachaLog'
|
this.model = 'gachaLog'
|
||||||
|
|
||||||
|
@ -21,9 +21,21 @@ export default class GachaLog extends base {
|
||||||
{ type: 302, typeName: '武器' },
|
{ type: 302, typeName: '武器' },
|
||||||
{ type: 200, typeName: '常驻' }
|
{ type: 200, typeName: '常驻' }
|
||||||
]
|
]
|
||||||
|
if (e.isSr) {
|
||||||
|
/** 绑定的uid */
|
||||||
|
this.uidKey = `Yz:srJson:mys:qq-uid:${this.userId}`
|
||||||
|
|
||||||
|
this.path = `./data/srJson/${this.e.user_id}/`
|
||||||
|
this.pool = [
|
||||||
|
{ type: 11, typeName: '角色' },
|
||||||
|
{ type: 12, typeName: '光锥' },
|
||||||
|
{ type: 1, typeName: '常驻' },
|
||||||
|
{ type: 2, typeName: '新手' }
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async logUrl () {
|
async logUrl() {
|
||||||
let url = this.e.msg
|
let url = this.e.msg
|
||||||
|
|
||||||
/** 处理url */
|
/** 处理url */
|
||||||
|
@ -55,7 +67,7 @@ export default class GachaLog extends base {
|
||||||
return data
|
return data
|
||||||
}
|
}
|
||||||
|
|
||||||
async logFile () {
|
async logFile() {
|
||||||
let url = await this.downFile()
|
let url = await this.downFile()
|
||||||
if (!url) {
|
if (!url) {
|
||||||
if (this.e?.file?.name.includes('output')) {
|
if (this.e?.file?.name.includes('output')) {
|
||||||
|
@ -68,7 +80,7 @@ export default class GachaLog extends base {
|
||||||
return this.logUrl()
|
return this.logUrl()
|
||||||
}
|
}
|
||||||
|
|
||||||
dealUrl (url) {
|
dealUrl(url) {
|
||||||
// timestamp=1641338980〈=zh-cn 修复链接有奇怪符号
|
// timestamp=1641338980〈=zh-cn 修复链接有奇怪符号
|
||||||
url = url.replace(/〈=/g, '&').split('getGachaLog?')[1]
|
url = url.replace(/〈=/g, '&').split('getGachaLog?')[1]
|
||||||
|
|
||||||
|
@ -91,7 +103,7 @@ export default class GachaLog extends base {
|
||||||
return params
|
return params
|
||||||
}
|
}
|
||||||
|
|
||||||
async downFile () {
|
async downFile() {
|
||||||
this.creatFile()
|
this.creatFile()
|
||||||
|
|
||||||
let textPath = `${this.path}output_log.txt`
|
let textPath = `${this.path}output_log.txt`
|
||||||
|
@ -111,7 +123,7 @@ export default class GachaLog extends base {
|
||||||
let url = txt.match(/auth_appid=webview_gacha(.*)hk4e_cn/)
|
let url = txt.match(/auth_appid=webview_gacha(.*)hk4e_cn/)
|
||||||
|
|
||||||
/** 删除文件 */
|
/** 删除文件 */
|
||||||
fs.unlink(textPath, () => {})
|
fs.unlink(textPath, () => { })
|
||||||
|
|
||||||
if (!url || !url[0]) {
|
if (!url || !url[0]) {
|
||||||
return false
|
return false
|
||||||
|
@ -120,7 +132,7 @@ export default class GachaLog extends base {
|
||||||
return url[0]
|
return url[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkUrl (param) {
|
async checkUrl(param) {
|
||||||
if (!param.region) {
|
if (!param.region) {
|
||||||
this.e.reply('链接参数错误:缺少region\n请复制完整链接')
|
this.e.reply('链接参数错误:缺少region\n请复制完整链接')
|
||||||
return false
|
return false
|
||||||
|
@ -172,15 +184,15 @@ export default class GachaLog extends base {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async logApi (param) {
|
async logApi(param) {
|
||||||
// 调用一次接口判断链接是否正确
|
// 调用一次接口判断链接是否正确
|
||||||
let logUrl = 'https://hk4e-api.mihoyo.com/event/gacha_info/api/getGachaLog?'
|
let logUrl = 'https://hk4e-api.mihoyo.com/event/gacha_info/api/getGachaLog?'
|
||||||
|
|
||||||
/** 国际服 */
|
/** 国际服 */
|
||||||
if (!['cn_gf01', 'cn_qd01'].includes(param.region)) {
|
if (!['cn_gf01', 'cn_qd01'].includes(param.region)) {
|
||||||
logUrl = 'https://hk4e-api-os.mihoyo.com/event/gacha_info/api/getGachaLog?'
|
logUrl = 'https://hk4e-api-os.mihoyo.com/event/gacha_info/api/getGachaLog?'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let logParam = new URLSearchParams({
|
let logParam = new URLSearchParams({
|
||||||
authkey_ver: 1,
|
authkey_ver: 1,
|
||||||
lang: 'zh-cn', // 只支持简体中文
|
lang: 'zh-cn', // 只支持简体中文
|
||||||
|
@ -190,7 +202,22 @@ export default class GachaLog extends base {
|
||||||
end_id: 0,
|
end_id: 0,
|
||||||
...param
|
...param
|
||||||
}).toString()
|
}).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?'
|
||||||
|
}
|
||||||
|
logParam = new URLSearchParams({
|
||||||
|
authkey_ver: 1,
|
||||||
|
lang: 'zh-cn', // 只支持简体中文
|
||||||
|
gacha_type: 11,
|
||||||
|
page: 1,
|
||||||
|
size: 20,
|
||||||
|
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}`)
|
logger.error(`[获取抽卡记录失败] ${err}`)
|
||||||
})
|
})
|
||||||
|
@ -201,7 +228,7 @@ export default class GachaLog extends base {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 更新抽卡记录 */
|
/** 更新抽卡记录 */
|
||||||
async updateLog () {
|
async updateLog() {
|
||||||
/** 获取authkey */
|
/** 获取authkey */
|
||||||
let authkey = await redis.get(`${this.urlKey}${this.uid}`)
|
let authkey = await redis.get(`${this.urlKey}${this.uid}`)
|
||||||
if (!authkey) return false
|
if (!authkey) return false
|
||||||
|
@ -244,7 +271,7 @@ export default class GachaLog extends base {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 递归获取所有数据 */
|
/** 递归获取所有数据 */
|
||||||
async getAllLog (ids, authkey, page = 1, endId = 0) {
|
async getAllLog(ids, authkey, page = 1, endId = 0) {
|
||||||
let res = await this.logApi({
|
let res = await this.logApi({
|
||||||
gacha_type: this.type,
|
gacha_type: this.type,
|
||||||
page,
|
page,
|
||||||
|
@ -288,11 +315,11 @@ export default class GachaLog extends base {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 读取本地json
|
// 读取本地json
|
||||||
readJson () {
|
readJson() {
|
||||||
let logJson = []; let ids = new Map()
|
let logJson = []; let ids = new Map()
|
||||||
let file = `${this.path}/${this.uid}/${this.type}.json`
|
let file = `${this.path}/${this.uid}/${this.type}.json`
|
||||||
if (fs.existsSync(file)) {
|
if (fs.existsSync(file)) {
|
||||||
// 获取本地数据 进行数据合并
|
// 获取本地数据 进行数据合并
|
||||||
logJson = JSON.parse(fs.readFileSync(file, 'utf8'))
|
logJson = JSON.parse(fs.readFileSync(file, 'utf8'))
|
||||||
for (let val of logJson) {
|
for (let val of logJson) {
|
||||||
if (val.id) {
|
if (val.id) {
|
||||||
|
@ -304,7 +331,7 @@ export default class GachaLog extends base {
|
||||||
return { list: logJson, ids }
|
return { list: logJson, ids }
|
||||||
}
|
}
|
||||||
|
|
||||||
creatFile () {
|
creatFile() {
|
||||||
if (!fs.existsSync(this.path)) {
|
if (!fs.existsSync(this.path)) {
|
||||||
fs.mkdirSync(this.path)
|
fs.mkdirSync(this.path)
|
||||||
}
|
}
|
||||||
|
@ -315,7 +342,7 @@ export default class GachaLog extends base {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
writeJson (data) {
|
writeJson(data) {
|
||||||
this.creatFile()
|
this.creatFile()
|
||||||
|
|
||||||
let file = `${this.path}${this.uid}/`
|
let file = `${this.path}${this.uid}/`
|
||||||
|
@ -324,7 +351,7 @@ export default class GachaLog extends base {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** #抽卡记录 */
|
/** #抽卡记录 */
|
||||||
async getLogData () {
|
async getLogData() {
|
||||||
/** 卡池 */
|
/** 卡池 */
|
||||||
this.getPool()
|
this.getPool()
|
||||||
|
|
||||||
|
@ -348,30 +375,38 @@ export default class GachaLog extends base {
|
||||||
return data
|
return data
|
||||||
}
|
}
|
||||||
|
|
||||||
getPool () {
|
getPool() {
|
||||||
let msg = this.e.msg.replace(/#|抽卡|记录|祈愿|分析|池/g, '')
|
let msg = this.e.msg.replace(/#|抽卡|记录|祈愿|分析|池|原神|星铁|崩坏星穹铁道|铁道/g, '')
|
||||||
this.type = 301
|
this.type = this.e.isSr ? 11 : 301
|
||||||
this.typeName = '角色'
|
this.typeName = '角色'
|
||||||
switch (msg) {
|
switch (msg) {
|
||||||
case 'up':
|
case 'up':
|
||||||
case '抽卡':
|
case '抽卡':
|
||||||
case '角色':
|
case '角色':
|
||||||
case '抽奖':
|
case '抽奖':
|
||||||
this.type = 301
|
this.type = this.e.isSr ? 11 : 301
|
||||||
this.typeName = '角色'
|
this.typeName = '角色'
|
||||||
break
|
break
|
||||||
case '常驻':
|
case '常驻':
|
||||||
this.type = 200
|
this.type = this.e.isSr ? 1 : 200
|
||||||
this.typeName = '常驻'
|
this.typeName = '常驻'
|
||||||
break
|
break
|
||||||
case '武器':
|
case '武器':
|
||||||
this.type = 302
|
this.type = this.e.isSr ? 12 : 302
|
||||||
this.typeName = '武器'
|
this.typeName = this.e.isSr ? '光锥' : '武器'
|
||||||
|
break
|
||||||
|
case "光锥":
|
||||||
|
this.type = 12
|
||||||
|
this.typeName = '光锥'
|
||||||
|
break
|
||||||
|
case "新手":
|
||||||
|
this.type = this.e.isSr ? 2 : 100
|
||||||
|
this.typeName = '新手'
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async getUid () {
|
async getUid() {
|
||||||
if (!fs.existsSync(this.path)) {
|
if (!fs.existsSync(this.path)) {
|
||||||
this.e.reply('暂无抽卡记录\n#记录帮助,查看配置说明', false, { at: true })
|
this.e.reply('暂无抽卡记录\n#记录帮助,查看配置说明', false, { at: true })
|
||||||
return false
|
return false
|
||||||
|
@ -394,7 +429,7 @@ export default class GachaLog extends base {
|
||||||
/** 拿修改时间最后的uid */
|
/** 拿修改时间最后的uid */
|
||||||
let uidArr = []
|
let uidArr = []
|
||||||
for (let uid of logs) {
|
for (let uid of logs) {
|
||||||
let json = `${this.path}${uid}/301.json`
|
let json = this?.e?.isSr ? `${this.path}${uid}/301.json` : `${this.path}${uid}/11.json`
|
||||||
if (!fs.existsSync(json)) {
|
if (!fs.existsSync(json)) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -419,7 +454,7 @@ export default class GachaLog extends base {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 统计计算记录 */
|
/** 统计计算记录 */
|
||||||
analyse () {
|
analyse() {
|
||||||
if (lodash.isEmpty(this.all)) {
|
if (lodash.isEmpty(this.all)) {
|
||||||
this.all = this.readJson().list
|
this.all = this.readJson().list
|
||||||
}
|
}
|
||||||
|
@ -450,7 +485,7 @@ export default class GachaLog extends base {
|
||||||
} else {
|
} else {
|
||||||
fourLog[val.name] = 1
|
fourLog[val.name] = 1
|
||||||
}
|
}
|
||||||
if (val.item_type == '武器') {
|
if (val.item_type == '武器' || val.item_type == '光锥') {
|
||||||
weaponFourNum++
|
weaponFourNum++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -558,9 +593,8 @@ export default class GachaLog extends base {
|
||||||
noWaiRate = (fiveNum - bigNum - wai) / (fiveNum - bigNum)
|
noWaiRate = (fiveNum - bigNum - wai) / (fiveNum - bigNum)
|
||||||
noWaiRate = (noWaiRate * 100).toFixed(1)
|
noWaiRate = (noWaiRate * 100).toFixed(1)
|
||||||
}
|
}
|
||||||
|
let firstTime = this.all[this.all.length - 1]?.time.substring(0, 16)
|
||||||
let firstTime = this.all[this.all.length - 1].time.substring(0, 16)
|
let lastTime = this.all[0]?.time.substring(0, 16)
|
||||||
let lastTime = this.all[0].time.substring(0, 16)
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
allNum,
|
allNum,
|
||||||
|
@ -583,11 +617,10 @@ export default class GachaLog extends base {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
checkIsUp () {
|
checkIsUp() {
|
||||||
if (['莫娜', '七七', '迪卢克', '琴'].includes(this.role.name)) {
|
if (['莫娜', '七七', '迪卢克', '琴', '姬子', '杰帕德', '彦卿', '白露', '瓦尔特', '克拉拉', '布洛妮娅'].includes(this.role.name)) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
let role5join = {
|
let role5join = {
|
||||||
'刻晴': {
|
'刻晴': {
|
||||||
start: '2021-02-17 18:00:00',
|
start: '2021-02-17 18:00:00',
|
||||||
|
@ -602,7 +635,6 @@ export default class GachaLog extends base {
|
||||||
end: '2023-03-21 17:59:59'
|
end: '2023-03-21 17:59:59'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lodash.keys(role5join).includes(this.role.name)) {
|
if (lodash.keys(role5join).includes(this.role.name)) {
|
||||||
let start = new Date(role5join[this.role.name].start).getTime()
|
let start = new Date(role5join[this.role.name].start).getTime()
|
||||||
let end = new Date(role5join[this.role.name].end).getTime()
|
let end = new Date(role5join[this.role.name].end).getTime()
|
||||||
|
@ -614,14 +646,14 @@ export default class GachaLog extends base {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 渲染数据 */
|
/** 渲染数据 */
|
||||||
randData (data) {
|
randData(data) {
|
||||||
let line = []
|
let line = []
|
||||||
if (this.type == 301) {
|
let weapon = this.e.isSr ? '光锥' : '武器'
|
||||||
|
if ([301, 11].includes(this.type)) {
|
||||||
line = [[
|
line = [[
|
||||||
{ lable: '未出五星', num: data.noFiveNum, unit: '抽' },
|
{ lable: '未出五星', num: data.noFiveNum, unit: '抽' },
|
||||||
{ lable: '五星', num: data.fiveNum, unit: '个' },
|
{ lable: '五星', num: data.fiveNum, unit: '个' },
|
||||||
|
@ -631,16 +663,16 @@ export default class GachaLog extends base {
|
||||||
{ lable: '未出四星', num: data.noFourNum, unit: '抽' },
|
{ lable: '未出四星', num: data.noFourNum, unit: '抽' },
|
||||||
{ lable: '五星常驻', num: data.wai, unit: '个' },
|
{ lable: '五星常驻', num: data.wai, unit: '个' },
|
||||||
{ lable: 'UP平均', num: data.isvalidNum, unit: '抽' },
|
{ lable: 'UP平均', num: data.isvalidNum, unit: '抽' },
|
||||||
{ lable: 'UP花费原石', num: data.upYs, unit: '' }
|
{ lable: `UP花费${this?.e?.isSr ? '星琼' : '原石'}`, num: data.upYs, unit: '' }
|
||||||
]]
|
]]
|
||||||
}
|
}
|
||||||
// 常驻池
|
// 常驻池
|
||||||
if (this.type == 200) {
|
if ([200, 1].includes(this.type)) {
|
||||||
line = [[
|
line = [[
|
||||||
{ lable: '未出五星', num: data.noFiveNum, unit: '抽' },
|
{ lable: '未出五星', num: data.noFiveNum, unit: '抽' },
|
||||||
{ lable: '五星', num: data.fiveNum, unit: '个' },
|
{ lable: '五星', num: data.fiveNum, unit: '个' },
|
||||||
{ lable: '五星平均', num: data.fiveAvg, unit: '抽', color: data.fiveColor },
|
{ lable: '五星平均', num: data.fiveAvg, unit: '抽', color: data.fiveColor },
|
||||||
{ lable: '五星武器', num: data.weaponNum, unit: '个' }
|
{ lable: `五星${weapon}`, num: data.weaponNum, unit: '个' }
|
||||||
], [
|
], [
|
||||||
{ lable: '未出四星', num: data.noFourNum, unit: '抽' },
|
{ lable: '未出四星', num: data.noFourNum, unit: '抽' },
|
||||||
{ lable: '四星', num: data.fourNum, unit: '个' },
|
{ lable: '四星', num: data.fourNum, unit: '个' },
|
||||||
|
@ -649,12 +681,26 @@ export default class GachaLog extends base {
|
||||||
]]
|
]]
|
||||||
}
|
}
|
||||||
// 武器池
|
// 武器池
|
||||||
if (this.type == 302) {
|
if ([302, 12].includes(this.type)) {
|
||||||
line = [[
|
line = [[
|
||||||
{ lable: '未出五星', num: data.noFiveNum, unit: '抽' },
|
{ lable: '未出五星', num: data.noFiveNum, unit: '抽' },
|
||||||
{ lable: '五星', num: data.fiveNum, unit: '个' },
|
{ lable: '五星', num: data.fiveNum, unit: '个' },
|
||||||
{ lable: '五星平均', num: data.fiveAvg, unit: '抽', color: data.fiveColor },
|
{ lable: '五星平均', num: data.fiveAvg, unit: '抽', color: data.fiveColor },
|
||||||
{ lable: '四星武器', num: data.weaponFourNum, unit: '个' }
|
{ lable: `四星${weapon}`, num: data.weaponFourNum, 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 }
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
// 新手池
|
||||||
|
if ([100, 2].includes(this.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: data.noFourNum, unit: '抽' },
|
{ lable: '未出四星', num: data.noFourNum, unit: '抽' },
|
||||||
{ lable: '四星', num: data.fourNum, unit: '个' },
|
{ lable: '四星', num: data.fourNum, unit: '个' },
|
||||||
|
@ -662,7 +708,6 @@ export default class GachaLog extends base {
|
||||||
{ lable: '四星最多', num: data.maxFour.num, unit: data.maxFour.name }
|
{ lable: '四星最多', num: data.maxFour.num, unit: data.maxFour.name }
|
||||||
]]
|
]]
|
||||||
}
|
}
|
||||||
|
|
||||||
let hasMore = false
|
let hasMore = false
|
||||||
if (this.e.isGroup && data.fiveLog.length > 48) {
|
if (this.e.isGroup && data.fiveLog.length > 48) {
|
||||||
data.fiveLog = data.fiveLog.slice(0, 48)
|
data.fiveLog = data.fiveLog.slice(0, 48)
|
||||||
|
@ -684,22 +729,22 @@ export default class GachaLog extends base {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getServer () {
|
getServer() {
|
||||||
let uid = this.uid
|
let uid = this.uid
|
||||||
switch (String(uid)[0]) {
|
switch (String(uid)[0]) {
|
||||||
case '1':
|
case '1':
|
||||||
case '2':
|
case '2':
|
||||||
return 'cn_gf01' // 官服
|
return this.e.isSr ? 'prod_gf_cn' : 'cn_gf01' // 官服
|
||||||
case '5':
|
case '5':
|
||||||
return 'cn_qd01' // B服
|
return this.e.isSr ? 'prod_qd_cn' : 'cn_qd01' // B服
|
||||||
case '6':
|
case '6':
|
||||||
return 'os_usa' // 美服
|
return this.e.isSr ? 'prod_official_usa' : 'os_usa' // 美服
|
||||||
case '7':
|
case '7':
|
||||||
return 'os_euro' // 欧服
|
return this.e.isSr ? 'prod_official_euro' : 'os_euro' // 欧服
|
||||||
case '8':
|
case '8':
|
||||||
return 'os_asia' // 亚服
|
return this.e.isSr ? 'prod_official_asia' : 'os_asia' // 亚服
|
||||||
case '9':
|
case '9':
|
||||||
return 'os_cht' // 港澳台服
|
return this.e.isSr ? 'prod_official_cht' : 'os_cht' // 港澳台服
|
||||||
}
|
}
|
||||||
return 'cn_gf01'
|
return 'cn_gf01'
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import gsCfg from './gsCfg.js'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
|
||||||
export default class LogCount extends base {
|
export default class LogCount extends base {
|
||||||
constructor (e) {
|
constructor(e) {
|
||||||
super(e)
|
super(e)
|
||||||
this.model = 'logCount'
|
this.model = 'logCount'
|
||||||
|
|
||||||
|
@ -25,14 +25,30 @@ export default class LogCount extends base {
|
||||||
this.role5 = ['刻晴', '莫娜', '七七', '迪卢克', '琴', '提纳里', '迪希雅']
|
this.role5 = ['刻晴', '莫娜', '七七', '迪卢克', '琴', '提纳里', '迪希雅']
|
||||||
/** 五星武器 */
|
/** 五星武器 */
|
||||||
this.weapon5 = ['阿莫斯之弓', '天空之翼', '天空之卷', '天空之脊', '天空之傲', '天空之刃', '四风原典', '和璞鸢', '狼的末路', '风鹰剑']
|
this.weapon5 = ['阿莫斯之弓', '天空之翼', '天空之卷', '天空之脊', '天空之傲', '天空之刃', '四风原典', '和璞鸢', '狼的末路', '风鹰剑']
|
||||||
|
if (e.isSr) {
|
||||||
|
/** 绑定的uid */
|
||||||
|
this.uidKey = `Yz:srJson:mys:qq-uid:${this.userId}`
|
||||||
|
|
||||||
|
this.path = `./data/srJson/${this.e.user_id}/`
|
||||||
|
this.pool = [
|
||||||
|
{ type: 11, typeName: '角色' },
|
||||||
|
{ type: 12, typeName: '光锥' },
|
||||||
|
{ type: 1, typeName: '常驻' },
|
||||||
|
{ type: 2, typeName: '新手' }
|
||||||
|
]
|
||||||
|
/** 五星角色 */
|
||||||
|
this.role5 = ['姬子', '杰帕德', '彦卿', '白露', '瓦尔特', '克拉拉', '布洛妮娅']
|
||||||
|
/** 五星武器 */
|
||||||
|
this.weapon5 = ['银河铁道之夜', '无可取代的东西', '但战斗还未结束', '以世界之名', '制胜的瞬间', '如泥酣眠', '时节不居']
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 读取本地json
|
// 读取本地json
|
||||||
readJson () {
|
readJson() {
|
||||||
let logJson = []; let ids = []
|
let logJson = []; let ids = []
|
||||||
let file = `${this.path}/${this.uid}/${this.type}.json`
|
let file = `${this.path}/${this.uid}/${this.type}.json`
|
||||||
if (fs.existsSync(file)) {
|
if (fs.existsSync(file)) {
|
||||||
// 获取本地数据 进行数据合并
|
// 获取本地数据 进行数据合并
|
||||||
logJson = JSON.parse(fs.readFileSync(file, 'utf8'))
|
logJson = JSON.parse(fs.readFileSync(file, 'utf8'))
|
||||||
for (let val of logJson) {
|
for (let val of logJson) {
|
||||||
if (val.id) {
|
if (val.id) {
|
||||||
|
@ -45,7 +61,7 @@ export default class LogCount extends base {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** #抽卡统计 */
|
/** #抽卡统计 */
|
||||||
async count () {
|
async count() {
|
||||||
/** 卡池 */
|
/** 卡池 */
|
||||||
this.getPool()
|
this.getPool()
|
||||||
|
|
||||||
|
@ -68,30 +84,38 @@ export default class LogCount extends base {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getPool () {
|
getPool() {
|
||||||
let msg = this.e.msg.replace(/#|抽卡|统计|池/g, '')
|
let msg = this.e.msg.replace(/#|抽卡|记录|祈愿|分析|池|原神|星铁|崩坏星穹铁道|铁道|抽卡|统计|池/g, '')
|
||||||
this.type = 301
|
this.type = this.e.isSr?11:301
|
||||||
this.typeName = '角色'
|
this.typeName = '角色'
|
||||||
switch (msg) {
|
switch (msg) {
|
||||||
case 'up':
|
case 'up':
|
||||||
case '抽卡':
|
case '抽卡':
|
||||||
case '角色':
|
case '角色':
|
||||||
case '抽奖':
|
case '抽奖':
|
||||||
this.type = 301
|
this.type = this.e.isSr ? 11 : 301
|
||||||
this.typeName = '角色'
|
this.typeName = '角色'
|
||||||
break
|
break
|
||||||
case '常驻':
|
case '常驻':
|
||||||
this.type = 200
|
this.type = this.e.isSr ? 1 : 200
|
||||||
this.typeName = '常驻'
|
this.typeName = '常驻'
|
||||||
break
|
break
|
||||||
case '武器':
|
case '武器':
|
||||||
this.type = 302
|
this.type = this.e.isSr ? 12 : 302
|
||||||
this.typeName = '武器'
|
this.typeName = this.e.isSr ? '光锥' : '武器'
|
||||||
|
break
|
||||||
|
case "光锥":
|
||||||
|
this.type = 12
|
||||||
|
this.typeName = '光锥'
|
||||||
|
break
|
||||||
|
case "新手":
|
||||||
|
this.type = this.e.isSr? 2:100
|
||||||
|
this.typeName = '新手'
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async getUid () {
|
async getUid() {
|
||||||
if (!fs.existsSync(this.path)) {
|
if (!fs.existsSync(this.path)) {
|
||||||
this.e.reply('暂无抽卡记录\n#记录帮助,查看配置说明', false, { at: true })
|
this.e.reply('暂无抽卡记录\n#记录帮助,查看配置说明', false, { at: true })
|
||||||
return false
|
return false
|
||||||
|
@ -138,7 +162,7 @@ export default class LogCount extends base {
|
||||||
return uidArr[0].uid
|
return uidArr[0].uid
|
||||||
}
|
}
|
||||||
|
|
||||||
getPoolCfg () {
|
getPoolCfg() {
|
||||||
let poolCfg = gsCfg.getdefSet('pool', this.type)
|
let poolCfg = gsCfg.getdefSet('pool', this.type)
|
||||||
|
|
||||||
poolCfg.forEach(v => {
|
poolCfg.forEach(v => {
|
||||||
|
@ -150,8 +174,9 @@ export default class LogCount extends base {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 统计计算记录 */
|
/** 统计计算记录 */
|
||||||
analyseHistory () {
|
analyseHistory() {
|
||||||
let all = this.readJson().list
|
let all = this.readJson().list
|
||||||
|
|
||||||
all = all.reverse()
|
all = all.reverse()
|
||||||
|
|
||||||
let poolCfg = [...this.getPoolCfg()].reverse()
|
let poolCfg = [...this.getPoolCfg()].reverse()
|
||||||
|
|
|
@ -7,7 +7,7 @@ import MysUser from './mys/MysUser.js'
|
||||||
import MysInfo from './mys/mysInfo.js'
|
import MysInfo from './mys/mysInfo.js'
|
||||||
|
|
||||||
export default class User extends base {
|
export default class User extends base {
|
||||||
constructor (e) {
|
constructor(e) {
|
||||||
super(e)
|
super(e)
|
||||||
this.model = 'bingCk'
|
this.model = 'bingCk'
|
||||||
/** 绑定的uid */
|
/** 绑定的uid */
|
||||||
|
@ -15,20 +15,24 @@ export default class User extends base {
|
||||||
|
|
||||||
/** 多角色uid */
|
/** 多角色uid */
|
||||||
this.allUid = []
|
this.allUid = []
|
||||||
|
if (this.e.isSr) {
|
||||||
|
/** 绑定的uid */
|
||||||
|
this.uidKey = `Yz:srJson:mys:qq-uid:${this.userId}`
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取当前user实例
|
// 获取当前user实例
|
||||||
async user () {
|
async user() {
|
||||||
return await MysInfo.getNoteUser(this.e)
|
return await MysInfo.getNoteUser(this.e)
|
||||||
}
|
}
|
||||||
|
|
||||||
async resetCk () {
|
async resetCk() {
|
||||||
let user = await this.user()
|
let user = await this.user()
|
||||||
await user.initCache()
|
await user.initCache()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 绑定ck */
|
/** 绑定ck */
|
||||||
async bing () {
|
async bing() {
|
||||||
let user = await this.user()
|
let user = await this.user()
|
||||||
let set = gsCfg.getConfig('mys', 'set')
|
let set = gsCfg.getConfig('mys', 'set')
|
||||||
|
|
||||||
|
@ -97,24 +101,31 @@ export default class User extends base {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
await this.e.reply(uidMsg.join('\n'))
|
await this.e.reply(uidMsg.join('\n'))
|
||||||
|
let msg = ''
|
||||||
let msg = '【#体力】查询当前树脂'
|
this.region_name += lodash.map(this.allUid, 'region_name').join(',')
|
||||||
msg += '\n【#原石】查看原石札记'
|
if (/天空岛|世界树/.test(this.region_name)) {
|
||||||
msg += '\n【#原石统计】原石统计数据'
|
msg += '原神模块支持:\n【#体力】查询当前树脂'
|
||||||
msg += '\n【#练度统计】技能统计列表'
|
msg += '\n【#签到】米游社原神自动签到'
|
||||||
msg += '\n【#uid】当前绑定ck uid列表'
|
msg += '\n【#关闭签到】开启或关闭原神自动签到'
|
||||||
msg += '\n【#ck】检查当前用户ck是否有效'
|
msg += '\n【#原石】查看原石札记'
|
||||||
msg += '\n【#我的ck】查看当前绑定ck'
|
msg += '\n【#原石统计】原石统计数据'
|
||||||
msg += '\n【#删除ck】删除当前绑定ck'
|
msg += '\n【#练度统计】技能统计列表'
|
||||||
|
msg += '\n【#uid】当前绑定ck uid列表'
|
||||||
|
msg += '\n【#ck】检查当前用户ck是否有效'
|
||||||
|
msg += '\n【#我的ck】查看当前绑定ck'
|
||||||
|
msg += '\n【#删除ck】删除当前绑定ck'
|
||||||
|
}
|
||||||
|
if (/星穹列车/.test(this.region_name)) {
|
||||||
|
msg += "\n星穹铁道支持:\n功能还在咕咕咕~"
|
||||||
|
}
|
||||||
msg += '\n 支持绑定多个ck'
|
msg += '\n 支持绑定多个ck'
|
||||||
|
|
||||||
msg = await common.makeForwardMsg(this.e, ['使用命令说明', msg], '绑定成功:使用命令说明')
|
msg = await common.makeForwardMsg(this.e, ['使用命令说明', msg], '绑定成功:使用命令说明')
|
||||||
|
|
||||||
await this.e.reply(msg)
|
await this.e.reply(msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 检查ck是否可用 */
|
/** 检查ck是否可用 */
|
||||||
async checkCk (param) {
|
async checkCk(param) {
|
||||||
let res
|
let res
|
||||||
for (let type of ['mys', 'hoyolab']) {
|
for (let type of ['mys', 'hoyolab']) {
|
||||||
let roleRes = await this.getGameRoles(type)
|
let roleRes = await this.getGameRoles(type)
|
||||||
|
@ -135,7 +146,7 @@ export default class User extends base {
|
||||||
if (!res) return false
|
if (!res) return false
|
||||||
|
|
||||||
if (!res.data.list || res.data.list.length <= 0) {
|
if (!res.data.list || res.data.list.length <= 0) {
|
||||||
this.checkMsg = '该账号尚未绑定原神角色!'
|
this.checkMsg = '该账号尚未绑定原神或星穹角色!'
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,17 +172,17 @@ export default class User extends base {
|
||||||
return this.uid
|
return this.uid
|
||||||
}
|
}
|
||||||
|
|
||||||
async getGameRoles (server = 'mys') {
|
async getGameRoles(server = 'mys') {
|
||||||
return await MysUser.getGameRole(this.ck, server)
|
return await MysUser.getGameRole(this.ck, server)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取米游社通行证id
|
// 获取米游社通行证id
|
||||||
async getUserInfo (server = 'mys') {
|
async getUserInfo(server = 'mys') {
|
||||||
return await MysUser.getUserFullInfo(this.ck, server)
|
return await MysUser.getUserFullInfo(this.ck, server)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 保存ck */
|
/** 保存ck */
|
||||||
getCk () {
|
getCk() {
|
||||||
let ck = gsCfg.getBingCkSingle(this.e.user_id)
|
let ck = gsCfg.getBingCkSingle(this.e.user_id)
|
||||||
|
|
||||||
lodash.map(ck, o => {
|
lodash.map(ck, o => {
|
||||||
|
@ -185,6 +196,7 @@ export default class User extends base {
|
||||||
ck: this.ck,
|
ck: this.ck,
|
||||||
ltuid: this.ltuid,
|
ltuid: this.ltuid,
|
||||||
login_ticket: this.login_ticket,
|
login_ticket: this.login_ticket,
|
||||||
|
region_name: this.region_name,
|
||||||
device_id: this.getGuid(),
|
device_id: this.getGuid(),
|
||||||
isMain: true
|
isMain: true
|
||||||
}
|
}
|
||||||
|
@ -196,6 +208,7 @@ export default class User extends base {
|
||||||
qq: this.e.user_id,
|
qq: this.e.user_id,
|
||||||
ck: this.ck,
|
ck: this.ck,
|
||||||
ltuid: this.ltuid,
|
ltuid: this.ltuid,
|
||||||
|
region_name: v.region_name,
|
||||||
device_id: this.getGuid(),
|
device_id: this.getGuid(),
|
||||||
isMain: false
|
isMain: false
|
||||||
}
|
}
|
||||||
|
@ -204,14 +217,14 @@ export default class User extends base {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 删除绑定ck */
|
/** 删除绑定ck */
|
||||||
async delCk (uid = '') {
|
async delCk(uid = '') {
|
||||||
let user = await this.user()
|
let user = await this.user()
|
||||||
let uids = await user.delCk()
|
let uids = await user.delCk()
|
||||||
return `绑定cookie已删除,uid:${uids.join(',')}`
|
return `绑定cookie已删除,uid:${uids.join(',')}`
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 绑定uid,若有ck的话优先使用ck-uid */
|
/** 绑定uid,若有ck的话优先使用ck-uid */
|
||||||
async bingUid () {
|
async bingUid() {
|
||||||
let uid = this.e.msg.match(/[1|2|5-9][0-9]{8}/g)
|
let uid = this.e.msg.match(/[1|2|5-9][0-9]{8}/g)
|
||||||
if (!uid) return
|
if (!uid) return
|
||||||
uid = uid[0]
|
uid = uid[0]
|
||||||
|
@ -221,28 +234,40 @@ export default class User extends base {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** #uid */
|
/** #uid */
|
||||||
async showUid () {
|
async showUid() {
|
||||||
let user = await this.user()
|
let user = await this.user()
|
||||||
|
|
||||||
if (!user.hasCk) {
|
if (!user.hasCk) {
|
||||||
await this.e.reply(`当前绑定uid:${user.uid || '无'}`, false, { at: true })
|
await this.e.reply(`当前绑定uid:${user.uid || '无'}`, false, { at: true })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let uids = user.ckUids
|
let uids = user.ckUids
|
||||||
|
let ckData = user.ckData
|
||||||
let uid = user.uid * 1
|
let uid = user.uid * 1
|
||||||
let msg = [`当前uid:${uid}`, '当前绑定cookie Uid列表', '通过【#uid+序号】来切换uid']
|
let msg = [`当前uid:${uid}`, '当前绑定cookie Uid列表', '通过【#uid+序号】来切换uid']
|
||||||
for (let i in uids) {
|
let region_name = []
|
||||||
let tmp = `${Number(i) + 1}: ${uids[i]}`
|
Object.keys(ckData).forEach((v) => {
|
||||||
if (uids[i] * 1 === uid) {
|
if (!region_name.includes(ckData[v].region_name)) {
|
||||||
tmp += ' ☑'
|
region_name.push(ckData[v].region_name)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let count = 0;
|
||||||
|
for (let n of region_name) {
|
||||||
|
msg.push(n)
|
||||||
|
for (let i in uids) {
|
||||||
|
if (ckData[uids[i]].region_name == n) {
|
||||||
|
let tmp = `${++count}: ${uids[i]}`
|
||||||
|
if (uids[i] * 1 === uid) {
|
||||||
|
tmp += ' ☑'
|
||||||
|
}
|
||||||
|
msg.push(tmp)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
msg.push(tmp)
|
|
||||||
}
|
}
|
||||||
await this.e.reply(msg.join('\n'))
|
await this.e.reply(msg.join('\n'))
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 切换uid */
|
/** 切换uid */
|
||||||
async toggleUid (index) {
|
async toggleUid(index) {
|
||||||
let user = await this.user()
|
let user = await this.user()
|
||||||
let uidList = user.ckUids
|
let uidList = user.ckUids
|
||||||
if (index > uidList.length) {
|
if (index > uidList.length) {
|
||||||
|
@ -254,7 +279,7 @@ export default class User extends base {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 加载旧ck */
|
/** 加载旧ck */
|
||||||
async loadOldData () {
|
async loadOldData() {
|
||||||
let file = [
|
let file = [
|
||||||
'./data/MysCookie/NoteCookie.json',
|
'./data/MysCookie/NoteCookie.json',
|
||||||
'./data/NoteCookie/NoteCookie.json',
|
'./data/NoteCookie/NoteCookie.json',
|
||||||
|
@ -309,7 +334,7 @@ export default class User extends base {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 我的ck */
|
/** 我的ck */
|
||||||
async myCk () {
|
async myCk() {
|
||||||
let user = await this.user()
|
let user = await this.user()
|
||||||
if (!user.hasCk) {
|
if (!user.hasCk) {
|
||||||
this.e.reply('当前尚未绑定cookie')
|
this.e.reply('当前尚未绑定cookie')
|
||||||
|
@ -322,7 +347,7 @@ export default class User extends base {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkCkStatus () {
|
async checkCkStatus() {
|
||||||
let user = await this.user()
|
let user = await this.user()
|
||||||
if (!user.hasCk) {
|
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 })
|
||||||
|
@ -354,15 +379,15 @@ export default class User extends base {
|
||||||
await this.e.reply(cks.join('\n----\n'), false, { at: true })
|
await this.e.reply(cks.join('\n----\n'), false, { at: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
getGuid () {
|
getGuid() {
|
||||||
function S4 () {
|
function S4() {
|
||||||
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1)
|
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (S4() + S4() + '-' + S4() + '-' + S4() + '-' + S4() + '-' + S4() + S4() + S4())
|
return (S4() + S4() + '-' + S4() + '-' + S4() + '-' + S4() + '-' + S4() + S4() + S4())
|
||||||
}
|
}
|
||||||
|
|
||||||
async userAdmin () {
|
async userAdmin() {
|
||||||
this.model = 'userAdmin'
|
this.model = 'userAdmin'
|
||||||
await MysInfo.initCache()
|
await MysInfo.initCache()
|
||||||
let stat = await MysUser.getStatData()
|
let stat = await MysUser.getStatData()
|
||||||
|
|
|
@ -0,0 +1,351 @@
|
||||||
|
@font-face {
|
||||||
|
font-family: "tttgbnumber";
|
||||||
|
src: url("../../../../../resources/font/tttgbnumber.ttf");
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-size: 18px;
|
||||||
|
color: #1e1f20;
|
||||||
|
font-family: PingFangSC-Medium, PingFang SC, sans-serif;
|
||||||
|
transform: scale(1.5);
|
||||||
|
transform-origin: 0 0;
|
||||||
|
width: 465px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
width: 465px;
|
||||||
|
padding: 20px 15px 10px 15px;
|
||||||
|
background-color: #f5f6fb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.head_box {
|
||||||
|
border-radius: 15px;
|
||||||
|
font-family: tttgbnumber;
|
||||||
|
padding: 10px 20px;
|
||||||
|
position: relative;
|
||||||
|
box-shadow: 0 5px 10px 0 rgb(0 0 0 / 15%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.head_box .id_text {
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.head_box .day_text {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.head_box .genshin_logo {
|
||||||
|
position: absolute;
|
||||||
|
top: 1px;
|
||||||
|
right: 15px;
|
||||||
|
width: 97px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: "tttgbnumber";
|
||||||
|
text-align: center;
|
||||||
|
color: #7994a7;
|
||||||
|
position: relative;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.data_box {
|
||||||
|
border-radius: 15px;
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
padding: 20px 0px 5px 10px;
|
||||||
|
background: #fff;
|
||||||
|
box-shadow: 0 5px 10px 0 rgb(0 0 0 / 15%);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab_lable {
|
||||||
|
position: absolute;
|
||||||
|
top: -10px;
|
||||||
|
left: -8px;
|
||||||
|
background: #d4b98c;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 3px 10px;
|
||||||
|
border-radius: 15px 0px 15px 15px;
|
||||||
|
z-index: 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data_line {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
margin-bottom: 14px;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data_line_item {
|
||||||
|
width: 100px;
|
||||||
|
text-align: center;
|
||||||
|
/*margin: 0 20px;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.num {
|
||||||
|
font-family: tttgbnumber;
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.num .unit {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data_box .lable {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #7f858a;
|
||||||
|
line-height: 1;
|
||||||
|
margin-top: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
width: 510px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
width: 510px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data_box {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info_box_border{
|
||||||
|
border-radius: 15px;
|
||||||
|
/* margin-top: 20px; */
|
||||||
|
margin-bottom: 20px;
|
||||||
|
padding: 6px 0px 5px 10px;
|
||||||
|
background: #fff;
|
||||||
|
box-shadow: 0 5px 10px 0 rgb(0 0 0 / 15%);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card_list {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card_list .item {
|
||||||
|
margin: 0px 8px 10px 0px;
|
||||||
|
border-radius: 7px;
|
||||||
|
box-shadow: 0 2px 6px 0 rgb(132 93 90 / 30%);
|
||||||
|
height: 90px;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
background: #e7e5d9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card_list .item img {
|
||||||
|
width: 70px;
|
||||||
|
height: 70px;
|
||||||
|
border-radius: 7px 7px 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card_list .item.star5 img {
|
||||||
|
background-image: url(../../img/other/bg5.png);
|
||||||
|
width: 100%;
|
||||||
|
height: 70px;
|
||||||
|
/*filter: brightness(1.1);*/
|
||||||
|
background-size: 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card_list .item.star4 img {
|
||||||
|
width: 100%;
|
||||||
|
height: 70px;
|
||||||
|
background-image: url(../../img/other/bg4.png);
|
||||||
|
background-size: 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card_list .item .num {
|
||||||
|
position: absolute;
|
||||||
|
top: 0px;
|
||||||
|
right: 0px;
|
||||||
|
z-index: 9;
|
||||||
|
font-size: 18px;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 1px 5px;
|
||||||
|
border-radius: 3px;
|
||||||
|
background: rgb(0 0 0 / 50%);
|
||||||
|
font-family: "tttgbnumber";
|
||||||
|
}
|
||||||
|
|
||||||
|
.card_list .item .name,
|
||||||
|
.card_list .item .num_name {
|
||||||
|
position: absolute;
|
||||||
|
top: 71px;
|
||||||
|
left: 0px;
|
||||||
|
z-index: 9;
|
||||||
|
font-size: 12px;
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 16px;
|
||||||
|
line-height: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card_list .item .num_name {
|
||||||
|
font-family: "tttgbnumber";
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.base_info {
|
||||||
|
position: relative;
|
||||||
|
padding-left: 10px;
|
||||||
|
margin: 5px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uid:before {
|
||||||
|
content: " ";
|
||||||
|
position: absolute;
|
||||||
|
width: 5px;
|
||||||
|
height: 24px;
|
||||||
|
border-radius: 1px;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
background: #d3bc8d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label_301 {
|
||||||
|
background-color: rgb(235 106 75);
|
||||||
|
}
|
||||||
|
|
||||||
|
.label_302 {
|
||||||
|
background-color: #E69449;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label_200 {
|
||||||
|
background-color: #757CC8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-size: 12px;
|
||||||
|
padding: 2px 7px;
|
||||||
|
vertical-align: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ritem {
|
||||||
|
display: flex;
|
||||||
|
font-size: 12px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info_role {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
padding: 0 0px 5px 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ritem .role {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
background-color: #ffb285;
|
||||||
|
border-radius: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ritem .weapon_box {
|
||||||
|
overflow: hidden;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
border-radius: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ritem .weapon {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
background-color: #ffb285;
|
||||||
|
border-radius: 100%;
|
||||||
|
transform: scale(1.5);
|
||||||
|
-webkit-transform: scale(1.5);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.ritem .role_text {
|
||||||
|
margin: 2px 3px 0 2px;
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ritem .role_name {
|
||||||
|
width: 24px;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ritem .role_num {
|
||||||
|
width: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line_box {
|
||||||
|
height: 32px;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #7d7d7d;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line_box .line {
|
||||||
|
height: 2px;
|
||||||
|
flex-grow: 1;
|
||||||
|
background-color: #ebebeb;
|
||||||
|
margin: 0px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.red {
|
||||||
|
color: #f21000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.orange {
|
||||||
|
color: #ff8d00;
|
||||||
|
}
|
||||||
|
|
||||||
|
.green {
|
||||||
|
color: #12d88c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blue {
|
||||||
|
color: #4169E1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.purple {
|
||||||
|
color: #7500ff;
|
||||||
|
}
|
||||||
|
.minimum{
|
||||||
|
position: absolute;
|
||||||
|
top: 0px;
|
||||||
|
right: 0px;
|
||||||
|
z-index: 9;
|
||||||
|
font-size: 12px;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 1px 3px;
|
||||||
|
background-color: rgb(0 0 0 / 80%);
|
||||||
|
font-family: "tttgbnumber";
|
||||||
|
}
|
||||||
|
.hasMore{
|
||||||
|
font-size: 12px;
|
||||||
|
margin: 6px 0;
|
||||||
|
color: #7f858a;
|
||||||
|
}
|
|
@ -0,0 +1,78 @@
|
||||||
|
<!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/gachaLog/gachaLog.css"/>
|
||||||
|
<link rel="preload" href="{{resPath}}font/tttgbnumber.ttf" as="font">
|
||||||
|
<link rel="preload" href="{{pluResPath}}img/namecard/{{headImg}}.png" as="image">
|
||||||
|
<link rel="preload" href="{{pluResPath}}img/other/bg5.png" as="image">
|
||||||
|
{{@headStyle}}
|
||||||
|
</head>
|
||||||
|
<body id="container" class="body_box">
|
||||||
|
<div class="container">
|
||||||
|
<div class="info_box">
|
||||||
|
|
||||||
|
<div class="head_box">
|
||||||
|
<div class="id_text">
|
||||||
|
ID: {{uid}}
|
||||||
|
</div>
|
||||||
|
<h2 class="day_text">
|
||||||
|
{{allNum}}抽
|
||||||
|
<span class="label label_{{type}}">{{typeName}}池</span>
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="data_box">
|
||||||
|
<div class="tab_lable">数据总览</div>
|
||||||
|
{{each line val}}
|
||||||
|
<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="lable">{{item.lable}}</div>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
|
||||||
|
<div class="line_box">
|
||||||
|
<span class="line"></span>
|
||||||
|
<span class="text">五星历史 {{firstTime}} ~ {{lastTime}}</span>
|
||||||
|
<span class="line"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="card_list">
|
||||||
|
{{each fiveLog val}}
|
||||||
|
<div class="item star5">
|
||||||
|
{{ if val.isUp && typeName == '角色' }}
|
||||||
|
<span class="minimum">UP</span>
|
||||||
|
{{/if}}
|
||||||
|
<img class="role"
|
||||||
|
src="{{pluResPath}}StarRail/img/{{val.item_type=='角色'?'role':'weapon'}}/{{val.name}}.webp"
|
||||||
|
onerror="whenError(this,'{{val.item_type=='角色'?'role':'weapon'}}')"/>
|
||||||
|
<!-- <div class="num">{{val.num}}</div>-->
|
||||||
|
<div class="num_name">{{val.num}}</div>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
{{if hasMore }}
|
||||||
|
<div class="hasMore">*完整数据请私聊查看</div>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
<div class="logo"> Created By Yunzai-Bot</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function whenError(a, type) {
|
||||||
|
// a.onerror = null;
|
||||||
|
// if(type=="role"){
|
||||||
|
// a.src = "{{_res_path}}/genshin/logo/role/荧.png";
|
||||||
|
// }else{
|
||||||
|
// a.src = "{{_res_path}}/genshin/logo/weapon/旅行剑.png";
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</html>
|
|
@ -0,0 +1,184 @@
|
||||||
|
@font-face {
|
||||||
|
font-family: "tttgbnumber";
|
||||||
|
src: url("../../../../../resources/font/tttgbnumber.ttf");
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: "HYWenHei-55W";
|
||||||
|
src: url("../../../../../resources/font/HYWenHei-55W.ttf");
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
font-size: 16px;
|
||||||
|
width: 530px;
|
||||||
|
color: #1e1f20;
|
||||||
|
transform: scale(1.5);
|
||||||
|
transform-origin: 0 0;
|
||||||
|
}
|
||||||
|
.container {
|
||||||
|
width: 530px;
|
||||||
|
padding: 20px 15px 10px 15px;
|
||||||
|
background-color: #f5f6fb;
|
||||||
|
}
|
||||||
|
.head_box {
|
||||||
|
|
||||||
|
border-radius: 15px;
|
||||||
|
font-family: tttgbnumber;
|
||||||
|
padding: 10px 20px;
|
||||||
|
position: relative;
|
||||||
|
box-shadow: 0 5px 10px 0 rgb(0 0 0 / 15%);
|
||||||
|
|
||||||
|
}
|
||||||
|
.head_box .id_text {
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
.head_box .day_text {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
.head_box .genshin_logo {
|
||||||
|
position: absolute;
|
||||||
|
top: 1px;
|
||||||
|
right: 15px;
|
||||||
|
width: 97px;
|
||||||
|
}
|
||||||
|
.base_info {
|
||||||
|
position: relative;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
.uid {
|
||||||
|
font-family: tttgbnumber;
|
||||||
|
}
|
||||||
|
.pool_box {
|
||||||
|
font-family: HYWenHei-55W;
|
||||||
|
border-radius: 12px;
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
padding: 10px 5px 5px 5px;
|
||||||
|
background: #fff;
|
||||||
|
box-shadow: 0 5px 10px 0 rgb(0 0 0 / 15%);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.title_box {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
white-space: nowrap;
|
||||||
|
max-width: 210px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.name_box {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
.title_box .date {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.list_box {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.item {
|
||||||
|
margin: 0px 0 10px 10px;
|
||||||
|
border-radius: 7px;
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: 0 2px 6px 0 rgb(132 93 90 / 30%);
|
||||||
|
height: 70px;
|
||||||
|
width: 70px;
|
||||||
|
background: #e9e5dc;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.item .role_img {
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
background-size: 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
/*filter: contrast(95%);*/
|
||||||
|
}
|
||||||
|
.item .num {
|
||||||
|
position: absolute;
|
||||||
|
top: 0px;
|
||||||
|
right: 0px;
|
||||||
|
z-index: 9;
|
||||||
|
font-size: 18px;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 1px 5px;
|
||||||
|
border-radius: 3px;
|
||||||
|
background: rgb(0 0 0 / 50%);
|
||||||
|
font-family: "tttgbnumber";
|
||||||
|
}
|
||||||
|
.label_301 {
|
||||||
|
background-color: rgb(235 106 75);
|
||||||
|
}
|
||||||
|
.label_302 {
|
||||||
|
background-color: #e69449;
|
||||||
|
}
|
||||||
|
.label_200 {
|
||||||
|
background-color: #757cc8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-size: 16px;
|
||||||
|
padding: 2px 7px;
|
||||||
|
vertical-align: 2px;
|
||||||
|
}
|
||||||
|
.bg5 {
|
||||||
|
background-image: url(../../img/other/bg5.png);
|
||||||
|
width: 100%;
|
||||||
|
height: 70px;
|
||||||
|
/*filter: brightness(1.1);*/
|
||||||
|
background-size: 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
.bg4 {
|
||||||
|
width: 100%;
|
||||||
|
height: 70px;
|
||||||
|
background-image: url(../../img/other/bg4.png);
|
||||||
|
background-size: 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
.list_box .item .life1 {
|
||||||
|
background-color: #62a8ea;
|
||||||
|
}
|
||||||
|
.list_box .item .life2 {
|
||||||
|
background-color: #62a8ea;
|
||||||
|
}
|
||||||
|
.list_box .item .life3 {
|
||||||
|
background-color: #45b97c;
|
||||||
|
}
|
||||||
|
.list_box .item .life4 {
|
||||||
|
background-color: #45b97c;
|
||||||
|
}
|
||||||
|
.list_box .item .life5 {
|
||||||
|
background-color: #ff5722;
|
||||||
|
}
|
||||||
|
.list_box .item .life6 {
|
||||||
|
background-color: #ff5722;
|
||||||
|
}
|
||||||
|
.logo {
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: "tttgbnumber";
|
||||||
|
text-align: center;
|
||||||
|
color: #7994a7;
|
||||||
|
}
|
||||||
|
.hasMore{
|
||||||
|
font-size: 12px;
|
||||||
|
margin: -6px 0 10px 6px;
|
||||||
|
color: #7f858a;
|
||||||
|
}
|
|
@ -0,0 +1,64 @@
|
||||||
|
<!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/logCount/logCount.css"/>
|
||||||
|
<link rel="preload" href="{{resPath}}/font/HYWenHei-55W.ttf" as="font">
|
||||||
|
<link rel="preload" href="{{resPath}}/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">
|
||||||
|
{{@headStyle}}
|
||||||
|
</head>
|
||||||
|
<body id="container" class="body_box">
|
||||||
|
<div class="container">
|
||||||
|
<div class="head_box">
|
||||||
|
<div class="id_text">ID: {{uid}}</div>
|
||||||
|
<h2 class="day_text">抽卡统计-{{typeName}}</h2>
|
||||||
|
</div>
|
||||||
|
{{each pool val}}
|
||||||
|
{{if val.roleNum > 0}}
|
||||||
|
<div class="pool_box">
|
||||||
|
<div class="title_box">
|
||||||
|
<div class="name_box">
|
||||||
|
<div class="title"><h2>「{{val.five}}」</h2></div>
|
||||||
|
<span class="label label_301">{{val.count}}抽</span>
|
||||||
|
</div>
|
||||||
|
{{if typeName != "常驻"}}
|
||||||
|
<span class="date">{{val.start}} - {{val.end}}</span>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
<div class="list_box">
|
||||||
|
{{each val.role v}}
|
||||||
|
<div class="item">
|
||||||
|
<div class="bg{{v.rank_type}}"></div>
|
||||||
|
<span class="num {{if v.count>=5 && v.rank_type ==5}}life5{{/if}}">{{v.count}}</span>
|
||||||
|
{{if v.item_type=='角色'}}
|
||||||
|
<img class="role_img" src="{{pluResPath}}StarRail/img/role/{{v.name}}.webp" onerror="whenError(this,'role')"/>
|
||||||
|
{{/if}}
|
||||||
|
{{if v.item_type=='光锥'}}
|
||||||
|
<img class="role_img" src="{{pluResPath}}StarRail/img/weapon/{{v.name}}.webp" onerror="whenError(this)"/>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{/each}}
|
||||||
|
{{if isGroup }}
|
||||||
|
<div class="hasMore">*完整数据请私聊查看</div>
|
||||||
|
{{/if}}
|
||||||
|
<div class="logo">Created By Yunzai-Bot</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function whenError(a, type) {
|
||||||
|
// a.onerror = null;
|
||||||
|
// if (type == "role") {
|
||||||
|
// a.src = "{{_res_path}}/genshin/logo/role/荧.png";
|
||||||
|
// } else {
|
||||||
|
// a.src = "{{_res_path}}/genshin/logo/weapon/旅行剑.png";
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</html>
|
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 994 B |
After Width: | Height: | Size: 994 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 6.9 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 6.9 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 6.9 KiB |
After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 51 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 7.8 KiB |
After Width: | Height: | Size: 7.6 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 7.8 KiB |
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 7.6 KiB |
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 8.0 KiB |
After Width: | Height: | Size: 7.6 KiB |
After Width: | Height: | Size: 7.6 KiB |
After Width: | Height: | Size: 7.3 KiB |