fix: env utils 方法名称拼写问题

This commit is contained in:
GeraltWang 2024-12-10 09:57:35 +08:00
parent 15152e4e7c
commit f1b245d66f
3 changed files with 6 additions and 6 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