<template>
	<view style="display: flex;flex-direction: column;">
		<view class="">
			<menu-list :menuList="minorMenuLists"></menu-list>
		</view>
		
		<view class="footer">
			<view class="foter-btn">
				<button class="btn" @click="outLing()">退出登录</button>
			</view>
			
		</view>
	</view>
</template>

<script>
	import  MenuList from "./menulist.vue"
	
	export default {
		components:{
			MenuList
		},
		data() {
			return {
				minorMenuLists: [
					{
						title: '手机号绑定',
						icon: '',
						link: null,
						contentType:"183****9247",
						isOpen: true,
						isShow: true,
						isType: false,
					},
					{
						title: '重置密码',
						icon: '',
						link: '/pages/personalCenter/accountoperation/resetpassword',
						isOpen: true,
						isShow: true,
						isType: false,
					},
					{
						title: '注销账号',
						icon: '',
						link: '',
						isOpen: true,
						isShow: true,
						isType: true,
					}
				]
			}
		},
		methods:{
			outLing(){
				uni.showModal({
					title: '退出登录',
					content: '确定要退出登录吗?',
					showCancel: true,
					success: function(res) {
						if (res.confirm) {
								uni.removeStorageSync('isLogin')
								uni.reLaunch({
									url:'/components/login/login'
								})
							uni.showToast({
								title: '操作成功',
								icon: 'none'
							});
						} else {
							console.log('已取消')
						}
					}
				});
			},
		}
	}
</script>

<style scoped>
	.footer{
		width: 100vw;
		position: fixed;
		bottom: 40rpx;
	}
	.foter-btn{
		padding: 0 20rpx;
	}
	.btn{
		background:  #20269B;
		border-radius: 40rpx;
	}
</style>
