在后台是这样写的: //弹窗
public function popups(){
//弹窗
if (Request::instance()->isPost()) {
$id = request()->param('id');
$popup=Db::name('distribute_leaflet')->alias('a')->join('document b', 'b.id=a.do_cd')->where('a.id',$id)->where('a.de_st',1)->select();
return $popup;
}
}
前台ajax里:function inputPayMethod(id){
$("#payMethod").show();
popupCenter();
$("#popup").show();
$.ajax({
type:'post',
url:'/index.php/admin/Works/popups',
data:'id='+id,
success:function(data){
alert(id);
$('#tbodys').empty();
var opt="";
$(data).each(function(){
opt+="<tr>"
opt+="<td>"+this.do_nm+"</td>"
opt+="<td>"+this.em_cd+"</td>"
opt+="<td>"+this.ac_de_da+"</td>"
opt+="<td>"+this.ad_fa_72+"</td>"
opt+="<td>"+this.un_pr+"</td>"
opt+="<td>"+this.to_mo+"</td>"
opt+="</tr>"
})
$('#tbodys').html(opt);
}
});
}
但是数据插入不到表格里,应该怎么弄