Showing
4 changed files
with
152 additions
and
10 deletions
@@ -603,15 +603,6 @@ | @@ -603,15 +603,6 @@ | ||
603 | return false; | 603 | return false; |
604 | } | 604 | } |
605 | 605 | ||
606 | - /*//封面图 | ||
607 | - var coverUrl = ''; | ||
608 | - $("input[name='coverImage']").each(function(j,item){ | ||
609 | - coverUrl = item.value; | ||
610 | - }); | ||
611 | - debugger; | ||
612 | - $("#coverImage").val(coverUrl);*/ | ||
613 | - | ||
614 | - | ||
615 | var labels = ''; | 606 | var labels = ''; |
616 | $("input[name='labelId']").each(function(j,item){ | 607 | $("input[name='labelId']").each(function(j,item){ |
617 | 608 | ||
@@ -893,7 +884,6 @@ | @@ -893,7 +884,6 @@ | ||
893 | } | 884 | } |
894 | 885 | ||
895 | //封面图 | 886 | //封面图 |
896 | - debugger; | ||
897 | $("#coverImageUploadExt").imageUpload("setValue",data.coverImg); | 887 | $("#coverImageUploadExt").imageUpload("setValue",data.coverImg); |
898 | 888 | ||
899 | htmlTopic(data.topicName); | 889 | htmlTopic(data.topicName); |
@@ -194,6 +194,16 @@ | @@ -194,6 +194,16 @@ | ||
194 | </td> | 194 | </td> |
195 | </tr> | 195 | </tr> |
196 | 196 | ||
197 | + <!--选择信息流结构--> | ||
198 | + <tr style="height: 60px"> | ||
199 | + <td style="width:100%;"> | ||
200 | + <div style="float: left;width:700px;" > | ||
201 | + <label style="font-size: 14px;">选择结构类型</label> <br> | ||
202 | + <input class="easyui-combobox" id="flowType" name="flowType" style="width:200px "> | ||
203 | + </div> | ||
204 | + </td> | ||
205 | + </tr> | ||
206 | + | ||
197 | <tr> | 207 | <tr> |
198 | <td valign="bottom"> | 208 | <td valign="bottom"> |
199 | <input id="draftBotton" class="btn btn-primary" style="font-size: 16px; height: 36px;" value="保存到草稿箱"/> | 209 | <input id="draftBotton" class="btn btn-primary" style="font-size: 16px; height: 36px;" value="保存到草稿箱"/> |
@@ -386,6 +396,15 @@ | @@ -386,6 +396,15 @@ | ||
386 | } | 396 | } |
387 | }); | 397 | }); |
388 | 398 | ||
399 | + /*选择信息结构*/ | ||
400 | + $("#flowType").combobox({ | ||
401 | + valueField : "value", | ||
402 | + textField : "text", | ||
403 | + required:false, | ||
404 | + prompt: "选择结构类型", | ||
405 | + data:[{text:"",value:""},{text:"长图",value:"1"},{text:"方图",value:"2"}] | ||
406 | + }); | ||
407 | + | ||
389 | $("#subtitle").textbox({ | 408 | $("#subtitle").textbox({ |
390 | required: false, | 409 | required: false, |
391 | missingMessage: "请输入120字以内的副标题", | 410 | missingMessage: "请输入120字以内的副标题", |
@@ -158,6 +158,20 @@ | @@ -158,6 +158,20 @@ | ||
158 | </td> | 158 | </td> |
159 | </tr> | 159 | </tr> |
160 | 160 | ||
161 | + <tr style="height: 60px"> | ||
162 | + <td> | ||
163 | + <label>封面</label> <br> | ||
164 | + <div id="coverImageUpload" style="float:left;"> | ||
165 | + </div> | ||
166 | + <div> | ||
167 | + <div style="float:left;"> | ||
168 | + <span style=" margin-left: 10px; color: red">1. 请上传 3:4/4:3/1:1 的图片,优质清晰的封面有利于推荐</span></br> | ||
169 | + <span style=" margin-left: 10px; color: red">2. 请上传500K以内的图片,请勿上传像素过高的图片</span> | ||
170 | + </div> | ||
171 | + </div> | ||
172 | + </td> | ||
173 | + </tr> | ||
174 | + | ||
161 | <!--选择信息流结构--> | 175 | <!--选择信息流结构--> |
162 | <tr style="height: 60px"> | 176 | <tr style="height: 60px"> |
163 | <td style="width:100%;"> | 177 | <td style="width:100%;"> |
@@ -632,6 +646,58 @@ | @@ -632,6 +646,58 @@ | ||
632 | } | 646 | } |
633 | }); | 647 | }); |
634 | 648 | ||
649 | + /*封面图上传*/ | ||
650 | + $("#coverImageUpload").imageUpload({ | ||
651 | + width: 171, | ||
652 | + height: 120, | ||
653 | + realInputName: "coverImage", | ||
654 | + uploadInputName: "files", | ||
655 | + url: serverContextPath + '/fileupload/uploadImgFile', | ||
656 | + queryParams: { | ||
657 | + bucket: "grassImg" | ||
658 | + }, | ||
659 | + onBeforeSubmit: function () { | ||
660 | + debugger; | ||
661 | + var oobj = $(this).find("input[type='file']"); | ||
662 | + var files = oobj[0].files; | ||
663 | + | ||
664 | + for(var i=0; i<files.length;i++){ | ||
665 | + var obj = files[i]; | ||
666 | + if(obj!=null && obj!=''){ | ||
667 | + debugger | ||
668 | + if(obj.name.substring(obj.name.lastIndexOf(".")).toLowerCase() == '.png'){ | ||
669 | + $.messager.alert("提示","不允许上传png格式的图片", "info", function(){return false;}); | ||
670 | + return false; | ||
671 | + } | ||
672 | + if(obj.type.toLowerCase() == 'image/png'){ | ||
673 | + $.messager.alert("提示","不允许上传png格式的图片", "info", function(){return false;}); | ||
674 | + return false; | ||
675 | + } | ||
676 | + } | ||
677 | + } | ||
678 | + $.messager.progress({ | ||
679 | + title: "正在执行", | ||
680 | + msg: "正在执行,请稍后...", | ||
681 | + interval: 500, | ||
682 | + text: "" | ||
683 | + }); | ||
684 | + }, | ||
685 | + filterFileName: function (data) { | ||
686 | + debugger; | ||
687 | + if (!data || data.code != 200) { | ||
688 | + $.messager.progress("close"); | ||
689 | + $.messager.alert("错误", data.message); | ||
690 | + return ""; | ||
691 | + } | ||
692 | + return data.data; | ||
693 | + }, | ||
694 | + onLoadSuccess: function (data) { | ||
695 | + $.messager.progress("close"); | ||
696 | + | ||
697 | + return false; | ||
698 | + } | ||
699 | + }); | ||
700 | + | ||
635 | $("#imageUpload1").imageUpload({ | 701 | $("#imageUpload1").imageUpload({ |
636 | width: 171, | 702 | width: 171, |
637 | height: 120, | 703 | height: 120, |
@@ -149,6 +149,20 @@ | @@ -149,6 +149,20 @@ | ||
149 | </td> | 149 | </td> |
150 | </tr> | 150 | </tr> |
151 | 151 | ||
152 | + <tr style="height: 60px"> | ||
153 | + <td> | ||
154 | + <label>封面</label> <br> | ||
155 | + <div id="coverImageUploadExt" style="float:left;"> | ||
156 | + </div> | ||
157 | + <div> | ||
158 | + <div style="float:left;"> | ||
159 | + <span style=" margin-left: 10px; color: red">1. 请上传 3:4/4:3/1:1 的图片,优质清晰的封面有利于推荐</span></br> | ||
160 | + <span style=" margin-left: 10px; color: red">2. 请上传500K以内的图片,请勿上传像素过高的图片</span> | ||
161 | + </div> | ||
162 | + </div> | ||
163 | + </td> | ||
164 | + </tr> | ||
165 | + | ||
152 | <!--选择信息流结构--> | 166 | <!--选择信息流结构--> |
153 | <tr style="height: 60px"> | 167 | <tr style="height: 60px"> |
154 | <td style="width:100%;"> | 168 | <td style="width:100%;"> |
@@ -695,6 +709,56 @@ | @@ -695,6 +709,56 @@ | ||
695 | } | 709 | } |
696 | }); | 710 | }); |
697 | 711 | ||
712 | + $("#coverImageUploadExt").imageUpload({ | ||
713 | + width: 171, | ||
714 | + height: 120, | ||
715 | + realInputName: "coverImage", | ||
716 | + uploadInputName: "files", | ||
717 | + url: serverContextPath + '/fileupload/uploadImgFile', | ||
718 | + queryParams: { | ||
719 | + bucket: "grassImg" | ||
720 | + }, | ||
721 | + onBeforeSubmit: function () { | ||
722 | + debugger; | ||
723 | + var oobj = $(this).find("input[type='file']"); | ||
724 | + var files = oobj[0].files; | ||
725 | + | ||
726 | + for(var i=0; i<files.length;i++){ | ||
727 | + var obj = files[i]; | ||
728 | + if(obj!=null && obj!=''){ | ||
729 | + if(obj.name.substring(obj.name.lastIndexOf(".")).toLowerCase() == '.png'){ | ||
730 | + $.messager.alert("提示","不允许上传png格式的图片", "info", function(){return false;}); | ||
731 | + return false; | ||
732 | + } | ||
733 | + if(obj.type.toLowerCase() == 'image/png'){ | ||
734 | + $.messager.alert("提示","不允许上传png格式的图片", "info", function(){return false;}); | ||
735 | + return false; | ||
736 | + } | ||
737 | + } | ||
738 | + } | ||
739 | + $.messager.progress({ | ||
740 | + title: "正在执行", | ||
741 | + msg: "正在执行,请稍后...", | ||
742 | + interval: 500, | ||
743 | + text: "" | ||
744 | + }); | ||
745 | + }, | ||
746 | + filterFileName: function (data) { | ||
747 | + debugger; | ||
748 | + if (!data || data.code != 200) { | ||
749 | + $.messager.progress("close"); | ||
750 | + $.messager.alert("错误", data.message); | ||
751 | + return ""; | ||
752 | + } | ||
753 | + return data.data; | ||
754 | + }, | ||
755 | + onLoadSuccess: function (data) { | ||
756 | + $.messager.progress("close"); | ||
757 | + | ||
758 | + return false; | ||
759 | + } | ||
760 | + }); | ||
761 | + | ||
698 | $("#imageUpload1").imageUpload({ | 762 | $("#imageUpload1").imageUpload({ |
699 | width: 171, | 763 | width: 171, |
700 | height: 120, | 764 | height: 120, |
@@ -784,6 +848,9 @@ | @@ -784,6 +848,9 @@ | ||
784 | $("#flowType").combobox('setValue',data.flowType); | 848 | $("#flowType").combobox('setValue',data.flowType); |
785 | } | 849 | } |
786 | 850 | ||
851 | + //封面图 | ||
852 | + $("#coverImageUploadExt").imageUpload("setValue",data.coverImg); | ||
853 | + | ||
787 | 854 | ||
788 | var context = data.contentText; | 855 | var context = data.contentText; |
789 | if(context == null || context == '' || context == undefined){ | 856 | if(context == null || context == '' || context == undefined){ |
-
Please register or login to post a comment