Pārlūkot izejas kodu

优化页面偶尔报错

tl 5 mēneši atpakaļ
vecāks
revīzija
4ffdf52f9c
1 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. 3 3
      cpp-ui/src/views/cloudDataQuery/index.vue

+ 3 - 3
cpp-ui/src/views/cloudDataQuery/index.vue

@@ -815,11 +815,11 @@ export default {
         this.stationList = response.data
         if (this.stationList.length > 0) {
           // 判断缓存中是否是首页地图跳转
-          if (localStorage.getItem('map-jump-staion')==''){
-            this.stationCode = this.stationList[0].value
+          if (localStorage.getItem('map-jump-staion')){
+            this.stationCode = localStorage.getItem('map-jump-staion')
           }
           else{
-            this.stationCode = localStorage.getItem('map-jump-staion')
+            this.stationCode = this.stationList[0].value
           }
           this.dataQuery()
         }