ASCII码 ASCII码

fastadmin 查询 selectpage 数据

发布于:2022-05-25 15:05:48  栏目:技术文档
//查询类型为2的数据
$list=$this->model->where(['type'=>2])->select();
$result=array("total"=>count($list),"list"=>$list);
returnjson($result);

//selectpage默认显示名称是name字段值是id
//data-field='uname'
//data-primary-key='uid'
<divclass="form-group">
<labelclass="control-labelcol-xs-12col-sm-2">{:__('请选择弹窗信息')}:</label>
<divclass="col-xs-12col-sm-8">
<inputid="c-user_id"data-rule="required"data-source="user/index"data-primary-key="id"data-field="username"class="form-controlselectpage"name="row[user_id]"type="text"value="{$row.user_id|htmlentities}">
</div>
</div>

相关推荐
阅读 +