Commit 644f0bdc authored by msgroup's avatar msgroup Committed by mingsoft

fix:待发布版本

Signed-off-by: 's avatarmingsoft <killfen@126.com>
parent f66c6298
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so, * the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions: * subject to the following conditions:
* <p>
* The above copyright notice and this permission notice shall be included in all * The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software. * copies or substantial portions of the Software.
* <p>
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
...@@ -24,6 +24,11 @@ package net.mingsoft.cms.entity; ...@@ -24,6 +24,11 @@ package net.mingsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import net.mingsoft.base.entity.BaseEntity; import net.mingsoft.base.entity.BaseEntity;
import net.mingsoft.basic.util.BasicUtil;
import net.mingsoft.config.MSProperties;
import net.mingsoft.mdiy.util.ConfigUtil;
import java.io.File;
/** /**
* 分类实体 * 分类实体
...@@ -131,6 +136,21 @@ public class CategoryEntity extends BaseEntity { ...@@ -131,6 +136,21 @@ public class CategoryEntity extends BaseEntity {
*/ */
private String topId; private String topId;
/**
* 路径url
*/
@TableField(exist = false)
private String url;
/**
* 设置url路径
*
* @param url 路径的字符串
*/
public void setUrl(String url) {
this.url = url;
}
public Boolean getLeaf() { public Boolean getLeaf() {
return leaf; return leaf;
} }
...@@ -419,7 +439,8 @@ public class CategoryEntity extends BaseEntity { ...@@ -419,7 +439,8 @@ public class CategoryEntity extends BaseEntity {
* 获取栏目Id(标签使用) * 获取栏目Id(标签使用)
*/ */
public Boolean getTypeleaf() { public Boolean getTypeleaf() {
return this.leaf; } return this.leaf;
}
/** /**
...@@ -431,6 +452,7 @@ public class CategoryEntity extends BaseEntity { ...@@ -431,6 +452,7 @@ public class CategoryEntity extends BaseEntity {
@TableField(exist = false) @TableField(exist = false)
private String typepath; private String typepath;
/** /**
* 获取栏目图片 (标签使用) * 获取栏目图片 (标签使用)
*/ */
...@@ -462,4 +484,22 @@ public class CategoryEntity extends BaseEntity { ...@@ -462,4 +484,22 @@ public class CategoryEntity extends BaseEntity {
this.childsize = childsize; this.childsize = childsize;
} }
/**
* 获取url路径
*
* @return url路径的字符串
*/
public String getUrl() {
String appDir = "";
String htmlDir = MSProperties.diy.htmlDir;
String categoryPath = this.getCategoryPath();
String categoryPinyin = this.getCategoryPinyin();
if (!(ConfigUtil.getBoolean("短链配置", "shortLinkSwitch", false))) {
//未开启短链
appDir = "/" + BasicUtil.getApp().getAppDir();
return url = "/" + htmlDir + appDir + categoryPath + "/index.html";
}
//开启短链后的url拼接
return url = "/" + htmlDir + appDir + "/" + categoryPinyin + ".html";
}
} }
...@@ -132,7 +132,8 @@ public class WebConfig implements WebMvcConfigurer { ...@@ -132,7 +132,8 @@ public class WebConfig implements WebMvcConfigurer {
@Bean @Bean
public FilterRegistrationBean xssFilterRegistration(@Value("${ms.xss.enable:true}") boolean xssEnable, public FilterRegistrationBean xssFilterRegistration(@Value("${ms.xss.enable:true}") boolean xssEnable,
@Value("${ms.xss.filter-url}") String filterUrl, @Value("${ms.xss.filter-url}") String filterUrl,
@Value("${ms.xss.exclude-url}") String excludeUrl) { @Value("${ms.xss.exclude-url}") String excludeUrl,
@Value("${ms.xss.exclude-filed}") String excludeFiled) {
XSSEscapeFilter xssFilter = new XSSEscapeFilter(); XSSEscapeFilter xssFilter = new XSSEscapeFilter();
Map<String, String> initParameters = new HashMap(); Map<String, String> initParameters = new HashMap();
FilterRegistrationBean registration = new FilterRegistrationBean(); FilterRegistrationBean registration = new FilterRegistrationBean();
...@@ -149,6 +150,9 @@ public class WebConfig implements WebMvcConfigurer { ...@@ -149,6 +150,9 @@ public class WebConfig implements WebMvcConfigurer {
}else { }else {
xssFilter.excludes.add(MSProperties.manager.path + "/**"); xssFilter.excludes.add(MSProperties.manager.path + "/**");
} }
if (excludeFiled != null && StrUtil.isNotBlank(excludeFiled)) {
xssFilter.excludesFiled.addAll(Arrays.asList(excludeFiled.split(",")));
}
initParameters.put("isIncludeRichText", "false"); initParameters.put("isIncludeRichText", "false");
registration.setInitParameters(initParameters); registration.setInitParameters(initParameters);
registration.setFilter(xssFilter); registration.setFilter(xssFilter);
......
...@@ -92,7 +92,6 @@ ...@@ -92,7 +92,6 @@
}, },
}, },
created() { created() {
this.likeTotal()
} }
}) })
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment