提交 0ef1b32d 编写于 作者: doc_wei's avatar doc_wei

解决图片定位错误的问题

上级 dd87110b
/*******************************************************************************
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
******************************************************************************/
package com.skyeye.common.filter;
import org.springframework.context.EmbeddedValueResolverAware;
import org.springframework.stereotype.Component;
import org.springframework.util.StringValueResolver;
/**
* @ClassName: PropertiesUtil
* @Description: 非spring容器管理的类可以通过此类获取配置值
* @author: skyeye云系列--卫志强
* @date: 2022/1/3 15:49
* @Copyright: 2021 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
*/
@Component
public class PropertiesUtil implements EmbeddedValueResolverAware {
private static StringValueResolver resolver;
@Override
public void setEmbeddedValueResolver(StringValueResolver resolver) {
PropertiesUtil.resolver = resolver;
}
public static String getPropertiesValue(String key){
return resolver.resolveStringValue(key);
}
}
......@@ -35,8 +35,6 @@ public class SessionFilter implements Filter {
*/
public static final String LOGIN_PAGE = "/tpl/index/login.html";
public static final String WEB_API_URL = "http://localhost:8081/";
public static final String CONFIG_URL = "configRation.json";
@Override
......@@ -64,7 +62,8 @@ public class SessionFilter implements Filter {
}
if(url.startsWith("/images")){
servletResponse.sendRedirect(WEB_API_URL + url);
String fileBasePath = PropertiesUtil.getPropertiesValue("${skyeye.configuation.config.fileBasePath}");
servletResponse.sendRedirect(fileBasePath + url);
return;
}
......
......@@ -444,7 +444,7 @@ layui.config({
// 左侧底部功能
$("body").on("click", ".tradition-left-bottom .other-item", function(e){
var dataMenu = $(this);
var icon = dataid.find(".other-item-img").html();
var icon = dataMenu.find(".other-item-img").html();
indexMenu.loadTraditionPage(dataMenu, icon);
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册