47 lines
1.5 KiB
PHP
47 lines
1.5 KiB
PHP
<?php
|
||
// +----------------------------------------------------------------------
|
||
// | 作者:修缘 联系QQ:278896498 QQ群:1054861244
|
||
// | 声明:未经作者许可,禁止倒卖等商业运营,违者必究
|
||
// | 另接php业务,网站制作、代理后台、gm后台、支付对接等
|
||
// +----------------------------------------------------------------------
|
||
// | 创建时间: 2022/1/8 1:09
|
||
// +----------------------------------------------------------------------
|
||
|
||
|
||
namespace app\admin\controller;
|
||
|
||
use app\admin\model\AgencyUser;
|
||
use think\Request;
|
||
use app\common\model\CdkRecord;
|
||
|
||
|
||
class CdkRecordController extends Controller
|
||
{
|
||
protected function initialize(): void
|
||
{
|
||
parent::initialize(); // TODO: Change the autogenerated stub
|
||
$this->get_son_agency_account();
|
||
}
|
||
|
||
//列表
|
||
public function index(Request $request, CdkRecord $model)
|
||
{
|
||
$son_agency = $this->son_agency . ",{$this->user->username}";
|
||
$param = $request->param();
|
||
$model = $model->son($son_agency)->scope('where', $param);
|
||
$data = $model->paginate($this->admin['per_page'], false, ['query' => $request->get()]);
|
||
//关键词,排序等赋值
|
||
$this->assign($request->get());
|
||
$this->assign([
|
||
'data' => $data,
|
||
'page' => $data->render(),
|
||
'total' => $data->total(),
|
||
'agency' => AgencyUser::Progeny($this->user)->scope('role')->field('id,username,invite')->all(),
|
||
'user' => $this->user,
|
||
|
||
]);
|
||
return $this->fetch();
|
||
}
|
||
|
||
}
|