|
@@ -1,14 +1,17 @@
|
|
<template>
|
|
<template>
|
|
<view class="container">
|
|
<view class="container">
|
|
<view class="desc-box">
|
|
<view class="desc-box">
|
|
- 重要提醒:注销申请一旦提交,将无法撤销,且系统可能无法恢复相关数据,请您务必谨慎操作!
|
|
|
|
|
|
+ <view class="desc-text">您正在申请广州市房地产中介协会会员中心小程序账户注销,为保障您的权益,我们再次提醒您:</view>
|
|
|
|
+ <view class="desc-text">1、注销申请一旦提交,将无法撤销,且系统可能无法恢复相关数据,请您务必谨慎操作!我们将在您申请注销账号起15个工作日内完成与该账号相关的数据处理工作。</view>
|
|
|
|
+ <view class="desc-text">2、账号注销7个工作日内,您无法通过相同手机号或身份证重新注册/登录广州市房地产中介协会会员中心小程序账号。</view>
|
|
|
|
+ <view class="desc-text">3、如您在注销账号的过程中遇到任何问题,请拨打协会客服热线(020-66676400)与我们取得联系。</view>
|
|
</view>
|
|
</view>
|
|
<view class="form-box">
|
|
<view class="form-box">
|
|
<u-form :model="formData.form" ref="formRef" label-width="120" :label-style="{fontWeight: 'bold', fontSize: '26rpx'}">
|
|
<u-form :model="formData.form" ref="formRef" label-width="120" :label-style="{fontWeight: 'bold', fontSize: '26rpx'}">
|
|
<u-form-item prop="phone">
|
|
<u-form-item prop="phone">
|
|
<view class="input-code">
|
|
<view class="input-code">
|
|
<view class="input">
|
|
<view class="input">
|
|
- <u-input v-model="formData.form.phone" :border="true" type="text" placeholder="请输入绑定手机号"/>
|
|
|
|
|
|
+ <u-input v-model="formData.form.phone" disabled :border="true" type="text" placeholder="请输入绑定手机号"/>
|
|
</view>
|
|
</view>
|
|
<view class="btn">
|
|
<view class="btn">
|
|
<text class="form-item-text" @click="getCode">{{tips}}</text>
|
|
<text class="form-item-text" @click="getCode">{{tips}}</text>
|
|
@@ -21,7 +24,10 @@
|
|
</u-form>
|
|
</u-form>
|
|
</view>
|
|
</view>
|
|
<view class="bottom-box">
|
|
<view class="bottom-box">
|
|
- <u-button type="primary" shape="circle" @click="onSubmit">确定注销</u-button>
|
|
|
|
|
|
+ <u-checkbox-group style="display: flex;justify-content: center;margin-bottom: 20rpx;">
|
|
|
|
+ <u-checkbox v-model="cancelCheck" name="yes" shape="circle" label-size="26">我已阅读并同意《会员中心小程序账号注销通知》</u-checkbox>
|
|
|
|
+ </u-checkbox-group>
|
|
|
|
+ <u-button type="primary" shape="circle" @click="onSubmit">提交</u-button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
@@ -30,12 +36,19 @@
|
|
import { ref, reactive } from 'vue'
|
|
import { ref, reactive } from 'vue'
|
|
import { onLoad, onReady } from '@dcloudio/uni-app'
|
|
import { onLoad, onReady } from '@dcloudio/uni-app'
|
|
import { msgError, msgSuccess, showConfirm } from '@/utils/common'
|
|
import { msgError, msgSuccess, showConfirm } from '@/utils/common'
|
|
|
|
+ import { useAuthStore } from '@/store/authStore'
|
|
|
|
+ import {
|
|
|
|
+ smsSend
|
|
|
|
+ } from "@/api/login.js"
|
|
|
|
+
|
|
|
|
+ const authStore = useAuthStore()
|
|
|
|
|
|
const formRef = ref()
|
|
const formRef = ref()
|
|
const formData = reactive({
|
|
const formData = reactive({
|
|
form: {
|
|
form: {
|
|
phone: null,
|
|
phone: null,
|
|
- code: null
|
|
|
|
|
|
+ code: null,
|
|
|
|
+ captchaUuid: null
|
|
},
|
|
},
|
|
rules: {
|
|
rules: {
|
|
phone: [
|
|
phone: [
|
|
@@ -56,7 +69,25 @@
|
|
],
|
|
],
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ const isAwaitCode = ref(false)
|
|
const tips = ref('获取验证码') // 59秒重新获取
|
|
const tips = ref('获取验证码') // 59秒重新获取
|
|
|
|
+ const cancelCheck = ref(false)
|
|
|
|
+ function getCode() {
|
|
|
|
+ let {phone} = formData.form
|
|
|
|
+ if (!isAwaitCode.value) {
|
|
|
|
+ smsSend({phone}).then(res => {
|
|
|
|
+ if (res && res.data.captchaUuid) {
|
|
|
|
+ formData.form.captchaUuid = res.data.captchaUuid
|
|
|
|
+ isSendCode.value = true
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+
|
|
|
|
+ }, 60 * 1000)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ msg('倒计时结束后再发送');
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
function onSubmit() {
|
|
function onSubmit() {
|
|
formRef.value.validate((valid) => {
|
|
formRef.value.validate((valid) => {
|
|
@@ -64,6 +95,11 @@
|
|
// 提交
|
|
// 提交
|
|
showConfirm('是否确认注销').then(res => {
|
|
showConfirm('是否确认注销').then(res => {
|
|
if (res.confirm) {
|
|
if (res.confirm) {
|
|
|
|
+ authStore.clearAuthToken()
|
|
|
|
+ authStore.cleanUserInfo()
|
|
|
|
+ uni.reLaunch({
|
|
|
|
+ url: '/pages/initial/initial?isCancelAccount=1'
|
|
|
|
+ })
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -73,6 +109,9 @@
|
|
onReady(() => {
|
|
onReady(() => {
|
|
formRef.value.setRules(formData.rules)
|
|
formRef.value.setRules(formData.rules)
|
|
})
|
|
})
|
|
|
|
+ onLoad(() => {
|
|
|
|
+ formData.form.phone = authStore.phone
|
|
|
|
+ })
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
@@ -83,10 +122,15 @@
|
|
padding: 20rpx;
|
|
padding: 20rpx;
|
|
|
|
|
|
.desc-box {
|
|
.desc-box {
|
|
- text-indent: 2em;
|
|
|
|
- line-height: 60rpx;
|
|
|
|
padding: 20rpx 0;
|
|
padding: 20rpx 0;
|
|
margin-bottom: 20rpx;
|
|
margin-bottom: 20rpx;
|
|
|
|
+ .desc-text {
|
|
|
|
+ text-indent: 2em;
|
|
|
|
+ line-height: 60rpx;
|
|
|
|
+ &:nth-child(1) {
|
|
|
|
+ text-indent: 0em;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
.form-box {
|
|
.form-box {
|