common.ts 485 B

12345678910111213141516171819
  1. /**
  2. * Common / Base config API module
  3. * 通用常量配置等相关接口
  4. */
  5. import { http } from '~/utils/request'
  6. import type { BaseConstsConfig } from '~/types/api'
  7. export const commonApi = {
  8. /**
  9. * 获取通用常量配置
  10. * 对应后端接口:POST /base/consts/config
  11. * 免登录
  12. */
  13. getBaseConstsConfig() {
  14. // NOTE: http 拦截器会在 code===0 时将响应解包为 ApiResponse.data
  15. return http.post<BaseConstsConfig>('/base/consts/config')
  16. },
  17. }