auth.vue
2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<template>
<div class="mine_auth_wrap">
<div class="auth_bg">
<el-image class="col_img" :src="getImage(state.userInfo.identityTypeStatus == '1' ? 'auth-suc.png':'auth-ing.png', '/mine')"></el-image>
<div v-if="state.userInfo.identityTypeStatus == '0'">您的实名信息正在认证中</div>
<div v-else-if="state.userInfo.identityTypeStatus == '1'">您已完成实名认证</div>
<div v-else-if="state.userInfo.identityTypeStatus == '2'">实名认证失败</div>
<div v-else>您的企业还未认证</div>
</div>
<template v-if="state.userInfo.identityTypeStatus == '0' || state.userInfo.identityTypeStatus == '1'">
<div class="auth_info" v-if="state.authInfo">
<div class="info_col">
<div>企业名称</div>
<div>{{state.authInfo.companyName}}</div>
</div>
<div class="info_col">
<div>统一社会信用代码</div>
<div>{{state.authInfo.uscCode}}</div>
</div>
</div>
<div class="core_title">所属核心企业</div>
<div class="core_wrap">
<div class="core_name" v-if="state.authInfo">
<template v-for="item in state.authInfo.coreEnterprise">
<span>{{item.companyName}}</span><br/>
</template>
</div>
</div>
</template>
</div>
</template>
<script setup lang="ts">
import getImage from './../../assets/getImage'
import './../../assets/css/mineAuth.scss'
import router from "../../router/index";
import { loginMain } from './../../store/index'
import { storeToRefs } from 'pinia';
import * as api from "../../interface/api";
let loginAct = loginMain()
let { getUserInfo } = storeToRefs(loginAct)
let state = reactive({
userInfo: null,
authInfo: undefined
})
watchEffect(() => {
state.userInfo = getUserInfo
})
api.getAuthStatus().then(res=> {
state.authInfo = res.data
})
let linkTo = (url: string) => {
router.push(url)
}
const arrowPath = ref("/mine")
defineExpose({arrowPath})
</script>
<style scoped>
</style>