refactor: 重构异常处理
This commit is contained in:
@@ -26,10 +26,15 @@ const guestlogin=async ()=>{
|
||||
}
|
||||
const login=async ()=>{
|
||||
const response= await userStore.login(loginForm);
|
||||
if( response.code==undefined)
|
||||
console.log(response);
|
||||
if( response.status==200)
|
||||
{
|
||||
router.push("/index")
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("登录失败")
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user