// 查询类型为2的数据
$list=$this->model->where(['type'=>2])->select();
$result = array("total" => count($list), "list" => $list);
return json($result);
// selectpage 默认显示名称是name字段 值是id
//data-field='uname'
//data-primary-key='uid'
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('请选择弹窗信息')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-user_id" data-rule="required" data-source="user/index" data-primary-key="id" data-field="username" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
</div>
</div>
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!