登录发短信 修改一处配置判断
This commit is contained in:
parent
bd81447011
commit
bfb183653e
|
|
@ -1393,7 +1393,7 @@ function sendCaptcha(_a, context) {
|
|||
}]))];
|
||||
case 11:
|
||||
_k.sent();
|
||||
if (!(process.env.NODE_ENV === 'development')) return [3 /*break*/, 12];
|
||||
if (!(process.env.NODE_ENV === 'development' || mockSend)) return [3 /*break*/, 12];
|
||||
return [2 /*return*/, "\u9A8C\u8BC1\u7801[".concat(code, "]\u5DF2\u521B\u5EFA")];
|
||||
case 12: return [4 /*yield*/, (0, sms_1.sendSms)({
|
||||
origin: 'tencent',
|
||||
|
|
|
|||
|
|
@ -1158,10 +1158,9 @@ export async function sendCaptcha<ED extends EntityDict, Cxt extends BackendRunt
|
|||
dontCollect: true,
|
||||
});
|
||||
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
if (process.env.NODE_ENV === 'development' || mockSend) {
|
||||
return `验证码[${code}]已创建`;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
//发送短信
|
||||
const result = await sendSms<ED, Cxt>(
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue