chao 4 vuotta sitten
vanhempi
commit
0746274af9
34 muutettua tiedostoa jossa 473 lisäystä ja 150 poistoa
  1. 7 1
      src/main/java/com/caimei/www/controller/BaseController.java
  2. 2 3
      src/main/java/com/caimei/www/controller/InstrumentController.java
  3. 44 3
      src/main/java/com/caimei/www/controller/SinglePageController.java
  4. 2 6
      src/main/java/com/caimei/www/mapper/InstrumentDao.java
  5. 46 0
      src/main/java/com/caimei/www/mapper/SinglePageDao.java
  6. 4 8
      src/main/java/com/caimei/www/pojo/content/PageContent.java
  7. 1 0
      src/main/java/com/caimei/www/pojo/content/PageFloor.java
  8. 2 2
      src/main/java/com/caimei/www/service/InstrumentService.java
  9. 23 0
      src/main/java/com/caimei/www/service/SinglePageService.java
  10. 0 1
      src/main/java/com/caimei/www/service/impl/HomeServiceImpl.java
  11. 9 7
      src/main/java/com/caimei/www/service/impl/InstrumentServiceImpl.java
  12. 72 0
      src/main/java/com/caimei/www/service/impl/SinglePageServiceImpl.java
  13. 2 25
      src/main/resources/mapper/InstrumentMapper.xml
  14. 37 0
      src/main/resources/mapper/SinglePageMapper.xml
  15. 1 1
      src/main/resources/static/css/base/base.h5.css
  16. 32 18
      src/main/resources/static/css/instrument/detail.css
  17. 0 54
      src/main/resources/static/css/instrument/detail.h5.css
  18. 1 1
      src/main/resources/static/css/product/detail.h5.css
  19. 32 0
      src/main/resources/static/css/single-page/page.css
  20. 61 0
      src/main/resources/static/css/single-page/topic.css
  21. 1 1
      src/main/resources/static/js/instrument/detail.js
  22. 1 1
      src/main/resources/static/js/instrument/search.js
  23. 1 1
      src/main/resources/static/js/product/detail.js
  24. 1 1
      src/main/resources/static/js/product/list.js
  25. 30 0
      src/main/resources/static/js/single-page/topic.js
  26. 1 1
      src/main/resources/static/js/supplier/search.js
  27. 13 0
      src/main/resources/templates/error/404.html
  28. 5 5
      src/main/resources/templates/instrument/detail.html
  29. 1 1
      src/main/resources/templates/instrument/search.html
  30. 1 1
      src/main/resources/templates/product/detail.html
  31. 1 1
      src/main/resources/templates/product/list.html
  32. 7 2
      src/main/resources/templates/single-page/page.html
  33. 31 4
      src/main/resources/templates/single-page/topic.html
  34. 1 1
      src/main/resources/templates/supplier/search.html

+ 7 - 1
src/main/java/com/caimei/www/controller/BaseController.java

@@ -21,11 +21,13 @@ import java.util.List;
  */
 @Controller
 public class BaseController {
-    @Value("${caimei.spiServer}")
+	@Value("${caimei.spiServer}")
     private String spiServer;
     /** 打包时间 */
     @Value("${spring.application.build-time}")
     private String buildTime;
+    /** 错误页面 */
+	private static final String ERROR_PATH = "error/404";
 
     private BaseService baseService;
     @Autowired
@@ -64,4 +66,8 @@ public class BaseController {
 
 		return model;
 	}
+
+	String getErrorPath(){
+		return ERROR_PATH;
+	}
 }

+ 2 - 3
src/main/java/com/caimei/www/controller/InstrumentController.java

@@ -1,9 +1,8 @@
 package com.caimei.www.controller;
 
 import com.caimei.www.pojo.JsonModel;
-import com.caimei.www.pojo.content.InstrumentDetail;
+import com.caimei.www.pojo.content.PageContent;
 import com.caimei.www.pojo.content.PageFloor;
