|
|
@@ -11,7 +11,10 @@
|
|
|
<img class="g-image--avatar" src="" />
|
|
|
</div>
|
|
|
<div class="profile-user__info">
|
|
|
- <span>{{ getUserId() }}</span>
|
|
|
+ <div>
|
|
|
+ <Tag type="success" v-if="hasAuth">已实名</Tag>
|
|
|
+ <Tag type="primary" v-else>未实名</Tag>
|
|
|
+ </div>
|
|
|
<span>{{ getLoginId() }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -67,7 +70,7 @@
|
|
|
</div>
|
|
|
<div class="g-navmenu">
|
|
|
<CellGroup>
|
|
|
- <Cell is-link @click="hasAuth">
|
|
|
+ <Cell is-link :to="{ name: 'account-certification' }" v-if="!hasAuth">
|
|
|
<template #title>
|
|
|
<app-iconfont icon="icon-shimingrenzheng">实名认证</app-iconfont>
|
|
|
</template>
|
|
|
@@ -117,21 +120,21 @@
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
import { shallowRef } from 'vue'
|
|
|
-import { Cell, CellGroup, Button, Toast } from 'vant'
|
|
|
-import { fullloading, dialog } from '@/utils/vant'
|
|
|
+import { Cell, CellGroup, Button, Tag } from 'vant'
|
|
|
+import { dialog } from '@/utils/vant'
|
|
|
import { useNavigation } from '@/hooks/navigation'
|
|
|
-import { useLoginStore, useAccountStore } from '@/stores'
|
|
|
+import { useLoginStore, useUserStore, useAccountStore, } from '@/stores'
|
|
|
import { useAuth } from '@/business/auth'
|
|
|
import AppIconfont from '@mobile/components/base/iconfont/index.vue'
|
|
|
-import { queryUserAccount } from '@/services/api/account'
|
|
|
import { useBankAccountSign } from '@/business/bank'
|
|
|
|
|
|
const { router, routerTo } = useNavigation()
|
|
|
-const { getLoginId, getUserId, getFirstAccountId } = useLoginStore()
|
|
|
+const { getLoginId, getFirstAccountId } = useLoginStore()
|
|
|
+const { hasAuth } = useUserStore()
|
|
|
+const { getBankAccountList, dataList } = useBankAccountSign()
|
|
|
const { logout } = useAuth()
|
|
|
const { accountInfo } = useAccountStore()
|
|
|
const headerRef = shallowRef<HTMLDivElement>()
|
|
|
-const { getBankAccountList, dataList } = useBankAccountSign()
|
|
|
|
|
|
getBankAccountList()
|
|
|
|
|
|
@@ -153,28 +156,6 @@ const doInOutMoney = (tab: string) => {
|
|
|
router.push({ name: 'bank-wallet', query: { tab } })
|
|
|
}
|
|
|
|
|
|
-// 检查是否已实名认证
|
|
|
-const hasAuth = () => {
|
|
|
- fullloading((hideLoading) => {
|
|
|
- queryUserAccount({
|
|
|
- data: {
|
|
|
- userID: getUserId()
|
|
|
- },
|
|
|
- success: (res) => {
|
|
|
- hideLoading()
|
|
|
- if (res.data.hasauth) {
|
|
|
- dialog('当前已实名')
|
|
|
- } else {
|
|
|
- routerTo('account-certification')
|
|
|
- }
|
|
|
- },
|
|
|
- fail: (err) => {
|
|
|
- Toast.fail('加载失败')
|
|
|
- }
|
|
|
- })
|
|
|
- }, '正在加载...')
|
|
|
-}
|
|
|
-
|
|
|
const userLogout = () => {
|
|
|
dialog('是否退出当前账号?', {
|
|
|
showCancelButton: true
|