/** * Created by c.y on 2018/3/20 * Action 类似于 mutation,不同在于: * 1. Action 提交的是 mutation,而不是直接变更状态。 * 2. Action 可以包含任意异步操作 * 具体的配置可见 https://vuex.vuejs.org/zh-cn/actions.html */ // import { // UPDATE_COUNTS // } from './mutation-types'; // // const getUser = () => fetch('/v1/user', {user_id: getStore('user_id')}); // // export default { // // 更新counts // async getUserInfo({commit, state}) { // let res = await getUser(); // commit(UPDATE_COUNTS, res) // }, // };