Browse Source

呵呵-楼层轮播图跳转

Aslee 2 years ago
parent
commit
a51f3a4a0b

+ 7 - 0
src/main/java/com/caimei/modules/cmpage/web/CmPageCentreController.java

@@ -4,6 +4,8 @@ import com.caimei.modules.cmpage.entity.CmImage;
 import com.caimei.modules.cmpage.entity.CmPageCentre;
 import com.caimei.modules.cmpage.service.CmImageService;
 import com.caimei.modules.cmpage.service.CmPageCentreService;
+import com.caimei.modules.hehe.dao.CmHeheProductDao;
+import com.caimei.modules.hehe.entity.CmHeheProduct;
 import com.caimei.modules.newhome.entity.NewPageFloorContent;
 import com.caimei.modules.opensearch.GenerateUtils;
 import com.caimei.modules.product.entity.ActType;
@@ -51,6 +53,9 @@ public class CmPageCentreController extends BaseController {
     @Autowired
     private ActTypeService actTypeService;
 
+    @Resource
+    private CmHeheProductDao cmHeheProductDao;
+
     @Autowired
     private RedisService redisService;
     @Resource
@@ -240,6 +245,8 @@ public class CmPageCentreController extends BaseController {
             return "modules/newhome/beautyFloorContentForm";
         }
         if ("8".equals(newPageFloorContent.getType())) {
+            List<CmHeheProduct> productList = cmHeheProductDao.findList(new CmHeheProduct());
+            model.addAttribute("productList", productList);
             return "modules/hehe/cmHeheFloorContentForm";
         }
         return "modules/newhome/newPageFloorContentForm";

+ 1 - 1
src/main/java/com/caimei/modules/info/dao/InfoDao.java

@@ -36,5 +36,5 @@ public interface InfoDao extends CrudDao<Info> {
 
     void offlineInfo(Integer id);
 
-    String getSensitiveWords(Integer checkPoint);
+    String getSensitiveWords(@Param("checkPoint") Integer checkPoint);
 }

+ 195 - 0
src/main/java/com/caimei/modules/newhome/entity/NewPageFloorContent.java

@@ -173,6 +173,81 @@ public class NewPageFloorContent implements Serializable {
      */
     private Date displayDate3;
 
+    /**
+     * 跳转商品id1(颜选)
+     */
+    private Integer productId1;
+
+    /**
+     * 跳转商品id2(颜选)
+     */
+    private Integer productId2;
+
+    /**
+     * 跳转商品id3(颜选)
+     */
+    private Integer productId3;
+
+    /**
+     * 跳转商品id4(颜选)
+     */
+    private Integer productId4;
+
+    /**
+     * 跳转商品id5(颜选)
+     */
+    private Integer productId5;
+
+    /**
+     * 跳转图片1(颜选)
+     */
+    private String jumpImage1;
+
+    /**
+     * 跳转图片2(颜选)
+     */
+    private String jumpImage2;
+
+    /**
+     * 跳转图片3(颜选)
+     */
+    private String jumpImage3;
+
+    /**
+     * 跳转图片4(颜选)
+     */
+    private String jumpImage4;
+
+    /**
+     * 跳转图片5(颜选)
+     */
+    private String jumpImage5;
+
+    /**
+     * 跳转类型1(颜选):1链接,2商品,3图片
+     */
+    private Integer jumpType1;
+
+    /**
+     * 跳转类型2(颜选):1链接,2商品,3图片
+     */
+    private Integer jumpType2;
+
+    /**
+     * 跳转类型3(颜选):1链接,2商品,3图片
+     */
+    private Integer jumpType3;
+
+    /**
+     * 跳转类型4(颜选):1链接,2商品,3图片
+     */
+    private Integer jumpType4;
+
+    /**
+     * 跳转类型5(颜选):1链接,2商品,3图片
+     */
+    private Integer jumpType5;
+
     public Integer getId() {
         return id;
     }
@@ -436,4 +511,124 @@ public class NewPageFloorContent implements Serializable {
     public void setFormType(String formType) {
         this.formType = formType;
     }
+
+    public Integer getProductId1() {
+        return productId1;
+    }
+
+    public void setProductId1(Integer productId1) {
+        this.productId1 = productId1;
+    }
+
+    public Integer getProductId2() {
+        return productId2;
+    }
+
+    public void setProductId2(Integer productId2) {
+        this.productId2 = productId2;
+    }
+
+    public Integer getProductId3() {
+        return productId3;
+    }
+
+    public void setProductId3(Integer productId3) {
+        this.productId3 = productId3;
+    }
+
+    public Integer getProductId4() {
+        return productId4;
+    }
+
+    public void setProductId4(Integer productId4) {
+        this.productId4 = productId4;
+    }
+
+    public Integer getProductId5() {
+        return productId5;
+    }
+
+    public void setProductId5(Integer productId5) {
+        this.productId5 = productId5;
+    }
+
+    public String getJumpImage1() {
+        return jumpImage1;
+    }
+
+    public void setJumpImage1(String jumpImage1) {
+        this.jumpImage1 = jumpImage1;
+    }
+
+    public String getJumpImage2() {
+        return jumpImage2;
+    }
+
+    public void setJumpImage2(String jumpImage2) {
+        this.jumpImage2 = jumpImage2;
+    }
+
+    public String getJumpImage3() {
+        return jumpImage3;
+    }
+
+    public void setJumpImage3(String jumpImage3) {
+        this.jumpImage3 = jumpImage3;
+    }
+
+    public String getJumpImage4() {
+        return jumpImage4;
+    }
+
+    public void setJumpImage4(String jumpImage4) {
+        this.jumpImage4 = jumpImage4;
+    }
+
+    public String getJumpImage5() {
+        return jumpImage5;
+    }
+
+    public void setJumpImage5(String jumpImage5) {
+        this.jumpImage5 = jumpImage5;
+    }
+
+    public Integer getJumpType1() {
+        return jumpType1;
+    }
+
+    public void setJumpType1(Integer jumpType1) {
+        this.jumpType1 = jumpType1;
+    }
+
+    public Integer getJumpType2() {
+        return jumpType2;
+    }
+
+    public void setJumpType2(Integer jumpType2) {
+        this.jumpType2 = jumpType2;
+    }
+
+    public Integer getJumpType3() {
+        return jumpType3;
+    }
+
+    public void setJumpType3(Integer jumpType3) {
+        this.jumpType3 = jumpType3;
+    }
+
+    public Integer getJumpType4() {
+        return jumpType4;
+    }
+
+    public void setJumpType4(Integer jumpType4) {
+        this.jumpType4 = jumpType4;
+    }
+
+    public Integer getJumpType5() {
+        return jumpType5;
+    }
+
+    public void setJumpType5(Integer jumpType5) {
+        this.jumpType5 = jumpType5;
+    }
 }

+ 5 - 0
src/main/java/com/caimei/modules/newhome/service/NewPageFloorService.java

@@ -81,6 +81,11 @@ public class NewPageFloorService extends CrudService<NewPageFloorDao, NewPageFlo
         floorContent.setAppletsAdsImage3(UploadPicUtils.saveImageToServer(floorContent.getAppletsAdsImage3()));
         floorContent.setAppletsAdsImage4(UploadPicUtils.saveImageToServer(floorContent.getAppletsAdsImage4()));
         floorContent.setAppletsAdsImage5(UploadPicUtils.saveImageToServer(floorContent.getAppletsAdsImage5()));
+        floorContent.setJumpImage1(UploadPicUtils.saveImageToServer(floorContent.getJumpImage1()));
+        floorContent.setJumpImage2(UploadPicUtils.saveImageToServer(floorContent.getJumpImage2()));
+        floorContent.setJumpImage3(UploadPicUtils.saveImageToServer(floorContent.getJumpImage3()));
+        floorContent.setJumpImage4(UploadPicUtils.saveImageToServer(floorContent.getJumpImage4()));
+        floorContent.setJumpImage5(UploadPicUtils.saveImageToServer(floorContent.getJumpImage5()));
         int templateType = 0;
         String templateTypeStr = floorContent.getTemplateType();
         if (StringUtils.isNotEmpty(templateTypeStr)){

+ 2 - 2
src/main/resources/mappings/modules/baike/CmBaikeProductMapper.xml

@@ -176,12 +176,12 @@
 		</where>
 	</select>
 	<select id="getProductFileById" resultType="com.caimei.modules.baike.entity.CmBaikeProductFile">
-		select productId, fileTitle, fileName, ossName, uploadTime
+		select productId, fileTitle, fileName, ossName
 		from cm_baike_product_file
 		where id = #{fileId}
 	</select>
 	<select id="findFileList" resultType="com.caimei.modules.baike.entity.CmBaikeProductFile">
-		select id, productId, fileTitle, fileName, ossName, uploadTime
+		select id, productId, fileTitle, fileName, ossName
 		from cm_baike_product_file
 		where productId = #{id}
 	</select>

+ 44 - 25
src/main/resources/mappings/modules/newhome/NewPageFloorMapper.xml

@@ -178,39 +178,58 @@
 											  `appletsAdsImage2`, `appletsAdsImage3`, `appletsAdsImage4`,
 											  `appletsAdsImage5`, adsLink1,
 											  adsLink2, adsLink3, adsLink4, adsLink5, centreId, displayDate1,
-											  displayDate2, displayDate3)
+											  displayDate2, displayDate3, productId1, productId2, productId3,
+											  productId4, productId5,
+											  jumpImage1, jumpImage2, jumpImage3, jumpImage4, jumpImage5, jumpType1,
+											  jumpType2, jumpType3, jumpType4, jumpType5)
 		VALUES (#{floorId}, #{templateType}, #{pcAdsImage1},
 				#{pcAdsImage2}, #{pcAdsImage3}, #{pcAdsImage4}, #{pcAdsImage5}, #{appletsAdsImage1},
 				#{appletsAdsImage2}, #{appletsAdsImage3}, #{appletsAdsImage4}, #{appletsAdsImage5}, #{adsLink1},
 				#{adsLink2}, #{adsLink3}, #{adsLink4}, #{adsLink5}, #{centreId}, #{displayDate1}, #{displayDate2},
-				#{displayDate3})
+				#{displayDate3}, #{productId1}, #{productId2}, #{productId3}, #{productId4}, #{productId5},
+				#{jumpImage1}, #{jumpImage2}, #{jumpImage3}, #{jumpImage4}, #{jumpImage5}, #{jumpType1}, #{jumpType2},
+				#{jumpType3}, #{jumpType4}, #{jumpType5})
 	</insert>
 
 	<update id="updateFloorContent">
 		UPDATE
-		  `new_page_floor_content`
-		SET
-		  `floorId` = #{floorId},
-		  `centreId` = #{centreId},
-		  `templateType` = #{templateType},
-		  `pcAdsImage1` = #{pcAdsImage1},
-		  `pcAdsImage2` = #{pcAdsImage2},
-		  `pcAdsImage3` = #{pcAdsImage3},
-		  `pcAdsImage4` = #{pcAdsImage4},
-		  `pcAdsImage5` = #{pcAdsImage5},
-		  `appletsAdsImage1` = #{appletsAdsImage1},
-		  `appletsAdsImage2` = #{appletsAdsImage2},
-		  `appletsAdsImage3` = #{appletsAdsImage3},
-		  `appletsAdsImage4` = #{appletsAdsImage4},
-		  `appletsAdsImage5` = #{appletsAdsImage5},
-		  `adsLink1` = #{adsLink1},
-		  `adsLink2` = #{adsLink2},
-		  `adsLink3` = #{adsLink3},
-		  `adsLink4` = #{adsLink4},
-		  `adsLink5` = #{adsLink5},
-		  `displayDate1` = #{displayDate1},
-		  `displayDate2` = #{displayDate2},
-		  `displayDate3` = #{displayDate3}
+			`new_page_floor_content`
+		SET `floorId`          = #{floorId},
+			`centreId`         = #{centreId},
+			`templateType`     = #{templateType},
+			`pcAdsImage1`      = #{pcAdsImage1},
+			`pcAdsImage2`      = #{pcAdsImage2},
+			`pcAdsImage3`      = #{pcAdsImage3},
+			`pcAdsImage4`      = #{pcAdsImage4},
+			`pcAdsImage5`      = #{pcAdsImage5},
+			`appletsAdsImage1` = #{appletsAdsImage1},
+			`appletsAdsImage2` = #{appletsAdsImage2},
+			`appletsAdsImage3` = #{appletsAdsImage3},
+			`appletsAdsImage4` = #{appletsAdsImage4},
+			`appletsAdsImage5` = #{appletsAdsImage5},
+			`adsLink1`         = #{adsLink1},
+			`adsLink2`         = #{adsLink2},
+			`adsLink3`         = #{adsLink3},
+			`adsLink4`         = #{adsLink4},
+			`adsLink5`         = #{adsLink5},
+			`displayDate1`     = #{displayDate1},
+			`displayDate2`     = #{displayDate2},
+			`displayDate3`     = #{displayDate3},
+			productId1         = #{productId1},
+			productId2         = #{productId2},
+			productId3         = #{productId3},
+			productId4         = #{productId4},
+			productId5         = #{productId5},
+			jumpImage1         = #{jumpImage1},
+			jumpImage2         = #{jumpImage2},
+			jumpImage3         = #{jumpImage3},
+			jumpImage4         = #{jumpImage4},
+			jumpImage5         = #{jumpImage5},
+			jumpType1          = #{jumpType1},
+			jumpType2          = #{jumpType2},
+			jumpType3          = #{jumpType3},
+			jumpType4          = #{jumpType4},
+			jumpType5          = #{jumpType5}
 		WHERE `id` = #{id}
 	</update>
 

+ 7 - 6
src/main/webapp/WEB-INF/views/modules/baikePage/addProductRecommend.jsp

@@ -22,12 +22,12 @@
             $("#searchForm").validate({
                 submitHandler: function (form) {
                     var isSubMitFlag = true;
-                    /*var productID = $("#productID").val();
-                    if (isNaN(productID) || productID.indexOf('0') == 0) {
-                        alertx("请输入正确的商品ID");
-                        isSubMitFlag = false;
+                    var typeId = $("#typeId").val();
+                    var name = $("#name").val();
+                    if (typeId == '' && name == '') {
+                        alertx("请选择仪器分类");
                         return false;
-                    }*/
+                    }
                     if (isSubMitFlag) {
                         form.submit();
                     }
@@ -38,7 +38,7 @@
 </head>
 <body>
 <br/>
-<form:form id="searchForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/recommend/findProductPage" method="post" class="breadcrumb form-search">
+<form:form id="searchForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/recommend/products" method="post" class="breadcrumb form-search">
     <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
     <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
 <%--    <form:hidden path="productIds"/>--%>
@@ -93,6 +93,7 @@
         show_title(30);
     });
 
+
     function page(n, s) {
         $("#pageNo").val(n);
         $("#pageSize").val(s);

+ 2 - 1
src/main/webapp/WEB-INF/views/modules/baikePage/recommendForm.jsp

@@ -99,7 +99,8 @@
 			return;
 		}
 		var commodityType = '${cmBaikeProduct.commodityType}';
-		var url = "${ctx}/baike/cmBaikeProduct/recommend/products?productIds=" + productIds + "&commodityType=" + commodityType;
+		var typeId = '${cmBaikeProduct.typeId}';
+		var url = "${ctx}/baike/cmBaikeProduct/recommend/products?productIds=" + productIds + "&commodityType=" + commodityType + "&typeId=" + typeId;
 		title = '添加${commodityType}';
 		width = 700;
 		height = 600;

+ 187 - 21
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheFloorContentForm.jsp

@@ -155,6 +155,10 @@
         #displayDateDiv {
             height: 30px;
         }
+
+        .relative-pst {
+            margin-top: 20px !important;
+        }
     </style>
     <script type="text/javascript">
         $(document).ready(function () {
@@ -225,6 +229,17 @@
                         $(".Image4 .cancel-upload").click();
                         $(".Image5 .cancel-upload").click();
                     }
+                    for (var i = 1; i <= 5; i++) {
+                        var jumpTypeName = 'jumpType' + i;
+                        var jumpType = $("input[name=" + jumpTypeName + "]:checked").val();
+                        if (3 == jumpType) {
+                            var jumpImage = $("#jumpIcon"+i).val();
+                            if (jumpImage == '') {
+                                alertx("请上传广告图" + i + "跳转图片");
+                                return false;
+                            }
+                        }
+                    }
                     $("#formType").val(8);
                     loading('正在提交,请稍等...');
                     form.submit();
@@ -373,10 +388,35 @@
                                 </div>
                             </div>
                             <div style="float: left">
-                                <span class="help-inline"></span>链接:
-                                <div class="controls">
-                                    <form:input path="adsLink1" htmlEscape="false" maxlength="255"
-                                                class="input-xlarge"/>
+                                <span class="help-inline"></span>跳转方式:
+                                <div style="margin-left: 100px">
+                                    <div>
+                                        <input type="radio" name="jumpType1" value="1" onchange="changeJumpType(1)" ${(floorContent.jumpType1 eq null || floorContent.jumpType1 eq 1 )? "checked" : ""} />链接:
+                                        <form:input path="adsLink1" htmlEscape="false" maxlength="255"
+                                                    class="input-xlarge"/>
+                                    </div>
+                                    <div style="margin-top: 20px">
+                                        <input type="radio" name="jumpType1" value="2" onchange="changeJumpType(1)" ${floorContent.jumpType1 eq 2? "checked" : ""} />产品:
+                                        <form:select path="productId1" class="select-ele input-xlarge">
+                                            <form:option value="" label="请选择"/>
+                                            <form:options items="${productList}" itemLabel="name" itemValue="productId"
+                                                          htmlEscape="false"/>
+                                        </form:select>
+                                    </div>
+                                </div>
+                            </div>
+                            <div style="float: left;margin: 25px 0px 0px 100px">
+                                <span class="help-inline"></span>
+                                <input type="radio" name="jumpType1" value="3" onchange="changeJumpType(1)" ${floorContent.jumpType1 eq 3? "checked" : ""} />图片:
+                                <div class="controls upload-content iconBox" id="jumpImage1">
+                                    <div class="conList">
+                                        <form:hidden id="jumpIcon1" path="jumpImage1" htmlEscape="false" maxlength="255"
+                                                     class="input-xlarge required"/>
+                                        <sys:ckfinder input="jumpIcon1" type="images" uploadPath="/photo"
+                                                      selectMultiple="false"
+                                                      maxWidth="100" maxHeight="100"/> <br>
+                                        <label>建议图片分辨率750px*1624px</label>
+                                    </div>
                                 </div>
                             </div>
                         </div>
@@ -395,10 +435,35 @@
                                 </div>
                             </div>
                             <div style="float: left">
-                                <span class="help-inline"></span>链接:
-                                <div class="controls">
-                                    <form:input path="adsLink2" htmlEscape="false" maxlength="255"
-                                                class="input-xlarge"/>
+                                <span class="help-inline"></span>跳转方式:
+                                <div style="margin-left: 100px">
+                                    <div>
+                                        <input type="radio" name="jumpType2" value="1" onchange="changeJumpType(2)" ${(floorContent.jumpType2 eq null || floorContent.jumpType2 eq 1 )? "checked" : ""} />链接:
+                                        <form:input path="adsLink1" htmlEscape="false" maxlength="255"
+                                                    class="input-xlarge"/>
+                                    </div>
+                                    <div style="margin-top: 20px">
+                                        <input type="radio" name="jumpType2" value="2" onchange="changeJumpType(2)" ${floorContent.jumpType2 eq 2? "checked" : ""} />产品:
+                                        <form:select path="productId2" class="select-ele input-xlarge">
+                                            <form:option value="" label="请选择"/>
+                                            <form:options items="${productList}" itemLabel="name" itemValue="productId"
+                                                          htmlEscape="false"/>
+                                        </form:select>
+                                    </div>
+                                </div>
+                            </div>
+                            <div style="float: left;margin: 25px 0px 0px 100px">
+                                <span class="help-inline"></span>
+                                <input type="radio" name="jumpType2" value="3" onchange="changeJumpType(2)" ${floorContent.jumpType2 eq 3? "checked" : ""} />图片:
+                                <div class="controls upload-content iconBox" id="jumpImage2">
+                                    <div class="conList">
+                                        <form:hidden id="jumpIcon2" path="jumpImage2" htmlEscape="false" maxlength="255"
+                                                     class="input-xlarge required"/>
+                                        <sys:ckfinder input="jumpIcon2" type="images" uploadPath="/photo"
+                                                      selectMultiple="false"
+                                                      maxWidth="100" maxHeight="100"/> <br>
+                                        <label>建议图片分辨率750px*1624px</label>
+                                    </div>
                                 </div>
                             </div>
                         </div>
@@ -417,10 +482,35 @@
                                 </div>
                             </div>
                             <div style="float: left">
-                                <span class="help-inline"></span>链接:
-                                <div class="controls">
-                                    <form:input path="adsLink3" htmlEscape="false" maxlength="255"
-                                                class="input-xlarge"/>
+                                <span class="help-inline"></span>跳转方式:
+                                <div style="margin-left: 100px">
+                                    <div>
+                                        <input type="radio" name="jumpType3" value="1" onchange="changeJumpType(3)" ${(floorContent.jumpType3 eq null || floorContent.jumpType3 eq 1 )? "checked" : ""} />链接:
+                                        <form:input path="adsLink3" htmlEscape="false" maxlength="255"
+                                                    class="input-xlarge"/>
+                                    </div>
+                                    <div style="margin-top: 20px">
+                                        <input type="radio" name="jumpType3" value="2" onchange="changeJumpType(3)" ${floorContent.jumpType3 eq 2? "checked" : ""} />产品:
+                                        <form:select path="productId3" class="select-ele input-xlarge">
+                                            <form:option value="" label="请选择"/>
+                                            <form:options items="${productList}" itemLabel="name" itemValue="productId"
+                                                          htmlEscape="false"/>
+                                        </form:select>
+                                    </div>
+                                </div>
+                            </div>
+                            <div style="float: left;margin: 25px 0px 0px 100px">
+                                <span class="help-inline"></span>
+                                <input type="radio" name="jumpType3" value="3" onchange="changeJumpType(3)" ${floorContent.jumpType3 eq 3? "checked" : ""} />图片:
+                                <div class="controls upload-content iconBox" id="jumpImage3">
+                                    <div class="conList">
+                                        <form:hidden id="jumpIcon3" path="jumpImage3" htmlEscape="false" maxlength="255"
+                                                     class="input-xlarge required"/>
+                                        <sys:ckfinder input="jumpIcon3" type="images" uploadPath="/photo"
+                                                      selectMultiple="false"
+                                                      maxWidth="100" maxHeight="100"/> <br>
+                                        <label>建议图片分辨率750px*1624px</label>
+                                    </div>
                                 </div>
                             </div>
                         </div>
@@ -439,10 +529,35 @@
                                 </div>
                             </div>
                             <div style="float: left">
-                                <span class="help-inline"></span>链接:
-                                <div class="controls">
-                                    <form:input path="adsLink4" htmlEscape="false" maxlength="255"
-                                                class="input-xlarge"/>
+                                <span class="help-inline"></span>跳转方式:
+                                <div style="margin-left: 100px">
+                                    <div>
+                                        <input type="radio" name="jumpType4" value="1" onchange="changeJumpType(4)" ${(floorContent.jumpType4 eq null || floorContent.jumpType4 eq 1 )? "checked" : ""} />链接:
+                                        <form:input path="adsLink4" htmlEscape="false" maxlength="255"
+                                                    class="input-xlarge"/>
+                                    </div>
+                                    <div style="margin-top: 20px">
+                                        <input type="radio" name="jumpType4" value="2" onchange="changeJumpType(4)" ${floorContent.jumpType4 eq 2? "checked" : ""} />产品:
+                                        <form:select path="productId4" class="select-ele input-xlarge">
+                                            <form:option value="" label="请选择"/>
+                                            <form:options items="${productList}" itemLabel="name" itemValue="productId"
+                                                          htmlEscape="false"/>
+                                        </form:select>
+                                    </div>
+                                </div>
+                            </div>
+                            <div style="float: left;margin: 25px 0px 0px 100px">
+                                <span class="help-inline"></span>
+                                <input type="radio" name="jumpType4" value="3" onchange="changeJumpType(4)" ${floorContent.jumpType4 eq 3? "checked" : ""} />图片:
+                                <div class="controls upload-content iconBox" id="jumpImage4">
+                                    <div class="conList">
+                                        <form:hidden id="jumpIcon4" path="jumpImage4" htmlEscape="false" maxlength="255"
+                                                     class="input-xlarge required"/>
+                                        <sys:ckfinder input="jumpIcon4" type="images" uploadPath="/photo"
+                                                      selectMultiple="false"
+                                                      maxWidth="100" maxHeight="100"/> <br>
+                                        <label>建议图片分辨率750px*1624px</label>
+                                    </div>
                                 </div>
                             </div>
                         </div>
@@ -461,10 +576,35 @@
                                 </div>
                             </div>
                             <div style="float: left">
-                                <span class="help-inline"></span>链接:
-                                <div class="controls">
-                                    <form:input path="adsLink5" htmlEscape="false" maxlength="255"
-                                                class="input-xlarge"/>
+                                <span class="help-inline"></span>跳转方式:
+                                <div style="margin-left: 100px">
+                                    <div>
+                                        <input type="radio" name="jumpType5" value="1" onchange="changeJumpType(5)" ${(floorContent.jumpType5 eq null || floorContent.jumpType5 eq 1 )? "checked" : ""} />链接:
+                                        <form:input path="adsLink5" htmlEscape="false" maxlength="255"
+                                                    class="input-xlarge"/>
+                                    </div>
+                                    <div style="margin-top: 20px">
+                                        <input type="radio" name="jumpType5" value="2" onchange="changeJumpType(5)" ${floorContent.jumpType5 eq 2? "checked" : ""} />产品:
+                                        <form:select path="productId5" class="select-ele input-xlarge">
+                                            <form:option value="" label="请选择"/>
+                                            <form:options items="${productList}" itemLabel="name" itemValue="productId"
+                                                          htmlEscape="false"/>
+                                        </form:select>
+                                    </div>
+                                </div>
+                            </div>
+                            <div style="float: left;margin: 25px 0px 0px 100px">
+                                <span class="help-inline"></span>
+                                <input type="radio" name="jumpType5" value="3" onchange="changeJumpType(5)" ${floorContent.jumpType5 eq 3? "checked" : ""} />图片:
+                                <div class="controls upload-content iconBox" id="jumpImage5">
+                                    <div class="conList">
+                                        <form:hidden id="jumpIcon5" path="jumpImage5" htmlEscape="false" maxlength="255"
+                                                     class="input-xlarge required"/>
+                                        <sys:ckfinder input="jumpIcon5" type="images" uploadPath="/photo"
+                                                      selectMultiple="false"
+                                                      maxWidth="100" maxHeight="100"/> <br>
+                                        <label>建议图片分辨率750px*1624px</label>
+                                    </div>
                                 </div>
                             </div>
                         </div>
@@ -542,7 +682,7 @@
                 }
             })
         });
