3 回答
慕村9548890
TA贡献1884条经验 获得超4个赞
森栏
TA贡献1810条经验 获得超5个赞
actions:
export const getMenu = () => { return async (dispatch) => { let msg = await fetch('data/nodes',{
method: 'POST', //body: JSON.stringify({"aa":"aa"}),
header: {'content-type':'application/json; charset=utf-8'}
}).then((res)=>res.json()); var state = { nodes: msg };
dispatch({ type: 'INIT',
state
});
};
}
添加回答
举报
0/150
提交
取消