vuex中action如何互相调用
homeInit({dispatch,commit,state}){//初始化
return new Promise(resolve=>{
dispatch("apiGetHuiYiId").then(function(data){
console.log()
if(!tools.isPC()&&data.huiyi_id=="140abcfa261011eab9780242ac170002"){
window.location.href="http://onlinesys02.hoohui.cn/cms/app/2/index.jsp?mid="+data.mid;
return;
}
dispatch("getHomeLeftContent",data.huiyi_id);//获取首页左侧内容
dispatch("getHomeCenterContent",data.huiyi_id);//获取首页中间内容
dispatch("getHomeContent",data.huiyi_id);//获取首页内容(右侧 lang template)
}).then(function(data){
resolve();
})
})
},//首页初始化
。

浙公网安备 33010602011771号