diff --git a/src/store/index.js b/src/store/index.js index 42ff552..78722ce 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -6,7 +6,9 @@ Vue.use(Vuex); export default new Vuex.Store({ state: { //异常状态(默认没有异常,store中不保存异常信息,自己去查询异常) - loginState: false + loginState: false, + //设备类型 1.SU,2MU + deviceType : 1 }, //变异,改变state状态信息,同步 mutations: { @@ -25,6 +27,15 @@ export default new Vuex.Store({ */ logoutSys(state) { state.loginState = false; + }, + + /** + * 设置设备类别 + * @param {Object} state + * @param {Object} deviceType 板子返回的设备类别 + */ + setDeviceType(state,deviceType){ + state.deviceType = deviceType; } }, diff --git a/src/views/Index.vue b/src/views/Index.vue index 346d9dd..553015c 100644 --- a/src/views/Index.vue +++ b/src/views/Index.vue @@ -26,7 +26,7 @@
-