Browse Source

Merge pull request #1014 from colinin/fix-some-issues

Fix some issues
pull/1050/head
yx lin 1 year ago
committed by GitHub
parent
commit
07e0d157a7
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      apps/vue/.env.development
  2. 2
      apps/vue/.env.production
  3. 3
      apps/vue/build/vite/proxy.ts
  4. 4
      apps/vue/src/api/abp/application-configuration/index.ts
  5. 20
      apps/vue/src/api/oss-management/files/private/index.ts
  6. 20
      apps/vue/src/api/oss-management/files/public/index.ts
  7. 16
      apps/vue/src/api/oss-management/objects/index.ts
  8. 18
      apps/vue/src/api/sys/user.ts
  9. 60
      apps/vue/src/api/weather/index.ts
  10. 6
      apps/vue/src/hooks/web/useSignalR.ts
  11. 9
      apps/vue/src/layouts/default/header/components/notify/useMessages.ts
  12. 15
      apps/vue/src/layouts/default/header/components/notify/useNotifications.ts
  13. 29
      apps/vue/src/utils/http/axios/Axios.ts
  14. 5
      apps/vue/src/utils/http/axios/index.ts
  15. 42
      apps/vue/src/views/account/center/Cloud.vue
  16. 4
      apps/vue/src/views/account/setting/BaseSetting.vue
  17. 2
      apps/vue/src/views/oss-management/objects/components/OssManagePage.vue
  18. 2
      apps/vue/vite.config.ts

2
apps/vue/.env.development

