- 初始化获取数据
js代码
$(function () {
$("#jqGrid").jqGrid({
url: baseURL + 'system/artificer/list',
datatype: "json",
colModel: [
{label: 'seq', name: 'seq', hidden: true, hidedlg: true, key: true},
{label: '姓名', name: 'name', width: 100, align: "center"},
{
label: '头像', name: 'img', width: 150, formatter: function (cellvalue) {
var detail = '<image src="' + cellvalue + '" style="width: 200px;height: 70px;"/>';
return detail;
}
},
{label: '职位', name: 'post', width: 100, align: "center"},
{
label: '受欢迎度', name: 'isHot', width: 150, formatter: function (cellvalue) {
if (cellvalue == 0) {
return "正常";
} else if (cellvalu