多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# 列表数据区 * 模块部分 ~~~ $I_U->power([sbh_per.'_all'],1); $other = []; $where = []; $other['where'] = $I_L->where($where,$list_class_json); $other['limit'] = $I_L->limit($PIN, $paging_total, $paging_every); $other['order'] = $I_L->sort(sbh_id.' desc'); $arr = $Sql->arr(sbh_table,$other); $obj = []; $obj[] = ['name'=>'列字段','field'=>'field1']; $obj[] = ['name'=>'列字段','field'=>'field2','weizhi'=>'center']; $sbh_title = []; foreach ($obj as $keyword => $value) { $sbh_title[$keyword] = $value; } $json['title'] = $sbh_title; $list = []; foreach ($arr as $value) { extract($value); //>若要传递多值可在此处添加,如:'u_id'=>$value['u_id'] $obj = []; $obj[0] = [sbh_id=>$value[sbh_id]]; $tmp = []; $obj[2] = $tmp; foreach ($sbh_title as $val) { $field = $val['field']; switch ($field){ default : $obj[$field] = $value[$field]; break; } } $list[] = $obj; } $json['list'] = $list; $obj = []; $obj[] = ['name'=>'编辑','title'=>'标题编辑','T'=>'edit']; $obj[] = ['name'=>'删除','P'=>'del','note'=>'确定要执行删除操作?']; $obj[] = ['name'=>'跳转','url'=>'./?OP=list&MP=model-index']; $json['option'] = $obj; //>批量操作 $obj = []; $obj[] = ['name'=>'批量删除','P'=>'batch_del','note'=>'确定要删除选中选项吗?']; $json['batch'] = $obj; $json['succeed'] = 1; $json['msg'] = '加载完成['.__LINE__.']'; die(json_encode($json)); ~~~ * 参数说明 ~~~ 1.title 列表字段属性数组 1.1.name 字段显示名称 1.2.field 字段对应值 1.3.weizhi 字段位置定位(left/center/right) 2.list 列表数据处理 3.option 每行数据处理按钮数组 3.1.name 每行操作按钮名称 3.2.title 模块输入层标题(仅用于打开输入表单有用) 3.3.T 模块定位标识(仅用于模块定位) 3.4.P 逻辑定位标识(仅用于逻辑定位) 3.5.note 逻辑处理前提示信息(仅用于逻辑定位) 3.6.url 跳转地址 4.succeed 响应状态(1正常0异常) 5.msg 提示信息 ~~~