This commit is contained in:
2025-04-29 19:43:06 +08:00
parent dfb552b7ed
commit ff17e84aed
26 changed files with 530 additions and 260 deletions

View File

@@ -4,10 +4,14 @@ import {Message, Notification} from "@arco-design/web-vue";
import Api from "../../api/index.js";
const verificationCode = defineModel('verificationCode', {type: String});
const {mobile} = defineProps({
const {mobile, api} = defineProps({
mobile: {
type: String,
default: null,
},
api: {
type: Function,
default: Api.admin.sendSms
}
});
@@ -17,7 +21,7 @@ let timer = null;
const verifyPhone = async () => {
if (/^1[3-9]\d{9}$/.test(mobile)) {
if (timer === null) {
const {msg, code} = await Api.admin.sendSms(mobile);
const {msg, code} = await api(mobile);
if (code === 1) Message.success(msg);
time.value = 10;
timer = setInterval(() => {