mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-25 09:27:34 +00:00
修复#圣遗物列表功能
This commit is contained in:
parent
12bd03330a
commit
9a8b17b9a4
@ -61,12 +61,12 @@ export async function profileArtisList(e, { render }) {
|
||||
|
||||
let usefulMark;
|
||||
|
||||
let charCfg = Reliquaries2.getCharCfg(name);
|
||||
let charCfg = Artifact.getCharCfg(name);
|
||||
usefulMark = charCfg.titleWeight;
|
||||
|
||||
/* 处理圣遗物 */
|
||||
if (ds.artis) {
|
||||
let newScore = Reliquaries2.getArtisMark(name, ds.artis);
|
||||
let newScore = Artifact.getArtisMark(name, ds.artis);
|
||||
|
||||
lodash.forEach(ds.artis, (arti, idx) => {
|
||||
if (!arti.name) {
|
||||
@ -74,12 +74,12 @@ export async function profileArtisList(e, { render }) {
|
||||
}
|
||||
idx = idx.replace("arti", "");
|
||||
let mark = newScore[idx];
|
||||
let maxMark = Reliquaries.getMaxMark(name, arti.main[0] || "");
|
||||
let maxMark = Artifact.getMaxMark(name, arti.main[0] || "");
|
||||
arti.mark = Format.comma(mark, 1);
|
||||
arti._mark = mark;
|
||||
arti.markClass = Reliquaries2.getMarkClass(mark);
|
||||
arti.main = Profile.formatArti(arti.main);
|
||||
arti.attrs = Profile.formatArti(arti.attrs);
|
||||
arti.markClass = Artifact.getMarkClass(mark);
|
||||
arti.main = Artifact.formatArti(arti.main);
|
||||
arti.attrs = Artifact.formatArti(arti.attrs);
|
||||
arti.usefulMark = usefulMark;
|
||||
arti.avatar = name;
|
||||
artis.push(arti);
|
||||
|
2
index.js
2
index.js
@ -39,7 +39,7 @@ let rule = {
|
||||
//reg: "noCheck",
|
||||
describe: "【#角色】角色详情",
|
||||
},
|
||||
getArtis: {
|
||||
profileArtisList: {
|
||||
reg: "^#圣遗物列表\\s*(\\d{9})?$",
|
||||
describe: "【#角色】圣遗物列表",
|
||||
},
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
{{each artis ds}}
|
||||
<div class="item arti">
|
||||
{{if ds && ds.name && ds.main && ds.main[0] && ds.main[0]!="undefined"}}
|
||||
{{if ds && ds.name && ds.main && ds.main.title && ds.main.title!="undefined"}}
|
||||
<div class="avatar">
|
||||
<img src="{{_res_path}}meta/character/{{ds.avatar}}/side.png" onerror="whenError(this)"/>
|
||||
</div>
|
||||
@ -23,12 +23,13 @@
|
||||
<strong>{{ds.name}}</strong>
|
||||
<span class="mark mark-{{ds.markClass}}"><span>{{ds.mark}}分</span> - {{ds.markClass}}</span>
|
||||
</div>
|
||||
<ul class="detail">
|
||||
<li class="arti-main"><span class="title">{{ds.main[0]}}</span><span class="val">+{{ds.main[1]}}</span></li>
|
||||
<ul class="detail attr">
|
||||
<li class="arti-main"><span class="title">{{ds.main.title}}</span><span class="val">+{{ds.main.val}}</span></li>
|
||||
{{each ds.attrs attr}}
|
||||
{{if attr[0]}}
|
||||
<li class="{{ds.usefulMark[attr[0]]*1 > 79.9 ?`great`:(ds.usefulMark[attr[0]]*1>0 ? `useful`:`nouse`)}}"><span class="title">{{attr[0]}}</span><span
|
||||
class="val">+{{attr[1]}}</span></li>
|
||||
{{if attr.title}}
|
||||
<li class="{{ds.usefulMark[attr.title]*1 > 79.9 ?`great`:(ds.usefulMark[attr.title]*1>0 ? `useful`:`nouse`)}}">
|
||||
<span class="title">{{attr.title}}</span><span
|
||||
class="val">+{{attr.val}}</span></li>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
|
Loading…
Reference in New Issue
Block a user