import urlAlias from '../url'; import request from '../request'; const { recommandList } = urlAlias; const state = { recommandList: [], }; const mutations = { INIT: (state, list) => { state.recommandList = list; }, }; const actions = { getRecommandList({ commit }, param) { request({ url: recommandList, success: (res) => { console.log(res.data) commit('INIT', res.data.data) }, fail: (res) => { console.log("fail status === > ", res); }, complete: (res) => { console.log("complete status === > ", res); }, }) }, }; export default { namespaced: true, state, mutations, actions, };