const user = { state: { driver: { phone: '', headPortrait: '' }, baseDriver: { phone: '' }, wsAccount: '', temp: [], bMsgList: [], sMsgList: [], msgKind: true }, mutations: { SET_DRIVER: (state, driver) => { state.driver = driver }, SET_HEAD: (state, headPortrait) => { state.driver.headPortrait = headPortrait }, SET_BASEDRIVER: (state, baseDriver) => { state.baseDriver = baseDriver }, SET_CAR: (state, car) => { state.car = car }, SET_BMSGLIST: (state, bMsgList) => { state.bMsgList = bMsgList }, SET_SMSGLIST: (state, sMsgList) => { state.sMsgList = sMsgList }, SET_MSG: (state, msgKind) => { state.msgKind = msgKind }, SET_WSACCOUNT: (state, wsAccount) => { state.wsAccount = wsAccount }, SET_TEMP: (state, temp) => { state.temp = temp }, SET_ALLSTATE: () => { state = {} } } } export default user