Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

希望能够在parseResponse钩子函数上在增加一个入参 #6

Open
q264771003 opened this issue Mar 10, 2020 · 2 comments
Open

Comments

@q264771003
Copy link

//request.js
__parseResponse(response, responseType, parseResponse) { //需要一个同__afterResponse一样的info参数
if (isFunction(parseResponse)) {
const after = parseResponse(response, responseType);
return after;
}

return isFunction(response && response[responseType])
  ? response[responseType]()
  : response;

}

__afterResponse(response, afterResponse, info) {
if (isFunction(afterResponse)) {
const after = afterResponse(response, info);
return after;
}

return response;

}

//service.js
export async function getAuth(playload) {
return $$.post('/mrpt-mobile/m_getAuth.json', playload,{key:'123'});
//我想在config.js 里面的 parseResponse里取出{key:'123'},
}

@q264771003
Copy link
Author

-_-

@q264771003
Copy link
Author

-----------------_-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant