Blame view

yudao-ui-app/utils/request/index.js 408 Bytes
13b5ad12   sfmind   1.同步调整到OAuth2方式登录...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  // 引入配置
  import config from '@/common/config'
  // 初始化请求配置
  uni.$u.http.setConfig((defaultConfig) => {
      /* defaultConfig 为默认全局配置 */
      defaultConfig.baseURL = config.baseUrl /* 根域名 */
      defaultConfig.header = config.header
      return defaultConfig
  })
  
  module.exports = (vm) => {
      require('./requestInterceptors')(vm)
      require('./responseInterceptors')(vm)
  }