123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <h3>{$Think.lang.talk_detail}</h3>
- <dl>
- <dt>{$Think.lang.talk_list}{$Think.lang.ds_colon}</dt>
- <dd>
- <div id="div_talk" class="dsm-complain-talk"> </div>
- </dd>
- </dl>
- {elt name="complain_info.complain_state" value="40"}
- <dl>
- <dt>{$Think.lang.talk_send}{$Think.lang.ds_colon}</dt>
- <dd>
- <textarea id="complain_talk" class="w400"></textarea>
- </dd>
- </dl>
- <dl>
- <dt> </dt>
- <dd>
- <input id="btn_publish" type="submit" class="submit fl mr10" value="{$Think.lang.talk_send}">
- <input id="btn_refresh" type="submit" class="submit fl mr10" value="{$Think.lang.talk_refresh}">
- <input id="btn_handle" type="submit" class="submit fl mr10" value="{$Think.lang.handle_submit}">
- </dd>
- </dl>
- <form action="{:url('Membercomplain/apply_handle')}" method="post" id="handle_form">
- <input name="input_complain_id" type="hidden" value="{$complain_info.complain_id}" />
- </form>
- {/elt}
- <script type="text/javascript">
- $(document).ready(function(){
- get_complain_talk();
- $("#btn_publish").click(function(){
- if($("#complain_talk").val()=='') {
- layer.msg("{$Think.lang.talk_null}");
- }
- else {
- publish_complain_talk();
- }
- });
- $("#btn_refresh").click(function(){
- get_complain_talk();
- });
- $("#btn_handle").click(function(){
- layer.confirm("{$Think.lang.handle_confirm_message}", {
- btn: ['{$Think.lang.ds_ok}', '{$Think.lang.ds_cancel}'],
- title: false,
- }, function () {
- ds_ajaxpost('handle_form','url','{:url('Membercomplain/index')}')
- });
- });
- });
- function get_complain_talk() {
- $("#div_talk").empty();
- $.ajax({
- type:'POST',
- url:"{:url('Membercomplain/get_complain_talk')}",
- cache:false,
- data:"complain_id={$complain_info.complain_id}",
- dataType:'json',
- error:function(){
- $("#div_talk").append("<p class='admin'>"+"{$Think.lang.talk_none}"+"</p>");
- },
- success:function(talk_list){
- if(talk_list.length >= 1) {
- for(var i = 0; i < talk_list.length; i++)
- {
- $("#div_talk").append("<p class='"+talk_list[i].css+"'>"+talk_list[i].talk+"</p>");
- }
- }
- else {
- $("#div_talk").append("<p class='admin'>"+"{$Think.lang.talk_none}"+"</p>");
- }
- }
- });
- }
- function publish_complain_talk() {
- $.ajax({
- type:'POST',
- url:"{:url('Membercomplain/publish_complain_talk')}",
- cache:false,
- data:"complain_id={$complain_info.complain_id}&complain_talk="+encodeURIComponent($("#complain_talk").val()),
- dataType:'json',
- error:function(){
- layer.msg("{$Think.lang.talk_send_fail}");
- },
- success:function(talk_list){
- if(talk_list == 'success') {
- $("#complain_talk").val('');
- get_complain_talk();
- layer.msg("{$Think.lang.talk_send_success}");
- }
- else {
- layer.msg("{$Think.lang.talk_send_fail}");
- }
- }
- });
- }
- </script>
|