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

This commit is contained in:
GeraltWang
2024-12-10 09:57:35 +08:00
committed by Burt
parent e077f9c11c
commit 0e77899084
3 changed files with 6 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
// TODO: 别忘加更改环境变量的 VITE_UPLOAD_BASEURL 地址。
import { getEvnBaseUploadUrl } from '@/utils'
import { getEnvBaseUploadUrl } from '@/utils'
const VITE_UPLOAD_BASEURL = `${getEvnBaseUploadUrl()}`
const VITE_UPLOAD_BASEURL = `${getEnvBaseUploadUrl()}`
/**
* useUpload 是一个定制化的请求钩子,用于处理上传图片。

View File

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

View File

@@ -122,7 +122,7 @@ export const needLoginPages: string[] = getAllPages('needLogin').map((page) => p
/**
* 根据微信小程序当前环境判断应该获取的BaseUrl
*/
export const getEvnBaseUrl = () => {
export const getEnvBaseUrl = () => {
// 请求基准地址
let baseUrl = import.meta.env.VITE_SERVER_BASEURL
@@ -151,7 +151,7 @@ export const getEvnBaseUrl = () => {
/**
* 根据微信小程序当前环境判断应该获取的UPLOAD_BASEURL
*/
export const getEvnBaseUploadUrl = () => {
export const getEnvBaseUploadUrl = () => {
// 请求基准地址
let baseUploadUrl = import.meta.env.VITE_UPLOAD_BASEURL