迅睿CMS框架是一款PHP8高性能·简单易用的CMS开源开发框架,基于MIT开源许可协议发布,免费且不限制商业使用,是免费开源的产品,以万端互联为设计理念,支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
联系官方销售客服
1835022288
028-61286886
新建的模块中views/模块名_list中的$list_field如何自定义,在哪里自定义。
//会员用需求管理列表 public function member_list() { $user = dr_member_info($this->uid); if(!array_key_exists(4,$user["groupid"]) && !array_key_exists(6,$user["groupid"])){ $this->_json(0, dr_lang('只有审核会员才可以使用本功能!')); } // 初始化数据表 $this->_init([ 'table' => '1_demand', // (不带前缀的)表名字 'order_by' => 'id desc', // 列表排序,默认的排序方式 'date_field' => '', // 按时间段搜索字段,没有时间字段留空 'list_field' => [ 'id' => ['name' =>'ID','width' =>'10%','use'=>1], 'name' => ['name' =>'名称','width' =>'25%','use'=>1], 'fabudanwei' => ['name' =>'发布单位','width' =>'15%','use'=>1], 'inputtime' => ['name' =>'提交时间','width' =>'15%','use'=>1], 'xuqiujiazhi' => ['name' =>'需求价值','width' =>'10%','use'=>1], 'xuqiujindu' => ['name' =>'对接进度','width' =>'10%','use'=>1], ] ]); $this->list_pagesize = 12; if($this->init['where_list']) { $this->init['where_list'].= ' AND (djtdid = 0 and shifoubaomi != 2) or (djtdid != 0)'; } else { $this->init['where_list'] = '(djtdid = 0 and shifoubaomi != 2) OR (djtdid != 0)'; } list($tpl) = $this->_List(); \Phpcmf\Service::V()->display('demand_member_list.html'); }
//会员用需求管理列表 public function member_index() { $user = dr_member_info($this->uid); if(!array_key_exists(4,$user["groupid"]) && !array_key_exists(6,$user["groupid"])){ $this->_json(0, dr_lang('只有审核会员才可以使用本功能!')); } // 初始化数据表 $this->_init([ 'table' => SITE_ID.'_demand', // (不带前缀的)表名字 'order_by' => 'id desc', // 列表排序,默认的排序方式 'date_field' => '', // 按时间段搜索字段,没有时间字段留空 'where_list' => '(djtdid = 0 and shifoubaomi != 2) OR (djtdid != 0)', 'list_field' => [ 'id' => ['name' =>'ID','width' =>'10%','use'=>1], 'name' => ['name' =>'名称','width' =>'25%','use'=>1], 'fabudanwei' => ['name' =>'发布单位','width' =>'15%','use'=>1], 'inputtime' => ['name' =>'提交时间','width' =>'15%','use'=>1], 'xuqiujiazhi' => ['name' =>'需求价值','width' =>'10%','use'=>1], 'xuqiujindu' => ['name' =>'对接进度','width' =>'10%','use'=>1], ] ]); $this->list_pagesize = 12; list($tpl) = $this->_List(); \Phpcmf\Service::V()->display('demand_member_list.html'); }