<template>
	<view>
		<view class="Personalinformation">
			<u-cell-group>
				<u-cell size="large" title="账户名称" :value="getuserInfo.realName"></u-cell>
				<u-cell size="large" title="手机号码" :value="getuserInfo.mobile"></u-cell>
				<u-cell size="large" title="账号密码" value="******" isLink @click="editdata"></u-cell>
			</u-cell-group>
		</view>
		<view class="edit"  @click="tuichu">注销登录</view>
		
		<u-modal :show="showtc" content='请问您是否确定一键退出？' :showConfirmButton='true' :showCancelButton='true'
			@confirm="confirmtc" @cancel='canceltc'></u-modal>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				getuserInfo: {},
				showtc: false,
			};
		},
		onLoad() {
			this.getuserInfo = uni.getStorageSync('getuserInfo');
		},
		methods: {
			tuichu() {
				this.showtc = true;
			},
			confirmtc() {
				this.showtc = false;
				switch (uni.getSystemInfoSync().platform) {
					case 'android':
						plus.runtime.quit();
			
						break;
					case 'ios':
						plus.ios.import('UIApplication').sharedApplication().performSelector('exit');
			
						break;
				}
				//清除缓存
				uni.clearStorageSync();
			},
			canceltc() {
				this.showtc = false;
			},
			editdata() {
				uni.navigateTo({
						url: '/pages/my/Changepassword/Changepassword'
				})
			},
		}
	}
</script>

<style lang="scss">
	.Personalinformation {
		padding: 0 32rpx;
		background: #fff;
		margin-top: 24rpx;
	}

	.edit {
		margin-top: 80rpx;
		height: 88rpx;
		font-size: 32rpx;
		line-height: 88rpx;
		color: #2E69EB;
		text-align: center;
		background: #fff;
	}
</style>