-        for (var i = 0; i < 5; i++) {
+        for (var i = 0; i < 10; i++) {
             var observeEle = document.getElementsByClassName('upload-content')[i];
             observer.observe(observeEle, MutationObserverConfig)
         }
@@ -682,6 +822,15 @@
                     $("#appletsAdsImage" + i + " .cancel-upload").click();
                 }
             });
+            $("#jumpImage" + i).find("input.input-xlarge").each(function (j, ele) {
+                if ($(ele).val() && $(ele).val() != '') {
+                    $(ele).next().find("li").css("z-index", "99");
+                    $(ele).parents(".conList").find(".cancel-upload").show();
+                    $(ele).parents(".conList").next().removeClass("hide-pic");
+                } else {
+                    $("#jumpImage" + i + " .cancel-upload").click();
+                }
+            });
         }
     }
 
@@ -940,6 +1089,23 @@
         $("#redirectFlag").val(redirectFlag);
     }
 
+    function changeJumpType(index){
+        var jumpTypeName = 'jumpType' + index;
+        var jumpType = $("input[name=" + jumpTypeName + "]:checked").val();
+        var jumpLink = $("#adsLink"+index);
+        var jumpProductId = $("#productId"+index);
+        if (1 == jumpType) {
+            jumpLink.addClass("required");
+            jumpProductId.removeClass("required");
+        }else if (2 == jumpType) {
+            jumpProductId.addClass("required");
+            jumpLink.removeClass("required");
+        } else {
+            jumpProductId.removeClass("required");
+            jumpLink.removeClass("required");
+        }
+    }
+
 </script>
 </body>
 </html>

