刚做了一个easyui 数据表格,后台数据能返回到前台,前台easyui的定义也没问题。找了很久没看出问题在哪里,请各位大神帮忙看看。下面依次贴出代码。
页面:
<table id="gridPassengers" class="easyui-combogrid"
data-options="url:'QueryPassengers',fitColumns:true,singleSelect:true,pagination:true,pageList:[10,20,30,40,50]">
<thead>
<tr>
<th data-options="field:'Line'">线路</th>
<th data-options="field:'InComePassengers',width:180,align:'center'">进站客流</th>
<th data-options="field:'SwapInPassengers',width:180,align:'center'">换入客流</th>
<th data-options="field:'DayPassengers',width:180,align:'center'">本日客运量</th>
<th data-options="field:'MonthPassengers',width:180,align:'center'">本月累计客运量</th>
<th data-options="field:'AvgDayPassengers',width:180,align:'center'">本月日均客运量</th>
</tr>
</thead>
</table>
后台返回的数据:
{"total":2,"rows":[{"Line":"二号","InComePassengers":304301,"SwapInPassengers":304301,"DayPassengers":608602,"MonthPassengers":8805422,"AvgDayPassengers":284045},{"Line":"一号","InComePassengers":207829,"SwapInPassengers":207829,"DayPassengers":415658,"MonthPassengers":8014963,"AvgDayPassengers":258547}]}
不知为何突然又可以了。