From 703c2e292a812f80d9a1a7551c18c2cf457f58ba Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期三, 31 八月 2022 18:07:53 +0800
Subject: [PATCH] 云端录像详情页添加返回按钮

---
 web_src/src/components/Login.vue |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/web_src/src/components/Login.vue b/web_src/src/components/Login.vue
index 4ebc6d1..37c8a83 100644
--- a/web_src/src/components/Login.vue
+++ b/web_src/src/components/Login.vue
@@ -66,10 +66,6 @@
 
   	//鐧诲綍璇锋眰
   	toLogin(){
-
-  		//涓�鑸璺熷悗绔簡瑙e瘑鐮佺殑鍔犲瘑瑙勫垯
-  		//杩欓噷渚嬪瓙鐢ㄧ殑鍝堝笇绠楁硶鏉ヨ嚜./js/sha1.min.js
-
   		//闇�瑕佹兂鍚庣鍙戦�佺殑鐧诲綍鍙傛暟
   		let loginParam = {
   			username: this.username,
@@ -78,12 +74,17 @@
       var that = this;
       //璁剧疆鍦ㄧ櫥褰曠姸鎬�
       this.isLoging = true;
+      let timeoutTask = setTimeout(()=>{
+        that.$message.error("鐧诲綍瓒呮椂");
+        that.isLoging = false;
+      }, 1000)
 
       this.$axios({
       	method: 'get',
         url:"/api/user/login",
         params: loginParam
       }).then(function (res) {
+        window.clearTimeout(timeoutTask)
         console.log(JSON.stringify(res));
           if (res.data.code === 0 ) {
             that.$cookies.set("session", {"username": that.username,"roleId":res.data.data.role.id}) ;
@@ -99,6 +100,8 @@
               });
           }
       }).catch(function (error) {
+        console.log(error)
+        window.clearTimeout(timeoutTask)
         that.$message.error(error.response.data.msg);
         that.isLoging = false;
       });

--
Gitblit v1.8.0