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