| | |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <input type="hidden" id="id" value="${one.id}"> |
| | | <input type="hidden" id="id1" value="${two.id}"> |
| | | <div class="tabs-container"> |
| | | <ul class="nav nav-tabs"> |
| | | <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">常见问题设置</a></li> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="panel-body" style="padding-top: 60px;"> |
| | | <span>用户端:</span> |
| | | <textarea id="editor_1" type="text/plain" style="width:1200px;height:400px;">${one.content}</textarea> |
| | | <span>司机端:</span> |
| | | <textarea id="editor_2" type="text/plain" style="width:1200px;height:400px;">${two.content}</textarea> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="update_1(${one.id});"/> |
| | |
| | | $(function () { |
| | | //初始化编辑器 |
| | | editor_1 = UE.getEditor('editor_1'); |
| | | editor_2 = UE.getEditor('editor_2'); |
| | | |
| | | $('#language').on('change', function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tAgreement/getAgreement", function(data){ |
| | |
| | | ajax.set("type", 12); |
| | | ajax.set("useType", 1); |
| | | ajax.start(); |
| | | |
| | | |
| | | var ajax1 = new $ax(Feng.ctxPath + "/tAgreement/getAgreement", function(data){ |
| | | editor_2.setContent(data.content); |
| | | $('#id1').val(data.id); |
| | | },function(data){ |
| | | Feng.error("编辑失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax1.set("language", $(this).val()); |
| | | ajax1.set("type", 12); |
| | | ajax1.set("useType", 2); |
| | | ajax1.start(); |
| | | }) |
| | | }); |
| | | |
| | |
| | | Feng.error("内容不能为空!"); |
| | | return; |
| | | } |
| | | submitData(editor_1.getContent(), $('#id').val()); |
| | | if (editor_2.getContentTxt() == ""){ |
| | | Feng.error("内容不能为空!"); |
| | | return; |
| | | } |
| | | submitData(editor_1.getContent(), $('#id').val(),editor_2.getContent(), $('#id1').val()); |
| | | } |
| | | |
| | | function submitData(content,id) { |
| | | function submitData(content,id,content1,id1) { |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tAgreement/updateAppParam", function(data){ |
| | | Feng.success("编辑成功!"); |
| | |
| | | }); |
| | | ajax.set("context", content); |
| | | ajax.set("id", id); |
| | | ajax.set("context1", content1); |
| | | ajax.set("id1", id1); |
| | | ajax.start(); |
| | | } |
| | | </script> |