Merge branch 'base' into i18n

This commit is contained in:
Burt 2024-12-10 21:46:42 +08:00
commit feca440d06
4 changed files with 6 additions and 7 deletions

View File

@ -1,7 +1,7 @@
// TODO: 别忘加更改环境变量的 VITE_UPLOAD_BASEURL 地址。 // TODO: 别忘加更改环境变量的 VITE_UPLOAD_BASEURL 地址。
import { getEvnBaseUploadUrl } from '@/utils' import { getEnvBaseUploadUrl } from '@/utils'
const VITE_UPLOAD_BASEURL = `${getEvnBaseUploadUrl()}` const VITE_UPLOAD_BASEURL = `${getEnvBaseUploadUrl()}`
/** /**
* useUpload * useUpload

View File

@ -2,7 +2,7 @@
import qs from 'qs' import qs from 'qs'
import { useUserStore } from '@/store' import { useUserStore } from '@/store'
import { platform } from '@/utils/platform' import { platform } from '@/utils/platform'
import { getEvnBaseUrl } from '@/utils' import { getEnvBaseUrl } from '@/utils'
export type CustomRequestOptions = UniApp.RequestOptions & { export type CustomRequestOptions = UniApp.RequestOptions & {
query?: Record<string, any> query?: Record<string, any>
@ -11,7 +11,7 @@ export type CustomRequestOptions = UniApp.RequestOptions & {
} & IUniUploadFileOptions // 添加uni.uploadFile参数类型 } & IUniUploadFileOptions // 添加uni.uploadFile参数类型
// 请求基准地址 // 请求基准地址
const baseUrl = getEvnBaseUrl() const baseUrl = getEnvBaseUrl()
// 拦截器配置 // 拦截器配置
const httpInterceptor = { const httpInterceptor = {

View File

@ -122,7 +122,7 @@ export const needLoginPages: string[] = getAllPages('needLogin').map((page) => p
/** /**
* BaseUrl * BaseUrl
*/ */
export const getEvnBaseUrl = () => { export const getEnvBaseUrl = () => {
// 请求基准地址 // 请求基准地址
let baseUrl = import.meta.env.VITE_SERVER_BASEURL let baseUrl = import.meta.env.VITE_SERVER_BASEURL
@ -151,7 +151,7 @@ export const getEvnBaseUrl = () => {
/** /**
* UPLOAD_BASEURL * UPLOAD_BASEURL
*/ */
export const getEvnBaseUploadUrl = () => { export const getEnvBaseUploadUrl = () => {
// 请求基准地址 // 请求基准地址
let baseUploadUrl = import.meta.env.VITE_UPLOAD_BASEURL let baseUploadUrl = import.meta.env.VITE_UPLOAD_BASEURL

View File

@ -23,7 +23,6 @@
] ]
}, },
"vueCompilerOptions": { "vueCompilerOptions": {
"target": 3,
"plugins": ["@uni-helper/uni-types/volar-plugin"] "plugins": ["@uni-helper/uni-types/volar-plugin"]
}, },
"exclude": ["node_modules"], "exclude": ["node_modules"],