refactor: 重构异常处理

This commit is contained in:
橙子
2023-03-19 23:44:38 +08:00
parent 7b01d4722f
commit f4cdeb3dc5
9 changed files with 23 additions and 11 deletions

View File

@@ -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>