注册 短信发送失败

This commit is contained in:
2020-10-14 10:25:49 +08:00
parent 5e4db83a24
commit fb9ca6f040
3 changed files with 82 additions and 38 deletions

View File

@@ -144,11 +144,11 @@ export async function getlivelist(data?:any) {
* 列表统计
*/
interface StatisticList{
liveInfo: any;
videoInfo: any;
studentInfo: any;
}
interface StatisticList{
liveInfo: any;
videoInfo: any;
studentInfo: any;
}
export async function getstatisticlist() {
const res = await get<StatisticList>('statistics');
@@ -166,8 +166,31 @@ export async function getstatisticlist() {
interface Liveaddrule{
code:number,
msg:string
}
export async function liveadd(data:any) {
}
export async function liveadd(data:any) {
const res = await post<Liveaddrule>('live',data);
console.log(res)
}
}
/**
* 发送验证码
* @param phone 手机号
* @param type 国外1 国内0
*/
interface SendSms{
code: number;
msg: string;
}
export async function sendsms(phone: string, type: number): Promise<boolean>{
const res = await post<SendSms>("SendSms", {phone, type});
console.log(res);
if(res.code == 0){
message.success(res.msg);
return true;
}else{
message.error(res.msg);
return false;
}
}