store---index.js
2021-03-15 11:28
标签:utils -- dex tor rom success lib response default store---index.js 标签:utils -- dex tor rom success lib response default 原文地址:https://www.cnblogs.com/zhaofeis/p/12797962.htmlimport Vue from ‘vue‘
import Vuex from ‘vuex‘
import Api from ‘../lib/api/api‘
import Utils from ‘../lib/utils/utils‘
Vue.use(Vuex);
let store = new Vuex.Store({
state: {
platformName: ‘‘
},
mutations: {
// 网站基本信息
baseConfig(state, data) {
state.baseConfig = data;
},
},
actions: {
// 网站基本信息
baseConfig({state, commit }) {
// Api.baseConfig().then( response => {
// if (response[‘success‘]) {
// commit(‘baseConfig‘, response.data);
// }
// })
},
}
});
export default store;