api.js 420 B

12345678910111213141516171819
  1. import { httpApi } from '../request/httpApi'
  2. export default {
  3. async post(form) {
  4. return httpApi({
  5. url: '/api/' + form.url,
  6. method: 'post',
  7. params: form.params,
  8. data: form.data,
  9. })
  10. },
  11. async get(form) {
  12. return httpApi({
  13. url: '/api/' + form.url,
  14. params: form.params,
  15. method: 'get',
  16. })
  17. },
  18. }