diff --git a/api/app/lib/controllers/means/index.js b/api/app/lib/controllers/means/index.js index 878de2c..ec83b08 100644 --- a/api/app/lib/controllers/means/index.js +++ b/api/app/lib/controllers/means/index.js @@ -1,6 +1,7 @@ 'use strict'; async function addEditFile (ctx, next) { + let message = '添加文件夹失败' try { const models = ctx.fs.dc.models; const data = ctx.request.body; @@ -14,7 +15,8 @@ async function addEditFile (ctx, next) { } }) if (onefind) { - throw '文件夹名称重复' + message = '已有同层级文件夹' + throw message } @@ -33,7 +35,7 @@ async function addEditFile (ctx, next) { ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`) ctx.status = 400; ctx.body = { - "message": '添加文件夹失败' + "message": message } } } diff --git a/web/Dockerfile b/web/Dockerfile index 0ef1cde..2cc0abe 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -9,6 +9,7 @@ EXPOSE 8080 RUN npm config set registry=http://10.8.30.22:7000 RUN echo "{\"time\":\"$BUILD_TIMESTAMP\",\"build\": \"$BUILD_NUMBER\",\"revision\": \"$SVN_REVISION_1\",\"URL\":\"$SVN_URL_1\"}" > version.json RUN npm cache clean -f +RUN rm -rf package-lock.json RUN npm install --registry http://10.8.30.22:7000 RUN npm run build RUN rm -rf client/src diff --git a/web/client/src/sections/means/components/fileModal.jsx b/web/client/src/sections/means/components/fileModal.jsx index 7f72f78..a94300f 100644 --- a/web/client/src/sections/means/components/fileModal.jsx +++ b/web/client/src/sections/means/components/fileModal.jsx @@ -50,7 +50,7 @@ function FileModal (props) { diff --git a/web/client/src/sections/means/containers/projectMeans.jsx b/web/client/src/sections/means/containers/projectMeans.jsx index fce98a9..59f0927 100644 --- a/web/client/src/sections/means/containers/projectMeans.jsx +++ b/web/client/src/sections/means/containers/projectMeans.jsx @@ -196,11 +196,6 @@ const Rest = (props) => { { > + {(r.url?.indexOf("txt") !== -1 || r.url?.indexOf("rar") !== -1 || r.url?.indexOf("zip") !== -1) ? "" + : + + } + + }