fix: bug
This commit is contained in:
@@ -15,10 +15,10 @@ const userStore = useUserStore()
|
|||||||
|
|
||||||
const tabList = computed(() => {
|
const tabList = computed(() => {
|
||||||
return [
|
return [
|
||||||
{ label: '我的余额', value: 1, money: userStore.userInfo.money },
|
{ label: '我的余额', value: 1, money: userStore.userInfo?.money },
|
||||||
{ label: '救济金余额', value: 2, money: userStore.userInfo.moneyjiu },
|
{ label: '救济金余额', value: 2, money: userStore.userInfo?.moneyjiu },
|
||||||
{ label: '养老金余额', value: 3, money: userStore.userInfo.moneyold },
|
{ label: '养老金余额', value: 3, money: userStore.userInfo?.moneyold },
|
||||||
{ label: '团队佣金余额', value: 4, money: userStore.userInfo.moneyyong },
|
{ label: '团队佣金余额', value: 4, money: userStore.userInfo?.moneyyong },
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
const tabIndex = ref(0)
|
const tabIndex = ref(0)
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
>
|
>
|
||||||
<view class="text-14">{{ type === 0 ? '养老金' : '团队佣金' }}余额</view>
|
<view class="text-14">{{ type === 0 ? '养老金' : '团队佣金' }}余额</view>
|
||||||
<view class="text-17 font-bold">
|
<view class="text-17 font-bold">
|
||||||
{{ type === 0 ? userStore.userInfo.moneyold : userStore.userInfo.moneyyong }}
|
{{ type === 0 ? userStore.userInfo?.moneyold : userStore.userInfo?.moneyyong }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="p-15 bg-white shadow-[0_-2px_3px_rgba(10,68,245,0.1)] rounded-10">
|
<view class="p-15 bg-white shadow-[0_-2px_3px_rgba(10,68,245,0.1)] rounded-10">
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
<view
|
<view
|
||||||
class="text-12 text-gradient"
|
class="text-12 text-gradient"
|
||||||
@click="
|
@click="
|
||||||
convertNum = type === 0 ? userStore.userInfo.moneyold : userStore.userInfo.moneyyong
|
convertNum = type === 0 ? userStore.userInfo?.moneyold : userStore.userInfo?.moneyyong
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
全部
|
全部
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
class="m-15 text-white flex rounded-tl-10 rounded-br-10 justify-between items-center p-15 bg-[linear-gradient(90deg,rgba(59,129,243,0.5),#3B81F3)]"
|
class="m-15 text-white flex rounded-tl-10 rounded-br-10 justify-between items-center p-15 bg-[linear-gradient(90deg,rgba(59,129,243,0.5),#3B81F3)]"
|
||||||
>
|
>
|
||||||
<view class="text-14">钱包余额</view>
|
<view class="text-14">钱包余额</view>
|
||||||
<view class="text-17 font-bold">{{ userStore.userInfo.money }}</view>
|
<view class="text-17 font-bold">{{ userStore.userInfo?.money }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="p-15 bg-white shadow-[0_-2px_3px_rgba(10,68,245,0.1)] rounded-10">
|
<view class="p-15 bg-white shadow-[0_-2px_3px_rgba(10,68,245,0.1)] rounded-10">
|
||||||
<view class="mt-15">
|
<view class="mt-15">
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
placeholder="请输入提现金额"
|
placeholder="请输入提现金额"
|
||||||
class="text-14 text-#333 flex-1"
|
class="text-14 text-#333 flex-1"
|
||||||
/>
|
/>
|
||||||
<view class="text-12 text-#04A9F9" @click="form.money = userStore.userInfo.money">
|
<view class="text-12 text-#04A9F9" @click="form.money = userStore.userInfo?.money">
|
||||||
全部
|
全部
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -10,14 +10,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="home-page">
|
<view class="home-page">
|
||||||
<NavBar />
|
<NavBar />
|
||||||
<template v-if="userStore.userInfo.banknum">
|
<template v-if="userStore.userInfo?.banknum">
|
||||||
<view class="main-container w-345 h-185 mx-auto rounded-14 px-20 pt-70 text-12">
|
<view class="main-container w-345 h-185 mx-auto rounded-14 px-20 pt-70 text-12">
|
||||||
<view>姓名:{{ userStore.userInfo.nickname }}</view>
|
<view>姓名:{{ userStore.userInfo?.nickname }}</view>
|
||||||
<view class="mt-10">社会xx号码:{{ userStore.userInfo.banknum.substring(0, 4) }}</view>
|
<view class="mt-10">社会xx号码:{{ userStore.userInfo?.banknum.substring(0, 4) }}</view>
|
||||||
<view class="mt-15">中国工商银行卡号</view>
|
<view class="mt-15">中国工商银行卡号</view>
|
||||||
<view class="mt-5 text-14 text-#333">
|
<view class="mt-5 text-14 text-#333">
|
||||||
<!-- 每四位数字插入空格 -->
|
<!-- 每四位数字插入空格 -->
|
||||||
{{ userStore.userInfo.banknum.replace(/(\d{4})(?=\d)/g, '$1 ') }}
|
{{ userStore.userInfo?.banknum.replace(/(\d{4})(?=\d)/g, '$1 ') }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -16,17 +16,17 @@
|
|||||||
<view class="flex-1 text-center">
|
<view class="flex-1 text-center">
|
||||||
<view class="text-14">全部</view>
|
<view class="text-14">全部</view>
|
||||||
<view class="text-16 font-bold mt-15">
|
<view class="text-16 font-bold mt-15">
|
||||||
{{ userStore.userInfo.yanglao + userStore.userInfo.yiliao }}份
|
{{ userStore.userInfo?.yanglao + userStore.userInfo?.yiliao }}份
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-1 text-center">
|
<view class="flex-1 text-center">
|
||||||
<view class="text-14">养老</view>
|
<view class="text-14">养老</view>
|
||||||
<view class="text-16 font-bold mt-15">{{ userStore.userInfo.yanglao }}份</view>
|
<view class="text-16 font-bold mt-15">{{ userStore.userInfo?.yanglao }}份</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-1 text-center">
|
<view class="flex-1 text-center">
|
||||||
<view class="text-14">医疗</view>
|
<view class="text-14">医疗</view>
|
||||||
<view class="text-16 font-bold mt-15">
|
<view class="text-16 font-bold mt-15">
|
||||||
{{ userStore.userInfo.yiliao ? '保障中' : '未保障' }}
|
{{ userStore.userInfo?.yiliao ? '保障中' : '未保障' }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -11,10 +11,10 @@
|
|||||||
<view class="my-page">
|
<view class="my-page">
|
||||||
<NavBar />
|
<NavBar />
|
||||||
<view class="flex mt-50 text-white px-15 items-center">
|
<view class="flex mt-50 text-white px-15 items-center">
|
||||||
<Avatar class="w-60 h-60" :src="getImageUrl(userStore.userInfo.avatar)" />
|
<Avatar class="w-60 h-60" :src="getImageUrl(userStore.userInfo?.avatar)" />
|
||||||
<view class="ml-15 flex-1">
|
<view class="ml-15 flex-1">
|
||||||
<view class="text-16">{{ userStore.userInfo.nickname }}</view>
|
<view class="text-16">{{ userStore.userInfo?.nickname }}</view>
|
||||||
<view class="text-12 mt-8">账号:{{ userStore.userInfo.username }}</view>
|
<view class="text-12 mt-8">账号:{{ userStore.userInfo?.username }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
class="flex border-#50D0FF border-1 border-solid items-center justify-center h-32 w-100 btn-gradient rounded-full text-center text-14 text-white"
|
class="flex border-#50D0FF border-1 border-solid items-center justify-center h-32 w-100 btn-gradient rounded-full text-center text-14 text-white"
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
<view class="grid grid-cols-2 gap-10 px-15 mt-15">
|
<view class="grid grid-cols-2 gap-10 px-15 mt-15">
|
||||||
<view class="px-15 py-10 rounded-10 bg-#FFFFFF33">
|
<view class="px-15 py-10 rounded-10 bg-#FFFFFF33">
|
||||||
<view class="flex text-white text-12">我的余额</view>
|
<view class="flex text-white text-12">我的余额</view>
|
||||||
<view class="text-20 text-gradient font-bold">{{ userStore.userInfo.money }}</view>
|
<view class="text-20 text-gradient font-bold">{{ userStore.userInfo?.money }}</view>
|
||||||
<view
|
<view
|
||||||
class="btn-gradient w-fit rounded-full text-center text-12 text-white py-2 px-15 mt-8"
|
class="btn-gradient w-fit rounded-full text-center text-12 text-white py-2 px-15 mt-8"
|
||||||
@click="handleWithdrawal"
|
@click="handleWithdrawal"
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="px-15 py-10 rounded-10 bg-#FFFFFF33">
|
<view class="px-15 py-10 rounded-10 bg-#FFFFFF33">
|
||||||
<view class="flex text-white text-12">养老金余额</view>
|
<view class="flex text-white text-12">养老金余额</view>
|
||||||
<view class="text-20 text-gradient font-bold">{{ userStore.userInfo.moneyold }}</view>
|
<view class="text-20 text-gradient font-bold">{{ userStore.userInfo?.moneyold }}</view>
|
||||||
<view
|
<view
|
||||||
class="btn-gradient w-fit rounded-full text-center text-12 text-white py-2 px-15 mt-8"
|
class="btn-gradient w-fit rounded-full text-center text-12 text-white py-2 px-15 mt-8"
|
||||||
@click="handleConvert(0)"
|
@click="handleConvert(0)"
|
||||||
@@ -48,11 +48,11 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="px-15 py-10 rounded-10 bg-#FFFFFF33">
|
<view class="px-15 py-10 rounded-10 bg-#FFFFFF33">
|
||||||
<view class="flex text-white text-12">救济金余额</view>
|
<view class="flex text-white text-12">救济金余额</view>
|
||||||
<view class="text-20 text-gradient font-bold">{{ userStore.userInfo.moneyjiu }}</view>
|
<view class="text-20 text-gradient font-bold">{{ userStore.userInfo?.moneyjiu }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="px-15 py-10 rounded-10 bg-#FFFFFF33">
|
<view class="px-15 py-10 rounded-10 bg-#FFFFFF33">
|
||||||
<view class="flex text-white text-12">团队佣金</view>
|
<view class="flex text-white text-12">团队佣金</view>
|
||||||
<view class="text-20 text-gradient font-bold">{{ userStore.userInfo.moneyyong }}</view>
|
<view class="text-20 text-gradient font-bold">{{ userStore.userInfo?.moneyyong }}</view>
|
||||||
<view
|
<view
|
||||||
class="btn-gradient w-fit rounded-full text-center text-12 text-white py-2 px-15 mt-8"
|
class="btn-gradient w-fit rounded-full text-center text-12 text-white py-2 px-15 mt-8"
|
||||||
@click="handleConvert(1)"
|
@click="handleConvert(1)"
|
||||||
|
|||||||
Reference in New Issue
Block a user