|
@@ -82,6 +82,18 @@ const pieces = ref([
|
|
|
const avatar = computed(() =>
|
|
|
!isEmpty(userInfo.value.avatar) ? userInfo.value.avatar : 'https://via.placeholder.com/72x72',
|
|
|
)
|
|
|
+const certificationStatusText = computed(() => {
|
|
|
+ if (!userInfo.value.userStatusEnabled) return '未认证'
|
|
|
+ if (userInfo.value.userStatusEnabled && userInfo.value.userAuthStatus === 1) return '审核中'
|
|
|
+ if (userInfo.value.userStatusEnabled && userInfo.value.userAuthStatus === 2) return '已驳回'
|
|
|
+ return '通过'
|
|
|
+})
|
|
|
+const certificationBtnText = computed(
|
|
|
+ () => ({ 0: '通过', 1: '审核中', 2: '已驳回' })[userInfo.value.userAuthStatus] || '去认证',
|
|
|
+)
|
|
|
+const isCertified = computed(
|
|
|
+ () => userInfo.value.userStatusEnabled && userInfo.value.userAuthStatus === 0,
|
|
|
+)
|
|
|
const nickNameClickHandle = async () => {
|
|
|
if (isLogined.value) return
|
|
|
uni.navigateTo({ url: '/pages/login/index' })
|
|
@@ -133,7 +145,7 @@ onPageScroll(({ scrollTop }: { scrollTop: number }) => {
|
|
|
</wd-navbar>
|
|
|
<div
|
|
|
class="bg-black/30 flex flex-col justify-end box-border bg-[url(https://image.zhuchaohui.com/zhucaohui/c706ec14a5a927c10e9e1fa0153affb11bbdd9255882e18c67ee82687ff9813a.png)] bg-[length:100%_auto]"
|
|
|
- :class="[userInfo.userStatusEnabled ? 'aspect-[0.94/1] pb-44' : 'aspect-[1.15/1] pb-20']"
|
|
|
+ :class="[isCertified ? 'aspect-[0.94/1] pb-44' : 'aspect-[1.15/1] pb-20']"
|
|
|
>
|
|
|
<div class="my-6.5 px-3.5 flex">
|
|
|
<img class="w-[72px] h-[72px] rounded-full border border-white" :src="avatar" />
|
|
@@ -145,20 +157,17 @@ onPageScroll(({ scrollTop }: { scrollTop: number }) => {
|
|
|
{{ !isLogined ? '请点击登录' : userInfo?.nickname }}
|
|
|
</div>
|
|
|
<div
|
|
|
- v-if="!userInfo.userStatusEnabled"
|
|
|
+ v-if="!isCertified"
|
|
|
class="mt-2 w-[63px] h-[26px] bg-black/10 rounded-[20px] border border-white/60 flex items-center justify-center"
|
|
|
>
|
|
|
<div
|
|
|
class="text-center text-white text-xs font-normal font-['PingFang_SC'] leading-normal"
|
|
|
>
|
|
|
- 未认证
|
|
|
+ <!-- 未认证 -->
|
|
|
+ {{ certificationStatusText }}
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div
|
|
|
- v-if="userInfo.userStatusEnabled"
|
|
|
- class="flex items-center text-white"
|
|
|
- @click="handleToHomepage"
|
|
|
- >
|
|
|
+ <div v-if="isCertified" class="flex items-center text-white" @click="handleToHomepage">
|
|
|
<div
|
|
|
class="text-center text-white text-sm font-normal font-['PingFang_SC'] leading-normal"
|
|
|
>
|
|
@@ -210,7 +219,7 @@ onPageScroll(({ scrollTop }: { scrollTop: number }) => {
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="relative top--18" v-if="!userInfo.userStatusEnabled">
|
|
|
+ <div class="relative top--18" v-if="!isCertified">
|
|
|
<div class="mx-3.5 box-border absolute left-0 right-0 top-0">
|
|
|
<wd-img :src="vipBg" width="100%" mode="widthFix"></wd-img>
|
|
|
</div>
|
|
@@ -230,7 +239,9 @@ onPageScroll(({ scrollTop }: { scrollTop: number }) => {
|
|
|
<div
|
|
|
class="text-[#9e5934] text-[13px] font-normal font-['PingFang_SC'] leading-relaxed"
|
|
|
>
|
|
|
- 去认证
|
|
|
+ <!-- 去认证 -->
|
|
|
+ <!-- {{ !isCertified ? '去认证' : certificationStatusText }} -->
|
|
|
+ {{ certificationBtnText }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|