app.js 387 B

12345678910111213141516171819202122
  1. const state = {
  2. courseId: '',
  3. testId: '',
  4. shareCourseId: ''
  5. }
  6. const mutations = {
  7. SET_COURSEID: (state, courseId) => {
  8. state.courseId = courseId
  9. },
  10. SET_TESTID: (state, courseId) => {
  11. state.testId = courseId
  12. },
  13. SET_SHARECOURSEID: (state, courseId) => {
  14. state.shareCourseId = courseId
  15. }
  16. }
  17. const actions = {}
  18. export default {
  19. state,
  20. mutations,
  21. actions
  22. }