This commit is contained in:
yvan 2025-08-19 22:07:30 +08:00
parent 10b714e441
commit 4ae72d107c
2 changed files with 4 additions and 3 deletions

View File

@ -7,7 +7,7 @@ import { HTTP_CONFIG, checkApiAuth } from './config.js'
* 初始化HTTP配置
* @param {Object} vm Vue实例用于访问vuex等全局状态
*/
module.exports = (vm) => {
export default (vm) => {
// 初始化请求配置
uni.$u.http.setConfig((config) => {
config.baseURL = HTTP_CONFIG.baseURL

View File

@ -1,5 +1,6 @@
import App from './App'
import uViewNext from '@/uni_modules/uview-next';
import httpConfig from './http/config/request.js';
// #ifndef VUE3
import Vue from 'vue'
@ -12,7 +13,7 @@ const app = new Vue({
})
// 引入HTTP请求配置将app参数传递到配置中
require('./http/config/request.js')(app)
httpConfig(app)
app.$mount()
// #endif
@ -24,7 +25,7 @@ export function createApp() {
app.use(uViewNext)
// 引入HTTP请求配置
require('./http/config/request.js')(app)
httpConfig(app)
return {
app