diff --git a/.env.development b/.env.development index 44f61f6b..bd531c09 100644 --- a/.env.development +++ b/.env.development @@ -17,6 +17,3 @@ VITE_GLOB_API_URL=/api # File upload address, optional VITE_GLOB_UPLOAD_URL=/storage/file - -# Interface prefix -VITE_GLOB_API_URL_PREFIX= diff --git a/.env.production b/.env.production index 9c17dbb8..d42a573b 100644 --- a/.env.production +++ b/.env.production @@ -22,9 +22,6 @@ VITE_GLOB_API_URL=/api # It can be forwarded by nginx or write the actual address directly VITE_GLOB_UPLOAD_URL=/storage/file -# Interface prefix -VITE_GLOB_API_URL_PREFIX= - # Whether to enable image compression VITE_USE_IMAGEMIN= true @@ -32,4 +29,4 @@ VITE_USE_IMAGEMIN= true VITE_USE_PWA = false # Is it compatible with older browsers -VITE_LEGACY = false +VITE_LEGACY = false \ No newline at end of file diff --git a/.env.test b/.env.test index 74e29328..17a8ee6f 100644 --- a/.env.test +++ b/.env.test @@ -23,9 +23,6 @@ VITE_GLOB_API_URL=/api # It can be forwarded by nginx or write the actual address directly VITE_GLOB_UPLOAD_URL=/storage/file -# Interface prefix -VITE_GLOB_API_URL_PREFIX= - # Whether to enable image compression VITE_USE_IMAGEMIN= true @@ -33,4 +30,4 @@ VITE_USE_IMAGEMIN= true VITE_USE_PWA = false # Is it compatible with older browsers -VITE_LEGACY = false +VITE_LEGACY = false \ No newline at end of file diff --git a/src/hooks/setting/index.ts b/src/hooks/setting/index.ts index 025445f0..016fe67f 100644 --- a/src/hooks/setting/index.ts +++ b/src/hooks/setting/index.ts @@ -8,7 +8,6 @@ export const useGlobSetting = (): Readonly => { VITE_GLOB_APP_TITLE, VITE_GLOB_API_URL, VITE_GLOB_APP_SHORT_NAME, - VITE_GLOB_API_URL_PREFIX, VITE_GLOB_UPLOAD_URL } = getAppEnvConfig(); @@ -23,7 +22,6 @@ export const useGlobSetting = (): Readonly => { title: VITE_GLOB_APP_TITLE, apiUrl: VITE_GLOB_API_URL, shortName: VITE_GLOB_APP_SHORT_NAME, - urlPrefix: VITE_GLOB_API_URL_PREFIX, uploadUrl: VITE_GLOB_UPLOAD_URL }; return glob as Readonly; diff --git a/src/layouts/default/header/components/lock/LockModal.vue b/src/layouts/default/header/components/lock/LockModal.vue index c18e5b2f..9a31fa93 100644 --- a/src/layouts/default/header/components/lock/LockModal.vue +++ b/src/layouts/default/header/components/lock/LockModal.vue @@ -33,6 +33,7 @@ import { BasicForm, useForm } from "/@/components/Form/index"; import { useUserStore } from "/@/store/modules/User"; import { useLockStore } from "/@/store/modules/Lock"; import headerImg from "/@/assets/images/header.png"; +import { imageUrl } from "/@/utils/http/image/ImageRequest"; export default defineComponent({ name: "LockModal", @@ -75,7 +76,7 @@ export default defineComponent({ } const avatar = computed(() => { - return userStore.getUserInfo?.headImgUrl || headerImg; + return imageUrl("/storage/file/" + userStore.getUserInfo?.headImgUrl) || headerImg; }); return { diff --git a/src/layouts/default/header/components/user-dropdown/index.vue b/src/layouts/default/header/components/user-dropdown/index.vue index 0e9773ee..9c0a9a38 100644 --- a/src/layouts/default/header/components/user-dropdown/index.vue +++ b/src/layouts/default/header/components/user-dropdown/index.vue @@ -48,7 +48,7 @@