config.js 472 B

1234567891011121314151617181920212223
  1. // 全局配置文件
  2. export const config = {
  3. // API 基础地址(自动根据浏览器访问地址获取)
  4. get baseUrl() {
  5. return `http://59.32.228.147:81`
  6. },
  7. // 用户密钥
  8. userKey: 'b01a6a38926a47c2b55fc364b9afeccd',
  9. // 获取完整的 API URL
  10. getApiUrl(path) {
  11. return `${this.baseUrl}${path}`
  12. },
  13. // 获取请求头
  14. getHeaders() {
  15. return {
  16. 'Content-Type': 'application/json',
  17. 'USER-KEY': this.userKey
  18. }
  19. }
  20. }