第二个,因此无法正常工作

时间:2018-09-18 04:01:04

标签: javascript reactjs redux

只有第一个then在工作。随后的每个 export const usersFetchData = (url) => { return (dispatch) => { dispatch(userIsLoading(true)); axios .get(url) .then(res => { if(!res.ok){ throw Error(res.statusText) } dispatch(userIsLoading(false)); console.log(res.data); return res; }) .then(res => res.json()) .then(users => { console.log(users); dispatch(usersFetchDataSuccess(users))}) .catch(() => dispatch(userHasErrored(true))); } } 都不起作用。

[0, 2, 7, 9, 13]

1 个答案:

答案 0 :(得分:1)

//div[contains(@class,'_31LzD')]/div[text()='You can't join this group because it is full'] //div[contains(@class,'_3QNwO')]//precding::div[text()='You can't join this group because it is full'] 为您将其转换为JSON,您不必像在axios

中那样自己进行操作
fetch