Merge branch 'master' of http://git.luyuan.tk/luyuan/beelink into xbx

This commit is contained in:
2020-10-21 11:48:37 +08:00
3 changed files with 133 additions and 29 deletions

View File

@@ -395,21 +395,23 @@ export async function transactioninfo(data?: any){
/**
* 修改密码
*/
export async function editpassword(data?:any) :Promise<void> {
export async function editpassword(data?:any) :Promise<any> {
console.log(data,111)
const newdata={
memberid:0,
password:"",
topassword:""
}
newdata.memberid=store.state.userinfo.memberid
newdata.memberid=data.memberid
newdata.password=data.password
newdata.topassword=data.topassword
newdata.topassword=data.repassword
console.log(newdata)
const res = await post<Liveaddrule>('resetPassword',newdata)
if(res.code==0){
message.success("修改成功")
}
return res
}
/**
@@ -533,6 +535,47 @@ export async function addcomment(data?:any):Promise<void> {
}
return res
}
/**
* 验证用户是否存在
*/
interface CheckuserRule{
memberid: number,
name: string,
mobile: string,
email: string,
code:string
}
interface CheckData{
data: {
memberid: any,
name: string,
mobile: string,
email: string,
code:string
},
code: number;
msg: string;
}
export async function checkuser(data?:any){
const newdata={number:""}
newdata.number=data.phone
const res = await get<CheckuserRule>('checkUser',newdata);
// console.log(res)
return {
code :res.code,
msg:res.msg,
data:{
memberid:res.data.memberid,
name: res.data.name,
mobile: res.data.mobile,
email: res.data.email,
code:res.data.code
}
}
}
/**
* 发送验证码
* @param phone 手机号