From c24fc4282c81506812019c57e2008fe75b4b8f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=9A=E5=B1=BF?= <1491182878@qq.com> Date: Tue, 20 Jul 2021 00:54:50 +0000 Subject: [PATCH 01/19] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E5=90=8D=E5=8D=95=E8=AF=8D=E6=8B=BC=E5=86=99=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/framework/web/service/SysLoginService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java index d605303e..37c38866 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java @@ -62,7 +62,7 @@ public class SysLoginService // 验证码开关 if (captchaOnOff) { - validateCapcha(username, code, uuid); + validateCaptcha(username, code, uuid); } // 用户验证 Authentication authentication = null; @@ -100,7 +100,7 @@ public class SysLoginService * @param uuid 唯一标识 * @return 结果 */ - public void validateCapcha(String username, String code, String uuid) + public void validateCaptcha(String username, String code, String uuid) { String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid; String captcha = redisCache.getCacheObject(verifyKey); From cdace51197a7acf10033cc12f2dce3a7aad326e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E4=BF=8A=E4=B8=9C?= <1172482914@qq.com> Date: Tue, 20 Jul 2021 04:49:22 +0000 Subject: [PATCH 02/19] =?UTF-8?q?code=3D401=E6=97=B6request=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E6=B2=A1=E6=9C=89=E8=BF=94=E5=9B=9EPromise.reject=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/utils/request.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js index a510d2da..6a7cbfa3 100644 --- a/ruoyi-ui/src/utils/request.js +++ b/ruoyi-ui/src/utils/request.js @@ -64,6 +64,7 @@ service.interceptors.response.use(res => { location.href = '/index'; }) }).catch(() => {}); + return Promise.reject('error') } else if (code === 500) { Message({ message: msg, From c43f9bc3c2433982706d289833aa2d5cb856ea16 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 24 Jul 2021 18:20:55 +0800 Subject: [PATCH 03/19] =?UTF-8?q?=E9=A1=B6=E9=83=A8=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E6=8E=92=E9=99=A4=E9=9A=90=E8=97=8F=E7=9A=84=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/TopNav/index.vue | 15 +++++++++++++-- ruoyi-ui/src/router/index.js | 2 -- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ruoyi-ui/src/components/TopNav/index.vue b/ruoyi-ui/src/components/TopNav/index.vue index c8837f2a..edb9c532 100644 --- a/ruoyi-ui/src/components/TopNav/index.vue +++ b/ruoyi-ui/src/components/TopNav/index.vue @@ -87,7 +87,7 @@ export default { // 默认激活的菜单 activeMenu() { const path = this.$route.path; - let activePath = this.routers[0].path; + let activePath = this.defaultRouter(); if (path.lastIndexOf("/") > 0) { const tmpPath = path.substring(1, path.length); activePath = "/" + tmpPath.substring(0, tmpPath.indexOf("/")); @@ -100,7 +100,7 @@ export default { } var routes = this.activeRoutes(activePath); if (routes.length === 0) { - activePath = this.currentIndex || this.routers[0].path + activePath = this.currentIndex || this.defaultRouter() this.activeRoutes(activePath); } return activePath; @@ -121,6 +121,17 @@ export default { const width = document.body.getBoundingClientRect().width / 3; this.visibleNumber = parseInt(width / 85); }, + // 默认激活的路由 + defaultRouter() { + let router; + Object.keys(this.routers).some((key) => { + if (!this.routers[key].hidden) { + router = this.routers[key].path; + return true; + } + }); + return router; + }, // 菜单选择事件 handleSelect(key, keyPath) { this.currentIndex = key; diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index 7f0b1059..d0c4b0b0 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -5,8 +5,6 @@ Vue.use(Router) /* Layout */ import Layout from '@/layout' -import ParentView from '@/components/ParentView'; -import InnerLink from '@/layout/components/InnerLink' /** * Note: 路由配置项 From bb87f35797f5955fb4e7a8a7b886fa4c9cdc9069 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 25 Jul 2021 08:57:01 +0800 Subject: [PATCH 04/19] =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/Editor/index.vue | 26 ++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/ruoyi-ui/src/components/Editor/index.vue b/ruoyi-ui/src/components/Editor/index.vue index 33b3a62a..6bb5a18d 100644 --- a/ruoyi-ui/src/components/Editor/index.vue +++ b/ruoyi-ui/src/components/Editor/index.vue @@ -2,6 +2,7 @@
{ - // this.uploadType = "video"; - // if (value) { - // this.$refs.upload.$children[0].$refs.input.click(); - // } else { - // this.quill.format("video", false); - // } - // }); } this.Quill.pasteHTML(this.currentValue); this.Quill.on("text-change", (delta, oldDelta, source) => { @@ -158,6 +156,18 @@ export default { this.$emit("on-editor-change", eventName, ...args); }); }, + // 上传前校检格式和大小 + handleBeforeUpload(file) { + // 校检文件大小 + if (this.fileSize) { + const isLt = file.size / 1024 / 1024 < this.fileSize; + if (!isLt) { + this.$message.error(`上传文件大小不能超过 ${this.fileSize} MB!`); + return false; + } + } + return true; + }, handleUploadSuccess(res, file) { // 获取富文本组件实例 let quill = this.Quill; From 0a516e30014364fc9a9b873864ebe2bad40e80b9 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 25 Jul 2021 10:20:52 +0800 Subject: [PATCH 05/19] =?UTF-8?q?=E6=9B=B4=E5=A4=9A=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=B7=BB=E5=8A=A0=E6=9D=83=E9=99=90=E6=8E=A7?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/monitor/job/index.vue | 2 +- ruoyi-ui/src/views/system/role/index.vue | 2 +- ruoyi-ui/src/views/system/user/index.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/ruoyi-ui/src/views/monitor/job/index.vue index a1bb4e20..f08f238f 100644 --- a/ruoyi-ui/src/views/monitor/job/index.vue +++ b/ruoyi-ui/src/views/monitor/job/index.vue @@ -126,7 +126,7 @@ @click="handleDelete(scope.row)" v-hasPermi="['monitor:job:remove']" >删除 - + 更多 diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue index af824da2..e48043f6 100644 --- a/ruoyi-ui/src/views/system/role/index.vue +++ b/ruoyi-ui/src/views/system/role/index.vue @@ -139,7 +139,7 @@ @click="handleDelete(scope.row)" v-hasPermi="['system:role:remove']" >删除 - + 更多 diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index 7208dcf1..3a608bb1 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -182,7 +182,7 @@ @click="handleDelete(scope.row)" v-hasPermi="['system:user:remove']" >删除 - + 更多 From 60673b3b645f95cfcfa77220f997c4b9fd81dc22 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 25 Jul 2021 10:35:37 +0800 Subject: [PATCH 06/19] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=88=86=E9=A1=B5=E5=90=88=E7=90=86=E5=8C=96=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/application.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index eb6af14c..918d354f 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -100,7 +100,6 @@ mybatis: # PageHelper分页插件 pagehelper: helperDialect: mysql - reasonable: true supportMethodsArguments: true params: count=countSql From 856d1ceba8162cca4da1df39d336a0e493e8e955 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 25 Jul 2021 19:06:57 +0800 Subject: [PATCH 07/19] =?UTF-8?q?=E9=A1=B6=E9=83=A8=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/TopNav/index.vue | 30 +++++++++++++----------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/ruoyi-ui/src/components/TopNav/index.vue b/ruoyi-ui/src/components/TopNav/index.vue index edb9c532..1b7c4d9e 100644 --- a/ruoyi-ui/src/components/TopNav/index.vue +++ b/ruoyi-ui/src/components/TopNav/index.vue @@ -12,7 +12,7 @@ - +