猎豆优选小程序

index.js 281B

1234567891011121314151617181920
  1. import Vue from 'vue'
  2. import Vuex from 'vuex'
  3. Vue.use(Vuex)
  4. const store = new Vuex.Store({
  5. state: {
  6. isLogin: false, // 是否已登录
  7. },
  8. mutations: {
  9. setIsLogin(state, isLogin) {
  10. state.isLogin = isLogin
  11. },
  12. },
  13. actions: {},
  14. getters: {},
  15. })
  16. export default store