소스 검색

fix: 登录页面用户账户信息输入错误弹出toast信息提示用户

sequoia tungfang 2 일 전
부모
커밋
a838c5b6d1
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      src/views/Login.vue

+ 4 - 4
src/views/Login.vue

@@ -66,6 +66,7 @@
 <script>
 import CaptchaCanvas from "@/components/CaptchaCanvas.vue";
 import { mockLogin } from "@/mock/api";
+import Toast from "@/plugins/toast";
 
 export default {
   // eslint-disable-next-line vue/multi-word-component-names
@@ -114,10 +115,9 @@ export default {
         captcha: this.captchaInput
       });
 
-      if (!res.ok) {
-        this.hint = res.message;
-        return;
-      }
+      if (!res.ok) return window.$toast.error(res.message);
+      
+      console.log('123131');
       this.doorNavigated = false;
       this.isDoorOpening = false;
       this.$nextTick(() => {