<style lang='scss' scoped>
	.mySetup{
		width: 100%;
		&-btn{
			width: 100%;
			text-align: center;
			padding: 40rpx;
		}
	}
</style>
<template>
	<view class="mySetup">
		<u-cell-group>
			<u-cell-item icon="info-circle" title="关于" @click="goAboutFn"></u-cell-item>
			<u-cell-item icon="lock-open" hover-class="none" title="密码修改" @click="goPasswordFn"></u-cell-item>
			<u-cell-item icon="attach" hover-class="none" :arrow="false" title="版本号" v-model="version"></u-cell-item>
		</u-cell-group>
		<view class="mySetup-btn">
			<u-button type="primary" @click="outLoginFn">退出登录</u-button>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				version:'1.0.3'
			}
		},
		onLoad() {
			// #ifdef MP-WEIXIN
			const accountInfo = wx.getAccountInfoSync();
			if(accountInfo.miniProgram.envVersion=='release'){
				this.version = accountInfo.miniProgram.version;
			}
			console.log(accountInfo.miniProgram.version) // 插件版本号， 'a.b.c' 这样的形式
			// #endif
		},
		methods: {
			goAboutFn(){
				uni.navigateTo({
					url:"./about"
				})
			},
			outLoginFn(){
				// uni.clearStorageSync();
				uni.removeStorageSync('userToken');
				uni.reLaunch({
					url:"../../auth/login"
				})
			},
			goPasswordFn() {
				uni.navigateTo({
					url:"./passwordModify"
				})
			}
		}
	}
</script>
