diff --git a/src/App.vue b/src/App.vue index ebbd6b0..7295af1 100644 --- a/src/App.vue +++ b/src/App.vue @@ -10,14 +10,14 @@ export default { name: 'App', created () { - //在页面加载时读取sessionStorage里的状态信息 - if (util.session.get(Setting.storeKey) ) { - this.$store.replaceState(Object.assign({}, this.$store.state,JSON.parse(util.session.get(Setting.storeKey)))) + //在页面加载时读取localStorage里的状态信息 + if (util.local.get(Setting.storeKey) ) { + this.$store.replaceState(Object.assign({}, this.$store.state,util.local.get(Setting.storeKey))) } - //在页面刷新时将vuex里的信息保存到sessionStorage里 + //在页面刷新时将vuex里的信息保存到localStorage里 window.addEventListener("beforeunload",()=>{ - util.session.get(Setting.usernameKey) && util.session.set(Setting.storeKey,JSON.stringify(this.$store.state)) + util.local.get(Setting.usernameKey) && util.local.set(Setting.storeKey,this.$store.state) }) } } diff --git a/src/api/index.js b/src/api/index.js index 1776a22..f69c827 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -2,9 +2,8 @@ import Setting from '@/setting' let uploadURL = Setting.upload.apiURL export default { - // 登录注册 - logins: `management/userInfo/login`, - save: `management/userInfo/add`, + // 登录注册 + logins: `liuwanr/userInfo/adminLogins`, uploadUserAvatars: `liuwanr/userInfo/uploadUserAvatars`, queryProvince: `liuwanr/province/queryProvince`, diff --git a/src/assets/img/remove-gray.png b/src/assets/img/remove-gray.png new file mode 100644 index 0000000..f8bf9f4 Binary files /dev/null and b/src/assets/img/remove-gray.png differ diff --git a/src/assets/img/search-gray.png b/src/assets/img/search-gray.png new file mode 100644 index 0000000..2f327fa Binary files /dev/null and b/src/assets/img/search-gray.png differ diff --git a/src/layouts/header/index.vue b/src/layouts/header/index.vue index e1a3844..74e5da2 100644 --- a/src/layouts/header/index.vue +++ b/src/layouts/header/index.vue @@ -1,9 +1,11 @@