mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-12 16:57:12 +08:00
refactor: 重构原有文件上传接口并优化配置文件配置格式
移除 ContiNew Starter 本地存储依赖
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div class="navbar">
|
||||
<div class="left-side">
|
||||
<a-space>
|
||||
<img alt="logo" :src="getFile(appStore.getLogo)" height="33" />
|
||||
<img alt="logo" :src="appStore.getLogo" height="33" />
|
||||
<a-typography-title
|
||||
:style="{ margin: 0, fontSize: '18px' }"
|
||||
:heading="5"
|
||||
@@ -199,7 +199,6 @@
|
||||
import useUser from '@/hooks/user';
|
||||
import Menu from '@/components/menu/index.vue';
|
||||
import getAvatar from '@/utils/avatar';
|
||||
import getFile from '@/utils/file';
|
||||
import { setTimer } from '@/utils/auth';
|
||||
import MessageBox from '../message-box/index.vue';
|
||||
|
||||
|
@@ -7,14 +7,6 @@ export default function getAvatar(
|
||||
gender: number | undefined,
|
||||
) {
|
||||
if (avatar) {
|
||||
const baseUrl = import.meta.env.VITE_API_BASE_URL;
|
||||
if (
|
||||
!avatar.startsWith('http://') &&
|
||||
!avatar.startsWith('https://') &&
|
||||
!avatar.startsWith('blob:')
|
||||
) {
|
||||
return `${baseUrl}/avatar/${avatar}`;
|
||||
}
|
||||
return avatar;
|
||||
}
|
||||
|
||||
|
@@ -2,8 +2,8 @@
|
||||
<div class="root">
|
||||
<div class="header">
|
||||
<img
|
||||
:src="getFile(appStore.getLogo) ?? './logo.svg'"
|
||||
alt="logo"
|
||||
:src="appStore.getLogo ?? './logo.svg'"
|
||||
alt="Logo"
|
||||
height="33"
|
||||
/>
|
||||
<div class="logo-text">{{ appStore.getTitle }}</div>
|
||||
@@ -78,7 +78,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { useAppStore } from '@/store';
|
||||
import getFile from '@/utils/file';
|
||||
import useResponsive from '@/hooks/responsive';
|
||||
import { socialAuth } from '@/api/auth';
|
||||
import AccountLogin from './components/account-login.vue';
|
||||
|
@@ -33,7 +33,7 @@
|
||||
v-if="faviconFile && faviconFile.url"
|
||||
class="arco-upload-list-picture custom-upload-avatar favicon"
|
||||
>
|
||||
<img :src="getFile(faviconFile.url)" />
|
||||
<img :src="faviconFile.url" alt="favicon" />
|
||||
<div
|
||||
v-if="isEdit"
|
||||
class="arco-upload-list-picture-mask favicon"
|
||||
@@ -77,7 +77,7 @@
|
||||
v-if="logoFile && logoFile.url"
|
||||
class="arco-upload-list-picture custom-upload-avatar logo"
|
||||
>
|
||||
<img :src="getFile(logoFile.url)" />
|
||||
<img :src="logoFile.url" alt="Logo" />
|
||||
<div
|
||||
v-if="isEdit"
|
||||
class="arco-upload-list-picture-mask logo"
|
||||
@@ -181,7 +181,6 @@
|
||||
resetValue,
|
||||
} from '@/api/system/config';
|
||||
import { upload } from '@/api/common';
|
||||
import getFile from '@/utils/file';
|
||||
import { useAppStore } from '@/store';
|
||||
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
|
Reference in New Issue
Block a user