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