12345678910111213141516171819202122 |
- import Vue from 'vue'
- import Vuex from 'vuex'
- Vue.use(Vuex)
- //实例store对象
- const store = new Vuex.Store({
- state: {
- access_token:"",
- jpush:null
- },
- mutations: {
- setToken(state,token){
- state.access_token=token;
- },
- initJpush(state,jpush){
- state.jpush=jpush;
- }
- }
- })
- //导出store对象
- export default store
|