|
@@ -4,7 +4,8 @@ import user from "./modules/user";
|
|
import routes from "./modules/router";
|
|
import routes from "./modules/router";
|
|
import getters from "./getters";
|
|
import getters from "./getters";
|
|
const debug = process.env.NODE_ENV !== "production";
|
|
const debug = process.env.NODE_ENV !== "production";
|
|
-
|
|
|
|
|
|
+import { getCookie, setCookie } from "@/utills/auth"; // getToken from cookie
|
|
|
|
+import { get } from "jquery";
|
|
// 默认状态
|
|
// 默认状态
|
|
const state = {
|
|
const state = {
|
|
websocketTimeSec: 1000,
|
|
websocketTimeSec: 1000,
|
|
@@ -20,8 +21,8 @@ const state = {
|
|
cftList: localStorage.getItem("cftList")
|
|
cftList: localStorage.getItem("cftList")
|
|
? JSON.parse(localStorage.getItem("cftList"))
|
|
? JSON.parse(localStorage.getItem("cftList"))
|
|
: [],
|
|
: [],
|
|
- stationListAll: localStorage.getItem("stationListAll")
|
|
|
|
- ? JSON.parse(localStorage.getItem("stationListAll"))
|
|
|
|
|
|
+ stationListAll: getCookie("stationListAll")
|
|
|
|
+ ? JSON.parse(getCookie("stationListAll"))
|
|
: [],
|
|
: [],
|
|
boosterAlarm: JSON.parse(localStorage.getItem("boosterAlarm")) || 0,
|
|
boosterAlarm: JSON.parse(localStorage.getItem("boosterAlarm")) || 0,
|
|
drawer: JSON.parse(localStorage.getItem("drawer")) || false,
|
|
drawer: JSON.parse(localStorage.getItem("drawer")) || false,
|
|
@@ -60,7 +61,7 @@ const mutations = {
|
|
},
|
|
},
|
|
changeStationAll(state, data) {
|
|
changeStationAll(state, data) {
|
|
state.stationListAll = data;
|
|
state.stationListAll = data;
|
|
- localStorage.setItem("stationListAll", JSON.stringify(data));
|
|
|
|
|
|
+ setCookie("stationListAll", JSON.stringify(data));
|
|
},
|
|
},
|
|
changeBoosterAlarm(state, data) {
|
|
changeBoosterAlarm(state, data) {
|
|
state.boosterAlarm = data;
|
|
state.boosterAlarm = data;
|