部分文案更新

This commit is contained in:
yoimiya-kokomi 2022-08-17 04:04:12 +08:00
parent 0489249c12
commit ff57246610
13 changed files with 124 additions and 94 deletions

View File

@ -1,13 +1,18 @@
# 1.9.7
# 1.9.8
* `#上传深渊`、`#面板练度统计`已知问题修复,功能优化
* 对MiaoApi新版profile服务增加适配
# 1.9.1 ~ 1.9.7
* 新增`#面板练度统计`功能
* 可展示当前角色天赋及圣遗物练度信息
* 需要用户绑定Cookie圣遗物评分需要本地获取并查看过对应角色面板
* `#面板列表` 等页面样式与功能优化
* 内嵌字体改为默认woff格式调整部分页面与资源的结构与引用逻辑
# 1.9.1 ~ 1.9.6
* `#上传深渊`使用图片渲染深渊结果,同时可被`#喵喵深渊`触发
* 可展示本期深渊的全部角色信息,包括组队、天赋及圣遗物
* 数据会上传至胡桃Api进行伤害排名并展示在页面内
* 可在`#喵喵设置`中启用`#喵喵深渊`作为默认`#深渊`,默认关闭
* 启用后不会覆盖`#上期深渊`以及`#深渊12层`具体楼层的命令
* `#面板`、`#更新面板`命令使用图片渲染结果
* Enka面板服务支持配置代理 **@永恒的小黑屋**
* 如需配置可在**miao-plugin/config/profile.js**文件中配置
@ -16,11 +21,6 @@
* 感谢Enka官方 **@Algoinde**的官方授权及UA校验
* 感谢 **@MiniGrayGay**提供的Enka服务中转若面板更新失败可尝试在**miao-plugin/config/profile.js**文件中配置切换更新API
* 更新面板增加单用户更新间隔控制默认5分钟
* `#上传深渊`使用图片渲染深渊结果,同时可被`#喵喵深渊`触发
* 可展示本期深渊的全部角色信息,包括组队、天赋及圣遗物
* 数据会上传至胡桃Api进行伤害排名并展示在页面内
* 可在`#喵喵设置`中启用`#喵喵深渊`作为默认`#深渊`,默认关闭
* 启用后不会覆盖`#上期深渊`以及`#深渊12层`具体楼层的命令
* `#深渊出场率`、`#角色持有率` 增加样本数量展示,增加数据使用授权提示
* 修正部分V3Yunzai下的适配问题
* 部分角色的圣遗物评分增加充能的词条评分权重

View File

