mirror of
https://github.com/certd/certd.git
synced 2026-06-30 16:39:43 +08:00
perf: 支持易发云短信
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { logger } from '@certd/basic';
|
||||
import { ISmsService, PluginInputs, SmsPluginCtx } from './api.js';
|
||||
import { AliyunAccess, AliyunClient } from '@certd/plugin-lib';
|
||||
|
||||
export type AliyunSmsConfig = {
|
||||
accessId: string;
|
||||
regionId: string;
|
||||
signName: string;
|
||||
codeTemplateId: string;
|
||||
};
|
||||
@@ -11,27 +11,31 @@ export type AliyunSmsConfig = {
|
||||
export class AliyunSmsService implements ISmsService {
|
||||
static getDefine() {
|
||||
return {
|
||||
name: 'aliyun-sms',
|
||||
name: 'aliyun',
|
||||
desc: '阿里云短信服务',
|
||||
input: {
|
||||
accessId: {
|
||||
title: '阿里云授权',
|
||||
component: {
|
||||
name: 'access-selector',
|
||||
from: 'aliyun',
|
||||
type: 'aliyun',
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
regionId: {
|
||||
title: '接入点',
|
||||
required: true,
|
||||
},
|
||||
signName: {
|
||||
title: '签名',
|
||||
component: {
|
||||
name: 'a-input',
|
||||
vModel: 'value',
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
codeTemplateId: {
|
||||
title: '验证码模板Id',
|
||||
component: {
|
||||
name: 'a-input',
|
||||
vModel: 'value',
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
} as PluginInputs<AliyunSmsConfig>,
|
||||
|
||||
Reference in New Issue
Block a user