This commit is contained in:
2025-04-30 16:43:52 +08:00
parent b1bb0e63f5
commit 1a7886450d
14 changed files with 276 additions and 53 deletions

View File

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