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;
|
||||
}
|
||||
|
||||
|
||||
@@ -79,14 +79,34 @@ const logout = () => {
|
||||
<UserItem title="会员" :onClick="toBeVipPage">
|
||||
已赠送6个月会员
|
||||
</UserItem>
|
||||
<UserItem title="等级介绍" :onClick="toGradeIntroPage" />
|
||||
<UserItem title="等级介绍" :onClick="toGradeIntroPage">
|
||||
<text :style="{ color: '#4C76FF' }">Lv{{ user.lvl }}</text>
|
||||
<text
|
||||
:style="{
|
||||
color: '#FF7900',
|
||||
marginLeft: '5px',
|
||||
}"
|
||||
>{{ user.lvlPoints }}</text
|
||||
>
|
||||
<text>点</text>
|
||||
</UserItem>
|
||||
<UserItem
|
||||
title="段位介绍"
|
||||
:customStyle="{
|
||||
marginBottom: '10px',
|
||||
}"
|
||||
:onClick="toRankIntroPage"
|
||||
/>
|
||||
>
|
||||
<text :style="{ color: '#8E53EA' }">{{ user.lvlName }}</text>
|
||||
<text
|
||||
:style="{
|
||||
color: '#FF7900',
|
||||
marginLeft: '5px',
|
||||
}"
|
||||
>{{ user.scores }}</text
|
||||
>
|
||||
<text>点</text>
|
||||
</UserItem>
|
||||
<view class="my-grow" @click="toMyGrowthPage">
|
||||
<image src="../static/my-grow.png" mode="widthFix" />
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user