an_xiao/police_uniapp/store/modules/user.js

33 lines
655 B
JavaScript
Raw Permalink Normal View History

2024-07-25 16:03:08 +08:00
export default {
namespaced: true,
state: {
// 用户信息
userInformation: {},
schoolInformation:{}
},
mutations: {
// 用户信息
updateList(state, data) {
state.userInformation = data;
},
// 学校信息
schoolList(state,data){
state.schoolInformation = data
},
// 清空用户信息
clearuserInforma(state){
state.userInformation = {}
state.schoolInformation = {}
},
// 修改学校名称
editstation(state,data){
state.userInformation.station = data
}
},
actions: {
},
getters: {
getLoginInfo: state => state.userInformation,
getschoolList:state=>state.schoolInformation,
},
};