// 异步方法 import { servers } from '../js/server'; import { API } from '../js/api'; export default { getBrandInfo({commit, state}){ return servers.get({ url: API.calc, data: {}, failMsg: '加载数据失败!' }) .then(res=>{ commit('setBrandInfo',res); return res; }) } }