deactivate.vue 3.2 KB
Newer Older
DCloud_JSON's avatar
DCloud_JSON 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
<!-- 注销(销毁)账号 -->
<template>
	<view class="content">
		<text class="words" space="emsp">
			一、注销是不可逆操作,注销后:\n
			1.帐号将无法登录、无法找回。\n
			2.帐号所有信息都会清除(个人身份信息、粉丝数等;发布的作品、评论、点赞等;交易信息等),你
			的朋友将无法通过本应用帐号联系你,请自行备份相关
			信息和数据。\n

			二、重要提示\n
			1.封禁帐号(永久封禁、社交封禁、直播权限封禁)不能申请注销。\n
			2.注销后,你的身份证、三方帐号(微信、QQ、微博、支付宝)、手机号等绑定关系将解除,解除后可以绑定到其他帐号。\n
			3.注销后,手机号可以注册新的帐号,新帐号不会存在之前帐号的任何信息(作品、粉丝、评论、个人信息等)。\n
			4.注销本应用帐号前,需尽快处理帐号下的资金问题。\n
			5.视具体帐号情况而定,注销最多需要7天。\n
		</text>
		<view class="button-group">
			<button @click="nextStep" class="next" type="default">下一步</button>
			<button @click="cancel" type="warn">取消</button>
		</view>
	</view>
</template>

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

			}
		},
		onLoad() {},
		methods: {
			cancel() {
				uni.navigateBack()
			},
			nextStep() {
				uni.showModal({
					content: '已经仔细阅读注销提示,知晓可能带来的后果,并确认要注销',
					complete: (e) => {
						if (e.confirm) {
							const db = uniCloud.database();
							
							const uniIdco = uniCloud.importObject("uni-id-co");
							uniIdco.closeAccount().then((e) => {
								console.log(e);
								uni.showToast({
									title: '注销成功'
								});
								uni.removeStorageSync('uni_id_token');
								uni.setStorageSync('uni_id_token_expired', 0)
								uni.navigateTo({
									url:"/uni_modules/uni-id-pages/pages/login/login-withoutpwd"
								})
							})
						} else {
							uni.navigateBack()
						}
					}
				});
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		font-size: 28rpx;
	}

	.words {
		padding: 0 26rpx;
		line-height: 46rpx;
		margin-top: 20rpx;
		margin-bottom: 80px;
	}

	.button-group button {
		border-radius: 100px;
		border: none;
		width: 300rpx;
		height: 42px;
		line-height: 42px;
		font-size: 32rpx;
	}

	.button-group button:after {
		border: none;
	}

	.button-group button.next {
		color: #e64340;
		border: solid 1px #e64340;
	}
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
	
	@media screen and (max-width: 690px) {
		.button-group {
			display: flex;
			flex-direction: row;
			position: fixed;
			height: 50px;
			bottom: 10px;
			width: 750rpx;
			justify-content: center;
			align-items: center;
			border-top: solid 1px #e4e6ec;
			padding-top: 10px;
			background-color: #FFFFFF;
		}
	}
	
	@media screen and (min-width: 690px) {
		.button-group {
			display: flex;
			flex-direction: row;
			height: 50px;
			max-width: 1500rpx;
			justify-content: center;
			align-items: center;
			padding-top: 10px;
			background-color: #FFFFFF;
		}
	}
DCloud_JSON's avatar
DCloud_JSON 已提交
126
</style>