Commit 798e5013 by 陈超

A

parent 3e5abea2
...@@ -79,6 +79,10 @@ class TopicAction extends CommonAction ...@@ -79,6 +79,10 @@ class TopicAction extends CommonAction
$this->mhm_id && $map['mhm_id'] = $this->mhm_id; $this->mhm_id && $map['mhm_id'] = $this->mhm_id;
$data = D('Topics')->getTopic(1,$_GET['cate'],$map); $data = D('Topics')->getTopic(1,$_GET['cate'],$map);
$this->assign('topic_data',$data); $this->assign('topic_data',$data);
if($this->isAjax()) {
echo json_encode($data);
exit();
}
$html = $this->fetch('ajax_topic'); $html = $this->fetch('ajax_topic');
$data['data']=$html; $data['data']=$html;
exit( json_encode($data) ); exit( json_encode($data) );
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: "{:U('news/Topic/getTopicList')}", url: "{:U('news/Topic/getTopicList')}",
data: "?p=" + (opt.page + 1) + "cate=" + (this.tab + 1), data: "p=" + (opt.page + 1) + "cate=" + (this.tab + 1),
dataType: "json", dataType: "json",
success: function(data) { success: function(data) {
that.loading =false that.loading =false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment