when the effects, of model calls call to request backend data, when the backend data is not returned for a long time, other pages calling methods in effects will not be executed
Code to reproduce the issue: (Please provide reproducible code or steps)
= service=
export async function generatePayCode (params) {
return request("api/pay/getGeneratePayCode", {
method: "GET",
body: params,
})
};
= Model=
export default {
namespace: "qrcode",
state: {showPanel:false},
effects: {
* generatePayCode({payload}, {call, put}) {
let {data} = yield call(generatePayCode, {bcId});
}
* showPanel({payload}, {call, put}) {
yield put({
type: "saveShowPanel",
payload: {showPanel: true}
})
}
}
}
= call order =
1.dispatch ({type: "qrcode/generatePayCode"})
when the backend does not return for a long time, other buttons on the page call dispatch ({type: "qrcode/showPanel"}), and the page status will not be updated