登录页logo配置功能、logo替换 12.26

dev
zhc077 11 months ago
parent 5445d499d8
commit 9602f1934b
  1. 3
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfile_persion/controller/UpfilePersionController.java
  2. 7
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfile_persion/service/impl/UpfilePersionServiceImpl.java
  3. 2
      jeecg-boot-master/jeecg-module-system/jeecg-system-start/src/main/resources/application-prod.yml
  4. BIN
      jeecgboot-vue3-master/public/resource/img/comp/comp_logo.png
  5. 2
      jeecgboot-vue3-master/src/layouts/default/header/components/user-dropdown/index.vue
  6. 3
      jeecgboot-vue3-master/src/settings/siteSetting.ts

@ -373,9 +373,6 @@ public class UpfilePersionController extends JeecgController<UpfilePersion, IUpf
@PostMapping("loginPageImageUpload")
public Result<String> loginPageImageUpload(@RequestParam("files") MultipartFile[] file,
@RequestParam("flag") String flag) {
if (ObjectUtils.isEmpty(file)) {
return Result.error("请选择文件");
}
return upfilePersionService.logoImageUpload(file,flag);
}

@ -24,6 +24,8 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.multipart.MultipartFile;
@ -401,11 +403,14 @@ public class UpfilePersionServiceImpl
@Override
public Result<String> logoImageUpload(MultipartFile[] multipartFiles, String flag) {
Assert.notNull(multipartFiles, "请选择文件");
Assert.notNull(flag, "flag为空");
MultipartFile file = multipartFiles[0];
// 当前文件的格式
String currentFormat = Objects.requireNonNull(file.getOriginalFilename()).substring(file.getOriginalFilename().lastIndexOf(".") + 1);
// 验证格式
if (!"png".equals(currentFormat)) {
if (!"png".equalsIgnoreCase(currentFormat)) {
return Result.error("文件格式不符合要求,请上传.png文件!");
}

@ -306,7 +306,7 @@ third-app:
comp:
logo-image:
path: /user/local/www/
path: /user/local/www/comp
work:
# 作品目录,目录分隔符无论操作系统请用"/",路径末尾一定要有"/"
save-path: /opt/jeecgboot/upFiles/comp/zuopin

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 1.5 MiB

@ -11,7 +11,7 @@
<template #overlay>
<Menu @click="handleMenuClick">
<MenuItem key="doc" :text="t('layout.header.dropdownItemDoc')" icon="ion:document-text-outline" v-if="getShowDoc" />
<!-- <MenuItem key="doc" :text="t('layout.header.dropdownItemDoc')" icon="ion:document-text-outline" v-if="getShowDoc" />-->
<MenuDivider v-if="getShowDoc" />
<MenuItem key="account" :text="t('layout.header.dropdownItemSwitchAccount')" icon="ant-design:setting-outlined" />
<MenuItem key="password" :text="t('layout.header.dropdownItemSwitchPassword')" icon="ant-design:edit-outlined" />

@ -5,5 +5,4 @@ export const GITHUB_URL = 'https://github.com/jeecgboot/jeecgboot-vue3';
export const DOC_URL = 'http://help.jeecg.com';
// site url
// export const SITE_URL = 'http://www.jeecg.com';
export const SITE_URL = 'https://www.huanghuai.edu.cn/';
export const SITE_URL = 'http://www.jeecg.com';

Loading…
Cancel
Save