application/admin/controller/Form.php
(开头部分) 24KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* Created by PhpStorm.
* User: admin
* Date: 2022/2/23
* Time: 16:48
*/
namespace app\admin\controller;
use think\Page;
use think\Db;
use app\admin\logic\FormLogic;
class Form extends Base
{
private $field_type_list;
/**
* 构造方法
*/
public function _initialize() {
parent::_initialize();
// 数据表
$this->form_db = Db::name('_form');
$this->form_list_db = Db::name('form_list');
$this->form_field_db = Db::name('form_field');
$this->form_value_db = Db::name('form_value');
// 业务层
$this->formLogic = new FormLogic;
// 模型层
$this->form_model = model('Form');
$this->form_field_model = model('FormField');
// 多语言功能操作权限
$this->language_access();
$this->field_type_list = config("global.form_field_type_list");
}
/*
* 表单字段 -- 列表
*/
public function field()
{
$assign_data = [];
// 查询条件
$condition = [
'lang' => $this->admin_lang,
'status' => 1,
];
// 应用搜索条件
$keywords = input('keywords/s');
if (!empty($keywords)) $condition['form_name'] = array('LIKE', "%{$keywords}%");
// 分页查询
$count = $this->form_db->where($condition)->count();
$Page = new Page($count, config('paginate.list_rows'));
$show = $Page->show();
$assign_data['page'] = $show;
$assign_data['pager'] = $Page;
后面还有 505 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
