xbx #60
@ -203,20 +203,20 @@
|
||||
</template>
|
||||
<!-- 换绑手机号第一步 -->
|
||||
<div class="public-class phone-container" v-if="!isSecondStep">
|
||||
<div class="title">完成以下操作,修改账号密码</div>
|
||||
<div class="title sub-title">请输入{{ formData.phone }}收到的验证短信码</div>
|
||||
<div class="title">请完成以下认证</div>
|
||||
<div class="title sub-title">请输入{{ userinfo.mobile }}收到的验证短信码</div>
|
||||
<div class="form-box">
|
||||
<div class="form-item">
|
||||
<label class="label">手机验证码</label>
|
||||
<a-input size="small" v-model:value="verificationCode" />
|
||||
<div @click="sendVerificationCode" class="confirm-btn">获取验证码<span v-if="remainTime>0">({{ remainTime }}s)</span></div>
|
||||
<div @click="sendVerificationCode(userinfo.mobile)" class="confirm-btn">获取验证码<span v-if="remainTime>0">({{ remainTime }}s)</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div @click="nextPhoneStep" class="confirm-btn">下一步</div>
|
||||
</div>
|
||||
<!-- 换绑手机号第二步 -->
|
||||
<div class="public-class phone-container second-step" v-else>
|
||||
<div class="title">完成以下操作,修改账号密码</div>
|
||||
<div class="title">完成以下操作,绑定新号码</div>
|
||||
<div class="form-box">
|
||||
<div class="form-item">
|
||||
<label class="label">手机号</label>
|
||||
@ -277,7 +277,7 @@ import { uploadflie } from "@/utils/vod"
|
||||
import store from '@/store';
|
||||
import smile from "@/static/images/smile.png"
|
||||
import smilet from "@/static/images/smilet.png"
|
||||
import { editpassword, getarchives, getlanguages, putmember } from "@/api/index"
|
||||
import { editpassword, getarchives, getlanguages, putmember, sendsms } from "@/api/index"
|
||||
import { message } from 'ant-design-vue';
|
||||
|
||||
export default defineComponent({
|
||||
@ -360,16 +360,20 @@ export default defineComponent({
|
||||
function computedVerificationCode(): void {
|
||||
remainTime.value = 60;
|
||||
const timer = setInterval(() => {
|
||||
if(remainTime.value > 0) remainTime.value --;
|
||||
else clearInterval(timer);
|
||||
if(remainTime.value > 0) {
|
||||
remainTime.value --;
|
||||
} else {
|
||||
clearInterval(timer);
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
/**
|
||||
* 发送验证码
|
||||
*/
|
||||
function sendVerificationCode(): void {
|
||||
function sendVerificationCode(phone: string): void {
|
||||
if(remainTime.value === 0) {
|
||||
computedVerificationCode();
|
||||
sendsms(phone, 0)
|
||||
}
|
||||
}
|
||||
// 绑定手机号是否是第二步
|
||||
|
Loading…
Reference in New Issue
Block a user