perf: 发送验证码交互优化

This commit is contained in:
rd
2025-09-12 14:06:36 +08:00
parent 958d7a6424
commit 2c28ff7b06
8 changed files with 38 additions and 31 deletions

View File

@ -137,21 +137,6 @@ const changePasswordModalRef = ref(null);
const changeNameModalRef = ref(null);
const changeMobileModalRef = ref(null);
// const userInfo = computed(() => {
// return store.userInfo ?? {};
// });
const columns = [
{
title: '用户信息',
slotName: 'info',
},
{
title: '手机号',
slotName: 'mobile',
},
];
const infoVisible = ref(false);
const imageVisible = ref(false);
const mobileVisible = ref(false);
@ -290,18 +275,6 @@ async function handleVerificationSubmit() {
beginCountdown();
}
async function handleUpdateMobile() {
if (!isSendCaptcha.value) {
message.error('请先获取验证码!');
return false;
}
const res = await formRef.value.validate();
if (res === true || res === undefined) {
await updateMobile(form);
message.success('修改成功!');
}
}
function getFileExtension(filename: string): string {
const match = filename.match(/\.([^.]+)$/);
return match ? match[1].toLowerCase() : '';