floor.js 974 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. export const state = () => ({
  2. list: {
  3. fetching: false,
  4. data: []
  5. },
  6. list_v3: {
  7. fetching: false,
  8. data: []
  9. },
  10. list_expand: {
  11. fetching: false,
  12. data: []
  13. }
  14. })
  15. export const mutations = {
  16. REQUEST_LIST (state) {
  17. state.list.fetching = true
  18. },
  19. GET_LIST_FAILURE (state) {
  20. state.list.fetching = false
  21. },
  22. GET_LIST_SUCCESS (state, result) {
  23. state.list.fetching = false
  24. state.list.data = result
  25. },
  26. REQUEST_NEWLIST (state) {
  27. state.list_v3.fetching = true
  28. },
  29. GET_NEWLIST_FAILURE (state) {
  30. state.list_v3.fetching = false
  31. },
  32. GET_NEWLIST_SUCCESS (state, result) {
  33. state.list_v3.fetching = false
  34. state.list_v3.data = result
  35. },
  36. REQUEST_EXPANDLIST (state) {
  37. state.list_expand.fetching = true
  38. },
  39. GET_EXPANDLIST_FAILURE (state) {
  40. state.list_expand.fetching = false
  41. },
  42. GET_EXPANDLIST_SUCCESS (state, result) {
  43. state.list_expand.fetching = false
  44. state.list_expand.data = result
  45. }
  46. }