标签:
<script> $(document).ready(function() { $(‘.asc,.desc‘).css(‘cursor‘, ‘pointer‘).click(function() { var param = $(this).attr(‘data-id‘), href = "{{ path(‘orderrecord_all‘) }}", url = href+‘?‘+param; window.location.href=url; }); });
在CONTROLLER中增加一个变量来接收JS传过来的变量 $status = $request->get(‘status‘)
$dql .= ‘ ORDER BY‘; if($status) { $dql .= ‘ o.status ‘.$status.‘ ,o.createdAt DESC‘; } else { $dql .= ‘ o.createdAt DESC‘; }
标签:
原文地址:http://www.cnblogs.com/wlemory/p/4939210.html