xbx #60

Merged
theluyuan merged 9 commits from xbx into master 2020-10-20 17:09:35 +08:00
2 changed files with 2276 additions and 2273 deletions
Showing only changes of commit 91fd41f90e - Show all commits

View File

@ -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)
}
}
//

4529
yarn.lock

File diff suppressed because it is too large Load Diff