From 5b1074a8db4eebe40c963987eeeb02cbfd79f158 Mon Sep 17 00:00:00 2001 From: Vinjor Date: Thu, 14 Aug 2025 15:08:13 +0800 Subject: [PATCH] 1 --- .../controller/common/CommonController.java | 10 +- .../src/main/resources/application-druid.yml | 10 +- .../resources/mapper/base/BaseTempMapper.xml | 2 + dl_vue/.env.development | 3 + dl_vue/.env.production | 3 + dl_vue/src/components/FileUpload/index.vue | 2 +- dl_vue/src/views/base/temp/index.vue | 73 +-- .../views/busi/category/form/categoryForm.vue | 429 ++++++++++----- dl_vue/src/views/busi/new/newForm.vue | 498 +++++++++++++----- dl_vue/src/views/busi/prod/prodForm.vue | 16 +- 10 files changed, 714 insertions(+), 332 deletions(-) diff --git a/dl_admin/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java b/dl_admin/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java index 8174eb1..91dd1ca 100644 --- a/dl_admin/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java +++ b/dl_admin/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java @@ -106,12 +106,14 @@ public class CommonController String fileUrl = fileService.upload(file); long size = file.getSize()/1024; BufferedImage bufferedImage = ImageIO.read(file.getInputStream()); - int width = bufferedImage.getWidth(); - int height = bufferedImage.getHeight(); + if(null!=bufferedImage){ + int width = bufferedImage.getWidth(); + int height = bufferedImage.getHeight(); + ajax.put("width", width); + ajax.put("height", height); + } ajax.put("name", file.getOriginalFilename()); ajax.put("size", size); - ajax.put("width", width); - ajax.put("height", height); ajax.put("url", fileUrl); ajax.put("fileName", fileUrl); } diff --git a/dl_admin/ruoyi-admin/src/main/resources/application-druid.yml b/dl_admin/ruoyi-admin/src/main/resources/application-druid.yml index 374e538..ca19f11 100644 --- a/dl_admin/ruoyi-admin/src/main/resources/application-druid.yml +++ b/dl_admin/ruoyi-admin/src/main/resources/application-druid.yml @@ -4,10 +4,14 @@ spring: type: com.alibaba.druid.pool.DruidDataSource driverClassName: com.mysql.cj.jdbc.Driver druid: - # 主库数据源 + # 主库数据源-点亮开发库 +# master: +# url: jdbc:mysql://82.156.161.160:3306/dl_site_system?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +# username: site +# password: 123456 + # 主库数据源-客户测试服务器 master: -# url: jdbc:mysql://124.222.105.7:3306/dl_notice?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - url: jdbc:mysql://82.156.161.160:3306/dl_site_system?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + url: jdbc:mysql://114.132.197.85:3306/dl_site_system?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: site password: 123456 # 从库数据源 diff --git a/dl_admin/ruoyi-admin/src/main/resources/mapper/base/BaseTempMapper.xml b/dl_admin/ruoyi-admin/src/main/resources/mapper/base/BaseTempMapper.xml index 26174ea..eba7759 100644 --- a/dl_admin/ruoyi-admin/src/main/resources/mapper/base/BaseTempMapper.xml +++ b/dl_admin/ruoyi-admin/src/main/resources/mapper/base/BaseTempMapper.xml @@ -24,10 +24,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" \ No newline at end of file diff --git a/dl_vue/.env.development b/dl_vue/.env.development index 5c95054..63c54c0 100644 --- a/dl_vue/.env.development +++ b/dl_vue/.env.development @@ -12,3 +12,6 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true # websocket VUE_APP_WEBSOCKET = 'ws://localhost:8099/ws/asset/' + +# 产品、文章预览 +VUE_APP_PREVIEW = 'http://www.lighting-it.cn/admin-preview/' diff --git a/dl_vue/.env.production b/dl_vue/.env.production index 2bfeba0..097cffc 100644 --- a/dl_vue/.env.production +++ b/dl_vue/.env.production @@ -9,3 +9,6 @@ VUE_APP_BASE_API = 'http://114.132.197.85:8099' # websocket VUE_APP_WEBSOCKET = 'ws://114.132.197.85:8099/ws/asset/' + +# 产品、文章预览 +VUE_APP_PREVIEW = 'http://www.lighting-it.cn/admin-preview/' diff --git a/dl_vue/src/components/FileUpload/index.vue b/dl_vue/src/components/FileUpload/index.vue index 1492065..6b59885 100644 --- a/dl_vue/src/components/FileUpload/index.vue +++ b/dl_vue/src/components/FileUpload/index.vue @@ -29,7 +29,7 @@
  • - + {{ getFileName(file.name) }}
    diff --git a/dl_vue/src/views/base/temp/index.vue b/dl_vue/src/views/base/temp/index.vue index 2a7e824..441a006 100644 --- a/dl_vue/src/views/base/temp/index.vue +++ b/dl_vue/src/views/base/temp/index.vue @@ -1,6 +1,6 @@