+ 7 - 3
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheImageForm.jsp

@@ -60,6 +60,10 @@
 		.hide-pic {
 			display: none !important;
 		}
+
+		.relative-pst{
+			position: relative;
+		}
 	</style>
 	<script type="text/javascript">
 		$(document).ready(function() {
@@ -123,11 +127,11 @@
 		<div class="control-group">
 			<label class="control-label">跳转方式:</label>
 			<div class="controls">
-				<input type="radio" name="jumpType" value="1" onchange="changeJumpType()" ${(cmHeheImage.jumpType eq null || cmHeheImage.jumpType eq 1 )? "checked" : ""} />链接:
-				<form:input path="jumpLink" htmlEscape="false" class="input-xxlarge"/>
+				<input type="radio" name="jumpType" value="1" class="relative-pst" onchange="changeJumpType()" ${(cmHeheImage.jumpType eq null || cmHeheImage.jumpType eq 1 )? "checked" : ""} />链接:
+				<form:input path="jumpLink" htmlEscape="false" class="input-xxlarge relative-pst"/>
 			</div>
 			<div class="controls" style="margin-top: 10px">
-				<input type="radio" name="jumpType" value="2" onchange="changeJumpType()" ${cmHeheImage.jumpType eq 2 ? "checked" : ""} />产品:
+				<input type="radio" name="jumpType" value="2" class="relative-pst" onchange="changeJumpType()" ${cmHeheImage.jumpType eq 2 ? "checked" : ""} />产品:
 				<form:select path="jumpProductId" class="select-ele input-xlarge">
 					<form:option value="" label="请选择"/>
 					<form:options items="${productList}" itemLabel="name" itemValue="productId"