@ -141,7 +141,7 @@ export async function autoGetProfile (e, uid, avatar, callback) {
e.reply(`请确认${char.name}已展示在【游戏内】的角色展柜中,并打开了“显示角色详情”。然后请使用 #更新面板\n命令来获取${char.name}的面板详情`)
}
return { err: true }
} else if (!['enka', 'input2', 'miao', 'miao-pre'].includes(profile.dataSource)) {
} else if (!['enka', 'input2', 'miao'].includes(profile.dataSource)) {
if (!await refresh()) {
e.reply('由于数据格式升级,请重新获取面板信息后查看')
}
@ -225,7 +225,7 @@ export async function getProfileAll (e) {
let chars = []
lodash.forEach(profiles || [], (ds) => {
if (!['enka', 'input2', 'miao-pre', 'miao'].includes(ds.dataSource)) {
if (!['enka', 'input2', 'miao'].includes(ds.dataSource)) {
return
}
ds.name && chars.push(ds.name)

View File

@ -41,7 +41,7 @@ export async function renderProfile (e, char, render, mode = 'profile', params =
e.reply('由于数据Api变更请重新获取面板信息后查看')
}
return true
} else if (!['enka', 'input2', 'miao', 'miao-pre'].includes(profile.dataSource)) {
} else if (!['enka', 'input2', 'miao'].includes(profile.dataSource)) {
if (!await refresh()) {
e.reply('由于数据格式升级,请重新获取面板信息后查看')
}

View File

@ -22,7 +22,7 @@ export async function profileList (e, { render }) {
newChar = e.newChar
}
lodash.forEach(profiles || [], (ds) => {
if (!['enka', 'input2', 'miao-pre', 'miao'].includes(ds.dataSource)) {
if (!['enka', 'input2', 'miao'].includes(ds.dataSource)) {
return
}
let { id } = ds

View File

@ -411,7 +411,7 @@ export async function uploadData (e, { render }) {
})
if (!MysApi || !MysApi.isSelfCookie) {
if (isMatch) {
e.reply(`请绑定ck后再使用${e.original_msg}`)
e.reply(`请绑定ck后再使用${e.original_msg || e.msg}`)
}
return false
}
@ -420,7 +420,7 @@ export async function uploadData (e, { render }) {
let resDetail, resAbyss, overview
try {
resAbyss = await MysApi.getSpiralAbyss(1)
overview = await HutaoApi.getOverview()
// overview = await HutaoApi.getOverview()
if (resAbyss.floors.length > 0 && !await Avatars.hasTalentCache(uid)) {
e.reply('正在获取用户信息,请稍候...')
}
@ -447,14 +447,19 @@ export async function uploadData (e, { render }) {
return true
}
let abyss = new Abyss(resAbyss)
let abyssData = abyss.getData()
let avatars = new Avatars(uid, resDetail.avatars)
let avatarIds = abyss.getAvatars()
let overview = ret.info || (await HutaoApi.getOverview())?.data || {}
let addMsg = function (title, ds) {
let tmp = {}
if (!ds && !ds.avatarId && !ds.percent) {
if (!ds) {
return
}
let char = Character.get(ds.avatarId)
if (!ds.avatarId && !ds.id) {
return
}
let char = Character.get(ds.avatarId || ds.id)
tmp.title = title
tmp.id = char.id
tmp.value = `${(ds.value / 10000).toFixed(1)} W`
@ -475,19 +480,25 @@ export async function uploadData (e, { render }) {
})
}
}
if (ds.percent) {
pct(ds.percent, char.name)
pct(ds.percentTotal, '总记录')
} else {
msg.push({
txt: '暂无统计信息'
})
}
stat.push(tmp)
}
addMsg('最强一击', ret.data.damage || {})
addMsg('最高承伤', ret.data.takeDamage || {})
addMsg('最强一击', ret.data?.damage || abyssData?.stat?.dmg || {})
addMsg('最高承伤', ret.data?.takeDamage || abyssData?.stat.takeDmg || {})
let avatarData = await avatars.getTalentData(avatarIds, MysApi)
return await Common.render('stat/abyss-summary', {
abyss: abyss.getData(),
abyss: abyssData,
avatars: avatarData,
stat,
save_id: uid,
totalCount: overview?.data?.collectedPlayerCount || 0,
totalCount: overview?.collectedPlayerCount || 0,
uid
}, { e, render, scale: 1.8 })
} else {

View File

@ -20,11 +20,11 @@ let Miao = {
e.reply(data.msg || '请求失败')
return false
}
if (!data.uidListData || data.uidListData.length === 0) {
data = data.data
if (!data.showAvatarInfoList || data.showAvatarInfoList.length === 0) {
e.reply('请打开游戏内角色展柜的“显示详情”后等待5分钟重新获取面板')
return false
}
return Miao.getData(uid, data)
},
@ -36,56 +36,35 @@ let Miao = {
lodash.forEach({
name: 'nickname',
// avatar: "profilePicture.avatarId",
lv: 'level'
avatar: 'profilePicture.avatarID',
lv: 'level',
signature: 'signature'
}, (src, key) => {
ret[key] = lodash.get(data, src, '')
})
lodash.forEach(data.uidListData, (ds) => {
let char = Miao.getAvatar(ds)
lodash.forEach(data.showAvatarInfoList, (ds) => {
let char = Miao.getAvatarDetail(ds)
ret.chars[char.id] = char
})
if (data.cacheExpireAt) {
let exp = Math.max(0, Math.round(data.cacheExpireAt - (new Date() / 1000)))
ret.ttl = Math.max(60, exp)
}
return ret
},
getAvatar (ds) {
let char = Character.get(ds.usernameid)
let char = Character.get(ds.id)
let now = moment()
return {
id: ds.usernameid,
id: ds.id,
name: char ? char.name : '',
dataSource: 'miao-pre',
dataSource: 'miao',
updateTime: now.format('YYYY-MM-DD HH:mm:ss'),
lv: ds.level
}
},
async getCharData (uid, ds, saveCharData, { diyCfg = {}, sysCfg = {} }) {
if (ds.dataSource !== 'miao-pre' || !ds.id) {
return ds
}
try {
let url = diyCfg?.miaoApi?.url || sysCfg.miaoApi.url
let token = diyCfg?.miaoApi?.token || sysCfg.miaoApi.token
let profileApi = diyCfg?.miaoApi?.detailApi || sysCfg.miaoApi.detailApi
let api = profileApi({ url, token, uid, avatar: ds.id })
let req = await fetch(api)
let data = await req.json()
if (data.status === 0 && data.uidData) {
data = Miao.getAvatarDetail(data)
if (data) {
saveCharData(uid, data)
return data
}
}
return ds
} catch (err) {
console.log(err)
return ds
}
},
getAvatarDetail (data) {
let ds = data.uidData
getAvatarDetail (ds) {
let char = Character.get(ds.id)
let now = moment()
let ret = {
@ -95,10 +74,10 @@ let Miao = {
updateTime: now.format('YYYY-MM-DD HH:mm:ss'),
lv: ds.level,
fetter: ds.fetterLevel,
attr: Miao.getAttr(data.uidDataCombatValue),
attr: Miao.getAttr(ds.combatValue),
weapon: Miao.getWeapon(ds.weapon),
artis: Miao.getArtifact(data.uidDataByReliquary),
cons: ds.constellationNum || 0,
artis: Miao.getArtifact(ds.reliquary),
cons: ds.promoteLevel || 0,
talent: Miao.getTalent(char.id, ds.skill),
_priority: 10
}
@ -207,13 +186,11 @@ let Miao = {
idxMap[id] = nRet && nRet[1] ? idxMap[nRet[1]] : idxMap[idx]
idx++
})
let ret = {}
lodash.forEach(data, (ds) => {
let key = idxMap[ds.id]
ret[key] = {
level_original: ds.level,
level_current: ds.level
level: ds.level
}
})
return ret
@ -229,9 +206,8 @@ let Miao = {
id = id * 1
if (id !== 10000033) {
let a = talent.a || {}
if (a.level_current > 10) {
a.level_current = 10
a.level_original = 10
if (a.level > 10) {
a.level = 10
}
}
ret._fix = true

View File

@ -15,10 +15,7 @@ export const miaoApi = {
url: 'http://49.232.91.210/profile',
token: 'miao-token',
listApi: ({ url, uid, token }) => {
return `${url}/list?uid=${uid}&token=${token}`
},
detailApi: ({ url, uid, avatar, token }) => {
return `${url}/detail?uid=${uid}&avatar=${avatar}&token=${token}`
return `${url}/data?uid=${uid}&token=${token}`
}
}

View File

@ -6,8 +6,8 @@
<div class="info_box">
<div class="head-box type{{bgType}}">
<div class="label">#喵喵设置</div>
<div class="title">喵喵管理面板</div>
<div class="label">喵喵管理面板</div>
<div class="title">#喵喵设置</div>
</div>
</div>
<div class="cfg-box">

View File

@ -10,8 +10,8 @@
<div class="info_box">
<div class="head-box type{{bgType}}">
<div class="label">#喵喵面板设置</div>
<div class="title">角色面板管理</div>
<div class="label">角色面板管理</div>
<div class="title">#喵喵面板设置</div>
</div>
</div>
<div class="cfg-box">

View File

@ -67,7 +67,7 @@
{{/if}}
</div>
<div class="td-artis">
<div class="item item-banner avatar-artis artis{{avatar.sets.length}}">
<div class="item item-banner avatar-artis artis{{avatar?.artisMark?.sets?.length||avatar.sets.length}}">
<div class="artis item-icon">
{{each avatar?.artisMark?.sets || avatar?.sets || [] name}}
<span class="img"

View File

@ -70,12 +70,11 @@ body,
color: #d3bc8e;
}
.avatar-banner {
margin-top: -20px;
height: 270px;
height: 250px;
width: 175px;
background-repeat: no-repeat;
background-size: 100% auto;
background-position: top center;
background-position: 0 -30px;
}
.abyss-data {
display: flex;
@ -221,15 +220,33 @@ body,
margin: 2px;
}
.avatar-banner.avatar-枫原万叶 {
background-position: 0 60px;
background-position: 0 40px;
}
.avatar-banner.avatar-九条裟罗 {
background-position: 0 30px;
background-position: 0 0;
}
.avatar-banner.avatar-香菱 {
background-position: 0 80px;
background-position: 0 50px;
}
.avatar-banner.avatar-行秋 {
background-position: 0 70px;
background-position: 0 50px;
}
.avatar-banner.avatar-甘雨 {
background-position: 0 25px;
}
.avatar-banner.avatar-刻晴 {
background-position: 0 15px;
}
.avatar-banner.avatar-神里绫华 {
background-position: 0 -40px;
}
.avatar-banner.avatar-班尼特 {
background-position: 0 -45px;
}
.avatar-banner.avatar-五郎 {
background-position: 0 -45px;
}
.avatar-banner.avatar-托马 {
background-position: 0 15px;
}
/*# sourceMappingURL=abyss-summary.css.map */

View File

@ -37,6 +37,7 @@
{{each stat ds}}
{{set avatar = avatars[ds.id]}}
<div class="cont">
{{if avatar}}
<div class="stat-title">
<span>{{ds.title}}</span>
<strong>{{ds.value}}</strong>
@ -45,9 +46,14 @@
style="background-image:url({{_res_path}}/meta/character/{{avatar.name}}/gacha_card.png)"></div>
<div class="stat-msg">
{{each ds.msg msg}}
{{if msg.txt}}
<div class="msg">{{msg.txt}}</div>
{{else}}
<div class="msg">{{msg.title}}<strong>{{msg.value}}%</strong>的{{msg.name}}</div>
{{/if}}
{{/each}}
</div>
{{/if}}
</div>
{{/each}}
</div>
@ -110,7 +116,7 @@
<li><strong>#上传深渊</strong>会上传你的角色列表及当期深渊挑战数据,<strong>不会上传其他信息</strong>,感谢支持,喵~</li>
<li>统计服务由SG团队<strong>胡桃API</strong>提供,上传的数据将会用于排名以及<strong>#深渊使用率</strong><strong>#角色持有率</strong>等统计</li>
<li>深渊排行为本期深渊排行,{{if totalCount}}本期已提交用户数:<strong>{{totalCount}}</strong>{{/if}}更新时间{{abyss.time}}。</li>
<li>排名会随时间而更新,数据排名仅供娱乐~</li>
<li>角色装备与圣遗物为当前最新状态;排名会随时间而更新,数据排名仅供娱乐~</li>
</ul>
</div>
</div>

View File

@ -82,12 +82,11 @@ body, .container {
.avatar-banner {
margin-top: -20px;
height: 270px;
height: 250px;
width: 175px;
background-repeat: no-repeat;
background-size: 100% auto;
background-position: top center;
background-position: 0 -30px;
}
.abyss-data {
@ -268,18 +267,42 @@ body, .container {
.avatar-banner {
&.avatar-枫原万叶 {
background-position: 0 60px;
background-position: 0 40px;
}
&.avatar-九条裟罗 {
background-position: 0 30px;
background-position: 0 0;
}
&.avatar-香菱 {
background-position: 0 80px;
background-position: 0 50px;
}
&.avatar-行秋 {
background-position: 0 70px;
background-position: 0 50px;
}
&.avatar-甘雨 {
background-position: 0 25px;
}
&.avatar-刻晴 {
background-position: 0 15px;
}
&.avatar-神里绫华 {
background-position: 0 -40px;
}
&.avatar-班尼特 {
background-position: 0 -45px;
}
&.avatar-五郎 {
background-position: 0 -45px;
}
&.avatar-托马 {
background-position: 0 15px;
}
}