mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-26 01:01:52 +08:00
15 lines
408 B
JavaScript
15 lines
408 B
JavaScript
// 引入配置
|
|
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)
|
|
}
|