export function ajaxRes(res, thunkAPI) { const { code = 9999, msg, data = null } = res; const { fulfillWithValue, rejectWithValue } = thunkAPI; if (code !== "0000" || !data) { return rejectWithValue(msg); } else { return fulfillWithValue(data); } }