修复验证码

This commit is contained in:
2020-11-06 22:51:42 +08:00
parent 45180ae026
commit 013cae84af
5 changed files with 10 additions and 9 deletions

View File

@@ -673,8 +673,9 @@ interface SendSms{
msg: string;
}
export async function sendsms(phone: string, type: number): Promise<boolean>{
const res = await post<SendSms>("SendSms", {phone, type});
export async function sendsms(code: string ,phone: string): Promise<boolean>{
const type = code == '86' ? 0 : 1;
const res = await post<SendSms>("SendSms", {phone: code + phone, type});
console.log(res);
if(res.code == 0){
message.success(res.msg);