Keine Beschreibung
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

add_ask.htm 8.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>提问-问答中心</title>
  5. <meta name="renderer" content="webkit" />
  6. <meta charset="utf-8" />
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=0,minimal-ui" />
  9. <link href="{eyou:global name='web_cmspath' /}/favicon.ico" rel="shortcut icon" type="image/x-icon" />
  10. {eyou:static file="skin/css/eyoucms.css" code="ask"/}
  11. {eyou:static file="skin/css/ask.css" code="ask"/}
  12. <script>
  13. var __root_dir__ = "__ROOT_DIR__";
  14. </script>
  15. {eyou:static file="/public/static/common/js/jquery.min.js"/}
  16. {eyou:static file="/public/plugins/layer-v3.1.0/layer.js"/}
  17. {eyou:static file="skin/js/ask.js" code="ask"/}
  18. </head>
  19. <body>
  20. <!-- 头部 -->
  21. {eyou:include file="ask/mobile/ask_header.htm" /}
  22. <!-- END -->
  23. <main class="mian-body container" style="">
  24. <div class="main_box main_box_a" style="">
  25. <div class="tiwen_box mar_t38" style="">
  26. <form id="AskFormData" method="post">
  27. <input type="hidden" name="m" value="plugins">
  28. <input type="hidden" name="c" value="Ask">
  29. <input type="hidden" name="a" value="add_ask">
  30. <p class="tt-img">
  31. <img src="{eyou:static file="skin/images/twtop.png" code="ask"/}">
  32. </p>
  33. <div class="tiwen_main mar_t20" style="">
  34. <p class="ti">
  35. <big><strong>问题标题</strong></big>
  36. </p>
  37. <div class="mar_t10 ts">
  38. <input name="title" type="text" id="title" class="tit_input" maxlength="80" placeholder="简要准确描述你的问题">
  39. </div>
  40. <p class="ti" id="wenti">
  41. <big><strong>问题分类</strong></big>
  42. </p>
  43. <div class="mar_t10 ts">
  44. <div class="twnav">
  45. {$eyou.field.HtmlCode}
  46. </div>
  47. </div>
  48. {eq name='$eyou.conf.reward_switch' value='1'}
  49. <p class="hui_font mar_t10 ti">
  50. <big><strong>悬赏</strong></big>
  51. </p>
  52. <div class="mar_t10 ts">
  53. <input type="text" name="money" value="0" oninput="checkAddAskCoin(this,{$eyou.field.reward_money});" class="tit_input" style="width: 100px;text-align: right;" autocomplete="off">{$eyou.field.reward_desc}
  54. 当前账户剩余 <span style="color: #ff6f06;">{$eyou.field.reward_money}</span> {$eyou.field.reward_desc}
  55. {eq name='$eyou.conf.reward_type' value='users_money'}
  56. <a href="{:url('user/Pay/pay_account_recharge')}" style="color: #ff6f06;" target="_blank">[充值]</a>
  57. {/eq}
  58. </div>
  59. {/eq}
  60. <p class="hui_font mar_t10 ti">
  61. <big><strong>问题描述</strong></big>
  62. </p>
  63. <div class="mar_t10 da" style="">
  64. <script type="text/javascript">
  65. window.UEDITOR_HOME_URL = "__ROOT_DIR__/public/plugins/Ueditor/";
  66. </script>
  67. {eyou:static file="/public/plugins/Ueditor/ueditor.config.js"/}
  68. {eyou:static file="/public/plugins/Ueditor/ueditor.all.min.js"/}
  69. {eyou:static file="/public/plugins/Ueditor/lang/zh-cn/zh-cn.js"/}
  70. <!-- HTML文本 start -->
  71. <div class="row">
  72. <div class="col-xs-9">
  73. <textarea class="span12 ckeditor" id="content" name="content"></textarea>
  74. </div>
  75. </div>
  76. <script type="text/javascript">
  77. UE.getEditor('content',{
  78. serverUrl :"{:url('user/Uploadify/index',array('savepath'=>'weapp'))}",
  79. zIndex: 999,
  80. initialFrameWidth: "135%", //初化宽度
  81. initialFrameHeight: 300, //初化高度
  82. focus: false, //初始化时,是否让编辑器获得焦点true或false
  83. maximumWords: 99999,
  84. removeFormatAttributes: 'class,style,lang,width,height,align,hspace,valign',//允许的最大字符数 'fullscreen',
  85. pasteplain:false, //是否默认为纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴
  86. autoHeightEnabled: false,
  87. toolbars: [["forecolor", "backcolor", "removeformat", "|", "simpleupload", "unlink"]],
  88. // xss 过滤是否开启,inserthtml等操作
  89. xssFilterRules: true,
  90. //input xss过滤
  91. inputXssFilter: true,
  92. //output xss过滤
  93. outputXssFilter: true
  94. });
  95. //必须在提交前渲染编辑器;
  96. function content() {
  97. //判断编辑模式状态:0表示【源代码】HTML视图;1是【设计】视图,即可见即所得;-1表示不可用
  98. if(UE.getEditor("content").queryCommandState('source') != 0) {
  99. UE.getEditor("content").execCommand('source'); //切换到【设计】视图
  100. }
  101. }
  102. </script>
  103. </div>
  104. <input type="hidden" name="form_id" value="AskFormAddData" />
  105. <input type="hidden" name="__token__add_ask" id="add_ask_1652345941" class="token_answer_1652345941" value="" />
  106. <div class="width100 mar_t10 et da">
  107. <span class="el"></span>
  108. <span class="rc">
  109. <font id="errorTips"></font>
  110. <button type="button" class="sz_button float_r" data-url="{$eyou.field.SubmitAddAsk}" onclick="SubmitData(this);">发布</button>
  111. </span>
  112. </div>
  113. </div>
  114. </form>
  115. </div>
  116. </div>
  117. </main>
  118. <script type="text/javascript">
  119. get_token("__token__add_ask");
  120. function SubmitData(obj) {
  121. if (!$('#title').val()) {
  122. layer.msg('请填写问题标题!', {time: 1500, icon: 2});
  123. $('#title').focus();
  124. return false;
  125. }
  126. if (0 == $('#AskType').val()) {
  127. layer.msg('请选择问题分类!', {time: 1500, icon: 2});
  128. return false;
  129. }
  130. if (!$('textarea[name="content"]').val()) {
  131. layer.msg('请填写问题描述!', {time: 1500, icon: 2});
  132. return false;
  133. }
  134. layer_loading('正在处理');
  135. $.ajax({
  136. url: $(obj).data('url'),
  137. data: $('#AskFormData').serialize(),
  138. type:'post',
  139. dataType:'json',
  140. success:function(res){
  141. layer.closeAll();
  142. if (1 == res.code) {
  143. layer.msg(res.msg, {time: 1000},function(){
  144. window.location.href = res.url;
  145. });
  146. } else {
  147. get_token("__token__add_ask");
  148. layer.msg(res.msg, {time: 1500, icon: 2});
  149. }
  150. },
  151. error : function() {
  152. layer.closeAll();
  153. get_token("__token__add_ask");
  154. layer.alert('网络失败,请刷新页面后重试', {icon: 5, closeBtn: 0});
  155. }
  156. });
  157. }
  158. </script>
  159. </body>
  160. </html>