mirror of
https://github.com/certd/certd.git
synced 2026-07-09 22:47:38 +08:00
chore: format
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { logger } from '@certd/basic';
|
||||
import { ISmsService, PluginInputs, SmsPluginCtx } from './api.js';
|
||||
import { AliyunAccess, AliyunClient } from '../../../plugins/plugin-lib/aliyun/index.js';
|
||||
import { logger } from "@certd/basic";
|
||||
import { ISmsService, PluginInputs, SmsPluginCtx } from "./api.js";
|
||||
import { AliyunAccess, AliyunClient } from "../../../plugins/plugin-lib/aliyun/index.js";
|
||||
|
||||
export type AliyunSmsConfig = {
|
||||
accessId: string;
|
||||
@@ -11,30 +11,30 @@ export type AliyunSmsConfig = {
|
||||
export class AliyunSmsService implements ISmsService {
|
||||
static getDefine() {
|
||||
return {
|
||||
name: 'aliyun',
|
||||
desc: '阿里云短信服务',
|
||||
name: "aliyun",
|
||||
desc: "阿里云短信服务",
|
||||
input: {
|
||||
accessId: {
|
||||
title: '阿里云授权',
|
||||
title: "阿里云授权",
|
||||
component: {
|
||||
name: 'access-selector',
|
||||
type: 'aliyun',
|
||||
name: "access-selector",
|
||||
type: "aliyun",
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
signName: {
|
||||
title: '签名',
|
||||
title: "签名",
|
||||
component: {
|
||||
name: 'a-input',
|
||||
vModel: 'value',
|
||||
name: "a-input",
|
||||
vModel: "value",
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
codeTemplateId: {
|
||||
title: '验证码模板Id',
|
||||
title: "验证码模板Id",
|
||||
component: {
|
||||
name: 'a-input',
|
||||
vModel: 'value',
|
||||
name: "a-input",
|
||||
vModel: "value",
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
@@ -55,8 +55,8 @@ export class AliyunSmsService implements ISmsService {
|
||||
await aliyunClinet.init({
|
||||
accessKeyId: access.accessKeyId,
|
||||
accessKeySecret: access.accessKeySecret,
|
||||
endpoint: 'https://dysmsapi.aliyuncs.com',
|
||||
apiVersion: '2017-05-25',
|
||||
endpoint: "https://dysmsapi.aliyuncs.com",
|
||||
apiVersion: "2017-05-25",
|
||||
});
|
||||
const smsConfig = this.ctx.config;
|
||||
const phoneNumber = phoneCode + mobile;
|
||||
@@ -67,6 +67,6 @@ export class AliyunSmsService implements ISmsService {
|
||||
TemplateParam: `{"code":"${code}"}`,
|
||||
};
|
||||
|
||||
await aliyunClinet.request('SendSms', params);
|
||||
await aliyunClinet.request("SendSms", params);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user