zhaozhipeng 4 ani în urmă
părinte
comite
e43cce72d1
3 a modificat fișierele cu 9 adăugiri și 11 ștergeri
  1. 2 2
      src/main.js
  2. 6 4
      src/views/index.vue
  3. 1 5
      src/views/info.vue

+ 2 - 2
src/main.js

@@ -12,7 +12,7 @@ import store from './vuex/store';
 // 引入icon
 // import './assets/icon/iconfont.css'
 
-import touch from 'vue-directive-touch';
+// import touch from 'vue-directive-touch';
 
 import axios from 'axios';
 Vue.prototype.$axios = axios;
@@ -22,7 +22,7 @@ Vue.config.productionTip = false;
 // 文件上传域名
 // Vue.prototype.$imgUrl = "http://blue.cn1.utools.club/api1/file/uploadOne
 Vue.use(ElementUI);
-Vue.use(touch);
+// Vue.use(touch);
 // 创建loading
 Vue.prototype.openLoading = function() {
   const loading = this.$loading({           // 声明一个loading对象

+ 6 - 4
src/views/index.vue

@@ -120,8 +120,9 @@
       }
     },
     created() {
-      let data = getStore({'name': 'info', 'type': 1, 'debug': ''})
-      if(data != undefined){
+      // let data = getStore({'name': 'info', 'type': 1, 'debug': ''})
+      let data = JSON.parse(sessionStorage.getItem("info"))
+      if(data){
         selectTaskManagerList(data).then(res=> {
            this.leftList = res.data.slice(0,4)
         })
@@ -180,7 +181,7 @@
       },
       currentTime() {
         setInterval(this.formatDate, 1000);
-        setInterval(this.onload_page, 30000);
+        setInterval(this.onload_page, 180000);
       },
       onload_page() {
          if(this.stationName) {
@@ -270,7 +271,8 @@
         this.select_template_info_list(data)
         data['areaName'] = this.areaName
         data['stationName'] = this.stationName
-        setStore({'name':'info', 'content': data, 'type':1})
+        // setStore({'name':'info', 'content': data, 'type':1})
+        sessionStorage.setItem('info',  JSON.stringify(data))
         this.dialogVisible = false
       },
       async select_template_info_list(data) {

+ 1 - 5
src/views/info.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="main" v-touch:right="back_last_path">
+  <div id="main">
     <div class="title">
       <div>{{ mainTitle }}</div>
       <div style="width:1.5rem;height:1.5rem;margin-left: 0.625rem;cursor: pointer;" @click="back"><img src="../assets/img/tuichu.png"></div>
@@ -159,10 +159,6 @@
       },
       back() {
         this.$router.back()
-      },
-      back_last_path() {
-        console.log();
-        this.$router.back()
       }
      },
     filters: {