diff --git a/yanzhu-bigscreen/public/css/largeScreenLayout.css b/yanzhu-bigscreen/public/css/largeScreenLayout.css index 05a14d10..79dcfff9 100644 --- a/yanzhu-bigscreen/public/css/largeScreenLayout.css +++ b/yanzhu-bigscreen/public/css/largeScreenLayout.css @@ -160,7 +160,7 @@ } .header-title-user-info{ text-align: right; - padding-right: 40px; + padding-right: 60px; } .command{ cursor: pointer; diff --git a/yanzhu-bigscreen/src/components/header.vue b/yanzhu-bigscreen/src/components/header.vue index d65c6396..cf3ba1c7 100644 --- a/yanzhu-bigscreen/src/components/header.vue +++ b/yanzhu-bigscreen/src/components/header.vue @@ -29,6 +29,22 @@ + + + + + + + + @@ -40,7 +56,8 @@ export default { return { nav: 1, selProject: '', - projects: [] + projects: [], + isFullScreen: false, } }, computed: { @@ -68,6 +85,13 @@ export default { }); }, methods: { + toggleFullScreen() { + let el = document.body; + this.$toggleFullScreen(el); + setTimeout(() => { + this.isFullScreen = document.fullscreenElement == el; + }, 400); + }, doProjectSelect() { let tmps = this.projects.filter(d => d.id == this.selProject); if (tmps.length > 0) { diff --git a/yanzhu-gateway/src/main/java/com/yanzhu/gateway/config/CaptchaConfig.java b/yanzhu-gateway/src/main/java/com/yanzhu/gateway/config/CaptchaConfig.java index 5cccb777..719e6f4a 100644 --- a/yanzhu-gateway/src/main/java/com/yanzhu/gateway/config/CaptchaConfig.java +++ b/yanzhu-gateway/src/main/java/com/yanzhu/gateway/config/CaptchaConfig.java @@ -49,11 +49,11 @@ public class CaptchaConfig DefaultKaptcha defaultKaptcha = new DefaultKaptcha(); Properties properties = new Properties(); // 是否有边框 默认为true 我们可以自己设置yes,no - properties.setProperty(KAPTCHA_BORDER, "yes"); + properties.setProperty(KAPTCHA_BORDER, "no"); // 边框颜色 默认为Color.BLACK - properties.setProperty(KAPTCHA_BORDER_COLOR, "105,179,90"); + //properties.setProperty(KAPTCHA_BORDER_COLOR, "105,179,90"); // 验证码文本字符颜色 默认为Color.BLACK - properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_COLOR, "blue"); + properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_COLOR, "white"); // 验证码图片宽度 默认为200 properties.setProperty(KAPTCHA_IMAGE_WIDTH, "160"); // 验证码图片高度 默认为50 @@ -76,6 +76,7 @@ public class CaptchaConfig properties.setProperty(KAPTCHA_NOISE_IMPL, "com.google.code.kaptcha.impl.NoNoise"); // 图片样式 水纹com.google.code.kaptcha.impl.WaterRipple 鱼眼com.google.code.kaptcha.impl.FishEyeGimpy 阴影com.google.code.kaptcha.impl.ShadowGimpy properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, "com.google.code.kaptcha.impl.ShadowGimpy"); + properties.setProperty(KAPTCHA_BACKGROUND_IMPL, "com.yanzhu.gateway.config.NoBackground"); Config config = new Config(properties); defaultKaptcha.setConfig(config); return defaultKaptcha; diff --git a/yanzhu-gateway/src/main/java/com/yanzhu/gateway/config/NoBackground.java b/yanzhu-gateway/src/main/java/com/yanzhu/gateway/config/NoBackground.java new file mode 100644 index 00000000..cb007c63 --- /dev/null +++ b/yanzhu-gateway/src/main/java/com/yanzhu/gateway/config/NoBackground.java @@ -0,0 +1,29 @@ +package com.yanzhu.gateway.config; + +import com.google.code.kaptcha.BackgroundProducer; +import com.google.code.kaptcha.util.Configurable; + +import java.awt.*; +import java.awt.geom.Rectangle2D; +import java.awt.image.BufferedImage; + +public class NoBackground extends Configurable implements BackgroundProducer { + @Override + public BufferedImage addBackground(BufferedImage baseImage) + { + Color colorFrom = getConfig().getBackgroundColorFrom(); + Color colorTo = getConfig().getBackgroundColorTo(); + + int width = baseImage.getWidth(); + int height = baseImage.getHeight(); + + // create an opaque image + BufferedImage imageWithBackground = new BufferedImage(width, height, + BufferedImage.TRANSLUCENT); + + Graphics2D graph = (Graphics2D) imageWithBackground.getGraphics(); + graph.drawImage(baseImage, 0, 0, null); + + return imageWithBackground; + } +} diff --git a/yanzhu-gateway/src/main/java/com/yanzhu/gateway/service/impl/ValidateCodeServiceImpl.java b/yanzhu-gateway/src/main/java/com/yanzhu/gateway/service/impl/ValidateCodeServiceImpl.java index 5404ae28..b9feb1a9 100644 --- a/yanzhu-gateway/src/main/java/com/yanzhu/gateway/service/impl/ValidateCodeServiceImpl.java +++ b/yanzhu-gateway/src/main/java/com/yanzhu/gateway/service/impl/ValidateCodeServiceImpl.java @@ -81,7 +81,7 @@ public class ValidateCodeServiceImpl implements ValidateCodeService FastByteArrayOutputStream os = new FastByteArrayOutputStream(); try { - ImageIO.write(image, "jpg", os); + ImageIO.write(image, "png", os); } catch (IOException e) { diff --git a/yanzhu-ui-vue3/src/assets/icons/svg/validCode.svg b/yanzhu-ui-vue3/src/assets/icons/svg/validCode.svg index cfb10214..6f98e604 100644 --- a/yanzhu-ui-vue3/src/assets/icons/svg/validCode.svg +++ b/yanzhu-ui-vue3/src/assets/icons/svg/validCode.svg @@ -1 +1,8 @@ - \ No newline at end of file + + + + + \ No newline at end of file diff --git a/yanzhu-ui-vue3/src/assets/images/loginbg.jpeg b/yanzhu-ui-vue3/src/assets/images/loginbg.jpeg new file mode 100644 index 00000000..a825f44a Binary files /dev/null and b/yanzhu-ui-vue3/src/assets/images/loginbg.jpeg differ diff --git a/yanzhu-ui-vue3/src/assets/images/loginbg2.png b/yanzhu-ui-vue3/src/assets/images/loginbg2.png new file mode 100644 index 00000000..1ab6882d Binary files /dev/null and b/yanzhu-ui-vue3/src/assets/images/loginbg2.png differ diff --git a/yanzhu-ui-vue3/src/assets/images/loginbg3.png b/yanzhu-ui-vue3/src/assets/images/loginbg3.png new file mode 100644 index 00000000..1ade253d Binary files /dev/null and b/yanzhu-ui-vue3/src/assets/images/loginbg3.png differ diff --git a/yanzhu-ui-vue3/src/assets/images/pay.png b/yanzhu-ui-vue3/src/assets/images/pay.png deleted file mode 100644 index bb8b9672..00000000 Binary files a/yanzhu-ui-vue3/src/assets/images/pay.png and /dev/null differ diff --git a/yanzhu-ui-vue3/src/views/login.vue b/yanzhu-ui-vue3/src/views/login.vue index 6759ed8f..318b80da 100644 --- a/yanzhu-ui-vue3/src/views/login.vue +++ b/yanzhu-ui-vue3/src/views/login.vue @@ -1,54 +1,31 @@ @@ -114,12 +93,12 @@ function handleLogin() { } // 调用action的登录方法 userStore.login(loginForm.value).then(() => { - if(route.query?.redirect){ - location.href=route.query.redirect; - }else{ - router.push({ path:"/" }); + if (route.query?.redirect) { + location.href = route.query.redirect; + } else { + router.push({ path: "/" }); } - + }).catch(() => { loading.value = false; // 重新获取验证码 @@ -156,66 +135,138 @@ getCode(); getCookie(); -