UI内容更新
This commit is contained in:
@@ -39,11 +39,11 @@ const toRankListPage = () => {
|
|||||||
watch(
|
watch(
|
||||||
() => [config.value, user.value],
|
() => [config.value, user.value],
|
||||||
([n_config, n_user]) => {
|
([n_config, n_user]) => {
|
||||||
const list = n_config.levelInfo || [];
|
const rankInfos = n_config.randInfos || [];
|
||||||
if (n_user.id && list.length) {
|
if (n_user.id && rankInfos.length) {
|
||||||
list.some((r, index) => {
|
rankInfos.some((r, index) => {
|
||||||
if (r.exp_required && r.exp_required > n_user.lvlPoints) {
|
if (r.upgrade_scores && r.upgrade_scores > n_user.scores) {
|
||||||
nextLvlPoints.value = r.exp_required;
|
nextLvlPoints.value = r.upgrade_scores;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -75,17 +75,17 @@ watch(
|
|||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view class="user-stats">
|
<view class="user-stats">
|
||||||
<!-- <text class="level-tag level-tag-first">{{ user.lvlName }}</text> -->
|
<text class="level-tag level-tag-first">段位积分</text>
|
||||||
<text class="level-tag level-tag-second">LV{{ user.lvl }}</text>
|
<!-- <text class="level-tag level-tag-second">LV{{ user.lvl }}</text> -->
|
||||||
<view class="rank-tag">
|
<view class="rank-tag">
|
||||||
<view
|
<view
|
||||||
class="rank-tag-progress"
|
class="rank-tag-progress"
|
||||||
:style="{
|
:style="{
|
||||||
width: `${(user.lvlPoints / nextLvlPoints) * 100}%`,
|
width: `${(Math.max(user.scores, 0) / nextLvlPoints) * 100}%`,
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
<text class="rank-tag-text">
|
<text class="rank-tag-text">
|
||||||
{{ user.lvlPoints }}{{ nextLvlPoints ? `/${nextLvlPoints}` : "" }}
|
{{ Math.max(user.scores, 0) }}/{{ nextLvlPoints }}
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -170,7 +170,7 @@ watch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
.level-tag-first {
|
.level-tag-first {
|
||||||
width: 40px;
|
width: 50px;
|
||||||
background: #5f51ff;
|
background: #5f51ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,14 +79,34 @@ const logout = () => {
|
|||||||
<UserItem title="会员" :onClick="toBeVipPage">
|
<UserItem title="会员" :onClick="toBeVipPage">
|
||||||
已赠送6个月会员
|
已赠送6个月会员
|
||||||
</UserItem>
|
</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
|
<UserItem
|
||||||
title="段位介绍"
|
title="段位介绍"
|
||||||
:customStyle="{
|
:customStyle="{
|
||||||
marginBottom: '10px',
|
marginBottom: '10px',
|
||||||
}"
|
}"
|
||||||
:onClick="toRankIntroPage"
|
: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">
|
<view class="my-grow" @click="toMyGrowthPage">
|
||||||
<image src="../static/my-grow.png" mode="widthFix" />
|
<image src="../static/my-grow.png" mode="widthFix" />
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
Reference in New Issue
Block a user