src/config/constant/app.data.respCode.js
该文件中定义的码值会进入请求的正确响应中,即apiFn().then()中
所有微服务的正确响应码需定义在该文件中进行统一管理
有特殊异常判断时,在app.data.respCode.js 的 RESP_CODE 中定义业务异常码
/**
* 保全强校验
*/
NPM_STRONG_VERIF: '20001'
apiFn().then(res => {
const { code, data.message } = res;
if (code === RESP_CODE.NPM_STRONG_VERIF) {
...当前特殊判断处理
} else {
...正确响应处理
}
})