From 3f9b4e2d3ed48f3729b407a47eebda62455adf16 Mon Sep 17 00:00:00 2001 From: fanluyan <754122931@qq.com> Date: Tue, 23 May 2023 20:55:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=98=E5=88=B6=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Login.vue | 32 +++++++++---------- .../components/pictureTags.vue | 6 ++-- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/views/Login.vue b/src/views/Login.vue index a8408bb..8bdbfca 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -99,22 +99,22 @@ export default { this.$refs.loginForm.validate((valid) => { if (valid) { // this.userInfo.password = this.$md5(this.userInfo.password); //密码加密 - this.$store.commit("SET_TOKEN", "asdadadadadsadas"); //将token保存在vuex中 - this.$store.commit("SET_USERINFO", "xytest"); //将用户信息保存在vuex中 - this.$router.push("/realTimeMonitor"); - this.$message.success("登录成功"); - // loginJoggle(this.userInfo) - // .then((res) => { - // if (res.code == 200) { - // this.$store.commit("SET_TOKEN", res.data.sessionId); //将token保存在vuex中 - // this.$store.commit("SET_USERINFO", res.data); //将用户信息保存在vuex中 - // this.$router.push("/realTimeMonitor"); - // this.$message.success("登录成功"); - // } else { - // this.$message.error(res.msg); - // } - // }) - // .catch((err) => {}); + // this.$store.commit("SET_TOKEN", "asdadadadadsadas"); //将token保存在vuex中 + // this.$store.commit("SET_USERINFO", "xytest"); //将用户信息保存在vuex中 + // this.$router.push("/realTimeMonitor"); + // this.$message.success("登录成功"); + loginJoggle(this.userInfo) + .then((res) => { + if (res.code == 200) { + this.$store.commit("SET_TOKEN", res.data.sessionId); //将token保存在vuex中 + this.$store.commit("SET_USERINFO", res.data); //将用户信息保存在vuex中 + this.$router.push("/realTimeMonitor"); + this.$message.success("登录成功"); + } else { + this.$message.error(res.msg); + } + }) + .catch((err) => {}); } else { this.$message.error("请输入账号和密码"); console.log("error submit!!"); diff --git a/src/views/management/monitoringEquipment/photographicDevice/components/pictureTags.vue b/src/views/management/monitoringEquipment/photographicDevice/components/pictureTags.vue index 84f4bc8..eb1fea1 100644 --- a/src/views/management/monitoringEquipment/photographicDevice/components/pictureTags.vue +++ b/src/views/management/monitoringEquipment/photographicDevice/components/pictureTags.vue @@ -172,7 +172,7 @@ export default { }, mousedown(e) { - console.log("鼠标落下"); + //console.log("鼠标落下"); this.saveDrawingSurface(); this.flag = true; this.x = e.offsetX; // 鼠标落下时的X @@ -181,7 +181,7 @@ export default { console.log(this.flag); }, mouseup(e) { - console.log("鼠标抬起"); + //console.log("鼠标抬起"); console.log( this.x / this.imgpic.width, this.y / this.imgpic.height, @@ -214,7 +214,7 @@ export default { }, mousemove(e) { - console.log("鼠标移动"); + //console.log("鼠标移动"); if (this.flag) { this.restoreDrawingSurface(); this.drawRect(e);