index.js 372 B

12345678910111213141516171819202122
  1. import { HttpInterface } from './interface'
  2. export class Http extends HttpInterface {
  3. constructor() {
  4. super()
  5. this.init()
  6. }
  7. init() {
  8. this.interceptor = {
  9. before: null,
  10. after: null
  11. }
  12. }
  13. // 通用的post请求
  14. post(params) {
  15. return super.post(params)
  16. }
  17. // 通用的get请求
  18. get(params) {
  19. return super.get(params)
  20. }
  21. }