setPage_event.html 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <{include file="./admin/header.html"}>
  2. <{include file="./admin/left.html"}>
  3. <{include file="./admin/nav.html"}>
  4. <{include file="get_kindeditor.html"}>
  5. <style>
  6. .set-nav {
  7. margin: 0 auto;
  8. }
  9. .set-nav-hr {
  10. background-color: #ddd;
  11. height: 1px;
  12. position: relative;
  13. }
  14. .form-group label {
  15. font-weight: 600;
  16. }
  17. .checkbox-inline, .radio-inline {
  18. font-weight: 400!important;
  19. }
  20. .rowlabel {
  21. font-weight: 300!important;
  22. }
  23. .music_play_hide {
  24. display:none;
  25. }
  26. .ke-container {
  27. width:640px!important
  28. }
  29. </style>
  30. <div id="activity_container">
  31. <form id="activity_form">
  32. <div class="activity_center">
  33. <{include file="./admin/activity/common_nav.html"}>
  34. <input name="events_id" type="hidden" value="<{$events_Data.events.id}>">
  35. <div class="panel panel-default">
  36. <div class="panel-body">
  37. <div class="form-group">
  38. <label class="control-label rowlabel">显示顶部数据栏目:</label>
  39. <{foreach from=$eventsTopData item=info key=key}>
  40. <label class="radio-inline">
  41. <input name="top_data" type="radio" value="<{$key}>" <{if $eventData.top_data == $key}>checked<{elseif !$eventData.top_data && $key == 1}>checked<{/if}>> <{$info.desc}>
  42. </label>
  43. <{/foreach}>
  44. </div>
  45. <div class="form-group">
  46. <label class="control-label rowlabel">显示分栏标签:</label>
  47. <input name="is_column_tag_1" type="checkbox" value="1" <{if $eventData.is_column_tag_1 == 1}>checked<{/if}>>
  48. <input name="column_tag_1" class="form-control" style="display:inline;width:150px;" type="text" value="<{if $eventData.column_tag_1}><{$eventData.column_tag_1}><{else}> 活动介绍<{/if}>"/>
  49. <input name="is_column_tag_2" type="checkbox" value="1" <{if $eventData.is_column_tag_2 == 1}>checked<{/if}>>
  50. <input name="column_tag_2" class="form-control" style="display:inline;width:150px;" type="text" value="<{if $eventData.column_tag_2}><{$eventData.column_tag_2}><{else}> 中奖信息<{/if}>"/>
  51. <input name="is_column_tag_3" type="checkbox" value="1" <{if $eventData.is_column_tag_3 == 1}>checked<{/if}>>
  52. <input name="column_tag_3" class="form-control" style="display:inline;width:150px;" type="text" value="<{if $eventData.column_tag_3}><{$eventData.column_tag_3}><{else}> 试用评价<{/if}>"/>
  53. <input name="is_column_tag_4" type="checkbox" value="1" <{if $eventData.is_column_tag_4 == 1}>checked<{/if}>>
  54. <input name="column_tag_4" class="form-control" style="display:inline;width:150px;" type="text" value="<{if $eventData.column_tag_4}><{$eventData.column_tag_4}><{else}> 助力排行<{/if}>"/>
  55. </div>
  56. <div class="form-group">
  57. <label class="control-label rowlabel">正文内容:</label>
  58. <textarea name="events_tips" class="form-control" rows="15" style="width:;"><{$eventData.events_tips}></textarea>
  59. </div>
  60. <div class="form-group">
  61. <label class="control-label rowlabel">是否显示分享按钮:</label>
  62. <{foreach from=$eventsShareButton item=info key=key}>
  63. <label class="radio-inline">
  64. <input name="share_button" type="radio" value="<{$key}>" <{if $eventData.share_button == $key}>checked<{elseif !$eventData.share_button && $key == 1}>checked<{/if}>> <{$info.desc}>
  65. </label>
  66. <{/foreach}>
  67. <input name="share_button_tips" class="form-control" style="display:inline;width:300px;" type="text" value="<{if $eventData.share_button_tips}><{$eventData.share_button_tips}><{else}>分享优惠给好友<{/if}>"/>
  68. </div>
  69. <div class="form-group">
  70. <label class="control-label rowlabel">是否显示导购按钮:</label>
  71. <{foreach from=$eventsBuyButton item=info key=key}>
  72. <label class="radio-inline">
  73. <input name="buy_button" type="radio" value="<{$key}>" <{if $eventData.buy_button == $key}>checked<{elseif !$eventData.buy_button && $key == 1}>checked<{/if}>> <{$info.desc}>
  74. </label>
  75. <{/foreach}>
  76. <input name="buy_button_tips" class="form-control" style="display:inline;width:150px;" type="text" value="<{if $eventData.buy_button_tips}><{$eventData.buy_button_tips}><{else}>立即购买通道<{/if}>"/>
  77. <input name="buy_button_link" class="form-control" style="display:inline;width:150px;" type="text" value="<{if $eventData.buy_button_link}><{$eventData.buy_button_link}><{else}>微信链接<{/if}>"/>
  78. <input name="buy_button_app" class="form-control" style="display:inline;width:150px;" type="text" value="<{if $eventData.buy_button_app}><{$eventData.buy_button_app}><{else}>APP链接<{/if}>"/>
  79. </div>
  80. <div class="form-group">
  81. <label class="control-label rowlabel">参与人数基数:</label>
  82. <input name="base_num" class="form-control" type="text" style="width:300px;" value="<{$eventData.base_num}>"/>
  83. </div>
  84. <div class="form-group">
  85. <label class="control-label rowlabel">助力值基数:</label>
  86. <input name="zhuli_num" class="form-control" type="text" style="width:300px;" value="<{$eventData.zhuli_num}>"/>
  87. </div>
  88. <div class="form-group">
  89. <label class="control-label rowlabel">邀请好友助力提示文字:</label>
  90. <input name="yaoqing" class="form-control" type="text" style="width:300px;" value="<{$eventData.yaoqing}>"/>
  91. </div>
  92. <div class="form-group">
  93. <label class="control-label rowlabel">互动提示语:</label>
  94. <input name="events_hd_tips" class="form-control" type="text" style="width:300px;" value="<{$eventData.events_hd_tips}>"/>
  95. </div>
  96. <div class="form-group">
  97. <label class="control-label rowlabel">活动规则提示语:</label>
  98. <input name="operationt_tips" class="form-control" type="text" style="width:300px;" value="<{$eventData.operationt_tips}>"/>
  99. </div>
  100. <div class="form-group">
  101. <label class="control-label rowlabel">活动规则:</label>
  102. <textarea name="events_rules" class="form-control" rows="15" style="width:;"><{$eventData.events_rules}></textarea>
  103. </div>
  104. <a id="activity_submit" href="javascript:;" class="button button-3d button-primary button-rounded"><i class="fa fa-refresh fa-spin" style="display:none;"></i> 保存设置</a>
  105. </div>
  106. </div>
  107. </div>
  108. <{include file="./admin/activity/common_right.html"}>
  109. <div style="clear:both;"></div>
  110. </form>
  111. </div>
  112. <script>
  113. var tips_editor,rules_editor;
  114. KISSY.use('node, io, uri', function (S, Node, IO, Uri) {
  115. var $ = S.all;
  116. var Query = Uri.Query;
  117. var activity_submit_status = false; //按钮状态
  118. function submit_button_active() {
  119. activity_submit_status = true;
  120. $("#activity_submit").addClass('active').all('i').show();
  121. }
  122. function submit_button_default() {
  123. activity_submit_status = false;
  124. $("#activity_submit").removeClass('active').all('i').hide();
  125. }
  126. $("#activity_submit").on('click', function () {
  127. if (activity_submit_status) {
  128. return false;
  129. }
  130. submit_button_active();
  131. var events_tips = tips_editor.html();
  132. var events_rules = rules_editor.html();
  133. formData = IO.serialize("#activity_form");
  134. formData = new Query(formData).set('events_tips', events_tips).toString();
  135. formData = new Query(formData).set('events_rules', events_rules).toString();
  136. new IO({
  137. type: "post"
  138. , url: VG.conf.root_domain + '/?c=Admin_Activity_SetPage&a=ReqUpRoutine'
  139. , data: formData
  140. , success: function (data) {
  141. if (data.ok) { //ok
  142. location.href = location.href;
  143. } else {
  144. alert('操作失败,原因:'+data.msg);
  145. location.href = location.href;
  146. }
  147. return false;
  148. }
  149. , error: function (NULL, textStatus) {
  150. alert("请求服务器失败,原因:"+textStatus);
  151. }
  152. , dataType: "json"
  153. });
  154. });
  155. });
  156. var KCONFIG = {
  157. allowFileManager : true,
  158. uploadJson : VG.conf.root_domain + '/?c=kindeditor&a=updateJson',
  159. fileManagerJson : VG.conf.root_domain + '/?c=kindeditor&a=fileManagerJson',
  160. items : [
  161. 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
  162. 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
  163. 'insertunorderedlist', '|', 'emoticons', 'image', 'link', 'lineheight', 'flash']
  164. }
  165. KindEditor.ready(function(K) {
  166. tips_editor = K.create('textarea[name=events_tips]', KCONFIG);
  167. });
  168. KindEditor.ready(function(K) {
  169. rules_editor = K.create('textarea[name=events_rules]', KCONFIG);
  170. });
  171. </script>
  172. <{include file="./admin/bottom.html"}>