2025-11-07 09:56:20 +08:00
|
|
|
// 引入配置
|
|
|
|
|
import config from "@/common/config";
|
|
|
|
|
// 初始化请求配置
|
|
|
|
|
uni.$u.http.setConfig((defaultConfig) => {
|
2025-11-23 01:01:52 +08:00
|
|
|
/* defaultConfig 为默认全局配置 */
|
|
|
|
|
defaultConfig.baseURL = config.getRegisterUrl(); /* 根域名 */
|
|
|
|
|
return defaultConfig;
|
2025-11-07 09:56:20 +08:00
|
|
|
});
|
2025-12-08 18:10:51 +08:00
|
|
|
import requestInterceptors from "./requestInterceptors";
|
|
|
|
|
import responseInterceptors from "./responseInterceptors";
|
2025-11-07 09:56:20 +08:00
|
|
|
module.exports = (vm) => {
|
2025-12-08 18:10:51 +08:00
|
|
|
requestInterceptors(vm);
|
|
|
|
|
responseInterceptors(vm);
|
2025-11-23 01:01:52 +08:00
|
|
|
};
|