style: member code + vip

This commit is contained in:
hiyu 2024-06-27 19:18:58 +07:00
parent 1457971005
commit 0aaaebf3f7
2 changed files with 36 additions and 17 deletions

View File

@ -828,7 +828,7 @@ body .van-toast .van-toast__icon {
width: 18.933vw; width: 18.933vw;
height: 6vw; height: 6vw;
margin-left: 0; margin-left: 0;
margin-bottom: -1.6vw; /* margin-bottom: -1.6vw; */
} }
/* .page { /* .page {

View File

@ -33,7 +33,7 @@ const loadMoney = () => {
loadingMoney.value = true; loadingMoney.value = true;
handleRequest(axios.get(API.USER_INFO + "/" + "money")) handleRequest(axios.get(API.USER_INFO + "/" + "money"))
.then((res) => { .then((res) => {
userStore.updateUserInfo({ money: res.data }) userStore.updateUserInfo({ money: res.data });
}) })
.finally(() => { .finally(() => {
setTimeout(() => { setTimeout(() => {
@ -46,7 +46,7 @@ const loadScore = () => {
loadingScore.value = true; loadingScore.value = true;
handleRequest(axios.get(API.USER_INFO + "/" + "score")) handleRequest(axios.get(API.USER_INFO + "/" + "score"))
.then((res) => { .then((res) => {
userStore.updateUserInfo({ score: res.data }) userStore.updateUserInfo({ score: res.data });
}) })
.finally(() => { .finally(() => {
setTimeout(() => { setTimeout(() => {
@ -56,16 +56,14 @@ const loadScore = () => {
}; };
const getUnreadNotifications = () => { const getUnreadNotifications = () => {
handleRequest(axios.get(API.NOTIFICATION_UNREAD)) handleRequest(axios.get(API.NOTIFICATION_UNREAD)).then((res) => {
.then((res) => { if (res.success) {
if(res.success) { countNotify.value = res.data;
countNotify.value = res.data; }
} });
})
}; };
getUnreadNotifications(); getUnreadNotifications();
</script> </script>
<template> <template>
<div class="mine page"> <div class="mine page">
@ -100,7 +98,7 @@ getUnreadNotifications();
/> />
</div> </div>
<div class="login-content"> <div class="login-content">
<p class="login-btn" style="margin: 19.1833px 0"> <p class="login-btn" style="margin: 0">
{{ userInfo?.username }} {{ userInfo?.username }}
<img <img
@click="showVipTable = true" @click="showVipTable = true"
@ -123,8 +121,11 @@ getUnreadNotifications();
" "
></span> ></span>
</div> </div>
<div style="color: white; margin-top: 10px; text-wrap: nowrap;"> <div style="color: white; margin-top: 10px; text-wrap: nowrap">
thành viên: {{ userInfo.memberCode ?? "********"}} thành viên:
<span class="member-code">{{
userInfo.memberCode ?? "********"
}}</span>
</div> </div>
</div> </div>
</div> </div>
@ -182,15 +183,21 @@ getUnreadNotifications();
</div> </div>
</div> </div>
<div class="part-2"> <div class="part-2">
<p class="balance van-ellipsis" style="font-size: 24px"> {{ userInfo?.score }}/100</p> <p class="balance van-ellipsis" style="font-size: 24px">
{{ userInfo?.score }}/100
</p>
<span class="font-28 font-gray" style="font-size: 14px"> <span class="font-28 font-gray" style="font-size: 14px">
Điểm tín nhiệm</span Điểm tín nhiệm</span
> >
<div class="refresh-btn" :class="[ <div
class="refresh-btn"
:class="[
loadingScore loadingScore
? 'van-loading__spinner van-loading__spinner--circular' ? 'van-loading__spinner van-loading__spinner--circular'
: '', : '',
]" @click="loadScore"> ]"
@click="loadScore"
>
<i class="van-icon van-icon-replay"></i> <i class="van-icon van-icon-replay"></i>
</div> </div>
</div> </div>
@ -237,7 +244,13 @@ getUnreadNotifications();
/> />
</div> </div>
<span class="menu-item-label">Thông báo</span> <span class="menu-item-label">Thông báo</span>
<van-tag :show="countNotify" size="large" type="danger" style="font-size: 14px; padding: 5px;" round> <van-tag
:show="countNotify"
size="large"
type="danger"
style="font-size: 14px; padding: 5px"
round
>
{{ countNotify }} {{ countNotify }}
</van-tag> </van-tag>
</router-link> </router-link>
@ -274,4 +287,10 @@ a {
:deep(.van-image-preview__overlay) { :deep(.van-image-preview__overlay) {
background: rgba(0, 0, 0, 0.9); background: rgba(0, 0, 0, 0.9);
} }
.member-code {
font-size: 16px;
color: white;
text-shadow: 0 0 5px #ffa600, 0 0 5px #ffa600;
}
</style> </style>