<template>
	<view class="main pt0">
		<button class="btn" @click="exit()">退出登陆</button>
	</view>
</template>

<script>
export default {
	data() {
		return {};
	},
	methods: {
		exit() {
			uni.showModal({
				title: '提示',
				content: '确定退出登陆?',
				success: (res) => {
					if (res.confirm) {
						this.http.request({
							url: '/app/user/exit',
							success: (res) => {
								uni.removeStorageSync('user');
								uni.navigateBack();
							}
						});
					}
				}
			});
		}
	}
};
</script>

<style lang="scss"></style>