<template>
|
<div class="userCenter">
|
<div class="top" style="border-bottom: #f1f1f1 1px solid" v-if="!userInfo.token">
|
<div class="title textColor ">{{ $t('欢迎来到') }}{{ TITLE }}</div>
|
<p class="">{{ $t('全球最大的区块链资产平台') }}</p>
|
<div class="btnBox">
|
<div class="btn btnBackground" @click="$router.push('/register')">{{ $t('注册') }}</div>
|
<div class="btn btnMain" @click="$router.push('/login')">{{ $t('登录') }}</div>
|
</div>
|
</div>
|
<div v-else style="border-bottom: #eee 1px solid" class="flex-centerY flex-position-between">
|
<div class="userInfo">
|
<div class="imgBox"><img :src="require(`@/assets/theme/${theme}/image/img.png`)"
|
style="width: 40px;height: 40px" alt=""></div>
|
<div class="info">
|
<p class="textColor">Hi,{{ status === 2 ? name : userInfo.username }}</p>
|
<span>ID:{{ userInfo.usercode }}</span>
|
</div>
|
</div>
|
<!-- <div style="margin-right: 20px">
|
<img src="@/assets/image/userCenter/more.png" style="width: 15px;"/>
|
</div> -->
|
</div>
|
|
<div class="content">
|
<div v-if="status==2&&showRz" class="rz flex flex-position-between flex-center" style="margin-top: 20px">
|
<div class="flex">
|
<img :src="require(`../../assets/theme/${this.theme}/image/zq.png`)" style="width: 20px;height: 20px"/>
|
<div style="margin-left: 10px;margin-top: 0px;font-size: 14px;color: #333333">
|
<div>
|
{{ $t('身份认证') }}
|
</div>
|
<div>
|
{{ $t('已认证') }}
|
</div>
|
</div>
|
</div>
|
<div class="flex" style="height: 100%">
|
<div @click="showRz=false" style="margin-top: -12px">
|
{{ $t("关闭") }}
|
</div>
|
</div>
|
</div>
|
<!-- <div class="flex flex-centerY" style="margin-top: 20px">
|
<div @click="$router.push('/recharge/rechargeList')" class="flexY-center" style="flex: 1">
|
<img src="../../assets/new/img_1.png" class="ic1"/>
|
<div>
|
{{ $t('充币') }}
|
</div>
|
</div>
|
<div @click="$router.push('/withdraw/withdrawPage')" class="flexY-center" style="flex: 1">
|
<img src="../../assets/new/img_2.png" class="ic1"/>
|
<div>
|
{{ $t('提币') }}
|
</div>
|
</div>
|
<div @click="$router.push('/exchange/exchangePage')" class="flexY-center" style="flex: 1">
|
<img src="../../assets/new/img_3.png" class="ic1"/>
|
<div>
|
{{ $t('闪兑') }}
|
</div>
|
</div>
|
<div @click="$router.push('/funds')" class="flexY-center" style="flex: 1">
|
<img src="../../assets/new/img_4.png" class="ic1"/>
|
<div>
|
{{ $t('资产') }}
|
</div>
|
</div>
|
</div> -->
|
<!-- <div @click="$router.push('/promote')" class="flex flex-centerY css-1uwabd6">
|
<img :src="require(`../../assets/theme/${this.theme}/image/yqhy.png`)" style="width: 25px;height: 25px"/>
|
<div style="margin-left: 20px">
|
<div>
|
<div style="font-size: 16px">
|
{{ $t('邀请好友') }}
|
</div>
|
<div style="margin-top: 5px;font-size: 14px;color: #999999">
|
{{ $t('邀请好友,一起赚币') }}
|
</div>
|
</div>
|
</div>
|
</div> -->
|
<!-- <div @click="down()" class="css-1uwabd6 flex-center flex-position-between" style="height: 60px;padding: 0 20px" >
|
<div class="flex-center">
|
<img src="../../assets/new/img_1.png" class="ic1"/>
|
<div>
|
{{$t('下载')}}APP
|
</div>
|
</div>
|
<img src="../../assets/tobuy.png" class="ic1"/>
|
</div> -->
|
<list-box v-if="userInfo.token" :title="$t('安全')" :listData="safeList"></list-box>
|
<!-- <list-box v-if="userInfo.token" :title="$t('用户')" :status="status" :listData="userList"></list-box>-->
|
<!-- <list-box :title="$t('通用')" :listData="list">-->
|
<!-- </list-box>-->
|
<!-- <list-box :title="$t('更多')" :listData="moreList"></list-box>-->
|
<!-- <list-box v-if="!userInfo.token" :listData="moniList"></list-box> -->
|
<div v-if="$store.state.user.userInfo.token">
|
<div class="outBtn flex-center" style="background: rgb(211, 47, 47);color: white" @click="loginOut">
|
<img src="../../assets/tc.png" style="width: 17px;height: 17px;margin-right: 10px"/>
|
{{ $t('退出') }}
|
</div>
|
<!-- <div class="tips">{{ $t('请不要透漏密码、短信和谷歌验证码给任何人,包括交易所的工作人员。') }}</div> -->
|
</div>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import assetsHead from "@/components/assets-head";
|
import listBox from "./listBox.vue";
|
import {mapGetters} from "vuex";
|
import {_getIdentify} from '@/API/fund.api'
|
import {setStorage} from '@/utils/utis'
|
import {_getUnreadMsg} from '@/API/im.api'
|
|
export default {
|
props: {},
|
components: {
|
assetsHead,
|
listBox
|
},
|
computed: {
|
...mapGetters({
|
userInfo: 'user/userInfo',
|
theme: 'home/theme'
|
}),
|
},
|
data() {
|
return {
|
goHome: true,
|
showRz: true,
|
status: -1,//身份认证状态
|
list: [
|
{
|
name: this.$t('语言'),
|
icon: require('@/assets/image/userCenter/yuyan.png'),
|
url: '/language'
|
},
|
{
|
name: this.$t('计价方式'),
|
icon: require('@/assets/image/userCenter/jisuan.png'),
|
url: '/exchangeRate'
|
},
|
{
|
name: this.$t('在线客服'),
|
icon: require('@/assets/image/userCenter/kefu.png'),
|
url: '/customerService'
|
},
|
{
|
name: this.$t('主题模式'),
|
icon: require('@/assets/image/userCenter/theme.png'),
|
url: '/themeModel'
|
}
|
],
|
moreList: [
|
{
|
name: this.$t('帮助中心'),
|
icon: require('@/assets/image/userCenter/help.png'),
|
url: '/helpCenter'
|
},
|
{
|
name: this.$t('关于我们'),
|
icon: require('@/assets/image/userCenter/about.png'),
|
url: '/TermsOfService'
|
}
|
],
|
safeList: [
|
{
|
name: this.$t('安全'),
|
icon: require('@/assets/image/userCenter/aq.png'),
|
url: '/safety'
|
},
|
{
|
name: this.$t('通用'),
|
icon: require('@/assets/image/userCenter/sz.png'),
|
url: '/userCenter/setting'
|
},
|
{
|
name: this.$t('关于我们'),
|
icon: require('@/assets/image/userCenter/gy.png'),
|
url: '/TermsOfService'
|
}
|
],
|
userList: [
|
{
|
name: this.$t('邀请推广'),
|
icon: require('@/assets/image/userCenter/share.png'),
|
url: '/promote'
|
},
|
{
|
name: this.$t('账变记录'),
|
icon: require('@/assets/image/userCenter/record.png'),
|
url: '/accountChange'
|
},
|
{
|
name: this.$t('身份认证'),
|
icon: require('@/assets/image/userCenter/identity.png'),
|
url: '/certificationCenter'
|
}
|
],
|
moniList: [
|
{
|
name: this.$t('试用账户'),
|
icon: require('@/assets/image/userCenter/testDemo.png'),
|
url: '/test'
|
},
|
],
|
name: "", //实名认证的真实名字
|
unreadMsg_num: '',
|
}
|
},
|
mounted() {
|
if (this.userInfo.token) {
|
this.getIdentify()
|
this.fetchUnread()
|
}
|
},
|
activated() {
|
this.safeList = [
|
{
|
name: this.$t('安全'),
|
icon: require('@/assets/image/userCenter/aq.png'),
|
url: '/safety'
|
},
|
{
|
name: this.$t('通用'),
|
icon: require('@/assets/image/userCenter/sz.png'),
|
url: '/userCenter/setting'
|
},
|
{
|
name: this.$t('关于我们'),
|
icon: require('@/assets/image/userCenter/gy.png'),
|
url: '/TermsOfService'
|
}
|
]
|
},
|
methods: {
|
down(){
|
window.open('https://download.alokexs.com/')
|
},
|
fetchUnread() { // 获取未读
|
_getUnreadMsg().then(unread_num => {
|
this.unreadMsg_num = (unread_num * 1 > 0) ? unread_num * 1 : '';
|
//console.log('\n *** \n'+unread_num*1+'\n *** \n')
|
})
|
},
|
loginOut() {
|
this.$store.commit('user/SET_OUT')
|
setStorage('popNotice', false)
|
},
|
getIdentify() {
|
_getIdentify().then(data => {
|
this.status = data.status
|
this.name = data.name
|
})
|
},
|
tokefu() {
|
this.$router.push('/customerService')
|
}
|
},
|
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.ic1 {
|
width: 80px;
|
height: 80px
|
}
|
|
.css-1uwabd6 {
|
margin: 40px 40px 40px 40px;
|
padding: 40px;
|
background: rgba(0, 0, 0, 0.05);
|
border-radius: 5px;
|
transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
box-shadow: -2px 8px 8px rgba(0, 0, 0, 0.1);
|
}
|
|
.rz {
|
margin: 20px;
|
transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
border-radius: 4px;
|
box-shadow: none;
|
font-family: Roboto, Helvetica, Arial, sans-serif;
|
font-weight: 400;
|
font-size: 0.875rem;
|
line-height: 1.43;
|
letter-spacing: 0.01071em;
|
background-color: transparent;
|
display: flex;
|
padding: 20px 26px 30px 26px;
|
color: rgb(30, 70, 32);
|
border: 1px solid rgb(76, 175, 80)
|
}
|
|
.userCenter {
|
font-size: 26px;
|
width: 100%;
|
box-sizing: border-box;
|
overflow: hidden;
|
}
|
|
.top {
|
padding: 0 32px;
|
|
p {
|
color: #868D9A;
|
}
|
}
|
|
.content {
|
font-size: 30px;
|
}
|
|
.custom {
|
width: 44px;
|
height: 44px;
|
|
img {
|
width: 100%;
|
height: 100%;
|
}
|
}
|
|
.title {
|
font-weight: 700;
|
font-size: 52px;
|
margin-top: 54px;
|
margin-bottom: 22px;
|
}
|
|
.btnBox {
|
display: flex;
|
justify-content: space-between;
|
margin-top: 44px;
|
margin-bottom: 35px;
|
|
.btn {
|
color: #fff;
|
width: 364px;
|
height: 88px;
|
line-height: 88px;
|
font-size: 35px;
|
border-radius: 8px;
|
text-align: center;
|
}
|
}
|
|
.outBtn {
|
height: 88px;
|
line-height: 88px;
|
text-align: center;
|
font-size: 32px;
|
border-radius: 10px;
|
margin: 0 32px;
|
margin-top: 44px;
|
}
|
|
.tips {
|
color: #868D9A;
|
margin-top: 34px;
|
text-align: center;
|
padding: 0 13%;
|
display: flex;
|
justify-content: center;
|
}
|
|
.userInfo {
|
padding: 32px 32px 44px 32px;
|
display: flex;
|
|
.imgBox {
|
width: 96px;
|
height: 96px;
|
|
img {
|
width: 100%;
|
height: 100%;
|
}
|
}
|
|
.info {
|
margin-left: 22px;
|
display: flex;
|
flex-direction: column;
|
justify-content: center;
|
|
p {
|
margin-bottom: 10px;
|
font-size: 36px;
|
font-weight: 700;
|
}
|
|
span {
|
color: #868D9A;
|
font-size: 22px;
|
}
|
}
|
}
|
</style>
|