From 2bb0e066fdc522beb51dd13f6a72cd67bd5d6a58 Mon Sep 17 00:00:00 2001
From: “dzb” <2632970487@qq.com>
Date: 星期日, 09 十月 2022 18:06:46 +0800
Subject: [PATCH] 修改bug,店铺管理新增、查询
---
src/views/login/index.vue | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index a13548a..3418821 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -94,9 +94,16 @@
};
},
created() {
- const pic = JSON.parse(localStorage.getItem('pic'));
+ 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: {
@@ -118,17 +125,23 @@
})
.then(function (response) {
if (response.code === 200) {
+ // 璁剧疆toke鏃堕棿
// 淇濆瓨token
console.log(response);
sessionStorage.setItem('token',response.data.token);
// 淇濆瓨token
- sessionStorage.setItem('tokenHead',response.data.tokenHead)
+ sessionStorage.setItem('tokenHead',response.data.tokenHead);
+ // 淇濆瓨鐢ㄦ埛鐧诲綍鍚�
+ sessionStorage.setItem('name',username);
// 璺宠浆鍒伴椤�
that.$router.push("/home");
}else{
that.$refs.loginForm.validate((valid)=>{
if(valid){
- that.$message.error(response.data.message);
+ that.$message({
+ type:'warning',
+ message:response.message
+ })
}
})
}
@@ -176,6 +189,7 @@
.logo>img {
width: 75px;
height: 75px;
+ border-radius: 4px;
}
.text-r {
--
Gitblit v1.8.0