修复了登录

This commit is contained in:
luyuan 2020-10-29 09:52:51 +08:00
parent 8575d2dcac
commit ac4b1b4ea9
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3

View File

@ -13,13 +13,13 @@ import { del, get, post, put, setToken } from './base'
*/
export async function loginpass(phone: string, password: string,type?: number,smscode?: string){
let newdata={}
let newdata: any = {}
if(type==1){
newdata={type:type?type:2,username: phone, smscode: smscode}
}else{
newdata={type:type?type:2,username: phone, password: password}
}
newdata.logintype = 1;
const res = await post<LoginData>("login",newdata);
console.log(res.code)
if(res.code == 1){