<template>
	<view class="safe-manage">
		<custom-nav noback="noback" transparent="transparent" ref="ltm" title=" " />
		<view class="content">
			<navigator url="../address-manage/address-manage" class="app-item">
				<text>地址管理</text>
				<text class="cuIcon-right"></text>
			</navigator>
			<navigator url="../updata-psw/updata-psw" class="app-item">
				<text>修改密码</text>
				<text class="cuIcon-right"></text>
			</navigator>
			<navigator url="../change-phone/change-phone" class="app-item">
				<text>手机换绑</text>
				<text class="cuIcon-right"></text>
			</navigator>
			<view class="app-item" @tap="logout">
				<text>退出登陆</text>
				<text class="cuIcon-right"></text>
			</view>
			<!-- <navigator url="../apply-return/apply-return" class="app-item">
				<text>申请退货</text>
				<text class="cuIcon-right"></text>
			</navigator> -->
		</view>
	</view>
</template>

<script>
	import { _API_Logout } from '@/apis/verify.js'
	export default {
		data() {
			return {
				title: '安全中心'
			}
		},
		methods: {
			logout() {
				uni.showLoading({ mask: true })
				_API_Logout().then(() => {
					this.$store.commit('app/LOGOUT')
					uni.navigateBack()
					window.history.replaceState({}, '', '/api/gzh')
					location.reload()
				})
			}
		}
	}
</script>

<style lang="scss">
	.safe-manage {
		@include page();
	}
</style>
