ApiInstance.ts 711 B

12345678910111213141516171819202122232425262728293031
  1. import Http from "@/libs/axios"
  2. import { getToken } from "@/libs/auth"
  3. import { URL_API, URL_API_GYM, URL_API_GYT, URL_API_KLX } from "@/config"
  4. /** axios实例 */
  5. /* 中台 */
  6. export const httpAxios = new Http(URL_API)
  7. // 不带滚动条的
  8. export const httpAxiosNoNprogress = new Http(URL_API, {
  9. nprogress: false
  10. })
  11. /* 管乐迷 */
  12. export const httpAxios_gym = new Http(URL_API_GYM, {
  13. tokenName: "Authorization",
  14. getTokenFun: getToken
  15. })
  16. /* 管乐团 */
  17. export const httpAxios_gyt = new Http(URL_API_GYT, {
  18. tokenName: "Authorization",
  19. getTokenFun: getToken
  20. })
  21. /* 酷乐秀 */
  22. export const httpAxios_klx = new Http(URL_API_KLX, {
  23. tokenName: "Authorization",
  24. getTokenFun: getToken
  25. })