setPage_event.html 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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. </div>
  54. <div class="form-group">
  55. <label class="control-label rowlabel">正文内容:</label>
  56. <textarea name="events_tips" class="form-control" rows="15" style="width:;"><{$eventData.events_tips}></textarea>
  57. </div>
  58. <div class="form-group">
  59. <label class="control-label rowlabel">是否显示分享按钮:</label>
  60. <{foreach from=$eventsShareButton item=info key=key}>
  61. <label class="radio-inline">
  62. <input name="share_button" type="radio" value="<{$key}>" <{if $eventData.share_button == $key}>checked<{elseif !$eventData.share_button && $key == 1}>checked<{/if}>> <{$info.desc}>
  63. </label>
  64. <{/foreach}>
  65. <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}>"/>
  66. </div>
  67. <div class="form-group">
  68. <label class="control-label rowlabel">是否显示导购按钮:</label>
  69. <{foreach from=$eventsBuyButton item=info key=key}>
  70. <label class="radio-inline">
  71. <input name="buy_button" type="radio" value="<{$key}>" <{if $eventData.buy_button == $key}>checked<{elseif !$eventData.buy_button && $key == 1}>checked<{/if}>> <{$info.desc}>
  72. </label>
  73. <{/foreach}>
  74. <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}>"/>
  75. <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}>"/>
  76. <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}>"/>
  77. </div>
  78. <div class="form-group">
  79. <label class="control-label rowlabel">互动提示语:</label>
  80. <input name="events_hd_tips" class="form-control" type="text" style="width:300px;" value="<{$eventData.events_hd_tips}>"/>
  81. </div>
  82. <div class="form-group">
  83. <label class="control-label rowlabel">活动规则提示语:</label>
  84. <input name="operationt_tips" class="form-control" type="text" style="width:300px;" value="<{$eventData.operationt_tips}>"/>
  85. </div>
  86. <div class="form-group">
  87. <label class="control-label rowlabel">活动规则:</label>
  88. <textarea name="events_rules" class="form-control" rows="15" style="width:;"><{$eventData.events_rules}></textarea>
  89. </div>
  90. <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>
  91. </div>
  92. </div>
  93. </div>
  94. <{include file="./admin/activity/common_right.html"}>
  95. <div style="clear:both;"></div>
  96. </form>
  97. </div>
  98. <script>
  99. var tips_editor,rules_editor;
  100. KISSY.use('node, io, uri', function (S, Node, IO, Uri) {
  101. var $ = S.all;
  102. var Query = Uri.Query;
  103. var activity_submit_status = false; //按钮状态
  104. function submit_button_active() {
  105. activity_submit_status = true;
  106. $("#activity_submit").addClass('active').all('i').show();
  107. }
  108. function submit_button_default() {
  109. activity_submit_status = false;
  110. $("#activity_submit").removeClass('active').all('i').hide();
  111. }
  112. $("#activity_submit").on('click', function () {
  113. if (activity_submit_status) {
  114. return false;
  115. }
  116. submit_button_active();
  117. var events_tips = tips_editor.html();
  118. var events_rules = rules_editor.html();
  119. formData = IO.serialize("#activity_form");
  120. formData = new Query(formData).set('events_tips', events_tips).toString();
  121. formData = new Query(formData).set('events_rules', events_rules).toString();
  122. new IO({
  123. type: "post"
  124. , url: VG.conf.root_domain + '/?c=Admin_Activity_SetPage&a=ReqUpRoutine'
  125. , data: formData
  126. , success: function (data) {
  127. if (data.ok) { //ok
  128. location.href = location.href;
  129. } else {
  130. alert('操作失败,原因:'+data.msg);
  131. location.href = location.href;
  132. }
  133. return false;
  134. }
  135. , error: function (NULL, textStatus) {
  136. alert("请求服务器失败,原因:"+textStatus);
  137. }
  138. , dataType: "json"
  139. });
  140. });
  141. });
  142. var KCONFIG = {
  143. allowFileManager : true,
  144. uploadJson : VG.conf.root_domain + '/?c=kindeditor&a=updateJson',
  145. fileManagerJson : VG.conf.root_domain + '/?c=kindeditor&a=fileManagerJson',
  146. items : [
  147. 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
  148. 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
  149. 'insertunorderedlist', '|', 'emoticons', 'image', 'link', 'lineheight', 'flash']
  150. }
  151. KindEditor.ready(function(K) {
  152. tips_editor = K.create('textarea[name=events_tips]', KCONFIG);
  153. });
  154. KindEditor.ready(function(K) {
  155. rules_editor = K.create('textarea[name=events_rules]', KCONFIG);
  156. });
  157. </script>
  158. <{include file="./admin/bottom.html"}>