index.js 444 B

12345678910111213141516171819202122232425262728
  1. import Vue from 'vue'
  2. import Vuex from 'vuex'
  3. Vue.use(Vuex)
  4. const store = new Vuex.Store({
  5. state: {
  6. couponstate:true,
  7. },
  8. getters:{
  9. getcouponstate(state){
  10. return state.couponstate
  11. },
  12. },
  13. mutations: {
  14. mutationscouponstate(state,data){
  15. state.couponstate=data
  16. },
  17. },
  18. actions: {
  19. actionscouponstate(context,playload){
  20. context.commit('mutationscouponstate',playload)
  21. },
  22. }
  23. })
  24. export default store