business.ts 947 B

12345678910111213141516171819202122232425262728293031323334353637
  1. const business: any = {
  2. state: {
  3. certificationInfo: {}, //资质认证表单数据
  4. releaseFormData: {},//服务发布表单数据
  5. },
  6. mutations: {
  7. SET_CERTIFICATIONINFO: (state, data) => {
  8. console.log('存储志愿者注册数据', data);
  9. state.certificationInfo = data
  10. },
  11. SET_RELEASEFORM: (state, data) => {
  12. console.log('存储发布表单数据', data);
  13. state.releaseFormData = data
  14. },
  15. },
  16. actions: {
  17. handlerCertificationInfo({ commit, state }, data) {
  18. commit('SET_CERTIFICATIONINFO', data)
  19. },
  20. clearCertificationInfo({ commit, state }, data) {
  21. console.log('清空存储的信息');
  22. commit('SET_CERTIFICATIONINFO', {})
  23. },
  24. handlerReleaseFormData({ commit, state }, data) {
  25. commit('SET_RELEASEFORM', data)
  26. },
  27. clearReleaseFormData({ commit, state }, data) {
  28. commit('SET_RELEASEFORM', {})
  29. },
  30. }
  31. }
  32. export default business