From 9e09755ef054d6455e94ed4a68d60f231d8e944a Mon Sep 17 00:00:00 2001 From: panlinlin <648540858@qq.com> Date: 星期三, 13 一月 2021 17:56:01 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' into wvp-28181-2.0 --- web_src/src/components/Login.vue | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/web_src/src/components/Login.vue b/web_src/src/components/Login.vue index f047c5d..acf286e 100644 --- a/web_src/src/components/Login.vue +++ b/web_src/src/components/Login.vue @@ -18,7 +18,6 @@ </template> <script> -import crypto from 'crypto' export default { name: 'Login', data(){ @@ -56,13 +55,13 @@ //闇�瑕佹兂鍚庣鍙戦�佺殑鐧诲綍鍙傛暟 let loginParam = { username: this.username, - password: crypto.createHash('md5').update(this.password, "utf8").digest('hex') + password: this.$md5(this.password) } var that = this; //璁剧疆鍦ㄧ櫥褰曠姸鎬� this.isLoging = true; - this.$axios.get("/auth/login",{ + this.$axios.get("/api/user/login",{ params: loginParam } ) .then(function (res) { @@ -71,6 +70,13 @@ that.$cookies.set("session", {"username": that.username}) ; //鐧诲綍鎴愬姛鍚� that.$router.push('/'); + }else{ + that.isLoging = false; + that.$message({ + showClose: true, + message: '鐧诲綍澶辫触锛岀敤鎴峰悕鎴栧瘑鐮侀敊璇�', + type: 'error' + }); } }) .catch(function (error) { -- Gitblit v1.8.0