12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- import Vue from 'vue'
- import Vuex from 'vuex'
- Vue.use(Vuex)
- const store = new Vuex.Store({
- /* 状态对象 */
- state:{
- isLogin:false,
- user:{}, //用户信息
- token:{}, //令牌
- name:"", //姓名
- avatar:"", //头像
- roles:[], //角色
- introduction:"" , //用户信息
- departmentName:"", //部门名称
- departmentCode:"", //部门编码
- stationCode:"", //岗位编码
- stationName:"" , //岗位名称
- projectCode:"" //项目代码
- },
- mutations: {
-
- setIsLogin(state,isLogin){
- state.isLogin=isLogin;
- },
- setUser(state,user){
- state.user=user;
- },
- setToken(state,token){
- state.token=token;
- },
- setName(state,name){
- state.name=name;
- },
- setAvatar(state,avatar){
- state.avatar=avatar;
- },
- setRoles(state,roles){
- state.roles=roles;
- },
- setIntroduction(state,introduction){
- state.introduction=introduction;
- },
- setDepartmentCode(state,departmentCode){
- state.departmentCode=departmentCode;
- },
- setDepartmentName(state,departmentName){
- state.departmentName=departmentName;
- },
- setStationCode(state,stationCode){
- state.stationCode=stationCode;
- },
- setStationName(state,stationName){
- state.stationName=stationName;
- },
- setProjectCode(state,projectCode){
- state.projectCode=projectCode;
- }
- },
- getters:{
-
- },
- actions: {
- // lazy loading openid
-
- }
- })
- export default store
|