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