|
@@ -2,7 +2,7 @@
|
|
<div class="page">
|
|
<div class="page">
|
|
<div class="page-top flex flex-col justify-center items-center">
|
|
<div class="page-top flex flex-col justify-center items-center">
|
|
<div class="club-logo">
|
|
<div class="club-logo">
|
|
- <img :src="userInfo.logo" alt="" v-if="userInfo.logo" />
|
|
|
|
|
|
+ <img :src="clubInfo.logo" alt="" v-if="isAuth" />
|
|
<img
|
|
<img
|
|
src="~/assets/theme-images/common/pc-icon-club-logo-default.png"
|
|
src="~/assets/theme-images/common/pc-icon-club-logo-default.png"
|
|
v-else-if="isPc"
|
|
v-else-if="isPc"
|
|
@@ -13,22 +13,24 @@
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div class="club-mobile">{{ userInfo.mobile }}</div>
|
|
<div class="club-mobile">{{ userInfo.mobile }}</div>
|
|
- <div class="club-name" v-if="userInfo.authId">
|
|
|
|
- 机构:{{ userInfo.authParty }}
|
|
|
|
- </div>
|
|
|
|
|
|
+ <div class="club-name" v-if="isAuth">机构:{{ clubInfo.authParty }}</div>
|
|
</div>
|
|
</div>
|
|
<div class="page-content">
|
|
<div class="page-content">
|
|
<div class="section-title">我的认证</div>
|
|
<div class="section-title">我的认证</div>
|
|
<div class="section-content">
|
|
<div class="section-content">
|
|
<div class="item club" @click="onToClubDetail">
|
|
<div class="item club" @click="onToClubDetail">
|
|
- <div class="auth-icon auth">已认证</div>
|
|
|
|
|
|
+ <div class="auth-icon" :class="isAuth ? 'auth' : 'un-auth'">
|
|
|
|
+ {{ isAuth ? '已认证' : '未认证' }}
|
|
|
|
+ </div>
|
|
<div class="tip">机构认证</div>
|
|
<div class="tip">机构认证</div>
|
|
<div class="btn">
|
|
<div class="btn">
|
|
点击查看<span class="icon el-icon-arrow-right"></span>
|
|
点击查看<span class="icon el-icon-arrow-right"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="item device" @click="onToDeviceList">
|
|
<div class="item device" @click="onToDeviceList">
|
|
- <div class="auth-icon un-auth">未认证</div>
|
|
|
|
|
|
+ <div class="auth-icon" :class="isAuthDevice ? 'auth' : 'un-auth'">
|
|
|
|
+ {{ isAuthDevice ? '已认证' : '未认证' }}
|
|
|
|
+ </div>
|
|
<div class="tip">设备认证</div>
|
|
<div class="tip">设备认证</div>
|
|
<div class="btn">
|
|
<div class="btn">
|
|
点击查看<span class="icon el-icon-arrow-right"></span>
|
|
点击查看<span class="icon el-icon-arrow-right"></span>
|
|
@@ -44,12 +46,13 @@
|
|
</template>
|
|
</template>
|
|
<template v-else>
|
|
<template v-else>
|
|
<div class="menu-list">
|
|
<div class="menu-list">
|
|
- <div class="item">
|
|
|
|
|
|
+ <div class="item" @click="toAccountSubNav">
|
|
<span>账户设置</span>
|
|
<span>账户设置</span>
|
|
<span class="el-icon-arrow-right"></span>
|
|
<span class="el-icon-arrow-right"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
+ <div v-if="!isPc" class="logout" @click="logout">退出登录</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -58,10 +61,70 @@
|
|
import { mapGetters } from 'vuex'
|
|
import { mapGetters } from 'vuex'
|
|
export default {
|
|
export default {
|
|
layout: 'app-ross',
|
|
layout: 'app-ross',
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ clubInfo: {},
|
|
|
|
+ list: [],
|
|
|
|
+ }
|
|
|
|
+ },
|
|
computed: {
|
|
computed: {
|
|
- ...mapGetters(['routePrefix', 'isPc', 'userInfo']),
|
|
|
|
|
|
+ ...mapGetters(['routePrefix', 'isPc', 'userInfo', 'authUserId']),
|
|
|
|
+ isAuth() {
|
|
|
|
+ return this.clubInfo.auditStatus === 1
|
|
|
|
+ },
|
|
|
|
+ isAuthDevice() {
|
|
|
|
+ return this.isAuth && this.list.length > 0
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
+ this.initUserInfo()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 初始化用户信息
|
|
|
|
+ async initUserInfo() {
|
|
|
|
+ try {
|
|
|
|
+ const res = await this.$http.api.checkTokenResult()
|
|
|
|
+ this.$store.dispatch('user/login', res.data)
|
|
|
|
+ this.$setStorage(this.routePrefix, 'userInfo', res.data)
|
|
|
|
+ this.fetchAuthDetail()
|
|
|
|
+ this.fetchProductList()
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.log(error)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 获取机构信息
|
|
|
|
+ async fetchAuthDetail() {
|
|
|
|
+ try {
|
|
|
|
+ const authId = this.userInfo.authId
|
|
|
|
+ if (!authId) return
|
|
|
|
+ const res = await this.$http.api.fetchClubAuthInfoData({
|
|
|
|
+ authId,
|
|
|
|
+ })
|
|
|
|
+ this.clubInfo = res.data
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.log(error)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 获取已认证设备列表
|
|
|
|
+ async fetchProductList() {
|
|
|
|
+ try {
|
|
|
|
+ const authId = this.userInfo.authId
|
|
|
|
+ if (!authId) return
|
|
|
|
+ const res = await this.$http.api.fetchClubAuthProductList({
|
|
|
|
+ authId,
|
|
|
|
+ authUserId: this.authUserId,
|
|
|
|
+ })
|
|
|
|
+ if (res.data) {
|
|
|
|
+ this.list = res.data
|
|
|
|
+ }
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.log(error)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 去账户设置菜单列表
|
|
|
|
+ toAccountSubNav() {
|
|
|
|
+ this.$router.push(`${this.routePrefix}/center/subnav/account`)
|
|
|
|
+ },
|
|
// 机构详情
|
|
// 机构详情
|
|
onToClubDetail() {
|
|
onToClubDetail() {
|
|
this.$router.push(`${this.routePrefix}/center/club-detail`)
|
|
this.$router.push(`${this.routePrefix}/center/club-detail`)
|
|
@@ -74,6 +137,17 @@ export default {
|
|
onResetPassword() {
|
|
onResetPassword() {
|
|
this.$router.push(`${this.routePrefix}/center/settings/password`)
|
|
this.$router.push(`${this.routePrefix}/center/settings/password`)
|
|
},
|
|
},
|
|
|
|
+ // 退出登录
|
|
|
|
+ logout() {
|
|
|
|
+ this.$store.dispatch('user/logout')
|
|
|
|
+ this.$removeStorage(this.routePrefix, 'userInfo')
|
|
|
|
+ this.backHome()
|
|
|
|
+ },
|
|
|
|
+ // 回到首页
|
|
|
|
+ backHome() {
|
|
|
|
+ if (this.$route.path === this.routePrefix) return
|
|
|
|
+ this.$router.replace(this.routePrefix)
|
|
|
|
+ },
|
|
},
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -268,12 +342,29 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
.page-content {
|
|
.page-content {
|
|
|
|
+ padding-bottom: 26vw;
|
|
.section-title {
|
|
.section-title {
|
|
font-size: 4.2vw;
|
|
font-size: 4.2vw;
|
|
color: #666666;
|
|
color: #666666;
|
|
padding: 6.4vw 0 3.2vw;
|
|
padding: 6.4vw 0 3.2vw;
|
|
padding-left: 4vw;
|
|
padding-left: 4vw;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ .logout {
|
|
|
|
+ width: 85.2vw;
|
|
|
|
+ height: 12vw;
|
|
|
|
+ background: #f3920d;
|
|
|
|
+ border-radius: 0.2vw;
|
|
|
|
+ text-align: center;
|
|
|
|
+ line-height: 12vw;
|
|
|
|
+ color: #ffffff;
|
|
|
|
+ font-size: 3.6vw;
|
|
|
|
+ position: fixed;
|
|
|
|
+ bottom: 24vw;
|
|
|
|
+ left: 50%;
|
|
|
|
+ transform: translateX(-50%);
|
|
|
|
+ }
|
|
|
|
+
|
|
.section-content {
|
|
.section-content {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|