//查询类型为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>
相关推荐
© 2020 asciim码
人生就是一场修行