Browse Source

Signed-off-by: liuboyan <632697560@qq.com>
bug

liuboyan 3 years ago
parent
commit
f51117db6b
3 changed files with 8 additions and 12 deletions
  1. 7 7
      src/utils/store.js
  2. 1 4
      src/views/Index.vue
  3. 0 1
      src/views/maintain/index.vue

+ 7 - 7
src/utils/store.js

@@ -16,7 +16,7 @@ export const setStore = (params) => {
     datetime: new Date().getTime()
   }
   if (type) window.sessionStorage.setItem(name, JSON.stringify(obj))
-  else window.localStorage.setItem(name, JSON.stringify(obj))
+  else window.sessionStorage.setItem(name, JSON.stringify(obj))
 }
 
 /**
@@ -30,11 +30,11 @@ export const getStore = (params) => {
   } = params
   let obj = {}
   let content = null
-  obj = window.localStorage.getItem(name)
+  obj = window.sessionStorage.getItem(name)
   if (validatenull(obj)) obj = window.sessionStorage.getItem(name)
   if (validatenull(obj)) return
   if (type) obj = window.sessionStorage.getItem(name)
-  else obj = window.localStorage.getItem(name)
+  else obj = window.sessionStorage.getItem(name)
   obj = JSON.parse(obj)
   if (debug) {
     return obj
@@ -61,7 +61,7 @@ export const removeStore = params => {
   let {
     name
   } = params
-  window.localStorage.removeItem(name)
+  window.sessionStorage.removeItem(name)
   window.sessionStorage.removeItem(name)
 }
 
@@ -84,9 +84,9 @@ export const getAllStore = (params) => {
       })
     } else {
       list.push(getStore({
-        name: window.localStorage.key(i),
+        name: window.sessionStorage.key(i),
         content: getStore({
-          name: window.localStorage.key(i)
+          name: window.sessionStorage.key(i)
         })
       }))
     }
@@ -105,5 +105,5 @@ export const clearStore = (params) => {
     window.sessionStorage.clear()
     return
   }
-  window.localStorage.clear()
+  window.sessionStorage.clear()
 }

+ 1 - 4
src/views/Index.vue

@@ -1,10 +1,7 @@
 <template>
   <div class="index">
-    1
     <Layout style="height: 100%;background-color: transparent">
-      2
       <Content class="content">
-        3
         <router-view></router-view>
       </Content>
     </Layout>
@@ -48,7 +45,7 @@ export default {
     height: 100%;
     position: relative;
     overflow: hidden;
-    // background-image: url('~@/assets/images/index_bg.png');
+    background-image: url('~@/assets/images/index_bg.png');
     background-size: 100% 100%;
     background-position: center;
     .content{

+ 0 - 1
src/views/maintain/index.vue

@@ -1,6 +1,5 @@
 <template>
   <div class="container">
-    4
     <div class="container-title" :style="{fontSize: resizeWidth * 0.01875 + 'px'}">{{common.pageTitle}}</div>
     <div class="index-logo" :style="{width: resizeWidth * 0.305 + 'px', height: resizeWidth * 0.283 + 'px'}"></div>
     <div class="index-icon sqp-icon" :style="{width: resizeWidth * 0.138 + 'px', height: resizeWidth * 0.096 + 'px',