mirror of
https://github.com/dataease/dataease.git
synced 2026-05-23 05:48:13 +08:00
feat: 自动识别移动端配置
This commit is contained in:
@@ -116,7 +116,7 @@ public interface ParamConstants {
|
||||
DS_CHECK_INTERVAL_TYPE("basic.dsCheckIntervalType"),
|
||||
DEFAULT_LOGIN_TYPE("basic.loginType"),
|
||||
OPEN_HOME_PAGE("ui.openHomePage"),
|
||||
|
||||
AUTO_MOBILE("ui.autoMobile"),
|
||||
OPEN_MARKET_PAGE("ui.openMarketPage"),
|
||||
TEMPLATE_MARKET_ULR("basic.templateMarketUlr"),
|
||||
|
||||
|
||||
@@ -29,5 +29,7 @@ public class BasicInfo extends LoginLimitInfo implements Serializable {
|
||||
private String dsCheckInterval;
|
||||
@ApiModelProperty("数据源检测时间间隔类型")
|
||||
private String dsCheckIntervalType;
|
||||
@ApiModelProperty("自动识别移动端")
|
||||
private String autoMobile = "true";
|
||||
|
||||
}
|
||||
|
||||
@@ -62,9 +62,11 @@ public class SystemParameterService {
|
||||
List<SystemParameter> homePageList = this.getParamList("ui.openHomePage");
|
||||
List<SystemParameter> marketPageList = this.getParamList("ui.openMarketPage");
|
||||
List<SystemParameter> loginLimitList = this.getParamList("loginlimit");
|
||||
List<SystemParameter> autoMobileList = this.getParamList("ui.autoMobile");
|
||||
paramList.addAll(homePageList);
|
||||
paramList.addAll(marketPageList);
|
||||
paramList.addAll(loginLimitList);
|
||||
paramList.addAll(autoMobileList);
|
||||
BasicInfo result = new BasicInfo();
|
||||
result.setOpenHomePage("true");
|
||||
Map<String, LoginLimitXpackService> beansOfType = SpringContextUtil.getApplicationContext().getBeansOfType((LoginLimitXpackService.class));
|
||||
@@ -92,6 +94,10 @@ public class SystemParameterService {
|
||||
boolean open = StringUtils.equals("true", param.getParamValue());
|
||||
result.setOpenMarketPage(open ? "true" : "false");
|
||||
}
|
||||
if (StringUtils.equals(param.getParamKey(), ParamConstants.BASIC.AUTO_MOBILE.getValue())) {
|
||||
boolean close = StringUtils.equals("false", param.getParamValue());
|
||||
result.setAutoMobile(close ? "false" : "true");
|
||||
}
|
||||
if (StringUtils.equals(param.getParamKey(), ParamConstants.BASIC.TEMPLATE_MARKET_ULR.getValue())) {
|
||||
result.setTemplateMarketUlr(param.getParamValue());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user