-import com.caimei.www.pojo.content.Parameter;
 import com.caimei.www.service.InstrumentService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -47,7 +46,7 @@ public class InstrumentController extends BaseController {
      */
     @GetMapping("/instrument/detail.html")
     public String home(final Model model, @RequestParam("id") Integer instrumentId) {
-        InstrumentDetail detail = instrumentService.getInstrumentById(instrumentId);
+        PageContent detail = instrumentService.getInstrumentById(instrumentId);
         model.addAttribute("instrument", detail);
         return INSTRUMENT_DETAIL_PATH;
     }

+ 44 - 3
src/main/java/com/caimei/www/controller/SinglePageController.java

@@ -1,9 +1,18 @@
 package com.caimei.www.controller;
 
+import com.caimei.www.pojo.JsonModel;
+import com.caimei.www.pojo.content.PageContent;
+import com.caimei.www.pojo.content.PageFloor;
+import com.caimei.www.service.SinglePageService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.util.List;
+import java.util.Map;
 
 /**
  * 二级页面
@@ -12,7 +21,7 @@ import org.springframework.web.bind.annotation.RequestParam;
  * @date : 2020/7/20
  */
 @Controller
-public class SinglePageController {
+public class SinglePageController extends BaseController {
     /** 找产品/找仪器/找项目 */
 	private static final String TOPIC_PATH = "single-page/topic";
 	/** 专题活动列表页 */
@@ -24,14 +33,41 @@ public class SinglePageController {
 	/** 维修保养页 */
 	private static final String MAINTENANCE_PATH = "single-page/maintenance";
 
+    private SinglePageService singlePageService;
+    @Autowired
+    public void setSinglePageService(SinglePageService singlePageService) {
+        this.singlePageService = singlePageService;
+    }
+
     /**
-     * 二级页面(找产品/找仪器/找项目)
+     * 二级页面(找产品/找仪器/找项目/正品联盟
      */
     @GetMapping("/topic.html")
-    public String topic(final Model model, Integer id) {
+    public String topic(final Model model, @RequestParam("type") Integer id) {
+        PageContent topicPage = singlePageService.getTopicPageById(id);
+        if (topicPage == null){
+            return super.getErrorPath();
+        }
+        model.addAttribute("pageData", topicPage);
         return TOPIC_PATH;
     }
 
+    /**
+     * 二级专题数据
+     * @return
+     */
+    @GetMapping("/page/topic")
+    @ResponseBody
+    public JsonModel<List<PageFloor>> getTopicDataById(@RequestParam("type") Integer id) {
+        return singlePageService.getTopicDataById(id);
+    }
+
+
+
+
+
+
+
     /**
      * 专题活动列表页
      */
@@ -45,6 +81,11 @@ public class SinglePageController {
      */
     @GetMapping("/page.html")
     public String freePage(final Model model, Integer id) {
+        PageContent freePage = singlePageService.getFreePageById(id);
+        if (freePage == null){
+            return super.getErrorPath();
+        }
+        model.addAttribute("pageData", freePage);
         return FREE_PAGE_PATH;
     }
 

+ 2 - 6
src/main/java/com/caimei/www/mapper/InstrumentDao.java

@@ -1,7 +1,7 @@
 package com.caimei.www.mapper;
 
 import com.caimei.www.pojo.content.ImageLink;
-import com.caimei.www.pojo.content.InstrumentDetail;
+import com.caimei.www.pojo.content.PageContent;
 import com.caimei.www.pojo.content.PageFloor;
 import com.caimei.www.pojo.content.Parameter;
 import org.apache.ibatis.annotations.Mapper;
@@ -17,12 +17,8 @@ import java.util.List;
 @Mapper
 public interface InstrumentDao {
     /** 项目仪器详情 */
-    InstrumentDetail getInstrumentById(Integer instrumentId);
+    PageContent getInstrumentById(Integer instrumentId);
     /** 项目仪器参数 */
     List<Parameter> getParametersByInstrumentId(Integer instrumentId);
-    /** 获取项目仪器详情页中层信息 */
-    List<PageFloor> getInstrumentRecommendById(Integer instrumentId);
-    /** 中层信息详细数据 */
-    List<ImageLink> getFloorDataById(Integer id);
 }
 

+ 46 - 0
src/main/java/com/caimei/www/mapper/SinglePageDao.java

@@ -0,0 +1,46 @@
+package com.caimei.www.mapper;
+
+import com.caimei.www.pojo.content.ImageLink;
+import com.caimei.www.pojo.content.PageContent;
+import com.caimei.www.pojo.content.PageFloor;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2020/7/20
+ */
+@Mapper
+public interface SinglePageDao {
+
+    /**
+     * 自由页面
+     * @param id
+     * @return
+     */
+    PageContent getFreePageById(Integer id);
+
+    /**
+     * 二级页面
+     * @param id
+     * @return
+     */
+    PageContent getTopicPageById(Integer id);
+
+    /**
+     * 二级专题楼层
+     * @param id
+     * @return
+     */
+    List<PageFloor> getFloorByPageId(Integer id);
+
+    /**
+     * 二级专题楼层下的数据
+     * @param floorId
+     * @return
+     */
+    List<ImageLink> getDataByFloorId(Integer floorId);
+}

+ 4 - 8
src/main/java/com/caimei/www/pojo/content/InstrumentDetail.java → src/main/java/com/caimei/www/pojo/content/PageContent.java

@@ -12,7 +12,7 @@ import java.util.List;
  * @date : 2020/7/16
  */
 @Data
-public class InstrumentDetail implements Serializable {
+public class PageContent implements Serializable {
     private Integer id;
     /** 类型:1二级列表 2项目详情 3讲师列表 4自由页面 */
     private Integer type;
@@ -23,13 +23,9 @@ public class InstrumentDetail implements Serializable {
     /** seo描述 */
     private String description;
     /** 主图 */
-    private String headImage;
-    /** 底部文字 */
-    private String bottomText;
-    /** 底部图片 */
-    private String bottomImage;
-    /** 移动端底部图片 */
-    private String crmBottomImage;
+    private String image;
+    /** 内容 */
+    private String content;
     /** 项目详情页名称和内容 */
     private List<Parameter> pageContents;
 

+ 1 - 0
src/main/java/com/caimei/www/pojo/content/PageFloor.java

@@ -16,6 +16,7 @@ public class PageFloor {
 	private Integer type;
 	private String title;
 	private String detail;
+	private String link;
 	private List<PageFloor> subFloors;
 	private List<ImageLink> floorData;
 }

+ 2 - 2
src/main/java/com/caimei/www/service/InstrumentService.java

@@ -1,7 +1,7 @@
 package com.caimei.www.service;
 
 import com.caimei.www.pojo.JsonModel;
-import com.caimei.www.pojo.content.InstrumentDetail;
+import com.caimei.www.pojo.content.PageContent;
 import com.caimei.www.pojo.content.PageFloor;
 
 import java.util.List;
@@ -19,7 +19,7 @@ public interface InstrumentService {
      * @param instrumentId
      * @return
      */
-    InstrumentDetail getInstrumentById(Integer instrumentId);
+    PageContent getInstrumentById(Integer instrumentId);
 
     /**
      * 获取项目仪器详情页中层信息(搭配推荐,相似商品)

+ 23 - 0
src/main/java/com/caimei/www/service/SinglePageService.java

@@ -0,0 +1,23 @@
+package com.caimei.www.service;
+
+import com.caimei.www.pojo.JsonModel;
+import com.caimei.www.pojo.content.PageContent;
+import com.caimei.www.pojo.content.PageFloor;
+
+import java.util.List;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2020/7/20
+ */
+public interface SinglePageService {
+
+    /** 自由页面 */
+    PageContent getFreePageById(Integer id);
+    /** 二级页面 */
+    PageContent getTopicPageById(Integer id);
+    /** 二级专题数据 */
+    JsonModel<List<PageFloor>> getTopicDataById(Integer id);
+}

+ 0 - 1
src/main/java/com/caimei/www/service/impl/HomeServiceImpl.java

@@ -72,7 +72,6 @@ public class HomeServiceImpl implements HomeService {
                  product.setPricegrade(PriceUtil.getPriceGrade(product.getPrice()));
                  product.setPrice(0d);
                  product.setImage(ImageUtil.getImageURL("product", product.getImage(), 0, domain));
-
             });
         }
         return JsonModel.success(list);

+ 9 - 7
src/main/java/com/caimei/www/service/impl/InstrumentServiceImpl.java

@@ -1,15 +1,14 @@
 package com.caimei.www.service.impl;
 
 import com.caimei.www.mapper.InstrumentDao;
-import com.caimei.www.mapper.ProductDao;
+import com.caimei.www.mapper.SinglePageDao;
 import com.caimei.www.pojo.JsonModel;
 import com.caimei.www.pojo.content.ImageLink;
-import com.caimei.www.pojo.content.InstrumentDetail;
+import com.caimei.www.pojo.content.PageContent;
 import com.caimei.www.pojo.content.PageFloor;
 import com.caimei.www.pojo.content.Parameter;
 import com.caimei.www.service.InstrumentService;
 import com.caimei.www.utils.ImageUtil;
-import com.caimei.www.utils.PriceUtil;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
@@ -27,6 +26,9 @@ import java.util.List;
 public class InstrumentServiceImpl implements InstrumentService {
     @Resource
     private InstrumentDao instrumentDao;
+    @Resource
+    SinglePageDao singlePageDao;
+
     @Value("${caimei.wwwDomain}")
     private String domain;
 
@@ -37,8 +39,8 @@ public class InstrumentServiceImpl implements InstrumentService {
      * @return
      */
     @Override
-    public InstrumentDetail getInstrumentById(Integer instrumentId) {
-        InstrumentDetail instrument = instrumentDao.getInstrumentById(instrumentId);
+    public PageContent getInstrumentById(Integer instrumentId) {
+        PageContent instrument = instrumentDao.getInstrumentById(instrumentId);
         List<Parameter> contents = instrumentDao.getParametersByInstrumentId(instrumentId);
         instrument.setPageContents(contents);
         return instrument;
@@ -52,11 +54,11 @@ public class InstrumentServiceImpl implements InstrumentService {
      */
     @Override
     public JsonModel<List<PageFloor>> getInstrumentRecommendById(Integer instrumentId) {
-        List<PageFloor> floorList = instrumentDao.getInstrumentRecommendById(instrumentId);
+        List<PageFloor> floorList = singlePageDao.getFloorByPageId(instrumentId);
         if (floorList.size() > 0) {
             List<PageFloor> tempList = new ArrayList<>();
             floorList.forEach(floor -> {
-                List<ImageLink> imageLinks = instrumentDao.getFloorDataById(floor.getId());
+                List<ImageLink> imageLinks = singlePageDao.getDataByFloorId(floor.getId());
                 if (imageLinks.size() > 0) {
                     imageLinks.forEach(img -> {
                         img.setImage(ImageUtil.getImageURL("actType", img.getImage(), 0, domain));

+ 72 - 0
src/main/java/com/caimei/www/service/impl/SinglePageServiceImpl.java

@@ -0,0 +1,72 @@
+package com.caimei.www.service.impl;
+
+import com.caimei.www.mapper.SinglePageDao;
+import com.caimei.www.pojo.JsonModel;
+import com.caimei.www.pojo.content.ImageLink;
+import com.caimei.www.pojo.content.PageContent;
+import com.caimei.www.pojo.content.PageFloor;
+import com.caimei.www.service.SinglePageService;
+import com.caimei.www.utils.ImageUtil;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2020/7/20
+ */
+@Service
+public class SinglePageServiceImpl implements SinglePageService {
+
+    @Resource
+    private SinglePageDao singlePageDao;
+    @Value("${caimei.wwwDomain}")
+    private String domain;
+
+    /**
+     * 自由页面
+     *
+     * @param id
+     */
+    @Override
+    public PageContent getFreePageById(Integer id) {
+        return singlePageDao.getFreePageById(id);
+    }
+
+    /**
+     * 二级页面
+     *
+     * @param id
+     */
+    @Override
+    public PageContent getTopicPageById(Integer id) {
+        return singlePageDao.getTopicPageById(id);
+    }
+
+    /**
+     * 二级专题数据
+     *
+     * @param id
+     */
+    @Override
+    public JsonModel<List<PageFloor>> getTopicDataById(Integer id) {
+        List<PageFloor> pageFloors = singlePageDao.getFloorByPageId(id);
+        if (!CollectionUtils.isEmpty(pageFloors)) {
+            pageFloors.forEach(floor -> {
+                List<ImageLink> floorData = singlePageDao.getDataByFloorId(floor.getId());
+                if (!CollectionUtils.isEmpty(floorData)) {
+                    floorData.forEach(data -> {
+                        data.setImage(ImageUtil.getImageURL("actType", data.getImage(), 0, domain));
+                    });
+                }
+                floor.setFloorData(floorData);
+            });
+        }
+        return JsonModel.success(pageFloors);
+    }
+}

+ 2 - 25
src/main/resources/mapper/InstrumentMapper.xml

@@ -1,9 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.caimei.www.mapper.InstrumentDao">
-    <select id="getInstrumentById" resultType="com.caimei.www.pojo.content.InstrumentDetail">
-        select id, type, title, keywords, description,
-               headImage, bottomText, bottomImage, crmBottomImage1 as crmBottomImage
+    <select id="getInstrumentById" resultType="com.caimei.www.pojo.content.PageContent">
+        select id, type, title, keywords, description, headImage as image
 		from cm_page
 		where id = #{instrumentId} and type='2' and enabledStatus=1
     </select>
@@ -16,26 +15,4 @@
         from cm_page_name_content
         where pageId=#{instrumentId}
     </select>
-    <select id="getInstrumentRecommendById" resultType="com.caimei.www.pojo.content.PageFloor">
-        select id,
-               pageId as type,
-               title,
-               link as detail
-        from cm_page_centre
-        where pageId=#{instrumentId}
-        and enabledStatus=1
-        order by sort desc,createDate desc
-    </select>
-    <select id="getFloorDataById" resultType="com.caimei.www.pojo.content.ImageLink">
-        select  a.id as id,
-                a.title as title,
-                a.link as link,
-                d.image as image
-        from cm_page_image a
-        right join cm_page_centre_image b on b.imageId=a.id
-        left join cm_page_image_activity c on c.imageId=a.id
-        left join acttype d on d.acttypeId=c.acttypeId
-        where b.centreId=#{id} and  a.enabledStatus=1
-        order  by a.sort desc,a.createDate desc
-    </select>
 </mapper>

+ 37 - 0
src/main/resources/mapper/SinglePageMapper.xml

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.caimei.www.mapper.SinglePageDao">
+    <select id="getFreePageById" resultType="com.caimei.www.pojo.content.PageContent">
+        select  a.id, a.type, a.title, a.keywords, a.description, f.content
+        from cm_page a
+        left join cm_page_freedom f on a.id=f.pageId
+        where a.type='4' and a.enabledStatus='1' and f.type='1'
+        and a.id=#{id}
+    </select>
+    <select id="getTopicPageById" resultType="com.caimei.www.pojo.content.PageContent">
+        select  a.id, a.type, a.title, a.keywords, a.description, a.headImage as image, a.headText as content
+        from cm_page a
+        where a.type='1' and a.enabledStatus='1'
+        and a.id=#{id}
+    </select>
+
+    <select id="getFloorByPageId" resultType="com.caimei.www.pojo.content.PageFloor">
+        select id, pageId as type, title, link
+        from cm_page_centre
+        where pageId=#{id}
+        and enabledStatus=1
+        order by sort desc,createDate desc
+    </select>
+    <select id="getDataByFloorId" resultType="com.caimei.www.pojo.content.ImageLink">
+        select  a.id as id,
+                a.title as title,
+                a.link as link,
+                d.image as image
+        from cm_page_image a
+        right join cm_page_centre_image b on b.imageId=a.id
+        left join cm_page_image_activity c on c.imageId=a.id
+        left join acttype d on d.acttypeId=c.acttypeId
+        where b.centreId=#{floorId} and  a.enabledStatus=1
+        order  by a.sort desc,a.createDate desc
+    </select>
+</mapper>

+ 1 - 1
src/main/resources/static/css/base/base.h5.css

@@ -94,7 +94,7 @@
 .productItem .item .image .icon.hot:before,.productItem .item .image .icon.new:before{display:block;width:7.6vw;height:9vw}
 .productItem .item .image .icon.hot:before{background-position:10% 26%}
 .productItem .item .image .icon.new:before{background-position:-1% 26%}
-.productItem .item .name{display:block;padding:2.6vw 3.5vw .4vw;height:10vw;line-height:5vw;text-align: left;}
+.productItem .item .name{display:block;box-sizing:border-box;padding:2.6vw 3.5vw .4vw;height:10vw;line-height:5vw;text-align: left;}
 .productItem .item .name span{color:#93979F;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
 .productItem .item .name em{font-style: normal;color: #e15616;}
 .productItem .item .price{height:21vw;text-align:center}

+ 32 - 18
src/main/resources/static/css/instrument/detail.pc.css → src/main/resources/static/css/instrument/detail.css

@@ -1,8 +1,9 @@
 @charset "utf-8";
+li{list-style:none}
 /**
  * PC端
  */
-li{list-style:none;}
+@media screen and (min-width:768px){
 .instrumentBox{width:100%;margin:16px 0;background:#FFF;box-sizing:border-box;padding:15px}
 .instrumentBox .imageBox{float:left;width:452px;height:300px;background:#F3F7FE;}
 .instrumentBox img{width:100%;height:100%;display:block}
@@ -29,21 +30,34 @@ li{list-style:none;}
 .detailInfo .tabCon img{max-width:100%;}
 .detailInfo .tabCon table{width:100%;text-align:left}
 
-.pageFloor .title{height:24px;line-height:24px;padding-left:10px;border-left:4px solid #E15616;margin:32px 0 16px 0;font-size:24px;color:#4A4F58;font-weight:bolder}
-.pageFloor .content{width:1202px}
-.pageFloor .content li{float:left;width:284px;height:334px;margin:0 16px 16px 0;background:#FFF}
-.pageFloor .content li img{display:block;width:284px;height:284px}
-.pageFloor .content li span{display:block;height:50px;line-height:50px;padding:0 10px;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#93979F;font-size:16px}
-.pageFloor .content li:hover{box-shadow:0 2px 6px #dedede;transition:all 0.5s;-webkit-transition:all 0.5s}
-.pageFloor .content li:hover span{color:#E15616}
 
-.contactBox{width:100%;background:#FFF;margin-bottom:-29px;padding-bottom:15px}
-.contactBox .tit{position:relative;width:1184px;margin:0 auto;height:80px}
-.contactBox .tit:before{content:'';position:absolute;left:0;top:39px;width:100%;border-top:1px solid #FFE6DC}
-.contactBox .tit span{width:188px;height:80px;line-height:80px;background:#FFF;position:absolute;top:0;left:50%;margin-left:-94px;font-weight:bold;font-size:28px;color:#2D3036;text-align:center}
-.contactBox .cont{width:1184px;margin:0 auto;text-align:center;line-height:48px}
-.contactBox .cont span{display:inline-block;padding-left:84px;height:96px;text-align:left;font-size:24px;color:#2D3036;position:relative}
-.contactBox .cont .call{margin-right:160px}
-.contactBox .cont span:before{width:70px;height:70px;position:absolute;left:0;top:10px}
-.contactBox .cont .call:before{background-position:-82px -370px}
-.contactBox .cont .phone:before{background-position:0 -370px}
+}
+
+/**
+* 移动端
+*/
+@media screen and (max-width:768px){
+.instrumentBox{width:100%;background:#FFF;padding-bottom:2.7vw;margin-bottom: 2.7vw;}
+.instrumentBox .imageBox{width:100%;height:66.6vw;}
+.instrumentBox img{width:100%;height:100%;display:block}
+.instrumentBox .infoBox{width:93.4vw;margin:2.7vw auto 0;color:#93979F;background:#F3F7FE;box-sizing:border-box;padding:2.7vw;font-size:3.4vw;border-radius:2px;position:relative;}
+.instrumentBox .infoBox hr{border:none;border-top:1px dashed #BEC2C9;margin:1vw 0}
+.instrumentBox .infoBox .row{position:relative;padding:1.3vw 0 1.3vw 16vw;line-height:4.7vw}
+.instrumentBox .infoBox .row .l{display:inline-block;min-width:14.2vw;height:7.4vw;text-align:justify;vertical-align:top;margin-left:-16vw;}
+.instrumentBox .infoBox .row .l:after{content:'';display:inline-block;width:100%}
+.instrumentBox .infoBox .row>i{font-style:normal;}
+.instrumentBox .infoBox .row em{font-style:normal;color:#4A4F58}
+.instrumentBox .infoBox .tit{color:#E15616;padding:1.3vw 0;line-height:4.7vw;}
+.instrumentBox .infoBox .share,.instrumentBox .infoBox .buy{display:none;}
+
+.detailInfo{background:#FFF;margin-bottom:2.6vw;}
+.detailInfo .tabTit{padding:1.5vw 3.3vw;}
+.detailInfo .tabTit span{display:inline-block;height:7.5vw;line-height:7.5vw;border-bottom:2px solid transparent;color:#93979F;font-size:3.4vw;margin-left:8vw;}
+.detailInfo .tabTit span.on{color:#E15621;border-color:#E15621}
+.detailInfo .tabTit span:first-child{margin-left:0;}
+.detailInfo .tabCon{padding:1.2vw 3.3vw 3.3vw;text-align:center;font-size:3.4vw;}
+.detailInfo .tabCon img{max-width:100%;height:auto!important;}
+.detailInfo .tabCon table{width:100%;text-align:left}
+
+}
+

+ 0 - 54
src/main/resources/static/css/instrument/detail.h5.css

@@ -1,54 +0,0 @@
-@charset "utf-8";
-/**
-* 移动端
-*/
-li{list-style:none}
-.instrumentBox{width:100%;background:#FFF;padding-bottom:2.7vw;margin-bottom: 2.7vw;}
-.instrumentBox .imageBox{width:100%;height:66.6vw;}
-.instrumentBox img{width:100%;height:100%;display:block}
-.instrumentBox .infoBox{width:93.4vw;margin:2.7vw auto 0;color:#93979F;background:#F3F7FE;box-sizing:border-box;padding:2.7vw;font-size:3.4vw;border-radius:2px;position:relative;}
-.instrumentBox .infoBox hr{border:none;border-top:1px dashed #BEC2C9;margin:1vw 0}
-.instrumentBox .infoBox .row{position:relative;padding:1.3vw 0 1.3vw 16vw;line-height:4.7vw}
-.instrumentBox .infoBox .row .l{display:inline-block;min-width:14.2vw;height:7.4vw;text-align:justify;vertical-align:top;margin-left:-16vw;}
-.instrumentBox .infoBox .row .l:after{content:'';display:inline-block;width:100%}
-.instrumentBox .infoBox .row>i{font-style:normal;}
-.instrumentBox .infoBox .row em{font-style:normal;color:#4A4F58}
-.instrumentBox .infoBox .tit{color:#E15616;padding:1.3vw 0;line-height:4.7vw;}
-.instrumentBox .infoBox .share,.instrumentBox .infoBox .buy{display:none;}
-
-.detailInfo{background:#FFF;margin-bottom:2.6vw;}
-.detailInfo .tabTit{padding:1.5vw 3.3vw;}
-.detailInfo .tabTit span{display:inline-block;height:7.5vw;line-height:7.5vw;border-bottom:2px solid transparent;color:#93979F;font-size:3.4vw;margin-left:8vw;}
-.detailInfo .tabTit span.on{color:#E15621;border-color:#E15621}
-.detailInfo .tabTit span:first-child{margin-left:0;}
-.detailInfo .tabCon{padding:1.2vw 3.3vw 3.3vw;text-align:center;font-size:3.4vw;}
-.detailInfo .tabCon img{max-width:100%}
-.detailInfo .tabCon table{width:100%;text-align:left}
-
-.pageFloor{width:93.4vw;overflow:hidden;margin:0 auto;}
-.pageFloor .title{height:10vw;line-height:10vw;padding-left:10px;font-size:3.7vw;color:#4A4F58;font-weight:bold;text-align:center;}
-.pageFloor .content{width:100vw;}
-.pageFloor .content li{float:left;width:45.4vw;height:55.2vw;margin:0 2.6vw 2.6vw 0;background:#FFF}
-.pageFloor .content li img{display:block;width:45.4vw;height:45.4vw}
-.pageFloor .content li span{display:block;height:9.8vw;line-height:9.8vw;padding:0 1vw;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#93979F;font-size:3.1vw}
-
-.contactBox{width:100%;background:#FFF;margin: 0 auto 2.6vw;}
-.contactBox .tit{position:relative;width:100%;margin:0 auto;height:11.8vw}
-.contactBox .tit:before{content:'';position:absolute;left:0;top:5.9vw;width:100%;border-top:1px solid #FFE6DC}
-.contactBox .tit span{width:27.6vw;height:11.8vw;line-height:11.8vw;background:#FFF;position:absolute;top:0;left:50%;margin-left:-13.8vw;font-weight:bold;font-size:3.7vw;color:#2D3036;text-align:center}
-.contactBox .cont{width:100%;margin:0 auto;text-align:center}
-.contactBox .cont span{display:inline-block;width:100%;height:14vw;line-height:7vw;font-size:3.1vw;color:#2D3036;position:relative;text-align:left;padding-left:40vw;box-sizing:border-box;margin-bottom:2.6vw}
-.contactBox .cont span:before{width:9.4vw;height:9.4vw;position:absolute;left:28vw;top:2vw}
-.contactBox .cont .call:before{background-position:0% 41.5%}
-.contactBox .cont .phone:before{background-position:16% 41.5%}
-
-
-
-
-
-
-
-
-
-
-

+ 1 - 1
src/main/resources/static/css/product/detail.h5.css

@@ -58,7 +58,7 @@ li{list-style:none}
 .productInfo .tabTit span.on{color:#E15621;border-color:#E15621}
 .productInfo .tabTit span:first-child{margin-left:0;}
 .productInfo .tabCon{padding:1.2vw 3.3vw 3.3vw;text-align:center;font-size:3.4vw;}
-.productInfo .tabCon img{max-width:100%}
+.productInfo .tabCon img{max-width:100%;height:auto!important;}
 .productInfo .tabCon table{width:100%;text-align:left}
 .productInfo .tabCon td{padding:1.5vw;line-height:5vw}
 .productInfo .tabCon td:nth-of-type(1){width:20%;color:#93979F}

+ 32 - 0
src/main/resources/static/css/single-page/page.css

@@ -0,0 +1,32 @@
+@charset "utf-8";
+li{list-style:none}
+/**
+ * PC端
+ */
+@media screen and (min-width:768px){
+    .freePage {
+        width: 1184px;
+        margin: 0 auto;
+        padding:16px 0;
+        text-align:center;
+    }
+    .freePage img{max-width:100%;}
+    .freePage table{width:100%;text-align:left}
+}
+
+/**
+* 移动端
+*/
+@media screen and (max-width:768px){
+    .freePage {
+        width: 100vw;
+        margin: 0 auto;
+        text-align:center;
+    }
+   .freePage img {
+        max-width: 100%;
+        height: auto !important;
+    }
+    .freePage table{width:100%;text-align:left}
+}
+

+ 61 - 0
src/main/resources/static/css/single-page/topic.css

@@ -0,0 +1,61 @@
+@charset "utf-8";
+li{list-style:none}
+/**
+ * PC端
+ */
+@media screen and (min-width:768px){
+.pageTop{width:1184px;margin:0 auto;background:#FFF}
+.pageTop img{width:100%;height:auto}
+.pageTop p{padding:16px;color:#93979F;font-size:16px;line-height:26px}
+
+.pageFloor .title{height:24px;line-height:24px;padding-left:10px;border-left:4px solid #E15616;margin:32px 0 16px 0;font-size:24px;color:#4A4F58;font-weight:bold;text-align:left;}
+.pageFloor .content{width:1202px}
+.pageFloor .content li{float:left;width:284px;height:334px;margin:0 16px 16px 0;background:#FFF}
+.pageFloor .content li img{display:block;width:284px;height:284px}
+.pageFloor .content li span{display:block;height:50px;line-height:50px;padding:0 10px;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#93979F;font-size:16px}
+.pageFloor .content li:hover{box-shadow:0 2px 6px #dedede;transition:all 0.5s;-webkit-transition:all 0.5s}
+.pageFloor .content li:hover span{color:#E15616}
+
+.contactBox{width:100%;background:#FFF;margin-bottom:-29px;padding-bottom:15px}
+.contactBox .tit{position:relative;width:1184px;margin:0 auto;height:80px}
+.contactBox .tit:before{content:'';position:absolute;left:0;top:39px;width:100%;border-top:1px solid #FFE6DC}
+.contactBox .tit span{width:188px;height:80px;line-height:80px;background:#FFF;position:absolute;top:0;left:50%;margin-left:-94px;font-weight:bold;font-size:28px;color:#2D3036;text-align:center}
+.contactBox .cont{width:1184px;margin:0 auto;text-align:center;line-height:48px}
+.contactBox .cont span{display:inline-block;padding-left:84px;height:96px;text-align:left;font-size:24px;color:#2D3036;position:relative}
+.contactBox .cont .call{margin-right:160px}
+.contactBox .cont span:before{width:70px;height:70px;position:absolute;left:0;top:10px}
+.contactBox .cont .call:before{background-position:-82px -370px}
+.contactBox .cont .phone:before{background-position:0 -370px}
+
+
+}
+
+/**
+* 移动端
+*/
+@media screen and (max-width:768px){
+.pageTop{width:100%;background:#FFF}
+.pageTop img{display:block;width:93.4vw;height:auto;margin:0 auto;}
+.pageTop p{width:93.4vw;margin:0 auto;padding:4vw 0 1vw 0;color:#93979F;font-size:3.4vw;line-height:5.8vw;text-align:justify;}
+
+.pageFloor{width:93.4vw;overflow:hidden;margin:0 auto;}
+.pageFloor .title{height:10vw;line-height:10vw;padding-left:10px;font-size:3.7vw;color:#4A4F58;font-weight:bold;text-align:center;}
+.pageFloor .content{width:100vw;}
+.pageFloor .content li{float:left;width:45.4vw;height:55.2vw;margin:0 2.6vw 2.6vw 0;background:#FFF}
+.pageFloor .content li img{display:block;width:45.4vw;height:45.4vw}
+.pageFloor .content li span{display:block;height:9.8vw;line-height:9.8vw;padding:0 1vw;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#93979F;font-size:3.1vw}
+
+.contactBox{width:100%;background:#FFF;margin: 0 auto 2.6vw;}
+.contactBox .tit{position:relative;width:100%;margin:0 auto;height:11.8vw}
+.contactBox .tit:before{content:'';position:absolute;left:0;top:5.9vw;width:100%;border-top:1px solid #FFE6DC}
+.contactBox .tit span{width:27.6vw;height:11.8vw;line-height:11.8vw;background:#FFF;position:absolute;top:0;left:50%;margin-left:-13.8vw;font-weight:bold;font-size:3.7vw;color:#2D3036;text-align:center}
+.contactBox .cont{width:100%;margin:0 auto;text-align:center}
+.contactBox .cont span{display:inline-block;width:100%;height:14vw;line-height:7vw;font-size:3.1vw;color:#2D3036;position:relative;text-align:left;padding-left:40vw;box-sizing:border-box;margin-bottom:2.6vw}
+.contactBox .cont span:before{width:9.4vw;height:9.4vw;position:absolute;left:28vw;top:2vw}
+.contactBox .cont .call:before{background-position:0% 41.5%}
+.contactBox .cont .phone:before{background-position:16% 41.5%}
+
+
+
+}
+

+ 1 - 1
src/main/resources/static/js/instrument/detail.js

@@ -1,5 +1,5 @@
 var instrumentDetail = new Vue({
-    el: "#container",
+    el: "#instrumentDetail",
     data: {
         instrumentId: 0,
         userId: 6,

+ 1 - 1
src/main/resources/static/js/instrument/search.js

@@ -1,5 +1,5 @@
 var instrumentList = new Vue({
-    el: "#container",
+    el: "#instrumentList",
     data: {
         searchFlag: false,
         listLoading: true,

+ 1 - 1
src/main/resources/static/js/product/detail.js

@@ -1,5 +1,5 @@
 var productDetail = new Vue({
-    el: "#container",
+    el: "#productDetail",
     data: {
         productId: 0,
         userId: 6,

+ 1 - 1
src/main/resources/static/js/product/list.js

@@ -1,5 +1,5 @@
 var productList = new Vue({
-    el: "#container",
+    el: "#productList",
     data: {
         searchFlag: false,
         listLoading: true,

+ 30 - 0
src/main/resources/static/js/single-page/topic.js

@@ -0,0 +1,30 @@
+var topicPage = new Vue({
+    el: "#topicPage",
+    data: {
+        pageType: 0,
+        floorDatas: []
+    },
+    computed: {
+
+    },
+    methods: {
+        getFloorDatas: function () {
+            var _self = this;
+            if(this.pageType ===0){return;}
+            $.getJSON("/page/topic",{type: this.pageType}).done(function (r) {
+                if (r.code === 0 && r.data) {
+                    _self.floorDatas = r.data;
+                }
+            });
+        },
+
+    },
+    created: function () {
+        this.pageType = getUrlParam("type") ? getUrlParam("type")*1 : 0;
+        // 获取列表数据
+        this.getFloorDatas();
+    },
+    mounted: function () {
+        var _self = this;
+    }
+});

+ 1 - 1
src/main/resources/static/js/supplier/search.js

@@ -1,5 +1,5 @@
 var supplierList = new Vue({
-    el: "#container",
+    el: "#supplierList",
     data: {
         searchFlag: false,
         listLoading: true,

+ 13 - 0
src/main/resources/templates/error/404.html

@@ -0,0 +1,13 @@
+<!doctype html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport"
+          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>Document</title>
+</head>
+<body>
+404
+</body>
+</html>

+ 5 - 5
src/main/resources/templates/instrument/detail.html

@@ -6,18 +6,18 @@
     <meta http-equiv="keywords" th:content="${instrument.keywords}">
     <meta http-equiv="description" th:content="${instrument.description}">
     <template th:replace="components/headLink"></template>
-    <link th:href="@{/css/instrument/detail.h5.css(v=${version})}" media="screen and (max-width:768px)" rel="stylesheet" type="text/css">
-    <link th:href="@{/css/instrument/detail.pc.css(v=${version})}" media="screen and (min-width:768px)" rel="stylesheet" type="text/css">
+    <link th:href="@{/css/instrument/detail.css(v=${version})}" rel="stylesheet" type="text/css">
+    <link th:href="@{/css/single-page/topic.css(v=${version})}" rel="stylesheet" type="text/css">
 </head>
 <body>
 <!-- 引用头部 -->
 <template th:replace="components/header"></template>
 
 <!-- 项目仪器详情 -->
-<div id="container">
+<div id="instrumentDetail">
     <div class="wrap">
         <div class="instrumentBox clear">
-            <div class="imageBox"><img th:src="${instrument.headImage}"></div>
+            <div class="imageBox"><img th:src="${instrument.image}"></div>
             <div class="infoBox">
                 <p class="row" th:each="item: ${instrument.pageContents}" th:if="${item.type}==1">
                     <span class="l" th:text="${item.name}"></span><i>:</i><em th:text="${item.content}"></em>
@@ -45,7 +45,7 @@
             <div class="tabCon">
                 <div th:each="item,status : ${instrument.pageContents}"
                      th:if="${item.type}==3 and (${status.index}==10 or ${status.index}==11 or ${status.index}==12)"
-                     th:text="${item.name}" class="item">
+                     th:utext="${item.content}" class="item">
                 </div>
             </div>
         </div>

+ 1 - 1
src/main/resources/templates/instrument/search.html

@@ -11,7 +11,7 @@
 <template th:replace="components/header"></template>
 
 <!-- 项目仪器搜索列表 -->
-<div id="container">
+<div id="instrumentList">
     <!--loading-->
     <div v-if="listLoading" class="loading">
         <img src="/img/base/loading.gif">

+ 1 - 1
src/main/resources/templates/product/detail.html

@@ -12,7 +12,7 @@
 <template th:replace="components/header"></template>
 
 <!-- 商品详情 -->
-<div id="container">
+<div id="productDetail">
     <div class="wrap">
         <div class="productBox clear">
             <div class="imageBox" id="imgShown">

+ 1 - 1
src/main/resources/templates/product/list.html

@@ -11,7 +11,7 @@
 <template th:replace="components/header"></template>
 
 <!-- 商品列表 -->
-<div id="container">
+<div id="productList">
     <input type="hidden" id="searchFlag" th:value="${searchFlag}">
     <template v-if="isPC">
         <!-- 面包屑 -->

+ 7 - 2
src/main/resources/templates/single-page/page.html

@@ -2,15 +2,20 @@
 <html lang="zh-CN" xmlns:th="https://www.thymeleaf.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="https://www.thymeleaf.org ">
 <head>
-    <title>采美365网-中国美业全方位线上交易服务互动平台,做美业,上采美</title>
+    <title th:text="'采美365网-'+${pageData.title}"></title>
+    <meta http-equiv="keywords" th:content="${pageData.keywords}">
+    <meta http-equiv="description" th:content="${pageData.description}">
     <template th:replace="components/headLink"></template>
+    <link th:href="@{/css/single-page/page.css(v=${version})}" rel="stylesheet" type="text/css">
 </head>
 <body>
 <!-- 引用头部 -->
 <template th:replace="components/header"></template>
 
 <!-- 自由页面 -->
-<div id="container">
+<div id="freePage">
+
+    <div class="freePage" th:utext="${pageData.content}"></div>
 
 </div>
 

+ 31 - 4
src/main/resources/templates/single-page/topic.html

@@ -2,20 +2,47 @@
 <html lang="zh-CN" xmlns:th="https://www.thymeleaf.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="https://www.thymeleaf.org ">
 <head>
-    <title>采美365网-中国美业全方位线上交易服务互动平台,做美业,上采美</title>
+    <title th:text="'采美365网-'+${pageData.title}"></title>
+    <meta http-equiv="keywords" th:content="${pageData.keywords}">
+    <meta http-equiv="description" th:content="${pageData.description}">
     <template th:replace="components/headLink"></template>
+    <link th:href="@{/css/single-page/topic.css(v=${version})}" rel="stylesheet" type="text/css">
 </head>
 <body>
 <!-- 引用头部 -->
 <template th:replace="components/header"></template>
 
-<!-- 二级页面(找产品/找仪器/找项目) -->
-<div id="container">
-
+<!-- 二级页面 -->
+<div id="topicPage">
+    <div class="pageTop">
+        <img th:src="${pageData.image}">
+        <p th:utext="${pageData.content}"></p>
+    </div>
+    <div class="wrap">
+        <div class="pageFloor" v-for="floor in floorDatas">
+            <div class="title" v-text="floor.title"></div>
+            <ul class="content clear">
+                <li v-for="item in floor.floorData">
+                    <a :href="item.link">
+                        <img :src="item.image">
+                        <span v-text="item.title"></span>
+                    </a>
+                </li>
+            </ul>
+        </div>
+    </div>
+    <div class="contactBox">
+        <div class="tit"><span>加入正品联盟</span></div>
+        <div class="cont">
+            <span class="icon mIcon call">0755-22907771转806<br>15338851365</span>
+            <span class="icon mIcon phone">产品设备:18948339365<br>商务合作:17318032647</span>
+        </div>
+    </div>
 </div>
 
 <!-- 引入底部 -->
 <template th:replace="components/footer"></template>
 <template th:replace="components/footLink"></template>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/single-page/topic.js(v=${version})}"></script>
 </body>
 </html>

+ 1 - 1
src/main/resources/templates/supplier/search.html

@@ -11,7 +11,7 @@
 <template th:replace="components/header"></template>
 
 <!-- 供应商搜索列表 -->
-<div id="container">
+<div id="supplierList">
     <!--loading-->
     <div v-if="listLoading" class="loading">
         <img src="/img/base/loading.gif">