Merge remote-tracking branch 'origin/5.2'

# Conflicts:
#	doc/mcms-5.1.sql
#	pom.xml
master
wujj 6 years ago
commit c1b81d0dab
  1. 39
      doc/5.2-patch.sql
  2. 252
      pom.xml
  3. 2
      src/main/java/net/mingsoft/MSApplication.java
  4. 58
      src/main/java/net/mingsoft/cms/action/CategoryAction.java
  5. 37
      src/main/java/net/mingsoft/cms/action/ContentAction.java
  6. 2
      src/main/java/net/mingsoft/cms/action/GeneraterAction.java
  7. 27
      src/main/java/net/mingsoft/cms/action/web/ContentAction.java
  8. 31
      src/main/java/net/mingsoft/cms/action/web/MCmsAction.java
  9. 6
      src/main/java/net/mingsoft/cms/bean/CategoryBean.java
  10. 4
      src/main/java/net/mingsoft/cms/biz/ICategoryBiz.java
  11. 3
      src/main/java/net/mingsoft/cms/biz/IContentBiz.java
  12. 109
      src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java
  13. 183
      src/main/java/net/mingsoft/cms/biz/impl/ContentBizImpl.java
  14. 9
      src/main/java/net/mingsoft/cms/dao/ICategoryDao.java
  15. 10
      src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml
  16. 12
      src/main/java/net/mingsoft/cms/dao/IContentDao.java
  17. 29
      src/main/java/net/mingsoft/cms/dao/IContentDao.xml
  18. 33
      src/main/java/net/mingsoft/cms/entity/CategoryEntity.java
  19. 8
      src/main/java/net/mingsoft/cms/entity/ContentEntity.java
  20. 1
      src/main/java/net/mingsoft/cms/resources/resources_zh_CN.properties
  21. 51
      src/main/java/net/mingsoft/cms/upgrade/Upgrade.java
  22. 6
      src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
  23. 47
      src/main/java/net/mingsoft/config/WebConfig.java
  24. 17
      src/main/resources/application-dev.yml
  25. 2
      src/main/resources/application-test.yml
  26. 24
      src/main/resources/application.yml
  27. 54
      src/main/webapp/WEB-INF/manager/cms/category/form.ftl
  28. 11
      src/main/webapp/WEB-INF/manager/cms/category/index.ftl
  29. 5
      src/main/webapp/WEB-INF/manager/cms/content/form.ftl
  30. 5
      src/main/webapp/WEB-INF/manager/cms/content/main.ftl
  31. 5
      src/main/webapp/WEB-INF/manager/index.ftl
  32. 4
      src/main/webapp/WEB-INF/manager/main.ftl
  33. BIN
      src/main/webapp/static/plugins/wl-explorer/fonts/VideoJS.46ac6629.eot
  34. BIN
      src/main/webapp/static/plugins/wl-explorer/fonts/element-icons.535877f5.woff
  35. BIN
      src/main/webapp/static/plugins/wl-explorer/fonts/element-icons.732389de.ttf
  36. 1
      src/main/webapp/static/plugins/wl-explorer/wl-explorer.css
  37. 38058
      src/main/webapp/static/plugins/wl-explorer/wl-explorer.umd.js
  38. 2124
      src/main/webapp/template/1/江西省人民政府-web/about.htm
  39. 3
      src/main/webapp/template/1/江西省人民政府-web/css/app.css
  40. 2227
      src/main/webapp/template/1/江西省人民政府-web/detail.htm
  41. 163
      src/main/webapp/template/1/江西省人民政府-web/footer.htm
  42. 66
      src/main/webapp/template/1/江西省人民政府-web/header.htm
  43. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1601262165196.png
  44. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1601263168784.png
  45. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1601263219863.png
  46. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1601263314183.png
  47. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1601264474008.png
  48. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1601264558124.png
  49. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1601264865246.png
  50. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1601264880892.png
  51. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1601265232947.png
  52. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1601265263422.png
  53. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1601282117218.png
  54. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1602060761571.jpg
  55. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1602060968122.jpg
  56. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1602064370755.jpg
  57. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1602065099002.jpg
  58. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1602123532415.png
  59. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1602639842403.jpg
  60. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1602639957490.jpg
  61. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1602639968529.jpg
  62. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1602656777359.png
  63. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1602993572728.png
  64. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1602994812850.png
  65. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1602994843689.png
  66. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1602994853675.png
  67. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1602994867816.png
  68. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1602994889839.png
  69. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1602995154347.png
  70. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1603073616105.png
  71. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1603073720477.png
  72. BIN
      src/main/webapp/template/1/江西省人民政府-web/images/1603073920995.png
  73. 4263
      src/main/webapp/template/1/江西省人民政府-web/index.htm
  74. 2102
      src/main/webapp/template/1/江西省人民政府-web/list.htm
  75. 43
      src/main/webapp/template/1/江西省人民政府-web/search.htm
  76. 31
      src/main/webapp/templets/1/default/about.htm
  77. 67
      src/main/webapp/templets/1/default/advice.htm
  78. 47
      src/main/webapp/templets/1/default/case-list.htm
  79. 143
      src/main/webapp/templets/1/default/contact.htm
  80. 1
      src/main/webapp/templets/1/default/css/about.css
  81. 1
      src/main/webapp/templets/1/default/css/advice.css
  82. 3368
      src/main/webapp/templets/1/default/css/animate.css
  83. 1
      src/main/webapp/templets/1/default/css/base.css
  84. 1
      src/main/webapp/templets/1/default/css/case-list.css
  85. 1
      src/main/webapp/templets/1/default/css/center.css
  86. 1
      src/main/webapp/templets/1/default/css/index.css
  87. 79
      src/main/webapp/templets/1/default/css/jquery.sinaemotion.css
  88. 1
      src/main/webapp/templets/1/default/css/login.css
  89. 1
      src/main/webapp/templets/1/default/css/news-list.css
  90. 1
      src/main/webapp/templets/1/default/css/news-show.css
  91. 39
      src/main/webapp/templets/1/default/footer.htm
  92. 36
      src/main/webapp/templets/1/default/head-file.htm
  93. 146
      src/main/webapp/templets/1/default/head.htm
  94. BIN
      src/main/webapp/templets/1/default/images/00.png
  95. BIN
      src/main/webapp/templets/1/default/images/01.jpg
  96. BIN
      src/main/webapp/templets/1/default/images/02.jpg
  97. BIN
      src/main/webapp/templets/1/default/images/03.jpg
  98. BIN
      src/main/webapp/templets/1/default/images/1471918025445.png
  99. BIN
      src/main/webapp/templets/1/default/images/about_us.jpg
  100. BIN
      src/main/webapp/templets/1/default/images/ad_ctr.png
  101. Some files were not shown because too many files have changed in this diff Show More

File diff suppressed because one or more lines are too long

@ -1,84 +1,158 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>net.mingsoft</groupId>
<artifactId>ms-pom</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>net.mingsoft</groupId>
<artifactId>ms-mcms</artifactId>
<version>5.2-SNAPSHOT</version>
<name>ms-mcms</name>
<!-- 打包jar包 -->
<packaging>jar</packaging>
<!-- 打包war包 -->
<!-- <packaging>war</packaging> -->
<properties>
<java.version>1.8</java.version>
</properties>
<modelVersion>4.0.0</modelVersion>
<groupId>net.mingsoft</groupId>
<artifactId>ms-mcms</artifactId>
<version>5.1</version>
<name>ms-mcms</name>
<!-- 打包jar包 -->
<packaging>jar</packaging>
<!-- 打包war包 -->
<!-- <packaging>war</packaging> -->
<properties>
<java.version>1.8</java.version>
</properties>
<repositories>
<repository>
<id>alimaven</id>
<name>aliyun maven</name>
<url>https://maven.aliyun.com/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>net.mingsoft</groupId>
<artifactId>ms-mpeople</artifactId>
<version>1.0.28</version>
</dependency>
<dependencies>
<!-- 此部分是铭飞平台MStroe的客户端(MStore不在铭飞开源产品范围),如果不需要使用MStore可以删除掉 -->
<dependency>
<groupId>net.mingsoft</groupId>
<artifactId>store-client</artifactId>
<version>5.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>2.2.2.RELEASE</version>
<dependency>
<groupId>dm</groupId>
<artifactId>dm.jdbc.driver</artifactId>
<version>8.0.0</version>
</dependency>
<dependency>
<groupId>net.mingsoft</groupId>
<artifactId>ms-mpeople</artifactId>
</dependency>
<dependency>
<groupId>net.mingsoft</groupId>
<artifactId>ms-db</artifactId>
</dependency>
<!-- 此部分是铭飞平台MStroe的客户端(MStore不在铭飞开源产品范围),如果不需要使用MStore可以删除掉 -->
<dependency>
<groupId>net.mingsoft</groupId>
<artifactId>store-client</artifactId>
<version>5.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>2.2.2.RELEASE</version>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<finalName>ms-mcms</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<fork>true</fork>
<build>
<finalName>ms-mcms</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<excludes>
<exclude>**/static/plugins/</exclude>
<exclude>**/static/skin/</exclude>
<exclude>**/*.yml</exclude>
<exclude>**/Dockerfile</exclude>
<exclude>**/ehcache.xml</exclude>
<exclude>**/upgrade/</exclude>
<exclude>**/MSApplication.*</exclude>
<exclude>**/MSServletInitializer.*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<excludes>
<exclude>**/static/plugins/</exclude>
<exclude>**/static/skin/</exclude>
<exclude>**/*.yml</exclude>
<exclude>**/Dockerfile</exclude>
<exclude>**/ehcache.xml</exclude>
<exclude>**/upgrade/</exclude>
<exclude>**/config/</exclude>
<exclude>**/MSApplication.java</exclude>
<exclude>**/MSServletInitializer.java</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<charset>UTF-8</charset>
<encoding>UTF-8</encoding>
<docencoding>UTF-8</docencoding>
<javadocExecutable>${java.home}/../bin/javadoc</javadocExecutable>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<compilerArguments>
<verbose />
<bootclasspath>${java.home}/lib/rt.jar${path.separator}${java.home}/lib/jce.jar</bootclasspath>
</compilerArguments>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-eclipse</artifactId>
<version>2.1</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
</configuration>
</plugin>
@ -95,7 +169,7 @@
</plugins>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/webapp</directory>
<excludes>
<!--打包生产 -->
@ -104,14 +178,24 @@
<!-- <exclude>upload/</exclude> -->
<!-- <exclude>templets/</exclude> -->
</excludes>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/java</directory>
</resource>
</resources>
<defaultGoal>compile</defaultGoal>
</build>
<excludes>
<!--打包生产 -->
<exclude>static/</exclude>
<exclude>html/</exclude>
<exclude>upload/</exclude>
<exclude>template/</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<defaultGoal>compile</defaultGoal>
</build>
</project>

