user.js 392 B

12345678910111213141516171819202122
  1. export const state = {
  2. //用户数据
  3. userInfo: {
  4. phone: '',
  5. name: ''
  6. },
  7. };
  8. export const mutations = {
  9. //储存用户信息
  10. setUserInfo(state, data) {
  11. if (data) {
  12. state.userInfo = Object.assign({}, state.userInfo,data);
  13. }
  14. },
  15. emptyUserInfo(state) {
  16. state.userInfo = {};
  17. },
  18. // 退出A
  19. };
  20. export const actions = {
  21. };