This commit is contained in:
vastxie
2024-07-07 22:44:05 +08:00
parent 5df02f5441
commit 2a9ca58e38
726 changed files with 246 additions and 282 deletions

View File

@@ -296,13 +296,14 @@ let AuthService = class AuthService {
const nameSpace = await this.globalConfigService.getNamespace();
const { color = '#fff' } = parmas;
const captcha = svgCaptcha.create({
size: 5,
size: 4,
ignoreChars: '0o1i',
noise: 4,
color: true,
background: color,
height: 33,
width: 150,
height: 35,
width: 120,
charPreset: 'abcdefghijklmnopqrstuvwxyz',
});
const text = captcha.text;
const randomId = Math.random().toString(36).substr(2, 9);

View File

@@ -388,14 +388,14 @@ let GlobalConfigService = class GlobalConfigService {
return { siteName, qqNumber, vxNumber, registerBaseUrl, domain };
}
async getPhoneVerifyConfig() {
const { phoneRegisterStatus, aliPhoneAccessKeyId, aliPhoneAccessKeySecret, aliPhoneSignName, aliPhoneTemplateCode, } = await this.getConfigs([
'phoneRegisterStatus',
const { phoneLoginStatus, aliPhoneAccessKeyId, aliPhoneAccessKeySecret, aliPhoneSignName, aliPhoneTemplateCode, } = await this.getConfigs([
'phoneLoginStatus',
'aliPhoneAccessKeyId',
'aliPhoneAccessKeySecret',
'aliPhoneSignName',
'aliPhoneTemplateCode',
]);
if (Number(phoneRegisterStatus) !== 1) {
if (Number(phoneLoginStatus) !== 1) {
throw new common_1.HttpException('手机验证码功能暂未开放!', common_1.HttpStatus.BAD_REQUEST);
}
return {