Merge branch 'base' into tabbar
This commit is contained in:
commit
5144ceabd1
@ -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 是一个定制化的请求钩子,用于处理上传图片。
|
||||
|
@ -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 = {
|
||||
|
@ -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
|
||||
|
||||
|
@ -23,7 +23,6 @@
|
||||
]
|
||||
},
|
||||
"vueCompilerOptions": {
|
||||
"target": 3,
|
||||
"plugins": ["@uni-helper/uni-types/volar-plugin"]
|
||||
},
|
||||
"exclude": ["node_modules"],
|
||||
|
Loading…
x
Reference in New Issue
Block a user