http.request.js 402 B

12345678910111213
  1. import http from '@/services/http.interceptor.js'
  2. export default async (options = {}) => {
  3. return await http.request({
  4. method: options.method || 'GET', // 请求方法必须大写 [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE]
  5. url: options.url,
  6. data: options.data,
  7. params: options.params,
  8. custom: {
  9. loading: options.loading
  10. }
  11. })
  12. }