Merge pull request '改为判断data' (#140) from xbx into master

Reviewed-on: http://git.luyuan.tk/luyuan/beelink/pulls/140
This commit is contained in:
luyuan 2020-11-20 14:16:59 +08:00
commit 05194578c1
3 changed files with 10 additions and 16 deletions

View File

@ -608,22 +608,16 @@ export async function checkuser(data?: any){
newdata.number=data.phone newdata.number=data.phone
const res = await get<CheckuserRule>('checkUser',newdata); const res = await get<CheckuserRule>('checkUser',newdata);
// console.log(res) // console.log(res)
if(res.code == 1){ // if(res.code == 1){
return { // return {
code: res.code, // code: res.code,
msg: res.msg, // msg: res.msg,
} // }
} // }
return { return {
code: res.code, code: res.code,
msg: res.msg, msg: res.msg,
data: { data: res.data
memberid: res.data.memberid,
name: res.data.name,
mobile: res.data.mobile,
email: res.data.email,
code: res.data.code
}
} }
} }

View File

@ -171,8 +171,8 @@ export default defineComponent({
if(e==2){ if(e==2){
console.log(uinfo) console.log(uinfo)
const res: any = await checkuser(toRaw(uinfo.value)) const res: any = await checkuser(toRaw(uinfo.value))
console.log(res.data.memberid) // console.log(res.data)
if(res.code==0){ if(res.data){
// stepnow.value = e; // stepnow.value = e;
uinfo.value.quhao = res.data.code.toString() uinfo.value.quhao = res.data.code.toString()
uinfo.value.memberid=res.data.memberid uinfo.value.memberid=res.data.memberid

View File

@ -293,7 +293,7 @@ export default defineComponent({
return; return;
} }
const iszc = await checkuser({phone: phone.value.phone}) const iszc = await checkuser({phone: phone.value.phone})
if(iszc.code == 0){ if(iszc.data){
message.error(lan.$t('zhanghaocunzai')) message.error(lan.$t('zhanghaocunzai'))
return ; return ;
} }