update
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user