serviceConfig.js 369 B

12345678910111213141516
  1. import axios from './service';
  2. import apiMap from './index';
  3. export default {
  4. request({ alias, body, query, header }) {
  5. let url = apiMap[alias].url;
  6. let type = apiMap[alias].type;
  7. return axios({
  8. url: url,
  9. method: type,
  10. params: query,
  11. data: body,
  12. header: header,
  13. })
  14. }
  15. }