From 15079a363658567a62db46ccfe489f04af79a687 Mon Sep 17 00:00:00 2001 From: “dzb” <2632970487@qq.com> Date: 星期三, 28 九月 2022 18:41:45 +0800 Subject: [PATCH] 运营管理的基础设置和案件池首页 --- src/views/login/index.vue | 23 ++++++++++++++++++----- 1 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index d33b057..bfd8c3e 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -4,7 +4,7 @@ <div class="text"> <div class="logo"> <img - src="https://axure-file.lanhuapp.com/90466432-c999-4bf0-80b8-ee3f96a2099e__155eeb2ceaac89ec717869a050964a36.svg" + :src="imgUrl" alt=""> </div> <div class="text-r"> @@ -80,6 +80,7 @@ // username: "admin", // password: "macro123", }, + imgUrl:'', loginRules: { username: [ { required: true, trigger: "blur", validator: validateUsername }, @@ -92,7 +93,19 @@ pwdType: false, }; }, - created() { }, + created() { + const pic = JSON.parse(sessionStorage.getItem('pic')); + if(pic){ + this.imgUrl = pic.loginPageIconUrl + }else{ + this.$axios({ + method: 'get', + url: 'sccg/system/portal/logo/search', + }).then(res => { + this.imgUrl = res.data.loginPageIconUrl + }) + } + }, methods: { showPwd() { if (!this.pwdType) { @@ -103,7 +116,6 @@ }, ...mapActions(["login"]), handleLogin() { - console.log("in login"); const { username, password } = this.loginForm; const that = this; this.$axios @@ -115,9 +127,9 @@ if (response.code === 200) { // 淇濆瓨token console.log(response); - localStorage.setItem('token',response.data.token); + sessionStorage.setItem('token',response.data.token); // 淇濆瓨token - localStorage.setItem('tokenHead',response.data.tokenHead) + sessionStorage.setItem('tokenHead',response.data.tokenHead) // 璺宠浆鍒伴椤� that.$router.push("/home"); }else{ @@ -171,6 +183,7 @@ .logo>img { width: 75px; height: 75px; + border-radius: 4px; } .text-r { -- Gitblit v1.8.0