UI内容更新
This commit is contained in:
@@ -39,11 +39,11 @@ const toRankListPage = () => {
|
||||
watch(
|
||||
() => [config.value, user.value],
|
||||
([n_config, n_user]) => {
|
||||
const list = n_config.levelInfo || [];
|
||||
if (n_user.id && list.length) {
|
||||
list.some((r, index) => {
|
||||
if (r.exp_required && r.exp_required > n_user.lvlPoints) {
|
||||
nextLvlPoints.value = r.exp_required;
|
||||
const rankInfos = n_config.randInfos || [];
|
||||
if (n_user.id && rankInfos.length) {
|
||||
rankInfos.some((r, index) => {
|
||||
if (r.upgrade_scores && r.upgrade_scores > n_user.scores) {
|
||||
nextLvlPoints.value = r.upgrade_scores;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -75,17 +75,17 @@ watch(
|
||||
/>
|
||||
</view>
|
||||
<view class="user-stats">
|
||||
<!-- <text class="level-tag level-tag-first">{{ user.lvlName }}</text> -->
|
||||
<text class="level-tag level-tag-second">LV{{ user.lvl }}</text>
|
||||
<text class="level-tag level-tag-first">段位积分</text>
|
||||
<!-- <text class="level-tag level-tag-second">LV{{ user.lvl }}</text> -->
|
||||
<view class="rank-tag">
|
||||
<view
|
||||
class="rank-tag-progress"
|
||||
:style="{
|
||||
width: `${(user.lvlPoints / nextLvlPoints) * 100}%`,
|
||||
width: `${(Math.max(user.scores, 0) / nextLvlPoints) * 100}%`,
|
||||
}"
|
||||
/>
|
||||
<text class="rank-tag-text">
|
||||
{{ user.lvlPoints }}{{ nextLvlPoints ? `/${nextLvlPoints}` : "" }}
|
||||
{{ Math.max(user.scores, 0) }}/{{ nextLvlPoints }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -170,7 +170,7 @@ watch(
|
||||
}
|
||||
|
||||
.level-tag-first {
|
||||
width: 40px;
|
||||
width: 50px;
|
||||
background: #5f51ff;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user