<template>
	<view>
		<view style="width: 100%;text-align: center;margin: 20upx 0upx;">
			<image style="width: 100rpx;height: 100rpx; margin: 20rpx auto;" src="../../static/images/my/eorr.png" mode=""></image>
			<view style="font-weight: bold;font-size: 32rpx;color: #222222;">很抱歉，我们在这里见面</view>
			<view style="margin-top: 20upx;font-size: 24upx;color: #B2B2B2;">如果您是误操作，请取消申请</view>
		</view>

		<view style="margin: 32rpx;background: #F6F6F6;padding: 28rpx 30upx;border-radius: 32rpx;">
			<view style="font-weight: bold;
font-size: 32rpx;
color: #222222;margin-bottom: 20rpx;">注销提示：</view>
			<view style="font-weight: bold;
font-size: 28rpx;
color: #222222;margin-bottom: 20rpx;">若你是二次申请注销，则注销申请会直接通过</view>
			<view style="font-weight: bold;
font-size: 28rpx;
color: #222222;margin-bottom: 20rpx;">一旦账号注销成功</view>
			<view class="title_item">
				<view class="item_yuan"></view>
				<view class="item_title">您的账号将无法登陆与使用</view>
			</view>
			<view class="title_item">
				<view class="item_yuan"></view>
				<view class="item_title">您的账号信息与会员权益将会永久清除且无法恢复</view>
			</view>
			<view class="title_item">
				<view class="item_yuan"></view>
				<view class="item_title">您的收益将被永久清空且无法恢复</view>
			</view>
			<view class="title_item">
				<view class="item_yuan"></view>
				<view class="item_title">您的账号所关联的订单将无法查询与找回</view>
			</view>
			<view class="title_item">
				<view class="item_yuan"></view>
				<view class="item_title">您在上门服务购买的物品将无法进行售后</view>
			</view>
			<view class="title_item">
				<view class="item_yuan"></view>
				<view class="item_title">您在上门服务的账号信息及会员权益将会永久清除且无法恢复</view>
			</view>
			<view class="title_item">
				<view class="item_yuan"></view>
				<view class="item_title" style="color:#F24E4E">您所绑定的手机号码3个月内将无法再次注册上门服务</view>
			</view>
		</view>


		<view style="margin-top: 100upx;display: flex;padding: 20upx;">
			<view @tap="send"
				style="flex: 1;background: #F6F6F6;color: #222222;height: 100rpx;line-height: 100rpx;border-radius: 50upx;text-align: center;">
				继续注销</view>
			<view @tap="back"
				style="margin-left: 10upx;flex: 1;background: #FF9DB4;font-weight: bold;font-size: 32rpx;
color: #222222;height: 100rpx;line-height: 100rpx;border-radius: 50upx;text-align: center;">
				暂不注销</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		onLoad() {

		},
		methods: {
			back() {
				uni.navigateBack();
			},
			send() {
				let that = this;
				let userId = this.$queue.getData('userId');
				let phone = this.$queue.getData('phone') ? this.$queue.getData('phone') : '';
				uni.showModal({
					title: '温馨提示',
					content: '注销后您的账号信息与会员权益将会永久清除且无法恢复，继续注销将在三日内清除完毕，确认继续注销吗？',
					showCancel: true,
					cancelText: '暂不注销',
					confirmText: '继续注销',
					success: res => {
						if (res.confirm) {
							that.$queue.showLoading('注销中...');
							that.$Request
								.postJson('/app/message/insertMessage', {
									state: 3,
									title: phone ? phone : '注销账号',
									content: '我要注销账号！',
									phone: phone,
									userId: userId
								})
								.then(res => {
									if (res.code === 0) {
										uni.showToast({
											title: '申请成功！'
										});
										that.$queue.logout();
										setTimeout(function() {
											uni.switchTab({
												url: '/pages/index/index'
											})
										}, 1000);
									} else {
										uni.hideLoading();
										uni.showModal({
											showCancel: false,
											title: '注销失败',
											content: res.msg
										});
									}
								});
						}
					}
				});
			}
		}
	}
</script>

<style>
	page {
		background: #fff;
	}

	.title_item {
		display: flex;
		align-items: center;
		margin-top: 15upx;
	}

	.item_yuan {
		width: 12upx;
		height: 12upx;
		border-radius: 50%;
		background: #AAAAAA;
	}

	.item_title {
		margin-left: 10upx;
		font-size: 28rpx;
		color: #AAAAAA;
	}
</style>