@ -13,7 +13,7 @@ VITE_PROXY=[["/connect","http://127.0.0.1:30000"],["/api","http://127.0.0.1:3000
VITE_DROP_CONSOLE=false VITE_DROP_CONSOLE=false
# Basic interface address SPA # Basic interface address SPA
VITE_GLOB_API_URL=/api VITE_GLOB_API_URL=
# File upload address, optional # File upload address, optional
VITE_GLOB_UPLOAD_URL=/upload VITE_GLOB_UPLOAD_URL=/upload

2
apps/vue/.env.production

@ -16,7 +16,7 @@ VITE_BUILD_COMPRESS='none'
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE=false VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE=false
# Basic interface address SPA # Basic interface address SPA
VITE_GLOB_API_URL=/api VITE_GLOB_API_URL=
# File upload address, optional # File upload address, optional
# It can be forwarded by nginx or write the actual address directly # It can be forwarded by nginx or write the actual address directly

3
apps/vue/build/vite/proxy.ts

@ -25,7 +25,8 @@ export function createProxy(list: ProxyList = []) {
target: target, target: target,
changeOrigin: true, changeOrigin: true,
ws: true, ws: true,
rewrite: (path) => path.replace(new RegExp(`^${prefix}`), ''), rewrite: (path) => path,
// rewrite: (path) => path.replace(new RegExp(`^${prefix}`), ''),
// https is require secure=false // https is require secure=false
...(isHttps ? { secure: false } : {}), ...(isHttps ? { secure: false } : {}),
}; };

4
apps/vue/src/api/abp/application-configuration/index.ts

@ -1,8 +1,6 @@
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
export const GetAsyncByOptions = (options?: { export const GetAsyncByOptions = (options?: { includeLocalizationResources?: boolean }) => {
includeLocalizationResources?: boolean;
}) => {
return defHttp.get<ApplicationConfigurationDto>({ return defHttp.get<ApplicationConfigurationDto>({
url: '/api/abp/application-configuration', url: '/api/abp/application-configuration',
params: options, params: options,

20
apps/vue/src/api/oss-management/files/private/index.ts

@ -1,37 +1,27 @@
import { OssObject } from '../../objects/model'; import { OssObject } from '../../objects/model';
import { FileShare, FileShareInput, MyFileShare } from '../share/model'; import { FileShare, FileShareInput, MyFileShare } from '../share/model';
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import { AxiosResponse } from 'axios';
export const formatUrl = (url: string) => { export const formatUrl = (url: string) => {
// 格式化路径为用户目录 // 格式化路径为用户目录
return `/api/api/files/static/users/p/${url}`; return `/api/files/static/users/p/${url}`;
}; };
export const upload = (file: Blob, path: string, name: string) => { export const upload = (file: Blob, path: string, name: string) => {
return new Promise<AxiosResponse<OssObject>>((resolve, reject) => { return defHttp.uploadFile<OssObject>(
defHttp
.uploadFile<OssObject>(
{ {
url: '/api/api/files/private', url: '/api/files/private',
}, },
{ {
data: { path: path, object: name }, data: { path: path, object: name },
file: file, file: file,
}, },
) );
.then((res: AxiosResponse<any>) => {
resolve(res);
})
.catch((err) => {
reject(err);
});
});
}; };
export const get = (path: string, name: string) => { export const get = (path: string, name: string) => {
return defHttp.get<Blob>({ return defHttp.get<Blob>({
url: `/api/api/files/private/p/${path}/${name}`, url: `/api/files/private/p/${path}/${name}`,
}); });
}; };

20
apps/vue/src/api/oss-management/files/public/index.ts

@ -1,36 +1,26 @@
import { OssObject } from '../../objects/model'; import { OssObject } from '../../objects/model';
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import { AxiosResponse } from 'axios';
export const formatUrl = (url: string) => { export const formatUrl = (url: string) => {
// 格式化路径为公共目录 // 格式化路径为公共目录
return `/api/api/files/static/public/p/${url}`; return `/api/files/static/public/p/${url}`;
}; };
export const upload = (file: Blob, path: string, name: string) => { export const upload = (file: Blob, path: string, name: string) => {
return new Promise<AxiosResponse<OssObject>>((resolve, reject) => { return defHttp.uploadFile<OssObject>(
defHttp
.uploadFile<OssObject>(
{ {
url: `/api/api/files/public/upload`, url: `/api/files/public/upload`,
}, },
{ {
data: { path: path, object: name }, data: { path: path, object: name },
file: file, file: file,
}, },
) );
.then((res: AxiosResponse<any>) => {
resolve(res);
})
.catch((err) => {
reject(err);
});
});
}; };
export const get = (path: string, name: string) => { export const get = (path: string, name: string) => {
return defHttp.get<Blob>({ return defHttp.get<Blob>({
url: `/api/api/files/public/p/${path}/${name}`, url: `/api/files/public/p/${path}/${name}`,
}); });
}; };

16
apps/vue/src/api/oss-management/objects/index.ts

@ -14,8 +14,8 @@ import { useAbpStoreWithOut } from '/@/store/modules/abp';
import { format } from '/@/utils/strings'; import { format } from '/@/utils/strings';
import { ContentTypeEnum } from '/@/enums/httpEnum'; import { ContentTypeEnum } from '/@/enums/httpEnum';
export const uploadUrl = '/api/api/oss-management/objects/upload'; export const uploadUrl = '/api/oss-management/objects/upload';
export const downloadUrl = '/api/api/files/static/{bucket}/p/{path}/{name}'; export const downloadUrl = '/api/files/static/{bucket}/p/{path}/{name}';
export function generateOssUrl(bucket: string, path: string, object: string) { export function generateOssUrl(bucket: string, path: string, object: string) {
if (path) { if (path) {
@ -35,8 +35,6 @@ export const downloadBlob = (bucket: string, path: string, object: string) => {
accept: 'application/json', accept: 'application/json',
}, },
responseType: 'blob', responseType: 'blob',
}, {
apiUrl: '/api'
}); });
}; };
@ -112,7 +110,7 @@ export const uploadObject = (params: UploadFileParams, event: any) => {
fileName: fileName, fileName: fileName,
}; };
return defHttp return defHttp
.uploadFile<void>(requestConfig, { .uploadFile(requestConfig, {
data: requestData, data: requestData,
file: fileData, file: fileData,
}) })
@ -157,12 +155,10 @@ export const createObject = (input: OssObjectCreate, file?: Blob) => {
}; };
export const deleteObject = (input: GetOssObjectRequest) => { export const deleteObject = (input: GetOssObjectRequest) => {
return defHttp.delete<void>( return defHttp.delete<void>({
{
url: '/api/oss-management/objects', url: '/api/oss-management/objects',
params: input, params: input,
}, });
);
}; };
export const bulkDeleteObject = (input: OssObjectBulkDelete) => { export const bulkDeleteObject = (input: OssObjectBulkDelete) => {
@ -170,7 +166,7 @@ export const bulkDeleteObject = (input: OssObjectBulkDelete) => {
url: '/api/oss-management/objects/bulk-delete', url: '/api/oss-management/objects/bulk-delete',
data: input, data: input,
}); });
} };
export const getObject = (input: GetOssObjectRequest) => { export const getObject = (input: GetOssObjectRequest) => {
return defHttp.get<OssObject>({ return defHttp.get<OssObject>({

18
apps/vue/src/api/sys/user.ts

@ -25,7 +25,11 @@ enum Api {
/** /**
* @description: user login api * @description: user login api
*/ */
export function loginApi(params: LoginParams, mode: ErrorMessageMode = 'modal', isPortalLogin: boolean = false) { export function loginApi(
params: LoginParams,
mode: ErrorMessageMode = 'modal',
isPortalLogin = false,
) {
const setting = useGlobSetting(); const setting = useGlobSetting();
const tokenParams = { const tokenParams = {
client_id: setting.clientId, client_id: setting.clientId,
@ -48,7 +52,6 @@ export function loginApi(params: LoginParams, mode: ErrorMessageMode = 'modal',
}, },
{ {
errorMessageMode: mode, errorMessageMode: mode,
apiUrl: '/connect',
withToken: false, withToken: false,
}, },
); );
@ -79,7 +82,6 @@ export function loginPhoneApi(params: LoginByPhoneParams, mode: ErrorMessageMode
}, },
{ {
errorMessageMode: mode, errorMessageMode: mode,
apiUrl: '/connect',
}, },
); );
} }
@ -88,14 +90,16 @@ export function loginPhoneApi(params: LoginByPhoneParams, mode: ErrorMessageMode
* @description: getUserInfo * @description: getUserInfo
*/ */
export function getUserInfo() { export function getUserInfo() {
return defHttp.get<GetUserInfoModel>( return defHttp
.get<GetUserInfoModel>(
{ {
url: Api.GetUserInfo, url: Api.GetUserInfo,
}, },
{ {
errorMessageMode: 'none', errorMessageMode: 'none',
apiUrl: '/connect', },
}).catch(() => { )
.catch(() => {
const userStore = useUserStoreWithOut(); const userStore = useUserStoreWithOut();
createErrorModal({ createErrorModal({
title: t('sys.api.errorTip'), title: t('sys.api.errorTip'),
@ -103,7 +107,7 @@ export function getUserInfo() {
onOk: () => { onOk: () => {
userStore.setToken(undefined); userStore.setToken(undefined);
userStore.logout(true); userStore.logout(true);
} },
}); });
}); });
} }

60
apps/vue/src/api/weather/index.ts

@ -15,61 +15,73 @@ const Api = {
}; };
export const getProvinces = () => { export const getProvinces = () => {
return defHttp.get<Province[]>({ return defHttp.get<Province[]>(
{
url: Api.GetProvinces, url: Api.GetProvinces,
//baseURL: Host, //baseURL: Host,
headers: { headers: {
'X-Requested-With': 'XMLHttpRequest' 'X-Requested-With': 'XMLHttpRequest',
} },
}, { },
{
apiUrl: '', apiUrl: '',
joinTime: false, joinTime: false,
withToken: false, withToken: false,
withAcceptLanguage: false, withAcceptLanguage: false,
}); },
);
}; };
export const getPosition = () => { export const getPosition = () => {
return defHttp.get<Position>({ return defHttp.get<Position>(
{
url: Api.GetPosition, url: Api.GetPosition,
//baseURL: Host, //baseURL: Host,
headers: { headers: {
'X-Requested-With': 'XMLHttpRequest', 'X-Requested-With': 'XMLHttpRequest',
} },
}, { },
{
apiUrl: '', apiUrl: '',
joinTime: false, joinTime: false,
withToken: false, withToken: false,
withAcceptLanguage: false, withAcceptLanguage: false,
}); },
} );
};
export const getCitys = (provinceCode: string) => { export const getCitys = (provinceCode: string) => {
return defHttp.get<Position[]>({ return defHttp.get<Position[]>(
url: format(Api.GetCitys, {province: provinceCode}), {
url: format(Api.GetCitys, { province: provinceCode }),
//baseURL: Host, //baseURL: Host,
headers: { headers: {
'X-Requested-With': 'XMLHttpRequest' 'X-Requested-With': 'XMLHttpRequest',
} },
}, { },
{
apiUrl: '', apiUrl: '',
joinTime: false, joinTime: false,
withToken: false, withToken: false,
withAcceptLanguage: false, withAcceptLanguage: false,
}); },
} );
};
export const getWeather = (cityCode: string) => { export const getWeather = (cityCode: string) => {
return defHttp.get<WeatherResult>({ return defHttp.get<WeatherResult>(
url: format(Api.GetWeather, {code: cityCode}), {
url: format(Api.GetWeather, { code: cityCode }),
//baseURL: Host, //baseURL: Host,
headers: { headers: {
'X-Requested-With': 'XMLHttpRequest' 'X-Requested-With': 'XMLHttpRequest',
} },
}, { },
{
apiUrl: '', apiUrl: '',
joinTime: false, joinTime: false,
withToken: false, withToken: false,
withAcceptLanguage: false, withAcceptLanguage: false,
}); },
} );
};

6
apps/vue/src/hooks/web/useSignalR.ts

@ -50,7 +50,7 @@ export function useSignalR(options: UseSignalR & SignalROptions) {
httpOptions.accessTokenFactory = () => httpOptions.accessTokenFactory = () =>
token.startsWith('Bearer ') ? token.substring(7) : token; token.startsWith('Bearer ') ? token.substring(7) : token;
} }
var connectionBuilder = new HubConnectionBuilder() const connectionBuilder = new HubConnectionBuilder()
.withUrl(serverUrl, httpOptions) .withUrl(serverUrl, httpOptions)
.configureLogging(LogLevel.Warning); .configureLogging(LogLevel.Warning);
if (automaticReconnect && nextRetryDelayInMilliseconds) { if (automaticReconnect && nextRetryDelayInMilliseconds) {
@ -72,7 +72,7 @@ export function useSignalR(options: UseSignalR & SignalROptions) {
try { try {
await connection.start(); await connection.start();
emitter.emit('signalR:onStart'); emitter.emit('signalR:onStart');
} catch(error) { } catch (error) {
emitter.emit('signalR:onError', error); emitter.emit('signalR:onError', error);
} }
} }
@ -85,7 +85,7 @@ export function useSignalR(options: UseSignalR & SignalROptions) {
try { try {
await connection.stop(); await connection.stop();
emitter.emit('signalR:onStop'); emitter.emit('signalR:onStop');
} catch(error) { } catch (error) {
emitter.emit('signalR:onError', error); emitter.emit('signalR:onError', error);
} }
} }

9
apps/vue/src/layouts/default/header/components/notify/useMessages.ts

@ -29,7 +29,7 @@ export function useMessages() {
const { createConfirm, createMessage } = useMessage(); const { createConfirm, createMessage } = useMessage();
const signalR = useSignalR({ const signalR = useSignalR({
autoStart: false, autoStart: false,
serverUrl: '/signalr-hubs/signalr-hubs/messages', serverUrl: '/signalr-hubs/messages',
}); });
onMounted(() => { onMounted(() => {
@ -57,7 +57,7 @@ export function useMessages() {
messageRef.value.list.length = 0; messageRef.value.list.length = 0;
} }
function refreshLastMessages(maxResultCount: number = 10) { function refreshLastMessages(maxResultCount = 10) {
getLastMessages({ getLastMessages({
sorting: '', sorting: '',
state: MessageState.Send, state: MessageState.Send,
@ -69,7 +69,10 @@ export function useMessages() {
function onMessageReceived(message: ChatMessage) { function onMessageReceived(message: ChatMessage) {
// 处理需要本地化的系统消息 // 处理需要本地化的系统消息
if (message.source === MessageSourceTye.System && (message.extraProperties.L === true || message.extraProperties.L === 'true')) { if (
message.source === MessageSourceTye.System &&
(message.extraProperties.L === true || message.extraProperties.L === 'true')
) {
message.content = t( message.content = t(
message.extraProperties.content.ResourceName + '.' + message.extraProperties.content.Name, message.extraProperties.content.ResourceName + '.' + message.extraProperties.content.Name,
message.extraProperties.content.Values as Recordable, message.extraProperties.content.Values as Recordable,

15
apps/vue/src/layouts/default/header/components/notify/useNotifications.ts

@ -29,7 +29,7 @@ export function useNotifications() {
list: [], list: [],
}); });
const signalR = useSignalR({ const signalR = useSignalR({
serverUrl: '/signalr-hubs/signalr-hubs/notifications', serverUrl: '/signalr-hubs/notifications',
}); });
onMounted(() => { onMounted(() => {
@ -50,16 +50,8 @@ export function useNotifications() {
emitter.emit(notificationInfo.name, notificationInfo); emitter.emit(notificationInfo.name, notificationInfo);
return; return;
} }
const { const { title, message, description, creationTime, contentType, severity, type, data } =
title, deserialize(notificationInfo);
message,
description,
creationTime,
contentType,
severity,
type,
data,
} = deserialize(notificationInfo);
const notifier: Notification = { const notifier: Notification = {
id: notificationInfo.id, id: notificationInfo.id,
avatar: data.avatar, avatar: data.avatar,
@ -76,7 +68,6 @@ export function useNotifications() {
notifierRef.value.list.push(notifier); notifierRef.value.list.push(notifier);
} }
function _notification(notifier: Notification, severity: NotificationSeverity) { function _notification(notifier: Notification, severity: NotificationSeverity) {
let message = notifier.description; let message = notifier.description;
switch (notifier.contentType) { switch (notifier.contentType) {

29
apps/vue/src/utils/http/axios/Axios.ts

@ -144,8 +144,20 @@ export class VAxios {
}); });
} }
return this.axiosInstance.request<T>({ let conf: CreateAxiosOptions = cloneDeep(config);
...config, const transform = this.getTransform();
const { requestOptions } = this.options;
const opt: RequestOptions = Object.assign({}, requestOptions);
const { beforeRequestHook, transformRequestHook } = transform || {};
if (beforeRequestHook && isFunction(beforeRequestHook)) {
conf = beforeRequestHook(conf, opt);
}
return new Promise<T>((resolve, reject) => {
this.axiosInstance
.request<T>({
...conf,
method: 'POST', method: 'POST',
data: formData, data: formData,
headers: { headers: {
@ -153,6 +165,19 @@ export class VAxios {
// @ts-ignore // @ts-ignore
ignoreCancelToken: true, ignoreCancelToken: true,
}, },
})
.then((res) => {
if (transformRequestHook && isFunction(transformRequestHook)) {
try {
const ret = transformRequestHook(res as any, opt);
resolve(ret);
} catch (err) {
reject(err || new Error('request error!'));
}
return;
}
resolve(res as unknown as Promise<T>);
});
}); });
} }

5
apps/vue/src/utils/http/axios/index.ts

@ -92,7 +92,10 @@ const transform: AxiosTransform = {
} else { } else {
if (!isString(params)) { if (!isString(params)) {
formatDate && formatRequestDate(params); formatDate && formatRequestDate(params);
if (Reflect.has(config, 'data') && config.data && Object.keys(config.data).length > 0 || config.data instanceof FormData) { if (
(Reflect.has(config, 'data') && config.data && Object.keys(config.data).length > 0) ||
config.data instanceof FormData
) {
config.data = data; config.data = data;
config.params = params; config.params = params;
} else if ( } else if (

42
apps/vue/src/views/account/center/Cloud.vue

@ -6,6 +6,7 @@
<template #description> <template #description>
<DirectoryTree <DirectoryTree
:tree-data="folderTree" :tree-data="folderTree"
:loadedKeys="loadedKeys"
:expandedKeys="expandedKeys" :expandedKeys="expandedKeys"
@expand="fetchFolders" @expand="fetchFolders"
@select="handleSelectFolder" @select="handleSelectFolder"
@ -29,7 +30,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, ref, shallowRef } from 'vue'; import { computed, ref, shallowRef } from 'vue';
import { Card, Tree } from 'ant-design-vue'; import { Card, Tree } from 'ant-design-vue';
import { TreeDataItem } from 'ant-design-vue/es/tree/Tree'; import { AntTreeNodeBaseEvent, TreeDataItem } from 'ant-design-vue/es/tree/Tree';
import { useLocalization } from '/@/hooks/abp/useLocalization'; import { useLocalization } from '/@/hooks/abp/useLocalization';
import { usePermission } from '/@/hooks/web/usePermission'; import { usePermission } from '/@/hooks/web/usePermission';
import { OssObject } from '/@/api/oss-management/objects/model'; import { OssObject } from '/@/api/oss-management/objects/model';
@ -52,6 +53,12 @@
dataRef: any; dataRef: any;
} }
interface NodeInfo {
path?: string;
node: NodeInfo;
parent?: NodeInfo;
}
const { hasPermission } = usePermission(); const { hasPermission } = usePermission();
const { L } = useLocalization(['AbpOssManagement', 'AbpUi']); const { L } = useLocalization(['AbpOssManagement', 'AbpUi']);
const folderTreeRef = ref<{ [key: string]: TreeDataItem }>({ const folderTreeRef = ref<{ [key: string]: TreeDataItem }>({
@ -97,28 +104,36 @@
return false; return false;
} }
}); });
const loadedKeys = ref<string[]>([]);
const expandedKeys = ref<string[]>([]); const expandedKeys = ref<string[]>([]);
function fetchFolders(keys) { function fetchFolders(keys, e) {
expandedKeys.value = keys; expandedKeys.value = keys;
if (!e.expanded) {
const keys = loadedKeys.value;
const findIndex = keys.findLastIndex((key) => key === e.node.key);
findIndex >= 0 && keys.splice(findIndex);
loadedKeys.value = keys;
}
} }
function handleSelectFolder(_, e) { function handleSelectFolder(_, e: AntTreeNodeBaseEvent) {
switch (e.node.dataRef.group) { const path = calculateFilePath(e.node as any);
switch (e.node.group) {
case 'private': case 'private':
case 'public': case 'public':
switchComponent.value = { switchComponent.value = {
name: 'FileList', name: 'FileList',
group: e.node.dataRef.group, group: e.node.group,
path: e.node.dataRef.path, path: path,
dataRef: e.node.dataRef, dataRef: e.node.dataRef,
}; };
break; break;
case 'share': case 'share':
switchComponent.value = { switchComponent.value = {
name: 'ShareList', name: 'ShareList',
group: e.node.dataRef.group, group: e.node.group,
path: e.node.dataRef.path, path: path,
dataRef: e.node.dataRef, dataRef: e.node.dataRef,
}; };
break; break;
@ -128,7 +143,7 @@
function handleAppendFolder(folders: OssObject[]) { function handleAppendFolder(folders: OssObject[]) {
switchComponent.value.dataRef.children = folders.map((obj) => { switchComponent.value.dataRef.children = folders.map((obj) => {
return { return {
key: obj.name, key: switchComponent.value.path + obj.name,
group: switchComponent.value.group, group: switchComponent.value.group,
title: obj.name, title: obj.name,
path: obj.name, path: obj.name,
@ -136,4 +151,13 @@
}; };
}); });
} }
function calculateFilePath(e: NodeInfo) {
let path = e.path ?? '';
if (e.parent?.node?.path) {
path = e.parent.node.path + path;
path = calculateFilePath(e.parent) + path;
}
return path;
}
</script> </script>

4
apps/vue/src/views/account/setting/BaseSetting.vue

@ -84,8 +84,8 @@
return new Promise<void>((resolve, reject) => { return new Promise<void>((resolve, reject) => {
upload(params.file, 'avatar', params.filename) upload(params.file, 'avatar', params.filename)
.then((res) => { .then((res) => {
const path = encodeURIComponent(res.data.path.substring(0, res.data.path.length - 1)); const path = encodeURIComponent(res.path.substring(0, res.path.length - 1));
changeAvatar({ avatarUrl: `${path}/${res.data.name}` }) changeAvatar({ avatarUrl: `${path}/${res.name}` })
.then(() => { .then(() => {
createMessage.success(L('Successful')); createMessage.success(L('Successful'));
emits('profile-change'); emits('profile-change');

2
apps/vue/src/views/oss-management/objects/components/OssManagePage.vue

@ -42,7 +42,7 @@
import { Card, Select } from 'ant-design-vue'; import { Card, Select } from 'ant-design-vue';
import { useLocalization } from '/@/hooks/abp/useLocalization'; import { useLocalization } from '/@/hooks/abp/useLocalization';
import { getContainers } from '/@/api/oss-management/containers'; import { getContainers } from '/@/api/oss-management/containers';
import { OssContainer } from '/@/api/oss-management/model/ossModel'; import { OssContainer } from '/@/api/oss-management/containers/model';
import FolderTree from './FolderTree.vue'; import FolderTree from './FolderTree.vue';
import FileList from './FileList.vue'; import FileList from './FileList.vue';

2
apps/vue/vite.config.ts

@ -18,7 +18,7 @@ function buildWeatherProxy(): Record<string, ProxyOptions> {
'/wapi': { '/wapi': {
target: 'http://www.nmc.cn', target: 'http://www.nmc.cn',
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace('/wapi', ''), rewrite: (path) => path,
headers: { headers: {
host: 'www.nmc.cn', host: 'www.nmc.cn',
referer: 'http://www.nmc.cn', referer: 'http://www.nmc.cn',

Loading…
Cancel
Save