@ -13,7 +13,7 @@ import java.util.Locale;
@SpringBootApplication
@ComponentScan(basePackages = {"net.mingsoft"})
@MapperScan(basePackages={"**.dao"})
@MapperScan(basePackages={"**.dao","**.mapper"})
@ServletComponentScan(basePackages = {"net.mingsoft"})
public class MSApplication {
public static void main(String[] args) {

@ -1,19 +1,19 @@
package net.mingsoft.cms.action;
import cn.hutool.core.util.StrUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import net.mingsoft.base.entity.BaseEntity;
import net.mingsoft.base.entity.ResultData;
import net.mingsoft.basic.annotation.LogAnn;
import net.mingsoft.basic.bean.EUListBean;
import net.mingsoft.basic.constant.e.BusinessTypeEnum;
import net.mingsoft.basic.util.BasicUtil;
import net.mingsoft.basic.util.PinYinUtil;
import net.mingsoft.basic.util.StringUtil;
import net.mingsoft.cms.biz.ICategoryBiz;
import net.mingsoft.cms.entity.CategoryEntity;
import net.mingsoft.basic.util.PinYinUtil;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -25,6 +25,7 @@ import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 分类管理控制层
* @author 铭飞开发团队
@ -34,7 +35,7 @@ import java.util.List;
@Api(value = "分类接口")
@Controller("cmsCategoryAction")
@RequestMapping("/${ms.manager.path}/cms/category")
public class CategoryAction extends BaseAction{
public class CategoryAction extends BaseAction {
/**
@ -84,23 +85,18 @@ public class CategoryAction extends BaseAction{
})
@RequestMapping("/list")
@ResponseBody
public ResultData list(@ModelAttribute @ApiIgnore CategoryEntity category,HttpServletResponse response, HttpServletRequest request,@ApiIgnore ModelMap model,BindingResult result) {
category.setAppId(BasicUtil.getAppId());
public ResultData list(@ModelAttribute @ApiIgnore CategoryEntity category, HttpServletResponse response, HttpServletRequest request, @ApiIgnore ModelMap model, BindingResult result) {
BasicUtil.startPage();
List categoryList = categoryBiz.query(category);
return ResultData.build().success(new EUListBean(categoryList,(int)BasicUtil.endPage(categoryList).getTotal()));
return ResultData.build().success(new EUListBean(categoryList,(int) BasicUtil.endPage(categoryList).getTotal()));
}
/**
* 返回编辑界面category_form
*/
@GetMapping("/form")
public String form(@ModelAttribute CategoryEntity category,HttpServletResponse response,HttpServletRequest request,ModelMap model){
if(category.getId()!=null){
BaseEntity categoryEntity = categoryBiz.getEntity(Integer.parseInt(category.getId()));
model.addAttribute("categoryEntity",categoryEntity);
}
model.addAttribute("appId",BasicUtil.getAppId());
public String form(@ModelAttribute CategoryEntity category, HttpServletResponse response, HttpServletRequest request, ModelMap model){
model.addAttribute("appId", BasicUtil.getAppId());
return "/cms/category/form";
}
@ -112,12 +108,11 @@ public class CategoryAction extends BaseAction{
@ApiImplicitParam(name = "id", value = "编号", required =true,paramType="query")
@GetMapping("/get")
@ResponseBody
public ResultData get(@ModelAttribute @ApiIgnore CategoryEntity category,HttpServletResponse response, HttpServletRequest request,@ApiIgnore ModelMap model){
public ResultData get(@ModelAttribute @ApiIgnore CategoryEntity category, HttpServletResponse response, HttpServletRequest request, @ApiIgnore ModelMap model){
if(category.getId()==null) {
return ResultData.build().error();
}
category.setAppId(BasicUtil.getAppId());
CategoryEntity _category = (CategoryEntity)categoryBiz.getEntity(Integer.parseInt(category.getId()));
CategoryEntity _category = (CategoryEntity)categoryBiz.getById(category.getId());
return ResultData.build().success(_category);
}
@ -172,9 +167,16 @@ public class CategoryAction extends BaseAction{
if(!StringUtil.checkLength(category.getCategoryParentId()+"", 1, 100)){
return ResultData.build().error(getResString("err.length", this.getResString("category.parent.id"), "1", "100"));
}
//获取拼音
//判断拼音是否重复
if(StrUtil.isNotBlank(category.getCategoryPinyin())) {
CategoryEntity _category = new CategoryEntity();
_category.setCategoryPinyin(category.getCategoryPinyin());
List<CategoryEntity> query = categoryBiz.query(_category);
if (query.size() > 0) {
return ResultData.build().error(getResString("err.exist", this.getResString("category.pinyin")));
}
}
category.setAppId(BasicUtil.getAppId());
categoryBiz.saveEntity(category);
return ResultData.build().success(category);
}
@ -187,9 +189,9 @@ public class CategoryAction extends BaseAction{
@ResponseBody
@LogAnn(title = "删除分类", businessType = BusinessTypeEnum.DELETE)
@RequiresPermissions("cms:category:del")
public ResultData delete(@RequestBody List<CategoryEntity> categorys,HttpServletResponse response, HttpServletRequest request) {
public ResultData delete(@RequestBody List<CategoryEntity> categorys, HttpServletResponse response, HttpServletRequest request) {
for(int i = 0;i<categorys.size();i++){
categoryBiz.delete(Integer.parseInt(categorys.get(i).getId()));
categoryBiz.delete(categorys.get(i).getId());
}
return ResultData.build().success();
}
@ -230,7 +232,7 @@ public class CategoryAction extends BaseAction{
@LogAnn(title = "更新分类", businessType = BusinessTypeEnum.UPDATE)
@RequiresPermissions("cms:category:update")
public ResultData update(@ModelAttribute @ApiIgnore CategoryEntity category, HttpServletResponse response,
HttpServletRequest request) {
HttpServletRequest request) {
//验证栏目管理名称的值是否合法
if(StringUtil.isBlank(category.getCategoryTitle())){
return ResultData.build().error(getResString("err.empty", this.getResString("category.title")));
@ -245,10 +247,22 @@ public class CategoryAction extends BaseAction{
if(!StringUtil.checkLength(category.getCategoryParentId()+"", 0, 100)){
return ResultData.build().error(getResString("err.length", this.getResString("category.parent.id"), "1", "100"));
}
//判断拼音是否重复并且是否和原拼音相同
if(StrUtil.isNotBlank(category.getCategoryPinyin()) && !categoryBiz.getById(category.getId()).getCategoryPinyin().equals(category.getCategoryPinyin())) {
CategoryEntity _category = new CategoryEntity();
_category.setCategoryPinyin(category.getCategoryPinyin());
List<CategoryEntity> query = categoryBiz.query(_category);
if (query.size() > 0) {
return ResultData.build().error(getResString("err.exist", this.getResString("category.pinyin")));
}
}
String pingYin = PinYinUtil.getPingYin(category.getCategoryTitle());
//如果用户填写了拼音则使用用户填写的
if (StrUtil.isNotBlank(category.getCategoryPinyin())) {
pingYin = category.getCategoryPinyin();
}
CategoryEntity categoryEntity=new CategoryEntity();
categoryEntity.setCategoryPinyin(pingYin);
categoryEntity.setAppId(BasicUtil.getAppId());
CategoryEntity categoryBizEntity = (CategoryEntity)categoryBiz.getEntity(categoryEntity);
category.setCategoryPinyin(pingYin);
//如果存在此拼音栏目则拼接上id
@ -258,14 +272,12 @@ public class CategoryAction extends BaseAction{
//判断是否选择子级为所属栏目
CategoryEntity _category = new CategoryEntity();
_category.setCategoryParentId(category.getId());
_category.setAppId(BasicUtil.getAppId());
List<CategoryEntity> categoryList = categoryBiz.queryChilds(_category);
for(CategoryEntity item:categoryList){
if(item.getId().equals(category.getCategoryId())){
return ResultData.build().error(getResString("cannot.select.child"));
}
}
category.setAppId(BasicUtil.getAppId());
categoryBiz.updateEntity(category);
return ResultData.build().success(category);
}

@ -4,7 +4,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import net.mingsoft.base.entity.BaseEntity;
import net.mingsoft.base.entity.ResultData;
import net.mingsoft.basic.annotation.LogAnn;
import net.mingsoft.basic.bean.EUListBean;
@ -23,7 +22,9 @@ import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
/**
* 文章管理控制层
* @author 铭飞开发团队
@ -33,7 +34,7 @@ import java.util.List;
@Api(value = "文章接口")
@Controller("cmsContentAction")
@RequestMapping("/${ms.manager.path}/cms/content")
public class ContentAction extends BaseAction{
public class ContentAction extends BaseAction {
/**
@ -86,23 +87,18 @@ public class ContentAction extends BaseAction{
})
@RequestMapping("/list")
@ResponseBody
public ResultData list(@ModelAttribute @ApiIgnore ContentEntity content,HttpServletResponse response, HttpServletRequest request,@ApiIgnore ModelMap model,BindingResult result) {
content.setAppId(BasicUtil.getAppId());
public ResultData list(@ModelAttribute @ApiIgnore ContentEntity content, HttpServletResponse response, HttpServletRequest request, @ApiIgnore ModelMap model, BindingResult result) {
BasicUtil.startPage();
List contentList = contentBiz.query(content);
return ResultData.build().success(new EUListBean(contentList,(int)BasicUtil.endPage(contentList).getTotal()));
return ResultData.build().success(new EUListBean(contentList,(int) BasicUtil.endPage(contentList).getTotal()));
}
/**
* 返回编辑界面content_form
*/
@GetMapping("/form")
public String form(@ModelAttribute ContentEntity content,HttpServletResponse response,HttpServletRequest request,ModelMap model){
if(content.getId()!=null){
BaseEntity contentEntity = contentBiz.getEntity(Integer.parseInt(content.getId()));
model.addAttribute("contentEntity",contentEntity);
}
model.addAttribute("appId",BasicUtil.getAppId());
public String form(@ModelAttribute ContentEntity content, HttpServletResponse response, HttpServletRequest request, ModelMap model){
model.addAttribute("appId", BasicUtil.getAppId());
return "/cms/content/form";
}
@ -114,12 +110,11 @@ public class ContentAction extends BaseAction{
@ApiImplicitParam(name = "id", value = "编号", required =true,paramType="query")
@GetMapping("/get")
@ResponseBody
public ResultData get(@ModelAttribute @ApiIgnore ContentEntity content,HttpServletResponse response, HttpServletRequest request,@ApiIgnore ModelMap model){
public ResultData get(@ModelAttribute @ApiIgnore ContentEntity content, HttpServletResponse response, HttpServletRequest request, @ApiIgnore ModelMap model){
if(content.getId()==null) {
return ResultData.build().error();
}
content.setAppId(BasicUtil.getAppId());
ContentEntity _content = (ContentEntity)contentBiz.getEntity(Integer.parseInt(content.getId()));
ContentEntity _content = contentBiz.getById(content.getId());
return ResultData.build().success(_content);
}
@ -176,8 +171,7 @@ public class ContentAction extends BaseAction{
if(!StringUtil.checkLength(content.getContentUrl()+"", 0, 200)){
return ResultData.build().error(getResString("err.length", this.getResString("content.url"), "0", "200"));
}
content.setAppId(BasicUtil.getAppId());
contentBiz.saveEntity(content);
contentBiz.save(content);
return ResultData.build().success(content);
}
@ -189,12 +183,12 @@ public class ContentAction extends BaseAction{
@ResponseBody
@LogAnn(title = "删除文章", businessType = BusinessTypeEnum.DELETE)
@RequiresPermissions("cms:content:del")
public ResultData delete(@RequestBody List<ContentEntity> contents,HttpServletResponse response, HttpServletRequest request) {
int[] ids = new int[contents.size()];
public ResultData delete(@RequestBody List<ContentEntity> contents, HttpServletResponse response, HttpServletRequest request) {
List<String> ids = new ArrayList<>();
for(int i = 0;i<contents.size();i++){
ids[i] =Integer.parseInt(contents.get(i).getId()) ;
ids.add(contents.get(i).getId());
}
contentBiz.delete(ids);
contentBiz.removeByIds(ids);
return ResultData.build().success();
}
/**
@ -230,7 +224,7 @@ public class ContentAction extends BaseAction{
@LogAnn(title = "更新文章", businessType = BusinessTypeEnum.UPDATE)
@RequiresPermissions("cms:content:update")
public ResultData update(@ModelAttribute @ApiIgnore ContentEntity content, HttpServletResponse response,
HttpServletRequest request) {
HttpServletRequest request) {
//验证文章标题的值是否合法
if(StringUtil.isBlank(content.getContentTitle())){
return ResultData.build().error(getResString("err.empty", this.getResString("content.title")));
@ -251,7 +245,6 @@ public class ContentAction extends BaseAction{
if(!StringUtil.checkLength(content.getContentUrl()+"", 0, 200)){
return ResultData.build().error(getResString("err.length", this.getResString("content.url"), "0", "200"));
}
content.setAppId(BasicUtil.getAppId());
contentBiz.updateEntity(content);
return ResultData.build().success(content);
}

@ -161,12 +161,10 @@ public class GeneraterAction extends BaseAction {
if (CategoryId>0) {
CategoryEntity categoryEntity = new CategoryEntity();
categoryEntity.setId(CategoryId+"");
categoryEntity.setAppId(app.getAppId());
columns = categoryBiz.queryChilds(categoryEntity);
} else {
// 获取所有的内容管理栏目
CategoryEntity categoryEntity=new CategoryEntity();
categoryEntity.setAppId(app.getAppId());
columns = categoryBiz.query(categoryEntity);
}
List<CategoryBean> articleIdList = null;

@ -1,5 +1,6 @@
package net.mingsoft.cms.action.web;
import cn.hutool.core.util.ObjectUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@ -103,10 +104,9 @@ public class ContentAction extends net.mingsoft.cms.action.BaseAction{
@ApiImplicitParam(name = "contentId", value = "文章编号", required = true,paramType="path")
@GetMapping(value = "/{contentId}/hit")
@ResponseBody
public void hit(@PathVariable @ApiIgnore int contentId, HttpServletRequest request, HttpServletResponse response){
public String hit(@PathVariable @ApiIgnore int contentId, HttpServletRequest request, HttpServletResponse response){
if(contentId<=0){
this.outString(response, "document.write(0)");
return;
return "document.write(0)";
}
//获取ip
String ip = BasicUtil.getIp();
@ -114,11 +114,17 @@ public class ContentAction extends net.mingsoft.cms.action.BaseAction{
boolean isMobileDevice = BasicUtil.isMobileDevice();
ContentEntity content = (ContentEntity)contentBiz.getEntity(contentId);
if(content == null){
return "document.write(0)";
}
//浏览数+1
content.setContentHit(content.getContentHit()+1);
if(ObjectUtil.isNotEmpty(content.getContentHit())){
content.setContentHit(content.getContentHit()+1);
}else {
content.setContentHit(1);
}
contentBiz.updateEntity(content);
// cms_history 增加相应记录
HistoryLogEntity entity = new HistoryLogEntity();
entity.setHlIsMobile(isMobileDevice);
@ -126,17 +132,10 @@ public class ContentAction extends net.mingsoft.cms.action.BaseAction{
entity.setContentId(content.getId());
entity.setCreateDate(new Date());
historyLogBiz.saveEntity(entity);
if(content == null){
this.outString(response, "document.write(0)");
return;
}
if(content.getAppId() == null || content.getAppId() != BasicUtil.getAppId()){
this.outString(response, "document.write(0)");
return;
return "document.write(0)";
}
this.outString(response, "document.write(" + content.getContentHit() + ")");
return;
return "document.write(" + content.getContentHit() + ")";
}
}

@ -26,7 +26,9 @@ import cn.hutool.core.util.PageUtil;
import freemarker.core.ParseException;
import freemarker.template.MalformedTemplateNameException;
import freemarker.template.TemplateNotFoundException;
import net.bytebuddy.implementation.bytecode.Throw;
import net.mingsoft.base.constant.Const;
import net.mingsoft.basic.exception.BusinessException;
import net.mingsoft.basic.util.BasicUtil;
import net.mingsoft.basic.util.StringUtil;
import net.mingsoft.cms.bean.CategoryBean;
@ -105,7 +107,8 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
* 动态列表页
*/
@GetMapping("/index.do")
public void index(HttpServletRequest req, HttpServletResponse resp) {
@ResponseBody
public String index(HttpServletRequest req, HttpServletResponse resp) {
Map map = BasicUtil.assemblyRequestMap();
map.forEach((k,v)->{
map.put(k,v.toString().replaceAll("('|\"|\\\\)","\\\\$1"));
@ -129,7 +132,7 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
} catch (IOException e) {
e.printStackTrace();
}
this.outString(resp, content);
return content;
}
/**
@ -137,8 +140,9 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
* @param req
* @param resp
*/
@ResponseBody
@GetMapping("/list.do")
public void list(HttpServletRequest req, HttpServletResponse resp) {
public String list(HttpServletRequest req, HttpServletResponse resp) {
Map map = BasicUtil.assemblyRequestMap();
map.forEach((k,v)->{
map.put(k,v.toString().replaceAll("('|\"|\\\\)","\\\\$1"));
@ -152,7 +156,7 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
List<CategoryBean> columnArticles = contentBiz.queryIdsByCategoryIdForParser(contentBean);
//判断栏目下是否有文章
if(columnArticles.size()==0){
this.outJson(resp, false);
return "";
}
//设置分页类
PageBean page = new PageBean();
@ -185,7 +189,7 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
} catch (IOException e) {
e.printStackTrace();
}
this.outString(resp, content);
return content;
}
/**
@ -193,18 +197,17 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
* @param id 文章编号
*/
@GetMapping("/view.do")
public void view(String orderby,String order,HttpServletRequest req, HttpServletResponse resp) {
@ResponseBody
public String view(String orderby,String order,HttpServletRequest req, HttpServletResponse resp) {
//参数文章编号
ContentEntity article = (ContentEntity) contentBiz.getEntity(BasicUtil.getInt(ParserUtil.ID));
if(ObjectUtil.isNull(article)){
this.outJson(resp, null,false,getResString("err.empty", this.getResString("id")));
return;
throw new BusinessException(this.getResString("err.empty", this.getResString("id"))) ;
}
if(StringUtils.isNotBlank(order)){
//防注入
if(!order.toLowerCase().equals("asc")&&!order.toLowerCase().equals("desc")){
this.outJson(resp, null,false,getResString("err.error", this.getResString("order")));
return;
throw new BusinessException(this.getResString("err.error", this.getResString("order")));
}
}
@ -239,7 +242,7 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
ModelEntity contentModel = null;
for (int artId = 0; artId < articleIdList.size();) {
//如果不是当前文章则跳过
if(articleIdList.get(artId).getArticleId() != Integer.parseInt(article.getId())){
if(articleIdList.get(artId).getArticleId().equals(article.getId())){
artId++;
continue;
}
@ -289,7 +292,7 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
} catch (IOException e) {
e.printStackTrace();
}
this.outString(resp, content);
return content;
}
@ -303,7 +306,7 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
*/
@RequestMapping(value = "search")
@ResponseBody
public void search(HttpServletRequest request, HttpServletResponse response) throws IOException {
public String search(HttpServletRequest request, HttpServletResponse response) throws IOException {
Map<String, Object> map = new HashMap<>();
// 读取请求字段
@ -447,7 +450,7 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
} catch (IOException e) {
e.printStackTrace();
}
this.outString(response, content);
return content;
}
// 清除路径中的转义字符

@ -13,16 +13,16 @@ public class CategoryBean extends CategoryEntity {
/**
* 文章编号
*/
private int articleId;
private String articleId;
public int getArticleId() {
public String getArticleId() {
return articleId;
}
public void setArticleId(int articleId) {
public void setArticleId(String articleId) {
this.articleId = articleId;
}
}

@ -12,7 +12,7 @@ import java.util.List;
* 创建日期2019-11-28 15:12:32<br/>
* 历史修订<br/>
*/
public interface ICategoryBiz extends IBaseBiz {
public interface ICategoryBiz extends IBaseBiz<CategoryEntity> {
/**
* 查询当前分类下的所有子分类
@ -33,5 +33,5 @@ public interface ICategoryBiz extends IBaseBiz {
*/
void update(CategoryEntity entity);
void delete(int categoryId);
void delete(String categoryId);
}

@ -3,6 +3,7 @@ package net.mingsoft.cms.biz;
import net.mingsoft.base.biz.IBaseBiz;
import net.mingsoft.cms.bean.CategoryBean;
import net.mingsoft.cms.bean.ContentBean;
import net.mingsoft.cms.entity.ContentEntity;
import net.mingsoft.mdiy.entity.ModelEntity;
import java.util.List;
@ -15,7 +16,7 @@ import java.util.Map;
* 创建日期2019-11-28 15:12:32<br/>
* 历史修订<br/>
*/
public interface IContentBiz extends IBaseBiz {
public interface IContentBiz extends IBaseBiz<ContentEntity> {
/**
* 根据文章属性查询

@ -21,19 +21,23 @@ The MIT License (MIT) * Copyright (c) 2019 铭飞科技
package net.mingsoft.cms.biz.impl;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import net.mingsoft.base.biz.impl.BaseBizImpl;
import net.mingsoft.base.dao.IBaseDao;
import net.mingsoft.basic.util.BasicUtil;
import net.mingsoft.basic.util.PinYinUtil;
import net.mingsoft.cms.biz.ICategoryBiz;
import net.mingsoft.cms.dao.ICategoryDao;
import net.mingsoft.cms.dao.IContentDao;
import net.mingsoft.cms.entity.CategoryEntity;
import net.mingsoft.basic.util.PinYinUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
/**
@ -43,7 +47,8 @@ import java.util.List;
* 历史修订<br/>
*/
@Service("cmscategoryBizImpl")
public class CategoryBizImpl extends BaseBizImpl implements ICategoryBiz {
@Transactional(rollbackFor = RuntimeException.class)
public class CategoryBizImpl extends BaseBizImpl<ICategoryDao, CategoryEntity> implements ICategoryBiz {
@Autowired
@ -68,31 +73,49 @@ public class CategoryBizImpl extends BaseBizImpl implements ICategoryBiz {
public void saveEntity(CategoryEntity categoryEntity) {
// TODO Auto-generated method stub
String pingYin = PinYinUtil.getPingYin(categoryEntity.getCategoryTitle());
//如果用户自己填入了拼音则使用用户的
if (StrUtil.isNotBlank(categoryEntity.getCategoryPinyin())) {
pingYin = categoryEntity.getCategoryPinyin();
}
CategoryEntity category=new CategoryEntity();
category.setCategoryPinyin(pingYin);
category.setAppId(BasicUtil.getAppId());
Object categoryBizEntity = getEntity(category);
setParentId(categoryEntity);
categoryEntity.setCategoryPinyin(pingYin);
super.saveEntity(categoryEntity);
//更新新的父级
if(StrUtil.isNotBlank(categoryEntity.getCategoryId())&&!"0".equals(categoryEntity.getCategoryId())){
CategoryEntity parent = getById(categoryEntity.getCategoryId());
//如果之前是叶子节点就更新
if(parent.getLeaf()){
parent.setLeaf(false);
updateById(parent);
}
}
categoryEntity.setLeaf(false);
//如果是新增栏目一定是叶子节点
if (StrUtil.isEmpty(categoryEntity.getId())) {
categoryEntity.setLeaf(true);
}
super.save(categoryEntity);
//拼音存在则拼接id
if(categoryBizEntity!=null){
categoryEntity.setCategoryPinyin(pingYin+categoryEntity.getId());
}
CategoryEntity parentCategory = null;
if (StringUtils.isNotBlank(categoryEntity.getCategoryId())) {
parentCategory = (CategoryEntity)categoryDao.getEntity(Integer.parseInt(categoryEntity.getCategoryId()));
parentCategory = (CategoryEntity)getById(categoryEntity.getCategoryId());
}
//保存链接地址
String path=ObjectUtil.isNotNull(parentCategory)?parentCategory.getCategoryPath():"";
categoryEntity.setCategoryPath( path+"/" + categoryEntity.getCategoryPinyin());
super.updateEntity(categoryEntity);
setTopId(categoryEntity);
super.updateById(categoryEntity);
}
private void setParentId(CategoryEntity categoryEntity) {
String path = "";
if(StringUtils.isNotEmpty(categoryEntity.getCategoryId())&&Integer.parseInt(categoryEntity.getCategoryId())>0) {
CategoryEntity category = (CategoryEntity)categoryDao.getEntity(Integer.parseInt(categoryEntity.getCategoryId()));
if(StringUtils.isNotEmpty(categoryEntity.getCategoryId())&&Long.parseLong(categoryEntity.getCategoryId())>0) {
CategoryEntity category = (CategoryEntity)getById(categoryEntity.getCategoryId());
path = category.getCategoryPath();
if(StringUtils.isEmpty(category.getCategoryParentId())) {
categoryEntity.setCategoryParentId(category.getId());
@ -132,13 +155,14 @@ public class CategoryBizImpl extends BaseBizImpl implements ICategoryBiz {
String pingYin = PinYinUtil.getPingYin(entity.getCategoryTitle());
CategoryEntity category=new CategoryEntity();
category.setCategoryPinyin(pingYin);
category.setAppId(BasicUtil.getAppId());
CategoryEntity categoryBizEntity = (CategoryEntity)getEntity(category);
//拼音存在则拼接id
if(categoryBizEntity!=null&&!categoryBizEntity.getId().equals(entity.getId())){
entity.setCategoryPinyin(pingYin+entity.getId());
}
super.updateEntity(entity);
setParentLeaf(entity);
setTopId(entity);
super.updateById(entity);
setChildParentId(entity);
}
@ -148,21 +172,72 @@ public class CategoryBizImpl extends BaseBizImpl implements ICategoryBiz {
}
@Override
public void delete(int categoryId) {
public void delete(String categoryId) {
// TODO Auto-generated method stub
CategoryEntity category = (CategoryEntity) categoryDao.getEntity(categoryId);
CategoryEntity category = (CategoryEntity) categoryDao.selectById(categoryId);
//删除父类
if(category != null){
category.setCategoryParentId(null);
List<CategoryEntity> childrenList = categoryDao.queryChildren(category);
int[] ids = new int[childrenList.size()];
List<String> ids = new ArrayList<>();
for(int i = 0; i < childrenList.size(); i++){
//删除子类
ids[i] = Integer.parseInt(childrenList.get(i).getId());
ids.add(childrenList.get(i).getId());
}
categoryDao.delete(ids);
categoryDao.deleteBatchIds(ids);
// 删除文章
contentDao.deleteEntityByCategoryIds(ids);
contentDao.deleteEntityByCategoryIds(ids.toArray(new String[ids.size()]));
}
}
/**
* 设置父级叶子节点
* @param entity
*/
private void setParentLeaf(CategoryEntity entity){
Assert.notNull(entity);
CategoryEntity categoryEntity = getById(entity.getId());
//如果父级不为空并且修改了父级则需要更新父级
if(!entity.getCategoryId().equals(categoryEntity.getCategoryId())){
//更新旧的父级
if(StrUtil.isNotBlank(categoryEntity.getCategoryId())&&!"0".equals(categoryEntity.getCategoryId())){
CategoryEntity parent = getById(categoryEntity.getCategoryId());
//如果修改了父级则需要判断父级是否还有子节点
boolean leaf = parent.getLeaf();
//查找不等于当前更新的分类子集,有则不是叶子节点
QueryWrapper<CategoryEntity> queryWrapper = new QueryWrapper<>();
parent.setLeaf(count(queryWrapper.eq("category_id",parent.getId()).ne("id",entity.getId()))==0);
if(leaf!=parent.getLeaf()){
updateById(parent);
}
}
//更新新的父级
if(StrUtil.isNotBlank(entity.getCategoryId())&&!"0".equals(entity.getCategoryId())){
CategoryEntity parent = getById(entity.getCategoryId());
//如果之前是叶子节点就更新
if(parent.getLeaf()){
parent.setLeaf(false);
updateById(parent);
}
}
}
}
/**
* 设置顶级id
* @param entity
*/
private void setTopId(CategoryEntity entity){
String categoryParentId = entity.getCategoryParentId();
if(StrUtil.isNotBlank(categoryParentId)){
String[] ids = categoryParentId.split(",");
//如果有ParentId就取第一个
if(ids.length>0){
entity.setTopId(ids[0]);
return;
}
}
entity.setTopId("0");
}
}

@ -21,14 +21,32 @@ The MIT License (MIT) * Copyright (c) 2019 铭飞科技
package net.mingsoft.cms.biz.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.FileUtil;
import net.mingsoft.basic.constant.Const;
import net.mingsoft.basic.holder.DataHolder;
import net.mingsoft.basic.util.BasicUtil;
import net.mingsoft.cms.bean.CategoryBean;
import net.mingsoft.cms.bean.ContentBean;
import net.mingsoft.cms.dao.ICategoryDao;
import net.mingsoft.cms.entity.CategoryEntity;
import net.mingsoft.cms.entity.ContentEntity;
import net.mingsoft.cms.util.CmsParserUtil;
import net.mingsoft.mdiy.bean.AttributeBean;
import net.mingsoft.mdiy.bean.PageBean;
import net.mingsoft.mdiy.entity.ModelEntity;
import net.mingsoft.mdiy.util.ParserUtil;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import net.mingsoft.base.biz.impl.BaseBizImpl;
import net.mingsoft.base.dao.IBaseDao;
import java.io.IOException;
import java.util.*;
import net.mingsoft.cms.biz.IContentBiz;
@ -41,13 +59,22 @@ import net.mingsoft.cms.dao.IContentDao;
* 历史修订<br/>
*/
@Service("cmscontentBizImpl")
public class ContentBizImpl extends BaseBizImpl implements IContentBiz {
public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> implements IContentBiz {
/*
* log4j日志记录
*/
protected final Logger LOG = LoggerFactory.getLogger(this.getClass());
@Autowired
private IContentDao contentDao;
/**
* 栏目管理业务层
*/
@Autowired
private ICategoryDao categoryDao;
@Override
protected IBaseDao getDao() {
// TODO Auto-generated method stub
@ -67,4 +94,152 @@ public class ContentBizImpl extends BaseBizImpl implements IContentBiz {
}
return contentDao.getSearchCount(null,null,whereMap, appId,categoryIds);
}
/*
* 任务调度静态化任务
*/
public void staticizeTask(Integer appId, String tmpFileName, String generateFileName) {
LOG.info("定时静态化任务", new Date());
try {
//将任务采集传过来的appId导入到线程变量中
//当前线程使用appId时优先使用此数据
DataHolder.set(net.mingsoft.basic.constant.Const.APP_ID, appId);
//调用三种静态化
genernateColumn();
generaterIndex(tmpFileName, generateFileName);
//生成文章日期默认为执行日期的上一天
generateArticle(DateUtil.format(DateUtil.yesterday(), "yyyy-MM-dd"));
LOG.info("静态化完成", new Date());
} catch (IOException e) {
LOG.info("静态化失败", new Date());
e.printStackTrace();
}
}
/*
* 生成文章逻辑
*/
private void generateArticle(String dateTime) throws IOException {
// 网站风格物理路径
List<CategoryBean> articleIdList = null;
List<CategoryEntity> categoryList = null;
AttributeBean attributeBean = new AttributeBean();
ContentBean contentBean = new ContentBean();
contentBean.setBeginTime(dateTime);
Map<String, Object> map = new HashMap<>();
map.put(net.mingsoft.basic.constant.Const.APP_ID, BasicUtil.getAppId());
PageBean page = new PageBean();
map.put(ParserUtil.HTML, ParserUtil.HTML);
map.put(ParserUtil.URL, BasicUtil.getUrl());
map.put(ParserUtil.PAGE, page);
CategoryEntity categoryEntity = new CategoryEntity();
categoryList = categoryDao.query(categoryEntity);
for(CategoryEntity category : categoryList){
contentBean.setContentCategoryId(category.getId());
// 分类是列表
if(category.getCategoryType().equals("1")){
// 判断模板文件是否存在
if (!FileUtil.exist(ParserUtil.buildTempletPath(category.getCategoryListUrl())) || StringUtils.isEmpty(category.getCategoryListUrl())) {
LOG.error("模板不存在:{}",category.getCategoryUrl());
continue;
}
// 获取文章列表表属性
ParserUtil.read(category.getCategoryListUrl(),map, page,attributeBean);
contentBean.setFlag(attributeBean.getFlag());
contentBean.setNoflag(attributeBean.getNoflag());
contentBean.setOrder(attributeBean.getOrder());
contentBean.setOrderBy(attributeBean.getOrderby());
}
articleIdList = queryIdsByCategoryIdForParser(contentBean);
// 有符合条件的就更新
if (articleIdList.size() > 0) {
CmsParserUtil.generateBasic(articleIdList);
}
}
}
/*
* 生成栏目逻辑
*/
private void genernateColumn() throws IOException {
List<CategoryEntity> columns = new ArrayList<>();
// 获取所有的内容管理栏目
CategoryEntity categoryEntity=new CategoryEntity();
categoryEntity.setAppId(BasicUtil.getAppId());
columns = categoryDao.query(categoryEntity);
List<CategoryBean> articleIdList = null;
// 1、设置模板文件夹路径
// 获取栏目列表模版
for (CategoryEntity column : columns) {
ContentBean contentBean = new ContentBean();
contentBean.setContentCategoryId(column.getId());
// 分类是列表
if(column.getCategoryType().equals("1")) {
// 判断模板文件是否存在
if (!FileUtil.exist(ParserUtil.buildTempletPath(column.getCategoryListUrl()))) {
LOG.error("模板不存在:{}", column.getCategoryUrl());
continue;
}
//获取模板中列表标签中的条件
Map<String, Object> map = new HashMap<>();
map.put(net.mingsoft.basic.constant.Const.APP_ID, BasicUtil.getAppId());
PageBean page = new PageBean();
map.put(ParserUtil.HTML, ParserUtil.HTML);
map.put(ParserUtil.URL, BasicUtil.getUrl());
map.put(ParserUtil.PAGE, page);
AttributeBean attributeBean = new AttributeBean();
// 获取文章列表模板标签属性
ParserUtil.read(column.getCategoryListUrl(), map, page, attributeBean);
contentBean.setFlag(attributeBean.getFlag());
contentBean.setNoflag(attributeBean.getNoflag());
contentBean.setOrder(attributeBean.getOrder());
contentBean.setOrderBy(attributeBean.getOrderby());
}
articleIdList = contentDao.queryIdsByCategoryIdForParser(contentBean);
// 判断列表类型
switch (column.getCategoryType()) {
//TODO 暂时先用字符串代替
case "1": // 列表
CmsParserUtil.generateList(column, articleIdList.size());
break;
case "2":// 单页
if(articleIdList.size()==0){
CategoryBean columnArticleIdBean=new CategoryBean();
CopyOptions copyOptions=CopyOptions.create();
copyOptions.setIgnoreError(true);
BeanUtil.copyProperties(column,columnArticleIdBean,copyOptions);
articleIdList.add(columnArticleIdBean);
}
CmsParserUtil.generateBasic(articleIdList);
break;
}
}
}
/*
* 生成主页逻辑
*/
private void generaterIndex(String templatePath, String targetPath) throws IOException {
if (!FileUtil.exist(ParserUtil.buildTempletPath())) {
LOG.info("模板文件不存在");
return;
}
Map<String, Object> map = new HashMap<String, Object>();
map.put(ParserUtil.IS_DO, false);
CategoryEntity column = new CategoryEntity();
//内容管理栏目编码
map.put(ParserUtil.COLUMN, column);
//如果单站点,就废弃站点地址
if (ParserUtil.IS_SINGLE) {
map.put(ParserUtil.URL, BasicUtil.getUrl());
}
//设置生成的路径
map.put(ParserUtil.HTML, ParserUtil.HTML);
//设置站点编号
map.put(Const.APP_ID, BasicUtil.getAppId());
String read = ParserUtil.read(templatePath, map);
FileUtil.writeString(read, ParserUtil.buildHtmlPath(targetPath), net.mingsoft.base.constant.Const.UTF8);
}
}

@ -1,12 +1,11 @@
package net.mingsoft.cms.dao;
import net.mingsoft.base.dao.IBaseDao;
import java.util.*;
import net.mingsoft.cms.entity.CategoryEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 分类持久层
* @author 铭飞开发团队
@ -14,13 +13,13 @@ import org.springframework.stereotype.Component;
* 历史修订<br/>
*/
@Component("cmsCategoryDao")
public interface ICategoryDao extends IBaseDao {
public interface ICategoryDao extends IBaseDao<CategoryEntity> {
/**
* 查询当前分类下面的所有子分类
* @param category 必须存在categoryId categoryParentId
* @return
*/
public List<net.mingsoft.cms.entity.CategoryEntity> queryChildren(CategoryEntity category);
public List<CategoryEntity> queryChildren(CategoryEntity category);
}

@ -49,7 +49,6 @@
<if test="mdiyModelId != null and mdiyModelId != ''">mdiy_model_id,</if>
<if test="categoryDatetime != null">category_datetime,</if>
<if test="categoryManagerId != null">category_manager_id,</if>
<if test="appId != null">app_id,</if>
<if test="dictId != null">dict_id,</if>
<if test="categoryFlag != null">category_flag,</if>
<if test="categoryPath != null and categoryPath != ''">category_path,</if>
@ -75,7 +74,6 @@
<if test="mdiyModelId != null and mdiyModelId != ''">#{mdiyModelId},</if>
<if test="categoryDatetime != null">#{categoryDatetime},</if>
<if test="categoryManagerId != null">#{categoryManagerId},</if>
<if test="appId != null">#{appId},</if>
<if test="dictId != null">#{dictId},</if>
<if test="categoryFlag != null ">#{categoryFlag},</if>
<if test="categoryPath != null and categoryPath != ''">#{categoryPath},</if>
@ -107,7 +105,6 @@
<if test="mdiyModelId != null and mdiyModelId != ''">mdiy_model_id=#{mdiyModelId},</if>
<if test="categoryDatetime != null">category_datetime=#{categoryDatetime},</if>
<if test="categoryManagerId != null">category_manager_id=#{categoryManagerId},</if>
<if test="appId != null">app_id=#{appId},</if>
<if test="dictId != null">dict_id=#{dictId},</if>
<if test="categoryFlag != null ">category_flag=#{categoryFlag},</if>
<if test="categoryPath != null and categoryPath != ''">category_path=#{categoryPath},</if>
@ -143,7 +140,6 @@
<if test="mdiyModelId != null and mdiyModelId != ''">and mdiy_model_id=#{mdiyModelId}</if>
<if test="categoryDatetime != null"> and category_datetime=#{categoryDatetime} </if>
<if test="categoryManagerId != null"> and category_manager_id=#{categoryManagerId} </if>
<if test="appId != null"> and app_id=#{appId} </if>
<if test="dictId != null"> and dict_id=#{dictId} </if>
<if test="categoryFlag != null and categoryFlag != ''">and category_flag=#{categoryFlag}</if>
<if test="categoryPath != null and categoryPath != ''">and category_path=#{categoryPath}</if>
@ -170,9 +166,7 @@
<select id="queryChildren" resultMap="resultMap">
select * from cms_category
<where>
<if test="appId &gt; 0">
and app_id=#{appId}
</if>
<if test="dictId &gt; 0">
and dict_id=#{dictId}
</if>
@ -228,7 +222,6 @@
<if test="mdiyModelId != null and mdiyModelId != ''"> and mdiy_model_id=#{mdiyModelId}</if>
<if test="categoryDatetime != null"> and category_datetime=#{categoryDatetime} </if>
<if test="categoryManagerId != null"> and category_manager_id=#{categoryManagerId} </if>
<if test="appId != null"> and app_id=#{appId} </if>
<if test="dictId != null"> and dict_id=#{dictId} </if>
<if test="categoryFlag != null and categoryFlag != ''"> and category_flag=#{categoryFlag}</if>
<if test="categoryPath != null and categoryPath != ''"> and category_path=#{categoryPath}</if>
@ -240,7 +233,6 @@
<if test="del != null"> and del=#{del} </if>
<include refid="net.mingsoft.base.dao.IBaseDao.sqlWhere"></include>
</where>
order by id desc
</select>
</mapper>

@ -1,19 +1,21 @@
package net.mingsoft.cms.dao;
import net.mingsoft.base.dao.IBaseDao;
import java.util.*;
import net.mingsoft.cms.bean.CategoryBean;
import net.mingsoft.cms.bean.ContentBean;
import net.mingsoft.cms.entity.ContentEntity;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 文章持久层
* @author 铭飞开发团队
* 创建日期2019-11-28 15:12:32<br/>
* 历史修订<br/>
*/
public interface IContentDao extends IBaseDao {
public interface IContentDao extends IBaseDao<ContentEntity> {
/**
* 查询文章编号集合
@ -32,12 +34,12 @@ public interface IContentDao extends IBaseDao {
* list[2]:是否是等值查询 list[3]:字段的值
* @return 文章实体总数
*/
int getSearchCount(@Param("tableName") String tableName, @Param("diyList") List diyList,@Param("map") Map<String, Object> map,
int getSearchCount(@Param("tableName") String tableName, @Param("diyList") List diyList, @Param("map") Map<String, Object> map,
@Param("websiteId") int websiteId, @Param("ids") String ids);
/**
* 分类编号删除文章
* @param ids
*/
void deleteEntityByCategoryIds(@Param("ids") int[] ids);
void deleteEntityByCategoryIds(@Param("ids") String[] ids);
}

@ -43,7 +43,6 @@
<result column="content_url" property="contentUrl" /><!--文章跳转链接地址 -->
<result column="static_url" property="staticUrl" /><!--静态地址 -->
<result column="content_hit" property="contentHit" /><!--点击次数 -->
<result column="app_id" property="appId" /><!--文章管理的应用id -->
<result column="create_by" property="createBy" /><!--创建人 -->
<result column="create_date" property="createDate" /><!--创建时间 -->
<result column="update_by" property="updateBy" /><!--修改人 -->
@ -67,7 +66,6 @@
<result column="mdiy_model_id" property="mdiyModelId" /><!--栏目管理的内容模型id -->
<result column="category_datetime" property="categoryDatetime" /><!--类别发布时间 -->
<result column="category_manager_id" property="categoryManagerId" /><!--发布用户id -->
<result column="app_id" property="appId" /><!--应用编号 -->
<result column="dict_id" property="dictId" /><!--字典对应编号 -->
<result column="category_flag" property="categoryFlag" /><!--栏目属性 -->
<result column="category_path" property="categoryPath" /><!--栏目路径 -->
@ -98,7 +96,6 @@
<if test="contentDetails != null and contentDetails != ''">content_details,</if>
<if test="contentUrl != null and contentUrl != ''">content_url,</if>
<if test="contentHit != null">content_hit,</if>
<if test="appId != null">app_id,</if>
<if test="createBy &gt; 0">create_by,</if>
<if test="createDate != null">create_date,</if>
<if test="updateBy &gt; 0">update_by,</if>
@ -120,7 +117,6 @@
<if test="contentDetails != null and contentDetails != ''">#{contentDetails},</if>
<if test="contentUrl != null and contentUrl != ''">#{contentUrl},</if>
<if test="contentHit != null">#{contentHit},</if>
<if test="appId != null">#{appId},</if>
<if test="createBy &gt; 0">#{createBy},</if>
<if test="createDate != null">#{createDate},</if>
<if test="updateBy &gt; 0">#{updateBy},</if>
@ -147,7 +143,6 @@
<if test="contentDetails != null ">content_details=#{contentDetails},</if>
<if test="contentUrl != null and contentUrl != ''">content_url=#{contentUrl},</if>
<if test="contentHit != null">content_hit=#{contentHit},</if>
<if test="appId != null">app_id=#{appId},</if>
<if test="createBy &gt; 0">create_by=#{createBy},</if>
<if test="createDate != null">create_date=#{createDate},</if>
<if test="updateBy &gt; 0">update_by=#{updateBy},</if>
@ -181,7 +176,6 @@
<if test="contentDetails != null and contentDetails != ''">and content_details=#{contentDetails}</if>
<if test="contentUrl != null and contentUrl != ''">and content_url=#{contentUrl}</if>
<if test="contentHit != null">and content_hit=#{contentHit}</if>
<if test="appId != null"> and app_id=#{appId} </if>
<if test="createBy &gt; 0"> and create_by=#{createBy} </if>
<if test="createDate != null"> and create_date=#{createDate} </if>
<if test="updateBy &gt; 0"> and update_by=#{updateBy} </if>
@ -219,7 +213,7 @@
</select>
<!--条件查询-->
<select id="query" resultMap="resultContentMap">
select ct.*,CONCAT("/html/",ct.app_id,category_path,"/",ct.id,".html") AS static_url from (
select ct.*,CONCAT('/html/',ct.app_id,category_path,'/',ct.id,'.html') AS static_url from (
select ct.*,cc.category_path from cms_content ct
join cms_category cc on ct.content_category_id=cc.id
<where>
@ -239,13 +233,12 @@
<if test="contentDetails != null and contentDetails != ''"> and content_details=#{contentDetails}</if>
<if test="contentUrl != null and contentUrl != ''"> and content_url=#{contentUrl}</if>
<if test="contentHit != null"> and content_hit=#{contentHit}</if>
<if test="appId != null"> and ct.app_id=#{appId} </if>
<if test="createBy &gt; 0"> and ct.create_by=#{createBy} </if>
<if test="createDate != null"> and ct.create_date=#{createDate} </if>
<if test="updateBy &gt; 0"> and ct.update_by=#{updateBy} </if>
<if test="updateDate != null"> and update_date=#{updateDate} </if>
</where>
)ct ORDER BY date_format(ct.content_datetime,'%Y-%m-%d') desc,content_sort desc
)ct ORDER BY ct.content_datetime desc,content_sort desc
</select>
<sql id="queryWhereCategoryId" databaseId="mysql">
@ -261,13 +254,11 @@
<!-- 根据站点编号、开始、结束时间和栏目编号查询文章编号集合 -->
<select id="queryIdsByCategoryIdForParser" resultMap="resultBean" >
select
cms_content.id article_id,c.*
FROM cms_content
ct.id article_id,c.*
FROM cms_content ct
LEFT JOIN cms_category c ON content_category_id = c.id
where cms_content.del=0
<if test="appId &gt; 0">
and cms_content.app_id = #{appId}
</if>
where ct.del=0
<!-- 查询子栏目数据 -->
<if test="contentCategoryId &gt; 0">
and (content_category_id=#{contentCategoryId} or content_category_id in
@ -280,17 +271,17 @@
and content_datetime &gt;= #{endTime}
</if>
<if test="flag!=null and flag!=''">
and cms_content.content_type in ( #{flag})
and ct.content_type in ( #{flag})
</if>
<if test="noflag!=null and noflag!=''">
and (cms_content.content_type not in ( #{noflag} ) or cms_content.content_type is null)
and (ct.content_type not in ( #{noflag} ) or ct.content_type is null)
</if>
<if test="orderBy!=null and orderBy!='' ">
<if test="orderBy=='date'">ORDER BY content_datetime</if>
<if test="orderBy=='hit'">ORDER BY content_hit</if>
<if test="orderBy=='sort'">ORDER BY content_sort</if>
<if test="orderBy!='date' and orderBy!='hit' and orderBy!='sort'">
ORDER BY cms_content.id
ORDER BY ct.id
</if>
<choose>
<when test="order!=null and order!=''">
@ -312,7 +303,7 @@
<if test="tableName!=null and tableName!='' and diyMap!=null">left join ${tableName} d on d.link_id=a.id
</if>
<where>
a.del=0 and a.app_id = #{websiteId}
a.del=0
<if test="ids!=null and ids!=''">
and FIND_IN_SET(content_category_id,#{ids})
</if>

@ -4,16 +4,21 @@ import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.format.annotation.DateTimeFormat;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import net.mingsoft.base.entity.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* 分类实体
* @author 铭飞开发团队
* 创建日期2019-11-28 15:12:32<br/>
* 历史修订<br/>
*/
@TableName("cms_category")
public class CategoryEntity extends BaseEntity {
private static final long serialVersionUID = 1574925152750L;
@ -80,6 +85,7 @@ private static final long serialVersionUID = 1574925152750L;
/**
* 应用编号
*/
@TableField(exist = false)
private Integer appId;
/**
* 字典对应编号
@ -98,6 +104,31 @@ private static final long serialVersionUID = 1574925152750L;
*/
private String categoryParentId;
/**
* 叶子节点
*/
private Boolean leaf;
/**
* 顶级id
*/
private String topId;
public Boolean getLeaf() {
return leaf;
}
public void setLeaf(Boolean leaf) {
this.leaf = leaf;
}
public String getTopId() {
return topId;
}
public void setTopId(String topId) {
this.topId = topId;
}
/**
* 设置栏目管理名称

@ -1,16 +1,21 @@
package net.mingsoft.cms.entity;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.format.annotation.DateTimeFormat;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import net.mingsoft.base.entity.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* 文章实体
* @author 铭飞开发团队
* 创建日期2019-11-28 15:12:32<br/>
* 历史修订<br/>
*/
@TableName("cms_content")
public class ContentEntity extends BaseEntity {
private static final long serialVersionUID = 1574925152617L;
@ -73,6 +78,7 @@ private static final long serialVersionUID = 1574925152617L;
/**
* 文章管理的应用id
*/
@TableField(exist = false)
private Integer appId;
/**
* 点击次数

@ -34,3 +34,4 @@ content.sort=\u81EA\u5B9A\u4E49\u987A\u5E8F
category.diy.url=\u81EA\u5B9A\u4E49\u94FE\u63A5
content.keyword=\u5173\u952E\u5B57
templet.file=\u672A\u627E\u5230\u6A21\u677F\u6587\u4EF6
category.pinyin=\u62FC\u97F3

@ -1,13 +1,16 @@
package net.mingsoft.cms.upgrade;
import cn.hutool.core.util.StrUtil;
import io.swagger.models.auth.In;
import net.mingsoft.basic.util.BasicUtil;
import net.mingsoft.basic.util.SpringUtil;
import net.mingsoft.cms.biz.ICategoryBiz;
import net.mingsoft.cms.entity.CategoryEntity;
import net.mingsoft.basic.util.PinYinUtil;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author by 铭飞开源团队
@ -17,30 +20,44 @@ import java.util.List;
public class Upgrade {
/**
* 菜单拼音升级
* 更新栏目分类的顶级节点和叶子节点
*/
public void upgrade(){
ICategoryBiz categoryBiz = SpringUtil.getBean(ICategoryBiz.class);
List<CategoryEntity> list = categoryBiz.queryAll();
//先更新所有栏目的拼音
list.forEach(x->{
String pingYin = PinYinUtil.getPingYin(x.getCategoryTitle());
CategoryEntity category=new CategoryEntity();
category.setCategoryPinyin(pingYin);
category.setAppId(BasicUtil.getAppId());
CategoryEntity categoryBizEntity = (CategoryEntity)categoryBiz.getEntity(category);
x.setCategoryPinyin(pingYin);
//拼音存在则拼接id
if(categoryBizEntity!=null&&!categoryBizEntity.getId().equals(x.getId())){
x.setCategoryPinyin(pingYin+x.getId());
//将parentId第一行设为顶级节点
String topId = "0";
String parentId = x.getParentid();
if (parentId != null) {
topId = parentId.split(",")[0];
}
categoryBiz.update(x);
});
//再更新路径
list.forEach(x->{
if(StrUtil.isBlank(x.getCategoryId())||x.getCategoryId().equals("0")){
categoryBiz.updateEntity(x);
x.setTopId(topId);
String id = x.getId();
boolean leaf = true;
//判断是否叶子,循环查找,如果有节点的父节点中包含该节点的id则判断为否跳出循环
for (int i = 0; i< list.size(); i++) {
String pId = list.get(i).getParentid();
if (pId == null) {
continue;
}
leaf = !pId.contains(id);
//如果不是叶子就跳出循环,不需要再判断了
if (!leaf) {
break;
}
}
x.setLeaf(leaf);
//更新
Map<String, String> fields = new HashMap<>();
fields.put("leaf", x.getLeaf()?"1":"0");
fields.put("top_id", x.getTopId());
Map<String, String> where = new HashMap<>();
where.put("id", x.getId());
categoryBiz.updateBySQL("cms_category", fields, where);
});
}

@ -160,15 +160,15 @@ public class CmsParserUtil extends ParserUtil {
Map<Object, Object> contentModelMap = new HashMap<Object, Object>();
ModelEntity contentModel = null;
// 记录已经生成了文章编号
List<Integer> generateIds = new ArrayList<>();
ExecutorService pool=SpringUtil.getBean(ExecutorService.class);
List<String> generateIds = new ArrayList<>();
ExecutorService pool= SpringUtil.getBean(ExecutorService.class);
// 生成文章
for (int artId = 0; artId < articleIdList.size();) {
String writePath = null;
//设置分页类
PageBean page = new PageBean();
// 文章编号
int articleId = articleIdList.get(artId).getArticleId();
String articleId = articleIdList.get(artId).getArticleId();
// 文章的栏目路径
String articleColumnPath = articleIdList.get(artId).getCategoryPath();
// 该文章相关分类

@ -1,19 +1,15 @@
package net.mingsoft.config;
import java.io.File;
import java.util.List;
import java.util.concurrent.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.springframework.aop.Advisor;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.support.spring.stat.BeanTypeAutoProxyCreator;
import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import net.mingsoft.basic.filter.XSSEscapeFilter;
import org.springframework.aop.support.DefaultPointcutAdvisor;
import org.springframework.aop.support.JdkRegexpMethodPointcut;
import net.mingsoft.basic.interceptor.ActionInterceptor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
@ -21,21 +17,16 @@ import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.context.request.RequestContextListener;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.support.http.StatViewServlet;
import com.alibaba.druid.support.http.WebStatFilter;
import com.alibaba.druid.support.spring.stat.BeanTypeAutoProxyCreator;
import com.alibaba.druid.support.spring.stat.DruidStatInterceptor;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import net.mingsoft.basic.interceptor.ActionInterceptor;
import net.mingsoft.basic.util.BasicUtil;
import java.io.File;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
@Configuration
public class WebConfig implements WebMvcConfigurer {
@ -45,6 +36,9 @@ public class WebConfig implements WebMvcConfigurer {
*/
@Value("${ms.upload.path}")
private String uploadFloderPath;
@Value("${ms.upload.template}")
private String template;
/**
* 上传路径映射
*/
@ -55,7 +49,10 @@ public class WebConfig implements WebMvcConfigurer {
return new ActionInterceptor();
}
@Bean
public ConfigurationCustomizer configurationCustomizer() {
return configuration -> configuration.setUseDeprecatedExecutor(false);
}
/**
* 增加对rest api鉴权的spring mvc拦截器
*/
@ -68,12 +65,12 @@ public class WebConfig implements WebMvcConfigurer {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/upload/**").addResourceLocations("/upload/","file:upload/");
registry.addResourceHandler("/templets/**").addResourceLocations("/templets/","file:templets/");
registry.addResourceHandler(uploadMapping).addResourceLocations(File.separator+uploadFloderPath+File.separator,"file:"+uploadFloderPath+File.separator);
registry.addResourceHandler("/templets/**").addResourceLocations(File.separator+template+File.separator,"file:"+template+File.separator);
registry.addResourceHandler("/html/**").addResourceLocations("/html/","file:html/");
//三种映射方式 webapp下、当前目录下、jar内
registry.addResourceHandler("/app/**").addResourceLocations("/app/","file:app/", "classpath:/app/");
registry.addResourceHandler("/static/**","/**").addResourceLocations("/static/","file:static/","classpath:/static/","classpath:/META-INF/resources/");
registry.addResourceHandler("/static/**").addResourceLocations("/static/","file:static/","classpath:/static/","classpath:/META-INF/resources/");
registry.addResourceHandler("/api/**").addResourceLocations("/api/","file:api/", "classpath:/api/");
if(new File(uploadFloderPath).isAbsolute()){
//如果指定了绝对路径,上传的文件都映射到uploadMapping下

@ -1,7 +1,16 @@
#spring:
# datasource:
# url: jdbc:mysql://192.168.0.8:3316/mcms-dev-5.2-1?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
# username: admin
# password: 123456789
# filters: wall,mergeStat
# type: com.alibaba.druid.pool.DruidDataSource
spring:
datasource:
url: jdbc:mysql://localhost:3306/db-mcms-open?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
username: root
password: root
driver-class-name: dm.jdbc.driver.DmDriver
url: jdbc:dm://192.168.0.8:5236
username: SYSDBA
password: SYSDBA
filters: wall,mergeStat
type: com.alibaba.druid.pool.DruidDataSource
type: com.alibaba.druid.pool.DruidDataSource

@ -1,6 +1,6 @@
spring:
datasource:
url: jdbc:mysql://192.168.0.8:3316/mcms-5.1?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
url: jdbc:mysql://192.168.0.8:3316/mcms-5.2?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
username: mcms
password: mcms
filters: wall,mergeStat

@ -1,5 +1,5 @@
server:
port: 8080
port: 5107
servlet.session.timeout: P0DT60M0S #D天H小时M分钟S秒,字符T是紧跟在时分秒之前的,每个单位都必须由数字开始,且时分秒顺序不能乱
# ssl: #https证书配置 配置了之后只能通过https访问应用
# key-store: ms.pfx 证书文件
@ -13,16 +13,20 @@ logging:
path: log #会在项目的根目录下生成log目录,里面会生成对应的日期目录,日期目录下面生成日志压缩包备份文件,默认按每10M分割一个日志文件,例如:log/2020-01/app-2020-01-03-18.1.log.gz(表示2020年1月3号下午六点的第一个备份),也可以根据实际情况写绝对路径,例如:d:/log
ms:
# scheme: https #解决使用代理服务器代理应用时标签解析域名依旧为http的问题
mwebsite:
#站群需要appid过滤的表
tables: cms_category,cms_content,mdiy_dict,mdiy_model,mdiy_page,people,people_address,role
# scheme: https #解决使用代理服务器代理应用时标签解析域名依旧为http的问题
swagger:
enable: true #启用swagger文档,生产的时候务必关掉 访问地址:http://ip|域名/项目发布名/swagger-ui.html
manager:
path: /ms #后台访问的路径,如:http://项目/ms/login.do,生产的时候建议修改
view-path: /WEB-INF/manager #后台视图层路径配置
chcek-code: true #默认开启验证码验证,false验证码不验证
check-code: false #默认开启验证码验证,false验证码不验证
upload:
template: template
enable-web: true #启用web层的上传
template: template #模板文件夹支持重命名,不支持路径
path: upload #文件上传路径,可以根据实际写绝对路径
mapping: /upload/** #修改需要谨慎,系统第一次部署可以随意修改,如果已经有了上传数据,再次修改会导致之前上传的文件404
denied: .exe,.jsp
@ -75,7 +79,15 @@ spring:
time_format: HH:mm:ss
datetime_format: yyyy-MM-dd HH:mm:ss
number_format: 0.##
mybatis:
http:
encoding:
force: true
charset: utf-8
enabled: true
mybatis-plus:
global-config:
db-config:
column-format: "\"%s\"" #增加这个需要增加 ms-db
id-type: assign_id
configuration:
database-id: mysql

@ -169,6 +169,24 @@
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter="0"
justify="start" align="top">
<el-col :span="12">
<el-form-item label="栏目拼音" prop="categoryPinyin">
<el-input
v-model="form.categoryPinyin"
:disabled="false"
:readonly="false"
:style="{width: '100%'}"
:clearable="true"
placeholder="默认拼音根据名称生成">
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
</el-col>
</el-row>
<el-form-item label="栏目管理关键字" prop="categoryKeyword" >
<template slot='label'>栏目关键字
<el-popover slot="label" placement="top-start" title="提示" trigger="hover">
@ -249,7 +267,7 @@
// 栏目管理名称
categoryTitle: '',
// 所属栏目
categoryId: '',
categoryId: null,
// 栏目管理属性
categoryType: '1',
// 自定义顺序
@ -258,6 +276,8 @@
categoryListUrl: '',
// 内容模板
categoryUrl: '',
// 栏目拼音
categoryPinyin: '',
// 栏目管理关键字
categoryKeyword: '',
// 栏目管理描述
@ -418,7 +438,9 @@
ms.http.get(ms.manager + "/mdiy/model/list.do", {
modelType: 'zdymx_wz'
}).then(function (data) {
that.mdiyModelIdOptions = data.data.rows;
if(data.result){
that.mdiyModelIdOptions = data.data.rows;
}
}).catch(function (err) {
console.log(err);
});
@ -460,10 +482,12 @@
ms.http.post(ms.manager + "/cms/content/list.do", {
contentCategoryId: id
}).then(function (data) {
if (data.data.total > 0) {
that.categoryTypeDisabled = true;
} else {
that.categoryTypeDisabled = false;
if(data.result){
if (data.data.total > 0) {
that.categoryTypeDisabled = true;
} else {
that.categoryTypeDisabled = false;
}
}
}).catch(function (err) {
console.log(err);
@ -494,7 +518,10 @@
dictType: '栏目属性',
pageSize: 99999
}).then(function (res) {
that.categoryFlagOptions = res.rows;
if(res.result){
res = res.data;
that.categoryFlagOptions = res.rows;
}
}).catch(function (err) {
console.log(err);
});
@ -533,11 +560,18 @@
this.categoryUrlOptionsGet();
this.categoryFlagOptionsGet();
this.form.id = ms.util.getParameter("id");
this.form.childId = ms.util.getParameter("childId");// 判断是否增加子栏目
if (this.form.id) {
// 判断三种状态,默认为新增状态
this.categoryTypeDisabled = false;// 控制栏目分类是否可编辑
if (this.form.id != undefined && (this.form.childId == undefined || this.form.childId == "undefined")) {
// 切换编辑状态,id不为空 childId 为空
this.categoryTypeDisabled = true;
this.get(this.form.id);
} else {
this.categoryTypeDisabled = false;
} else if (this.form.childId) {
// 切换新增子栏目状态,id&childId 不为空
this.form.id = null;
this.form.categoryId = this.form.childId;
}
}
});

@ -47,7 +47,7 @@
</el-table-column>
<el-table-column label="链接地址" align="left" prop="categoryPath" show-overflow-tooltip>
<template slot-scope="scope">
<span style="cursor: pointer" class="copyBtn" :data-clipboard-text="'${'$'}{global.url}'+scope.row.categoryPath+'/index.html'" @click="copyUrl">{{"{ms:global.url/}"+scope.row.categoryPath+"/index.html"}}</span>
<span style="cursor: pointer" class="copyBtn" :data-clipboard-text="'${'$'}{ms:global.url}'+scope.row.categoryPath+'/index.html'" @click="copyUrl">{{"{ms:global.url/}"+scope.row.categoryPath+"/index.html"}}</span>
</template>
</el-table-column>
<el-table-column label="列表地址" align="left" prop="categoryListUrl" show-overflow-tooltip>
@ -62,8 +62,11 @@
{{scope.row.categoryType == '2'?scope.row.categoryUrl:''}}
</template>
</el-table-column>
<el-table-column label="操作" width="120" align="center">
<el-table-column label="操作" width="150" align="center">
<template slot-scope="scope">
<@shiro.hasPermission name="cms:category:save">
<el-link type="primary" :underline="false" @click="save(scope.row.id, scope.row.id)"><i class="el-icon-plus"></i>子栏目</el-link>
</@shiro.hasPermission>
<@shiro.hasPermission name="cms:category:update">
<el-link type="primary" :underline="false" @click="save(scope.row.id)">编辑</el-link>
</@shiro.hasPermission>
@ -231,9 +234,9 @@
return value;
},
//新增
save: function (id) {
save: function (id, childId) {
if (id) {
location.href = this.manager + "/cms/category/form.do?id=" + id;
location.href = this.manager + "/cms/category/form.do?id=" + id + "&childId=" + childId;
} else {
location.href = this.manager + "/cms/category/form.do";
}

@ -543,7 +543,10 @@
dictType: '文章属性',
pageSize: 99999
}).then(function (data) {
that.contentTypeOptions = data.rows;
if(data.result){
data = data.data;
that.contentTypeOptions = data.rows;
}
}).catch(function (err) {
console.log(err);
});

@ -456,7 +456,10 @@
dictType: '文章属性',
pageSize: 99999
}).then(function (data) {
that.contentTypeOptions = data.rows;
if(data.result){
data = data.data;
that.contentTypeOptions = data.rows;
}
}).catch(function (err) {
console.log(err);
});

@ -507,7 +507,10 @@
dictList: function () {
var that = this;
ms.http.get(ms.base + '/mdiy/dict/list.do', {dictType: '消息类型', pageSize: 99999}).then(function (res) {
that.messageTypeList = res.rows;
if(res.result){
res = res.data;
that.messageTypeList = res.rows;
}
}).catch(function (err) {
console.log(err);
});

@ -448,9 +448,9 @@
var that = this;
axios.create({
withCredentials: true
}).get("https://ms.mingsoft.net/cms/content/list.do?contentCategoryId=202").then(function (res) {
}).get("https://mingsoft.net/cms/content/list.do?contentCategoryId=202").then(function (res) {
that.msNewsLast = res.data.data.rows[0].contentTitle.toString();
that.msNewsPath = 'https://ms.mingsoft.net/html/1/203/202/' + res.data.data.rows[0].id + '.html';
that.msNewsPath = 'https://mingsoft.net/html/1/203/202/' + res.data.data.rows[0].id + '.html';
});
this.setCallBackFun();
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,163 @@
<!--底部导航 - start -->
<div class="footer">
<!--友情链接 - start -->
<div class="links">
<div class="body">
<span >
网站导航
</span>
<div class="link">
<!--下拉框 - start -->
<!--下拉框 -end -->
</div>
<div class="link">
<!--下拉框 - start -->
<!--下拉框 -end -->
</div>
<div class="link">
<!--下拉框 - start -->
<!--下拉框 -end -->
</div>
<div class="link">
<!--下拉框 - start -->
<!--下拉框 -end -->
</div>
<div class="link">
<!--下拉框 - start -->
<!--下拉框 -end -->
</div>
</div>
</div>
<!--友情链接 -end -->
<!--版权信息 - start -->
<div class="copyright">
<div class="body">
<img
title=""
alt=""
src="{ms:global.host/}/{ms:global.style/}/images/1602123532415.png"
/>
<div class="desc">
<div class="text">
<div >
<a href="#"
>
关于我们
</a>
<span >
</span>
<a href="#"
>
网站地图
</a>
</div>
</div>
<div class="text">
<a href="#"
>
主办:江西省人民政府办公厅
</a>
<a href="#"
>
承办:江西省信息中心
</a>
</div>
<div class="text">
<a href="#"
>
赣ICP备05004294号
</a>
<a href="#"
>
政府网站标识码3600000012
</a>
<a href="#"
>
赣公网安备 36010802000128号
</a>
</div>
<div class="ms-designer">
<a href="www.mingsoft.net"
target="_blank"
>
@该网页由MDesigner制作完成
</a>
</div>
</div>
<div class="right">
<div class="img">
<img
title=""
alt=""
src="http://www.gov.cn/govweb/xhtml/2016gov/guowuyuan/20190301gwykhd/images/icon_1234.png"
/>
<span >
国务院客户端
</span>
</div>
<div class="img">
<img
title=""
alt=""
src="http://www.gov.cn/govweb/xhtml/2016gov/guowuyuan/20190301gwykhd/images/icon_724.png"
/>
<span >
国务院小程序
</span>
</div>
<div class="wx">
<div >
<img
title=""
alt=""
src="http://www.gov.cn/govweb/xhtml/2016gov/guowuyuan/20190301gwykhd/images/icon_1434.png"
/>
<img
title=""
alt=""
src="http://www.gov.cn/govweb/xhtml/2016gov/guowuyuan/20190301gwykhd/images/icon_1534.png"
/>
<span >
中国政府网微博、微信
</span>
</div>
</div>
</div>
</div>
</div>
<!--版权信息 -end -->
<!--左漂浮 - start -->
<div class="left-fixed">
<div class="content">
<img
title=""
alt=""
src="https://iph.href.lu/100x100"
/>
</div>
</div>
<!--左漂浮 -end -->
<!--右漂浮 - start -->
<div class="right-fixed">
<div class="content">
<img
title=""
alt=""
src="https://iph.href.lu/100x100"
/>
</div>
</div>
<!--右漂浮 -end -->
</div>
<!--底部导航 -end -->

@ -0,0 +1,66 @@
<!--导航 - start -->
<div class="header">
<!--中间区域 - start -->
<div class="center">
<!--左侧 - start -->
<div class="left">
<a href="${global.url}"
>
${field.typetitle}
</a>
{ms:channel active='nav-sel' type='nav' flag='n'}
<a href="${global.url}${field.typelink}"
class="${field.active}">
${field.typetitle}
</a>
{/ms:channel}
</div>
<!--左侧 -end -->
<!--手机端 - start -->
<div @click='switchShow(["1601304203000_30278"]);' class="h5-menu">
<i class="iconfont icon-caidan icon" ></i>
<!--手机端菜单 - start -->
<div id="key_1601304203000_30278"
style="background-color:#2D548F;top:60px;left:0px;flex-direction:column;display:none;width:100vw;box-sizing:border-box;padding-top:0px;position:absolute;padding-left:0px;">
{ms:channel type='nav' flag='n'}
<a href="${global.url}${field.typelink}"
class="class-1">
${field.typetitle}
</a>
{/ms:channel}
</div>
<!--手机端菜单 -end -->
</div>
<!--手机端 -end -->
<!--副链接 - start -->
<div class="right">
<a href="http://www.gov.cn/"
target="_blank"
>
中国政府网
</a>
<span >
|
</span>
<a href="http://www.jxrd.gov.cn/"
target="_blank"
>
省人大
</a>
<span >
|
</span>
<a href="http://jxzx.jxnews.com.cn/"
target="_blank"
>
省政协
</a>
</div>
<!--副链接 -end -->
</div>
<!--中间区域 -end -->
</div>
<!--导航 -end -->

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,43 @@
<!--搜索区域 - start -->
<div class="search">
<div class="center">
<img
title=""
alt=""
src="{@ms:file global.logo/}"
class="logo" />
<div class="right">
<div class="top">
<a href="#"
>
政务邮箱
</a>
</div>
<div class="search">
<!--搜索 - start -->
<form id="searchDataForm" action="{ms:global.host/}/mcms/search.do" method="post" style="margin:0;padding:0;width:100%">
<div class="ms-search-input">
<div class="ms-search-input-div">
<!--输入框 - start -->
<input class="ms-input" placeholder="输入搜索关键字"/>
<!--输入框 -end -->
</div>
<div class="ms-search-button" onclick="document.getElementById('searchDataForm').submit();">
<i class="iconfont icon-fangdajing"></i>
<span>
搜索
</span>
</div>
</div>
</form> <!--搜索 -end -->
</div>
</div>
</div>
</div>
<!--搜索区域 -end -->

@ -1,31 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<#include "head-file.htm"/>
</head>
<body>
<#include "head.htm"/>
<div class="ms-banner" style="background:url({ms:global.host/}/{ms:global.style/}/images/about_us.jpg) no-repeat center;">
<p class="banner_tit_about animated fadeInLeft">关于我们</p>
<p class="banner_tit_about_des animated fadeInRight">About us</p>
</div>
<div class="ms-content-about">
<div class="ms-content-main">
<#include "menu-left.htm"/>
<div class="ms-content-right">
<div class="ms-content-right-position">
<a href="{ms:global.host/}">首页</a>
<span>></span>
<a href="{ms:field.typelink/}">{ms:field.typetitle/}</a>
</div>
<div class="ms-content-right-main">
<div class="ms-content-right-main-title">{ms:field.title/}</div>
<div class="ms-content-right-main-content">{ms:field.content/}</div>
</div>
</div>
</div>
</div>
<#include "footer.htm"/>
</body>
</html>

@ -1,67 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<#include "head-file.htm"/>
</head>
<body>
<#include "head.htm"/>
<div class="ms-banner" style="background:url({ms:global.host/}/{ms:global.style/}/images/talk_online.jpeg) no-repeat center;">
<p class="banner_tit_other animated fadeInLeft">在线留言</p>
<p class="banner_tit_other_des animated fadeInRight">Talk online</p>
</div>
<div class="ms-content-advice">
<div class="ms-content-form-background">
<form class="ms-content-form" method="post" id="postForm">
<input class="ms-content-form-name" type="text" name="name" placeholder="姓名">
<input class="ms-content-form-phone" type="text" name="phone" placeholder="手机">
<textarea class="ms-content-form-message" name="words" placeholder="留言"></textarea>
<div class="ms-login-button">提交</div>
</form>
</div>
</div>
<#include "footer.htm"/>
</body>
</html>
<script>
/* 表单提交 */
var flag = false;
$(".ms-login-button").click(function() {
if(!flag) {
$.ajax({
type: "POST",
url: "{ms:global.host/}/mdiy/post/7df6529f9eaa26da7ae4e01c7f73aa06.do",
data: $("#postForm").serialize(),
success: function(msg) {
flag = true;
alert("提交成功");
location.reload();
}
});
} else {
alert("您已经提交过了!");
}
})
/* 表单验证 */
function verification() {
if($('input[name="name"]').val().length > 0 && $('input[name="phone"]').val().length > 0 && $('.ms-content-form-message').val().length > 0) {
$('.ms-login-button').css("background-color", "#009aff");
$('.ms-login-button').css("pointer-events", 'visible');
$('.ms-login-button').css("color", "#fff");
} else {
$('.ms-login-button').css("background-color", "#fafafa");
$('.ms-login-button').css('pointer-events', "none");
$('.ms-login-button').css("color", "#ddd");
}
}
$('input[name="name"]').keyup(function() {
verification();
})
$('input[name="phone"]').keyup(function() {
verification();
})
$('.ms-content-form-message').keyup(function() {
verification();
})
</script>

@ -1,47 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<#include "head-file.htm"/>
</head>
<body>
<#include "head.htm"/>
<div class="ms-banner" style="background:url({ms:global.host/}/{ms:global.style/}/images/00.png) no-repeat center;">
<p class="banner_tit_other animated fadeInLeft">&nbsp;&nbsp;&nbsp;</p>
<p class="banner_tit_other_des animated fadeInRight">Case list</p>
</div>
<div class="ms-content-case">
<div class="ms-content-main">
{ms:arclist size=6 ispaging=true}
<div class="ms-content-main-case">
<div class="ms-content-main-case-img">
<img src="{ms:global.host/}[field.litpic/]">
</div>
<div class="ms-content-main-case-explain">
<div class="ms-content-main-case-title">[field.title/]</div>
<div class="ms-content-main-case-content">
<p class="ms-content-main-case-written">
[field.content/]
</p>
<!-- <p class="ms-content-main-case-QRcode">
<img src="./images/1471918025445.png">
</p> -->
</div>
<div class="ms-content-main-case-click">
<a target="_blank" href="[field.source/]">点击查看</a>
</div>
</div>
</div>
{/ms:arclist}
</div>
</div>
<#include "footer.htm"/>
</body>
</html>
<script type="text/javascript">
$(function() {
$('.ms-content-main-case').hover(function() {
$(this).find('.ms-content-main-case-explain').toggle();
});
});
</script>

@ -1,143 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<#include "head-file.htm"/>
</head>
<body>
<#include "head.htm"/>
<div class="ms-banner" style="background:url({ms:global.host/}/{ms:global.style/}/images/contact_us.jpeg) no-repeat center;">
<p class="banner_tit_other animated fadeInLeft" >联系我们</p>
<p class="banner_tit_other_des animated fadeInRight">Contact us</p>
</div>
<div class="ms-content-about">
<div class="ms-content-main">
<#include "menu-left.htm"/>
<div class="ms-content-right">
<div class="ms-content-right-position">
<a href="{ms:global.host/}">首页</a>
<span>></span>
<a href="{ms:field.typelink/}">{ms:field.typetitle/}</a>
</div>
<div class="ms-content-right-main">
<div class="ms-content-right-main-title">联系我们</div>
<div class="ms-content-right-main-content"><!-- {ms:field.content/} -->
<style type="text/css">
.BMap_Marker img{
width: 100%;
height: 100%;
}
html,body{margin:0;padding:0;}
.iw_poi_title {color:#CC5522;font-size:14px;font-weight:bold;overflow:hidden;padding-right:13px;white-space:nowrap}
.iw_poi_content {font:12px arial,sans-serif;overflow:visible;padding-top:4px;white-space:-moz-pre-wrap;word-wrap:break-word}
</style>
<script type="text/javascript" src="http://api.map.baidu.com/api?key=&v=1.1&services=true"></script>
<body>
<!--百度地图容器-->
<div style="width:100%;height:550px;border:#ccc solid 1px;" id="dituContent"></div>
</body>
<script type="text/javascript">
//创建和初始化地图函数:
function initMap(){
createMap();//创建地图
setMapEvent();//设置地图事件
addMapControl();//向地图添加控件
addMarker();//向地图中添加marker
}
//创建地图函数:
function createMap(){
var map = new BMap.Map("dituContent");//在百度地图容器中创建一个地图
var point = new BMap.Point(116.737158,29.153633);//定义一个中心点坐标
map.centerAndZoom(point,9);//设定地图的中心点和坐标并将地图显示在地图容器中
window.map = map;//将map变量存储在全局
}
//地图事件设置函数:
function setMapEvent(){
map.enableDragging();//启用地图拖拽事件,默认启用(可不写)
map.enableScrollWheelZoom();//启用地图滚轮放大缩小
map.enableDoubleClickZoom();//启用鼠标双击放大,默认启用(可不写)
map.enableKeyboard();//启用键盘上下左右键移动地图
}
//地图控件添加函数:
function addMapControl(){
//向地图中添加缩放控件
var ctrl_nav = new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_LEFT,type:BMAP_NAVIGATION_CONTROL_LARGE});
map.addControl(ctrl_nav);
//向地图中添加缩略图控件
var ctrl_ove = new BMap.OverviewMapControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT,isOpen:1});
map.addControl(ctrl_ove);
//向地图中添加比例尺控件
var ctrl_sca = new BMap.ScaleControl({anchor:BMAP_ANCHOR_BOTTOM_LEFT});
map.addControl(ctrl_sca);
}
//标注点数组
var markerArr = [{title:"铭飞科技(景德镇)有限公司",content:"江西省景德镇市昌江区&nbsp;枫林佳苑&nbsp;15栋A区&nbsp;三单元&nbsp;302室",point:"117.187869|29.282949",isOpen:0,icon:{w:21,h:21,l:0,t:0,x:6,lb:5}}
,{title:"铭飞科技(南昌)办事处",content:"江西省南昌市青山湖区创新一路&nbsp;绿地新都会(西门)&nbsp;12栋2单元901室",point:"116.003117|28.683521",isOpen:0,icon:{w:21,h:21,l:0,t:0,x:6,lb:5}}
];
//创建marker
function addMarker(){
for(var i=0;i<markerArr.length;i++){
var json = markerArr[i];
var p0 = json.point.split("|")[0];
var p1 = json.point.split("|")[1];
var point = new BMap.Point(p0,p1);
var iconImg = createIcon(json.icon);
var marker = new BMap.Marker(point,{icon:iconImg});
var iw = createInfoWindow(i);
var label = new BMap.Label(json.title,{"offset":new BMap.Size(json.icon.lb-json.icon.x+10,-20)});
marker.setLabel(label);
map.addOverlay(marker);
label.setStyle({
borderColor:"#808080",
color:"#333",
cursor:"pointer"
});
(function(){
var index = i;
var _iw = createInfoWindow(i);
var _marker = marker;
_marker.addEventListener("click",function(){
this.openInfoWindow(_iw);
});
_iw.addEventListener("open",function(){
_marker.getLabel().hide();
})
_iw.addEventListener("close",function(){
_marker.getLabel().show();
})
label.addEventListener("click",function(){
_marker.openInfoWindow(_iw);
})
if(!!json.isOpen){
label.hide();
_marker.openInfoWindow(_iw);
}
})()
}
}
//创建InfoWindow
function createInfoWindow(i){
var json = markerArr[i];
var iw = new BMap.InfoWindow("<b class='iw_poi_title' title='" + json.title + "'>" + json.title + "</b><div class='iw_poi_content'>"+json.content+"</div>");
return iw;
}
//创建一个Icon
function createIcon(json){
var icon = new BMap.Icon("{ms:global.host/}/{ms:global.style/}/images/img-2.png", new BMap.Size(json.w,json.h),{imageOffset: new BMap.Size(-json.l,-json.t),infoWindowOffset:new BMap.Size(json.lb+5,1),offset:new BMap.Size(json.x,json.h)})
return icon;
}
initMap();//创建和初始化地图
</script>
</div>
</div>
</div>
</div>
</div>
<#include "footer.htm"/>
</body>
</html>

@ -1 +0,0 @@
.ms-content-about{margin-top:20px;margin-bottom:40px}.ms-content-about a:link{color:#000;text-decoration:none}.ms-content-about a:visited{color:#000;text-decoration:none}.ms-content-about a:active{color:#000;text-decoration:none}.ms-content-about a:hover{color:#000;text-decoration:none}.ms-content-about .ms-content-main{width:1200px;overflow:hidden;margin:auto}.ms-content-about .ms-content-main .ms-content-left{width:230px;float:left;margin-right:20px}.ms-content-about .ms-content-main .ms-content-left .ms-content-left-title{font-weight:bold;background-color:#009aff;color:#fff;height:40px;line-height:40px;width:190px;padding:0 20px}.ms-content-about .ms-content-main .ms-content-left .ms-content-left-ul{background-color:#fff;margin-top:1px;width:230px}.ms-content-about .ms-content-main .ms-content-left .ms-content-left-ul a:hover{color:#fff}.ms-content-about .ms-content-main .ms-content-left .ms-content-left-ul a:hover li{background-color:#54bcfe}.ms-content-about .ms-content-main .ms-content-left .ms-content-left-ul a{color:#999999}.ms-content-about .ms-content-main .ms-content-left .ms-content-left-ul li{height:40px;line-height:40px;font-size:14px;cursor:pointer;padding:0 20px}.ms-content-about .ms-content-main .ms-content-left .ms-content-left-ul li .ms-content-left-li-more{float:right}.ms-content-about .ms-content-main .ms-content-left .ms-content-left-ul .ms-content-left-li-first{color:#fff}.ms-content-about .ms-content-main .ms-content-left .ms-content-left-ul .ms-content-left-li-first li{background-color:#54bcfe}.ms-content-about .ms-content-main .ms-content-right{overflow:hidden}.ms-content-about .ms-content-main .ms-content-right a:visited{color:#000000}.ms-content-about .ms-content-main .ms-content-right .ms-content-right-position{font-size:14px}.ms-content-about .ms-content-main .ms-content-right .ms-content-right-position a:hover{color:#0099ff}.ms-content-about .ms-content-main .ms-content-right .ms-content-right-position span{padding:0 5px}.ms-content-about .ms-content-main .ms-content-right .ms-content-right-main{width:952px;background-color:#ffffff;min-height:450px;padding-bottom:20px}.ms-content-about .ms-content-main .ms-content-right .ms-content-right-main .ms-content-right-main-content{margin:0 20px}.ms-content-about .ms-content-main .ms-content-right .ms-content-right-main .ms-content-right-main-title{text-align:center;font-size:20px;padding-top:40px;padding-bottom:20px;border-bottom:1px solid #d0cfcf99 99;margin:20px}/*# sourceMappingURL=./about.css.map */

@ -1 +0,0 @@
.ms-content-advice{margin-top:20px;margin-bottom:40px}.ms-content-advice .ms-content-form-background{width:1200px;height:480px;background-color:#ffffff;margin:auto;display:flex}.ms-content-advice .ms-content-form-background .ms-content-form{width:330px;margin:auto}.ms-content-advice .ms-content-form-background .ms-content-form ::-webkit-input-placeholder{color:#999}.ms-content-advice .ms-content-form-background .ms-content-form input::-webkit-input-placeholder,.ms-content-advice .ms-content-form-background .ms-content-form textarea::-webkit-input-placeholder{font-family:Arial,Verdana,Sans-serif}.ms-content-advice .ms-content-form-background .ms-content-form .ms-content-form-name,.ms-content-advice .ms-content-form-background .ms-content-form .ms-content-form-phone,.ms-content-advice .ms-content-form-background .ms-content-form .ms-content-form-message{width:308px;height:12px;padding:10px;display:block;border:1px solid #eeeeee;border-radius:3px;color:#555555;margin-bottom:20px}.ms-content-advice .ms-content-form-background .ms-content-form .ms-content-form-message{height:142px}.ms-content-advice .ms-content-form-background .ms-content-form .ms-login-button{pointer-events:none;width:330px;height:34px;line-height:34px;font-size:14px;color:#ddd;text-align:center;background-color:#fafafa;cursor:pointer;border-radius:4px}/*# sourceMappingURL=./advice.css.map */

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -1 +0,0 @@
.ms-content-case{background-color:#fff;overflow:hidden;padding-top:20px}.ms-content-case a:visited{color:#000000}.ms-content-case .ms-content-main{width:1200px;min-height:400px;margin:auto;overflow:hidden}.ms-content-case .ms-content-main .ms-content-main-case:nth-child(3n){margin-right:0}.ms-content-case .ms-content-main .ms-content-main-case{border:1px solid #f0f0f0;width:384px;height:332px;margin-right:20px;float:left;position:relative;overflow:hidden;color:#ffffff;margin-top:20px}.ms-content-case .ms-content-main .ms-content-main-case .ms-content-main-case-img{width:387px;height:334px}.ms-content-case .ms-content-main .ms-content-main-case .ms-content-main-case-img img{width:100%;height:100%}.ms-content-case .ms-content-main .ms-content-main-case .ms-content-main-case-explain{display:none;width:100%;height:100%;background-color:#0099ff;opacity:.9;position:absolute;top:0;left:0}.ms-content-case .ms-content-main .ms-content-main-case .ms-content-main-case-explain .ms-content-main-case-title{font-size:22px;text-align:center;margin:20px 0;padding:0 20px;height:22px;line-height:22px;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box}.ms-content-case .ms-content-main .ms-content-main-case .ms-content-main-case-explain .ms-content-main-case-content{min-height:215px}.ms-content-case .ms-content-main .ms-content-main-case .ms-content-main-case-explain .ms-content-main-case-content p{font-size:14px;padding:0 30px;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box}.ms-content-case .ms-content-main .ms-content-main-case .ms-content-main-case-explain .ms-content-main-case-content p img{width:100px;text-align:center;margin:20px 0;height:100px}.ms-content-case .ms-content-main .ms-content-main-case .ms-content-main-case-explain .ms-content-main-case-click{text-align:center}.ms-content-case .ms-content-main .ms-content-main-case .ms-content-main-case-explain .ms-content-main-case-click a{border:1px solid #ffffff;border-radius:17px;padding:5px 39px;color:#ffffff}.ms-content-case .ms-content-main .ms-content-main-case-left{margin-right:0}.ms-content-case #ms-case-page{margin-top:50px}.ms-content-case #ms-case-page a:hover{background-color:#eee}.ms-content-case .ms-content-main-page{text-align:center;margin-top:30px;margin-bottom:50px}.ms-content-case .ms-content-main-page a{color:#999;font-size:14px}.ms-content-case .ms-content-main-page .ms-content-main-page-first,.ms-content-case .ms-content-main-page .ms-content-main-page-last{border:1px solid #ddd;padding:10px 15px;margin-right:-5px}.ms-content-case .ms-content-main-page .ms-content-main-page-upper,.ms-content-case .ms-content-main-page .ms-content-main-page-next{border-top:1px solid #ddd;border-bottom:1px solid #ddd;padding:10px 15px;margin-right:-5px}.ms-content-case .ms-content-main-page .ms-content-main-page-upper{border-right:1px solid #ddd}.ms-content-case .ms-content-main-page .ms-content-main-page-first{border-top-left-radius:4px;border-bottom-left-radius:4px}.ms-content-case .ms-content-main-page .ms-content-main-page-last{border-top-right-radius:4px;border-bottom-right-radius:4px}/*# sourceMappingURL=./case-list.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,79 +0,0 @@
#emotions{
left:0;
width: 395px;
font-size:12px;
background:#fff;
position:absolute;
border: 1px solid #E8E8E8;
}
#emotions a{
color: #9ABBC8;
padding:2px 7px;
text-decoration:none;
}
#emotions img{
border:0;
}
#emotions div{
margin:5px 10px;
padding:1px;
overflow: hidden;
}
#emotions #prev,
#emotions #next
{
margin-left:3px;
background:#eee;
}
#emotions .categorys{
color:#ccc;
height:23px;
color: #9ABBC8;
overflow:hidden;
}
#emotions .categorys a{
display: inline-block;
}
#emotions .categorys a:hover{
text-decoration:underline;
}
#emotions .categorys a.current{
cursor: default;
background: #F0F0F0;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}
#emotions .container{
padding:1px;
overflow: hidden;
}
#emotions .container a{
float:left;
width:26px;
height:22px;
text-align:center;
box-sizing: content-box;
padding: 4px 2px;
margin: -1px 0 0 -1px;
border: 1px solid #e8e8e8;
}
#emotions .container a:hover{
z-index:2;
position:relative;
border:1px solid #0095cd;
}
#emotions .page{
text-align:right;
}
#emotions .page a.current{
color: #666;
background-color:#fff;
}
#emotions .page a{
margin-left:3px;
color: #0078B6;
background-color:#f3f3f3;
}
#emotions .page a:hover{
background-color:#e7e7e7;
}

@ -1 +0,0 @@
html,body,#login{height:100%}body{background-color:#ffffff}body,p{margin:0}input:focus,textarea:focus{outline:none}#login{display:flex;flex-direction:column;height:893px;min-width:1200px;background:url("../images/pic.png") no-repeat;background-position:50%}#login .ms-none{display:none !important}#login .ms-login-float{float:left}#login .ms-head,#login .ms-footer,#login .ms-content-form,#login .ms-content-code{background-color:#ffffff}#login .ms-head-line,#login .ms-head-welcome-login,#login .ms-footer{color:#999999}#login .ms-head-welcome-login,#login .ms-login-english-title,#login .ms-login-remmember-password,#login .ms-footer{font-size:12px}#login .ms-head{vertical-align:middle;height:22px;padding:34px 46px;display:flex;align-content:center}#login .ms-head a{width:147px}#login .ms-head img{height:100%}#login .ms-head .ms-head-welcome-login{margin-top:4px;font-size:1rem !important}#login .ms-head .ms-head-line{margin:0 12px;border-left:1px solid #999}#login .ms-content{flex:1;position:relative}#login .ms-content .ms-content-form,#login .ms-content .ms-content-code{width:280px;height:215px;padding:24px 20px;position:absolute;right:160px;top:25%;box-shadow:2px 2px 8px 6px #3bb1ff}#login .ms-content #ms-content-form-register{height:260px}#login .ms-content .ms-login-chinese-title{color:#0099ff;font-size:16px;line-height:15px}#login .ms-content .ms-login-code{position:absolute;top:4px;right:4px}#login .ms-content .ms-login-code-title{color:#0099ff;font-size:12px}#login .ms-content .ms-content-form .ms-login-title{line-height:13px}#login .ms-content .ms-content-form .ms-login-english-title,#login .ms-content .ms-content-form .ms-login-remmember-password,#login .ms-content .ms-content-form .ms-login-code-text{color:#999999}#login .ms-content .ms-content-form .ms-login-people-name,#login .ms-content .ms-content-form .ms-login-remmember-password{margin-bottom:12px}#login .ms-content .ms-content-form .ms-login-error-text{height:15px;font-size:12px;color:#e4393c;display:flex;align-items:center;padding:5px 0}#login .ms-content .ms-content-form .ms-login-error-text img{padding-right:5px}#login .ms-content .ms-content-form input{border:1px solid #eeeeee;border-radius:3px;color:#555555;outline-color:#0099ff}#login .ms-content .ms-content-form input::-webkit-input-placeholder{color:#999999}#login .ms-content .ms-content-form input::-moz-placeholder{color:#999999}#login .ms-content .ms-content-form .ms-login-people-name{width:260px;height:20px;padding:5px 10px}#login .ms-content .ms-content-form .ms-error{border:1px solid #e4393c}#login .ms-content .ms-content-form .ms-login-remmember-password{display:flex;line-height:13px;align-items:center;height:13px}#login .ms-content .ms-content-form .ms-login-remmember-password input[type="checkbox"]{margin:0 6px 0 0}#login .ms-content .ms-content-form .ms-login-button{pointer-events:none;background-color:#fafafa;color:#ddd;width:100%;height:34px;line-height:34px;font-size:14px;text-align:center;cursor:pointer;border-radius:4px}#login .ms-content .ms-content-form .login-code{overflow:hidden;margin-bottom:12px}#login .ms-content .ms-content-form .login-code .login-code-input{width:114px;height:12px;padding:10px}#login .ms-content .ms-content-form .login-code .login-code-input,#login .ms-content .ms-content-form .login-code .login-code-img{margin-right:11px}#login .ms-content .ms-content-form .login-code .login-code-img{height:34px}#login .ms-content .ms-content-form .login-code .login-code-text{font-size:10px}#login .ms-content .ms-content-form .login-code .login-code-change{cursor:pointer;color:#0099ff}#login .ms-content .ms-content-form .login-code .login-code-rompt{color:#999}#login .ms-content .ms-content-form .ms-login-rand-code{width:110px;height:12px;padding:10px}#login .ms-content .ms-content-form .ms-login-rand-code-img{height:34px}#login .ms-content .ms-content-code .ms-computer-title{background:url(../images/frame.png) no-repeat;position:absolute;top:10px;background-size:100% 100%;color:#ffffff;font-size:10px;width:90px;right:45px}#login .ms-content .ms-content-code .ms-login-weixin{text-align:center}#login .ms-content .ms-content-code .ms-login-weixin img{margin:auto;display:block;margin-top:18px;margin-bottom:16px}#login .ms-content .ms-login-button:hover,#login .ms-content .ms-login-button:active{background-color:#0086ff}#login .ms-footer{height:40px;padding:40px 0;text-align:center}#login .ms-footer a:link{color:#999999;text-decoration:none}#login .ms-footer a:visited{color:#999999;text-decoration:none}#login .ms-footer a:active{color:#999999;text-decoration:none}#login .ms-footer a:hover{color:#0099ff;text-decoration:none}#login .ms-footer p{margin:0 0 18px 0;line-height:11px}#login .ms-footer p:last-child{margin:0}/*# sourceMappingURL=./login.css.map */

@ -1 +0,0 @@
.ms-content{margin:20px 0}.ms-content .ms-content-left{width:230px;float:left;margin-right:20px}.ms-content .ms-content-left .ms-content-left-title{font-weight:bold;background-color:#009aff;color:#fff;height:40px;line-height:40px;width:190px;padding:0 20px}.ms-content .ms-content-left .ms-content-left-ul{background-color:#fff;margin-top:1px;width:230px}.ms-content .ms-content-left .ms-content-left-ul a:hover{color:#fff}.ms-content .ms-content-left .ms-content-left-ul a:hover li{background-color:#54bcfe}.ms-content .ms-content-left .ms-content-left-ul a{color:#999999}.ms-content .ms-content-left .ms-content-left-ul li{height:40px;line-height:40px;font-size:14px;cursor:pointer;padding:0 20px}.ms-content .ms-content-left .ms-content-left-ul li .ms-content-left-li-more{float:right}.ms-content .ms-content-left .ms-content-left-ul .ms-content-left-li-first{color:#fff}.ms-content .ms-content-left .ms-content-left-ul .ms-content-left-li-first li{background-color:#54bcfe}.ms-content a:visited{color:#000000}.ms-content .ms-content-new-list{overflow:hidden;margin-top:20px}.ms-content .ms-content-right-position{font-size:14px;overflow:hidden;margin-bottom:20px}.ms-content .ms-content-right-position a:hover{color:#0099ff}.ms-content .ms-content-right-position span{padding:0 5px}.ms-content #ms-content-search{float:none;width:100%;margin-top:20px}.ms-content .ms-content-main-list{float:right;width:950px;min-height:400px}.ms-content .ms-content-main-list .ms-content-main-div{background-color:#fff;padding-bottom:30px}.ms-content .ms-content-main-list .ms-content-main-div .ms-content-main-ul{margin:0 20px}.ms-content .ms-content-main-list .ms-content-main-div .ms-content-main-ul a:link{color:#333;text-decoration:none}.ms-content .ms-content-main-list .ms-content-main-div .ms-content-main-ul a:visited{color:#333;text-decoration:none}.ms-content .ms-content-main-list .ms-content-main-div .ms-content-main-ul a:active{color:#333;text-decoration:none}.ms-content .ms-content-main-list .ms-content-main-div .ms-content-main-ul a:hover{color:#0099ff;text-decoration:none}.ms-content .ms-content-main-list .ms-content-main-div .ms-content-main-ul li{border-bottom:1px dotted #eee;padding:12px 0;overflow:hidden}.ms-content .ms-content-main-list .ms-content-main-div .ms-content-main-ul .ms-content-main-li-span{padding-right:10px;float:left}.ms-content .ms-content-main-list .ms-content-main-div .ms-content-main-ul .ms-content-main-li-title{float:left;color:#333;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;font-size:14px;width:500px}.ms-content .ms-content-main-list .ms-content-main-div .ms-content-main-ul .ms-content-main-li-time{float:right;color:#999999;font-size:14px}.ms-content .ms-content-main-page{text-align:center;margin-top:30px;margin-bottom:50px}.ms-content .ms-content-main-page a{color:#999;font-size:14px}.ms-content .ms-content-main-page a:hover{background-color:#eee}.ms-content .ms-content-main-page .ms-content-main-page-first,.ms-content .ms-content-main-page .ms-content-main-page-last{border:1px solid #ddd;padding:10px 15px;margin-right:-5px}.ms-content .ms-content-main-page .ms-content-main-page-upper,.ms-content .ms-content-main-page .ms-content-main-page-next{border-top:1px solid #ddd;border-bottom:1px solid #ddd;padding:10px 15px;margin-right:-5px}.ms-content .ms-content-main-page .ms-content-main-page-upper{border-right:1px solid #ddd}.ms-content .ms-content-main-page .ms-content-main-page-first{border-top-left-radius:4px;border-bottom-left-radius:4px}.ms-content .ms-content-main-page .ms-content-main-page-last{border-top-right-radius:4px;border-bottom-right-radius:4px}.ms-content .ms-content-main-div .ms-content-main-div-prompt{border-bottom:1px solid #d0cfcf99 99;padding-top:20px;padding-left:20px;padding-bottom:10px;font-size:14px;color:#999999}.ms-content .ms-content-main-div .ms-content-main-div-prompt span{color:#0198ff}.ms-content .ms-content-main-div .ms-content-main-ul li{height:22px;line-height:22px}.ms-content .ms-content-main-div .ms-content-main-ul a{font-size:14px}.ms-content .ms-content-main-div .ms-content-main-ul .ms-content-main-li-title:hover{color:#0099ff}.ms-content .ms-content-main-div .ms-content-main-ul .ms-content-main-ul-result{color:#0198ff}.ms-content .ms-content-main-div .ms-content-main-div-nothing{font-size:14px;color:#999999;padding-top:20px;padding-left:20px;text-align:center}/*# sourceMappingURL=./news-list.css.map */

File diff suppressed because one or more lines are too long

@ -1,39 +0,0 @@
<div class="ms-footer">
<div class="ms-footer-content">
<div class="ms-footer-left">
<div class="ms-footer-left-column">
<span class="ms-footer-left-column-about">
<a href='{ms:global.url/}/guanyuwomen53/index.html'>关于我们</a>
</span>|
<span class="ms-footer-left-column-course">
<a target="_blank" href='http://mingsoft.net/html/1//5527/index.html#faz'>发展历程</a>
</span>|
<span class="ms-footer-left-column-contact">
<a target="_blank" href='http://mingsoft.net/html/1//5527/index.html#lianx'>联系我们</a>
</span>
</div>
<span class="ms-footer-left-copyright">版权所有&copy;铭飞科技有限公司2012-2018保留一切权利</span>
</div>
<div class="ms-footer-right">
<img class='ms-footer-right-img-weixin' src="{ms:global.host/}/{ms:global.style/}/images/we-chat.png">
<a target="_blank" href='http://tieba.baidu.com/f?kw=%E9%93%AD%E9%A3%9E%E7%A7%91%E6%8A%80&fr=index&fp=0&ie=utf-8'><img class="ms-footer-right-baidu" src="{ms:global.host/}/{ms:global.style/}/images/baidu.png"></a>
<a target="_blank" href='http://weibo.com/killfen'><img src="{ms:global.host/}/{ms:global.style/}/images/micro-blog.png"></a>
<div class="ms-footer-right-weixin">
<p></p>
<img alt="" src="{ms:global.host/}/{ms:global.style/}/images/weixin.jpg">
</div>
</div>
</div>
</div>
<script>
/*导航下拉*/
$(function(){
$(".head-menu-list-li").hover(function(){
$(this).find(".head-menu-son-list").fadeToggle();
});
$('.ms-footer-right-img-weixin').hover(function(){
$('.ms-footer-right-weixin').toggle();
});
});
</script>

@ -1,36 +0,0 @@
<title>{ms:global.name/}</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="{ms:global.host/}/plugins/iconfont/1.0.0/iconfont.css" />
<link rel="stylesheet" type="text/css" href="{ms:global.host/}/{ms:global.style/}/css/base.css">
<link rel="stylesheet" type="text/css" href="{ms:global.host/}/{ms:global.style/}/css/index.css">
<link rel="stylesheet" type="text/css" href="{ms:global.host/}/{ms:global.style/}/css/advice.css">
<link rel="stylesheet" type="text/css" href="{ms:global.host/}/{ms:global.style/}/css/case-list.css">
<link rel="stylesheet" type="text/css" href="{ms:global.host/}/{ms:global.style/}/css/about.css">
<link rel="stylesheet" type="text/css" href="{ms:global.host/}/{ms:global.style/}/css/news-list.css">
<link rel="stylesheet" type="text/css" href="{ms:global.host/}/{ms:global.style/}/css/news-show.css">
<link rel="stylesheet" type="text/css" href="{ms:global.host/}/{ms:global.style/}/css/center.css">
<script src="{ms:global.host/}/plugins/jquery/1.9.1/jquery-1.9.1.js"></script>
<script src="{ms:global.host/}/{ms:global.style/}/js/slider.js"></script>
<script src="{ms:global.host/}/static/plugins/less/3.9.0/less.min.js"></script>
<!--vue-懒加载-表单验证-->
<script src="{ms:global.host/}/plugins/vue/2.6.9/vue.min.js"></script>
<script src="{ms:global.host/}/plugins/validator/10.8.0/validator.min.js"></script>
<!-- Element -->
<link rel="stylesheet" href="{ms:global.host/}/plugins/element-ui/2.8.2/index.css">
<script src="{ms:global.host/}/plugins/element-ui/2.8.2/index.js"></script>
<link rel="stylesheet" type="text/css" href="{ms:global.host/}/{ms:global.style/}/css/animate.css">
<script src="{ms:global.host/}/static/plugins/axios/0.18.0/axios.min.js"></script>
<script src="{ms:global.host/}/static/plugins/ms/1.0.0/ms.js"></script>
<script src="{ms:global.host/}/static/plugins/ms/1.0.0/ms.http.js"></script>
<script src="{ms:global.host/}/static/plugins/ms/1.0.0/ms.util.js"></script>
<script src="{ms:global.host/}/api/ms.people.min.js"></script>
<script src="{ms:global.host/}/static/plugins/plupload/plupload.full.min.js"></script>
<script src="{ms:global.host/}/static/plugins/qs/6.6.0/qs.min.js"></script>
<script src="{ms:global.host/}/static/plugins/ms/1.0.0/ms.upload.js"></script>
<script>
window.http = ms.http;
ms.base = "{ms:global.host/}";
ms.login = '{ms:global.host/}';
</script>

@ -1,146 +0,0 @@
<div class="ms-head">
<div class="head-menu">
<div class="head-men-left head-menu-flex-center">
<a href="{ms:global.host/}/html/1/index.html">
<img src="http://cdn.mingsoft.net/images/logo.png" />
</a>
<ul class="head-menu-list">
<li class="head-menu-list-li">走进铭飞
<ul class="head-menu-son-list">
<li>
<a target="_blank" href='{ms:global.url/}/guanyuwomen53/index.html'>关于我们</a>
</li>
<li>
<a target="_blank" href='{ms:global.url/}/xinwenzhongxin/index.html'>公司动态</a>
</li>
<li>
<a target="_blank" href='http://mingsoft.net/html/1//5527/index.html#faz'>发展历程</a>
</li>
<li>
<a target="_blank" href='http://mingsoft.net/html/1//5527/index.html#lianx'>加入我们</a>
</li>
<li>
<a target="_blank" href='{ms:global.url/}/lianxiwomen19/index.html'>联系我们</a>
</li>
</ul>
</li>
<li class="head-menu-list-li">
<a href='{ms:global.url/}/wangzhananli/index.html'>案例</a>
</li>
<li class="head-menu-list-li">
<a target="_blank" href='http://store.mingsoft.net/mstore/index.do'>插件&模板</a>
<!-- <ul class="head-menu-son-list">
<li><a href='http://mstore.mingsoft.net/mstoreShow.do'>模板</a></li>
<li><a href='http://mstore.mingsoft.net/mstoreShow.do'>插件</a></li>
</ul> -->
</li>
<li class="head-menu-list-li">
<a target="_blank" href='{ms:global.url/}/lianxiwomen19/zaixianliuyan/index.html'>在线留言</a>
</li>
<li class="head-menu-list-li">技术支持
<ul class="head-menu-son-list">
<li>
<a target="_blank" href='http://bbs.mingsoft.net/mbbs/main.do'>开源社区</a>
</li>
<li>
<a target="_blank" href='https://gitee.com/mingSoft/MCMS'>源码下载</a>
</li>
<li>
<a target="_blank" href='http://doc.ms.mingsoft.net/plugs-cms/'>使用手册</a>
</li>
</ul>
</li>
</ul>
</div>
<div class="head-men-right head-menu-flex-center">
<div class="head-menu-flex-center head-menu-right-search">
<form id="searchDataForm" action="{ms:global.host/}/mcms/search.do" method="post">
<input type="text" class='ms-search-input' name="content_title" placeholder="请输入关键字">
<!-- <i class="iconfont ms-search-click">&#xe85e;</i> -->
<input type="submit" value="" class="ms-search-click">
</form>
</div>
<div class="head-menu-right-content" id="ms-login-vue">
<span v-show="!isLogin" style="display: none;">
<span>
<a href='{ms:global.host/}/mdiyPage/login.do'>登录</a>
</span>|<span><a href='{ms:global.host/}/mdiyPage/register.do'>注册</a></span>
</span>
<div class="topbar-info J_userInfo loginSuccess hide-default" v-show="isLogin" style="display: none;">
<a class="user-name" href="{ms:global.host/}/people/center.do">
<img :src="'{ms:global.host/}/'+peopleInfo.puIcon" class="loginImg user_icon" onerror="this.src='http://cdn.mingsoft.net/global/images/msheader.png'">
<b class="userName ms-userName" v-text="peopleInfo.puNickname"></b>
</a>
<a href="javascript:;" class="quitLogin" @click="quitLogin">退出</a>
</div>
</div>
</div>
</div>
</div>
<script>
var headVue = new Vue({
el: "#ms-login-vue",
data: {
isLogin: "", //登录状态
peopleInfo: "", //个人信息
imgUrl:"",
},
mounted: function() {
//获取个人信息
var target = this;
$.ajax({
type: "POST",
url: "{ms:global.host/}/checkLoginStatus.do",
success: function(msg) {
target.isLogin = msg.result; //判断用户是否登录,如登录,则target.isLogin===true
if(msg.result) {
$.ajax({
type: "GET",
url: "{ms:global.host/}/people/user/info.do",
success: function(msg) {
target.peopleInfo = msg; //target.peopleInfo为当前登录用户的基本信息
}
})
}
}
})
},
methods: {
//退出登录
quitLogin: function() {
var target = this;
$.ajax({
type: "GET",
url: "{ms:global.host/}/people/quit.do",
success: function(msg) {
if(msg.result) {
$("body").append("<form id='msHeadForm' action=''></form>");
$("#msHeadForm").attr("action", "{ms:global.host/}").submit();
}
}
})
},
},
})
/* $(function(){
var r=location.href;
if(r.match("53")){
$(".head-menu-list-li").removeClass("head-active");
$(".head-menu-list-li").eq(0).addClass("head-active");
}else if(r.match("141")){
$(".head-menu-list-li").removeClass("head-active");
$(".head-menu-list-li").eq(0).addClass("head-active");
}else if(r.match("59")){
$(".head-menu-list-li").removeClass("head-active");
$(".head-menu-list-li").eq(0).addClass("head-active");
}else if(r.match("155")){
$(".head-menu-list-li").removeClass("head-active");
$(".head-menu-list-li").eq(1).addClass("head-active");
}else if(r.match("142")){
$(".head-menu-list-li").removeClass("head-active");
$(".head-menu-list-li").eq(3).addClass("head-active");
}
}) */
</script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 520 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 498 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save