mirror of
https://github.com/certd/certd.git
synced 2026-04-14 04:20:52 +08:00
chore:
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user