mirror of https://github.com/certd/certd
chore:
parent
2bc3456400
commit
15740a6d8a
|
@ -11,11 +11,11 @@ const props = defineProps<{
|
|||
}>();
|
||||
|
||||
const loading = ref(false);
|
||||
function onClick() {
|
||||
async function onClick() {
|
||||
loading.value = true;
|
||||
try {
|
||||
if (props.click) {
|
||||
props.click();
|
||||
await props.click();
|
||||
}
|
||||
} finally {
|
||||
loading.value = false;
|
||||
|
|
|
@ -79,16 +79,19 @@ defineOptions({
|
|||
});
|
||||
|
||||
const testMobile = ref("");
|
||||
function testSendSms() {
|
||||
async function testSendSms() {
|
||||
if (!testMobile.value) {
|
||||
notification.error({
|
||||
message: "请输入测试手机号"
|
||||
});
|
||||
return;
|
||||
}
|
||||
api.TestSms({
|
||||
await api.TestSms({
|
||||
mobile: testMobile.value
|
||||
});
|
||||
notification.success({
|
||||
message: "发送成功"
|
||||
});
|
||||
}
|
||||
const formState = reactive<Partial<SysSettings>>({
|
||||
public: {
|
||||
|
|
|
@ -56,7 +56,7 @@ export class CodeService {
|
|||
/**
|
||||
*/
|
||||
async sendSmsCode(phoneCode = '86', mobile: string, randomStr: string) {
|
||||
if (mobile != null) {
|
||||
if (!mobile) {
|
||||
throw new Error('手机号不能为空');
|
||||
}
|
||||
if (!randomStr) {
|
||||
|
|
Loading…
Reference in New Issue