<template>
	<div>
		<common @asynCallBack="asynCallBack"></common>
		<top-header :pageTitle="pageTitle"></top-header>

		<div class="mui-content">
			<div class="vongi-me-list vongi-meset-list">
				<ul class="mui-table-view mui-table-view-chevron vongi-news">
					<li class="mui-table-view-cell">
						<a class="mui-navigate-right flew-sp">
							已绑定手机号
							<span v-text="person_data.phone"></span>
						</a>
					</li>
					<li class="mui-table-view-cell">
						<a class="mui-navigate-right flew-sp">
							字体大小
							<span>普通模式</span>
						</a>
					</li>
					<li class="mui-table-view-cell">
						<a class="mui-navigate-right"> 关于小鹏管家 </a>
					</li>
				</ul>
				<a href="../home/#/register?project=business&exchange=1" class="vongi-meset jump">注册新身份</a>
				<a href="../home/#/user/role?project=business&exchange=1" class="vongi-meset jump">切换身份</a>
				<a @click="loginOut" class="vongi-meset">退出帐号</a>
			</div>
		</div>
	</div>
</template>

<script>
	import * as API_User from '$project/apis/user'
	import Common from '$project/components/Common.vue'
	import Loading from '$project/components/Loading.vue'
	import TopHeader from '$project/components/TopHeader.vue'
	import NavMenu from '@/components/NavMenu.vue'
	import {
		mapGetters,
		mapMutations
	} from 'vuex'
	export default {
		name: 'MasterMineConfig',
		components: {
			Common,
			Loading,
			TopHeader,
			NavMenu
		},
		data() {
			return {
				pageTitle: '设置',

				isLoading: false,

				lastNotice: {}
			}
		},
		created() {

		},
		methods: {
			//退出登录
			loginOut() {
				this.isLoading = true;
				API_User.logOut().then(response => {
					this.isLoading = false;

					window.location.href = '../home/#/';

				}).catch(error => {
					this.isLoading = false;
					mui.toast(error);
				})
			},
			asynCallBack() {},
		},
		mounted() {

		},
		destroyed() {

		},
		computed: {
			...mapGetters({
				openId: 'wx_openid',
				token: 'token',
				person_data: 'person_data',
				person_popedom: 'person_popedom',
			})
		}
	}
</script>

<style scoped src="$project/assets/css/xpgj.css"></style>
<style src="$project/assets/css/iconfont.css"></style>
<style>
</style>
