cart.js 557 B

123456789101112131415161718192021222324252627282930313233
  1. const state = {
  2. reportAndError: {
  3. boolean: false,
  4. content: '网络开了会儿小差, 请刷新重试下哦~',
  5. },
  6. };
  7. const getters = {
  8. reportAndErrorObj(state) {
  9. return state.reportAndError;
  10. }
  11. };
  12. const mutations = {
  13. reportAndErrorObj(state, data) {
  14. state.reportAndError = data;
  15. },
  16. };
  17. const actions = {
  18. reportAndErrorObj(content, data) {
  19. content.commit('reportAndErrorObj', data);
  20. },
  21. };
  22. export default {
  23. namespaced:true,
  24. state,
  25. getters,
  26. mutations,
  27. actions,
  28. }