Open q264771003 opened 4 years ago
//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'}, }
-_-
-----------------_-
//request.js parseResponse(response, responseType, parseResponse) { //需要一个同afterResponse一样的info参数 if (isFunction(parseResponse)) { const after = parseResponse(response, responseType); return after; }
}
__afterResponse(response, afterResponse, info) { if (isFunction(afterResponse)) { const after = afterResponse(response, info); return after; }
}
//service.js export async function getAuth(playload) { return $$.post('/mrpt-mobile/m_getAuth.json', playload,{key:'123'}); //我想在config.js 里面的 parseResponse里取出{key:'123'}, }