1234567891011121314151617181920212223242526272829303132333435363738 |
- import {
- requestInterceptors,
- responseInterceptors
- } from './interceptors.js'
- import {
- http
- } from '@/uni_modules/uview-plus'
- const initRequest = (vm) => {
- http.setConfig((defaultConfig) => {
- defaultConfig.baseURL = 'http://8.155.45.217'
-
-
- defaultConfig = {
- ...defaultConfig,
- custom: {
- loading: true,
- isCloseLoad: true,
- validateCode: true,
- },
- }
-
-
-
-
-
-
-
- return defaultConfig
- })
- requestInterceptors()
- responseInterceptors()
- }
- export {
- initRequest
- }
|