#最强排行#最高分排行 增加角色头像

This commit is contained in:
Kokomi 2022-11-18 03:10:19 +08:00
parent a96c45eb11
commit bf1da949f1
4 changed files with 40 additions and 7 deletions

View File

@ -167,6 +167,7 @@ async function renderCharRankList ({ e, uids, char, mode, groupId }) {
} }
} }
} }
tmp.star0 = 5 - tmp.star
list.push(tmp) list.push(tmp)
} }
} }
@ -176,7 +177,7 @@ async function renderCharRankList ({ e, uids, char, mode, groupId }) {
list = lodash.sortBy(list, mode === 'mark' ? '_mark' : '_dmg').reverse() list = lodash.sortBy(list, mode === 'mark' ? '_mark' : '_dmg').reverse()
} else { } else {
title = `#${mode === 'mark' ? '最高分' : '最强'}排行` title = `#${mode === 'mark' ? '最高分' : '最强'}排行`
list = lodash.sortBy(list, 'uid') list = lodash.sortBy(list, ['uid', 'star0', 'charid'])
} }
const rankCfg = await ProfileRank.getGroupCfg(groupId) const rankCfg = await ProfileRank.getGroupCfg(groupId)

View File

@ -50,7 +50,7 @@ body {
.char-idx { .char-idx {
width: 48px; width: 48px;
} }
.char-idx span { .char-idx .idx-icon {
display: inline-block; display: inline-block;
width: 24px; width: 24px;
height: 24px; height: 24px;
@ -62,16 +62,26 @@ body {
line-height: 24px; line-height: 24px;
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8); text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
} }
.char-idx span.idx-1 { .char-idx .idx-icon.idx-1 {
width: 48px; width: 48px;
margin: 13px 0; margin: 13px 0;
background-image: url('./imgs/mark-icon2.png'); background-image: url('./imgs/mark-icon2.png');
color: rgba(0, 0, 0, 0); color: rgba(0, 0, 0, 0);
text-shadow: none; text-shadow: none;
} }
.char-idx span.mode-mark { .char-idx .idx-icon.mode-mark {
background-position: 100% 0; background-position: 100% 0;
} }
.char-idx .char-icon {
width: 36px;
height: 36px;
margin-top: 8px;
border-radius: 10px;
overflow: hidden;
}
.char-idx .char-icon .img {
border-radius: 0;
}
.char-icon { .char-icon {
width: 50px; width: 50px;
height: 50px; height: 50px;

View File

@ -40,9 +40,11 @@
{{each list ds idx}} {{each list ds idx}}
<div class="cont char-list-item"> <div class="cont char-list-item">
{{if !ds.isMax}}
<div class="char-idx"> <div class="char-idx">
<span class="idx-{{ds.isMax ? 1 : idx+1}} mode-{{mode}}">{{idx+1}}</span> <span class="idx-icon idx-{{idx+1}} mode-{{mode}}">{{idx+1}}</span>
</div> </div>
{{/if}}
<div class="item-icon char-icon star{{ds.star}}"> <div class="item-icon char-icon star{{ds.star}}">
{{if ds.qqFace}} {{if ds.qqFace}}
<span class="img" style="background-image:url({{ds.qqFace}})"></span> <span class="img" style="background-image:url({{ds.qqFace}})"></span>
@ -50,8 +52,14 @@
<span class="img" style="background-image:url({{_res_path}}{{ds.imgs?.face}})"></span> <span class="img" style="background-image:url({{_res_path}}{{ds.imgs?.face}})"></span>
{{/if}} {{/if}}
</div> </div>
{{if ds.isMax}}
<div class="char-idx">
<div class="item-icon char-icon star{{ds.star}}">
<span class="img" style="background-image:url({{_res_path}}{{ds.imgs?.face}})"></span>
</div>
</div>
{{/if}}
<div class="char-info char-name"> <div class="char-info char-name">
<div class="name"> <div class="name">
<span class="cons cons-{{ds.cons}}">{{ds.cons}}</span> <span class="cons cons-{{ds.cons}}">{{ds.cons}}</span>
<strong>{{ds.sName}}</strong> <strong>{{ds.sName}}</strong>

View File

@ -53,7 +53,7 @@ body {
.char-idx { .char-idx {
width: 48px; width: 48px;
span { .idx-icon {
display: inline-block; display: inline-block;
width: 24px; width: 24px;
height: 24px; height: 24px;
@ -78,6 +78,20 @@ body {
background-position: 100% 0; background-position: 100% 0;
} }
} }
.char-icon {
width: 36px;
height: 36px;
margin-top: 8px;
border-radius: 10px;
overflow: hidden;
.img {
border-radius: 0;
}
}
} }
.char-icon { .char-icon {