cloudCenter.js 659 B

123456789101112131415161718192021222324252627282930313233
  1. export const state = () => ({
  2. apple: {
  3. data: {},
  4. fetching: false
  5. },
  6. member: {
  7. data: {},
  8. fetching: false
  9. }
  10. })
  11. export const mutations = {
  12. REQUEST_APPLY (state) {
  13. state.apple.fetching = true
  14. },
  15. REQUEST_APPLY_SUCCESS (state, result) {
  16. state.apple.fetching = false
  17. state.apple.data = result
  18. },
  19. REQUEST_APPLY_FAILURE (state) {
  20. state.apple.fetching = false
  21. },
  22. REQUEST_MEMBER (state) {
  23. state.member.fetching = true
  24. },
  25. REQUEST_MEMBER_SUCCESS (state, result) {
  26. state.member.data = result
  27. state.member.fetching = false
  28. },
  29. REQUEST_MEMBER_FAILURE (state) {
  30. state.member.fetching = false
  31. }
  32. }