diff --git a/.env.development b/.env.development index 42abc19..c409d15 100644 --- a/.env.development +++ b/.env.development @@ -15,7 +15,10 @@ VITE_APP_MONITRO_ADMIN = 'http://localhost:9090/admin/applications' # SnailJob 控制台地址 VITE_APP_SNAILJOB_ADMIN = 'http://localhost:8800/snail-job' -VITE_APP_PORT = 80 +# 文件预览地址 +VITE_APP_PREVIEW = 'http://101.37.69.204:8012/onlinePreview' + +VITE_APP_PORT = 81 # 接口加密功能开关(如需关闭 后端也必须对应关闭) VITE_APP_ENCRYPT = true diff --git a/.env.production b/.env.production index be78030..6da7104 100644 --- a/.env.production +++ b/.env.production @@ -12,13 +12,16 @@ VITE_APP_MONITRO_ADMIN = '/admin/applications' # SnailJob 控制台地址 VITE_APP_SNAILJOB_ADMIN = 'http://localhost:8800/snail-job' +# 文件预览地址 +VITE_APP_PREVIEW = 'http://101.37.69.204:8012/onlinePreview' + # 生产环境 VITE_APP_BASE_API = '/api-school' # 是否在打包时开启压缩,支持 gzip 和 brotli VITE_BUILD_COMPRESS = gzip -VITE_APP_PORT = 80 +VITE_APP_PORT = 81 # 接口加密功能开关(如需关闭 后端也必须对应关闭) VITE_APP_ENCRYPT = true diff --git a/package.json b/package.json index f5bc28b..3afe348 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "school-file-web", "version": "1.0.0", - "description": "邗实校本资源本", + "description": "校本资源库", "author": "mozhe", "license": "MIT", "type": "module", @@ -37,6 +37,7 @@ "fuse.js": "7.0.0", "highlight.js": "11.9.0", "image-conversion": "^2.1.1", + "js-base64": "^3.7.7", "js-cookie": "3.0.5", "jsencrypt": "3.3.2", "moddle": "6.2.3", diff --git a/src/api/system/oss/index.ts b/src/api/system/oss/index.ts index 8987300..7346b24 100644 --- a/src/api/system/oss/index.ts +++ b/src/api/system/oss/index.ts @@ -36,7 +36,7 @@ export function previewPerson(ossId: string | number): any { return request({ url: '/oss/person/preview/' + ossId, method: 'post', - responseType: 'blob' + // responseType: 'blob' }); } @@ -57,7 +57,7 @@ export function previewTextbook(ossId: string | number): any { return request({ url: '/file/textbook/preview/' + ossId, method: 'post', - responseType: 'blob' + // responseType: 'blob' }); } @@ -78,7 +78,7 @@ export function previewResource(ossId: string | number): any { return request({ url: '/file/resource/preview/' + ossId, method: 'post', - responseType: 'blob' + // responseType: 'blob' }); } @@ -284,4 +284,11 @@ export const getVolume = (query?: any): AxiosPromise => { method: 'get', params: query }); +}; + +export const getCatalogPersonDownload = (id: any): AxiosPromise => { + return request({ + url: `/oss/person/download/${id}`, + method: 'post' + }); }; \ No newline at end of file diff --git a/src/components/FileMd5Upload/index.vue b/src/components/FileMd5Upload/index.vue index 7bb7dac..1bced9e 100644 --- a/src/components/FileMd5Upload/index.vue +++ b/src/components/FileMd5Upload/index.vue @@ -48,7 +48,7 @@ const props = defineProps({ // 大小限制(MB) fileSize: propTypes.number.def(1024), // 文件类型, 例如['png', 'jpg', 'jpeg'] - fileType: propTypes.array.def(['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'pdf', 'txt']), + fileType: propTypes.array.def(['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'pdf', 'txt', 'jpg', 'png', 'jpeg', 'gif', 'bmp', 'mp4', 'mov', 'wmv', 'flv', 'avi', 'mkv', 'mp3', 'wma']), // 是否显示提示 isShowTip: propTypes.bool.def(true) }); diff --git a/src/components/iFrame/index.vue b/src/components/iFrame/index.vue index 98f2224..bb26618 100644 --- a/src/components/iFrame/index.vue +++ b/src/components/iFrame/index.vue @@ -16,7 +16,7 @@ const loading = ref(true); const url = computed(() => props.src); onMounted(() => { - setTimeout(() => { + setTimeout(() => {system:oss:upload loading.value = false; }, 300); window.onresize = function temp() { diff --git a/src/views/index.vue b/src/views/index.vue index 8b8603e..fc54921 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -105,31 +105,31 @@
- +

添加老师

- +

部门管理

- +

我的空间

- +

同步教材

- +

专题资源

diff --git a/src/views/resource/catalogPerson/components/FileList.vue b/src/views/resource/catalogPerson/components/FileList.vue index 5980cdf..9774680 100644 --- a/src/views/resource/catalogPerson/components/FileList.vue +++ b/src/views/resource/catalogPerson/components/FileList.vue @@ -27,12 +27,10 @@ @@ -95,27 +92,7 @@ - - - - - - - -
{{ txt }} -
- - -
- - +