commonApi.js 575 B

12345678910111213141516171819202122
  1. import request from '../utils/request.js'
  2. class commonApi extends request{
  3. // static constructor() {
  4. // super();
  5. // // this._baseUrl = 'https://live-api.shpr.top/api/'
  6. // // this._defaultHeader = {}
  7. // // this._request = new request
  8. // // this._request.setErrorHandler(this.errorHandel)
  9. // }
  10. // static errorHandel(res) {
  11. // console.log(res);
  12. // }
  13. static async getToken() {
  14. const res = await this.getRequest(this.BASE_URL+`Token/getToken`)
  15. return res.data
  16. }
  17. }
  18. export default commonApi