123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>提问-问答中心</title>
- <meta name="renderer" content="webkit" />
- <meta charset="utf-8" />
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=0,minimal-ui" />
- <link href="{eyou:global name='web_cmspath' /}/favicon.ico" rel="shortcut icon" type="image/x-icon" />
- {eyou:static file="skin/css/eyoucms.css" code="ask"/}
- {eyou:static file="skin/css/ask.css" code="ask"/}
- <script>
- var __root_dir__ = "__ROOT_DIR__";
- </script>
- {eyou:static file="/public/static/common/js/jquery.min.js"/}
- {eyou:static file="/public/plugins/layer-v3.1.0/layer.js"/}
- {eyou:static file="skin/js/ask.js" code="ask"/}
- </head>
-
- <body>
- <!-- 头部 -->
- {eyou:include file="ask/mobile/ask_header.htm" /}
- <!-- END -->
-
- <main class="mian-body container" style="">
- <div class="main_box main_box_a" style="">
- <div class="tiwen_box mar_t38" style="">
- <form id="AskFormData" method="post">
- <input type="hidden" name="m" value="plugins">
- <input type="hidden" name="c" value="Ask">
- <input type="hidden" name="a" value="add_ask">
- <p class="tt-img">
- <img src="{eyou:static file="skin/images/twtop.png" code="ask"/}">
- </p>
-
- <div class="tiwen_main mar_t20" style="">
- <p class="ti">
- <big><strong>问题标题</strong></big>
- </p>
- <div class="mar_t10 ts">
- <input name="title" type="text" id="title" class="tit_input" maxlength="80" placeholder="简要准确描述你的问题">
- </div>
-
- <p class="ti" id="wenti">
- <big><strong>问题分类</strong></big>
- </p>
- <div class="mar_t10 ts">
- <div class="twnav">
- {$eyou.field.HtmlCode}
- </div>
- </div>
- {eq name='$eyou.conf.reward_switch' value='1'}
- <p class="hui_font mar_t10 ti">
- <big><strong>悬赏</strong></big>
- </p>
- <div class="mar_t10 ts">
- <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}
- 当前账户剩余 <span style="color: #ff6f06;">{$eyou.field.reward_money}</span> {$eyou.field.reward_desc}
- {eq name='$eyou.conf.reward_type' value='users_money'}
- <a href="{:url('user/Pay/pay_account_recharge')}" style="color: #ff6f06;" target="_blank">[充值]</a>
- {/eq}
- </div>
- {/eq}
- <p class="hui_font mar_t10 ti">
- <big><strong>问题描述</strong></big>
- </p>
- <div class="mar_t10 da" style="">
- <script type="text/javascript">
- window.UEDITOR_HOME_URL = "__ROOT_DIR__/public/plugins/Ueditor/";
- </script>
- {eyou:static file="/public/plugins/Ueditor/ueditor.config.js"/}
- {eyou:static file="/public/plugins/Ueditor/ueditor.all.min.js"/}
- {eyou:static file="/public/plugins/Ueditor/lang/zh-cn/zh-cn.js"/}
- <!-- HTML文本 start -->
- <div class="row">
- <div class="col-xs-9">
- <textarea class="span12 ckeditor" id="content" name="content"></textarea>
- </div>
- </div>
- <script type="text/javascript">
- UE.getEditor('content',{
- serverUrl :"{:url('user/Uploadify/index',array('savepath'=>'weapp'))}",
- zIndex: 999,
- initialFrameWidth: "135%", //初化宽度
- initialFrameHeight: 300, //初化高度
- focus: false, //初始化时,是否让编辑器获得焦点true或false
- maximumWords: 99999,
- removeFormatAttributes: 'class,style,lang,width,height,align,hspace,valign',//允许的最大字符数 'fullscreen',
- pasteplain:false, //是否默认为纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴
- autoHeightEnabled: false,
- toolbars: [["forecolor", "backcolor", "removeformat", "|", "simpleupload", "unlink"]],
- // xss 过滤是否开启,inserthtml等操作
- xssFilterRules: true,
- //input xss过滤
- inputXssFilter: true,
- //output xss过滤
- outputXssFilter: true
- });
-
- //必须在提交前渲染编辑器;
- function content() {
- //判断编辑模式状态:0表示【源代码】HTML视图;1是【设计】视图,即可见即所得;-1表示不可用
- if(UE.getEditor("content").queryCommandState('source') != 0) {
- UE.getEditor("content").execCommand('source'); //切换到【设计】视图
- }
- }
- </script>
- </div>
- <input type="hidden" name="form_id" value="AskFormAddData" />
- <input type="hidden" name="__token__add_ask" id="add_ask_1652345941" class="token_answer_1652345941" value="" />
- <div class="width100 mar_t10 et da">
- <span class="el"></span>
- <span class="rc">
- <font id="errorTips"></font>
- <button type="button" class="sz_button float_r" data-url="{$eyou.field.SubmitAddAsk}" onclick="SubmitData(this);">发布</button>
- </span>
- </div>
-
- </div>
- </form>
- </div>
- </div>
- </main>
-
- <script type="text/javascript">
- get_token("__token__add_ask");
- function SubmitData(obj) {
- if (!$('#title').val()) {
- layer.msg('请填写问题标题!', {time: 1500, icon: 2});
- $('#title').focus();
- return false;
- }
- if (0 == $('#AskType').val()) {
- layer.msg('请选择问题分类!', {time: 1500, icon: 2});
- return false;
- }
- if (!$('textarea[name="content"]').val()) {
- layer.msg('请填写问题描述!', {time: 1500, icon: 2});
- return false;
- }
-
- layer_loading('正在处理');
- $.ajax({
- url: $(obj).data('url'),
- data: $('#AskFormData').serialize(),
- type:'post',
- dataType:'json',
- success:function(res){
- layer.closeAll();
- if (1 == res.code) {
- layer.msg(res.msg, {time: 1000},function(){
- window.location.href = res.url;
- });
- } else {
- get_token("__token__add_ask");
- layer.msg(res.msg, {time: 1500, icon: 2});
- }
- },
- error : function() {
- layer.closeAll();
- get_token("__token__add_ask");
- layer.alert('网络失败,请刷新页面后重试', {icon: 5, closeBtn: 0});
- }
- });
- }
- </script>
- </body>
- </html>
|