修改代码

This commit is contained in:
邹景立 2022-10-25 14:57:06 +08:00
parent 52d11305a2
commit 6f2d88e27a
11 changed files with 11 additions and 12 deletions

View File

@ -41,7 +41,7 @@ class Menu extends Controller
public function index() public function index()
{ {
$this->title = '系统菜单管理'; $this->title = '系统菜单管理';
$this->type = input('get.type', 'index'); $this->type = $this->get['type'] ?? 'index';
SystemMenu::mQuery()->layTable(); SystemMenu::mQuery()->layTable();
} }

View File

@ -41,8 +41,7 @@ class User extends Controller
*/ */
public function index() public function index()
{ {
$this->type = input('get.type', 'index'); $this->type = $this->get['type'] ?? 'index';
// 创建快捷查询工具 // 创建快捷查询工具
SystemUser::mQuery()->layTable(function () { SystemUser::mQuery()->layTable(function () {
$this->title = '系统用户管理'; $this->title = '系统用户管理';

View File

@ -25,7 +25,7 @@ class Discount extends Controller
*/ */
public function index() public function index()
{ {
$this->type = input('get.type', 'index'); $this->type = $this->get['type'] ?? 'index';
BaseUserDiscount::mQuery()->layTable(function () { BaseUserDiscount::mQuery()->layTable(function () {
$this->title = '折扣方案管理'; $this->title = '折扣方案管理';
}, function (QueryHelper $query) { }, function (QueryHelper $query) {

View File

@ -53,7 +53,7 @@ class Pager extends Controller
*/ */
public function edit() public function edit()
{ {
$this->skey = input('get.type', ''); $this->skey = $this->get['type'] ?? '';
$this->base = $this->types[$this->skey] ?? []; $this->base = $this->types[$this->skey] ?? [];
if (empty($this->base)) $this->error('未配置基础数据!'); if (empty($this->base)) $this->error('未配置基础数据!');
$this->title = "编辑{$this->base['name']}"; $this->title = "编辑{$this->base['name']}";

View File

@ -32,7 +32,7 @@ class Payment extends Controller
*/ */
public function index() public function index()
{ {
$this->type = input('get.type', 'index'); $this->type = $this->get['type'] ?? 'index';
BaseUserPayment::mQuery()->layTable(function () { BaseUserPayment::mQuery()->layTable(function () {
$this->title = '支付通道管理'; $this->title = '支付通道管理';
}, function (QueryHelper $query) { }, function (QueryHelper $query) {

View File

@ -72,7 +72,7 @@ class Slider extends Controller
*/ */
public function edit() public function edit()
{ {
$this->skey = input('get.type', ''); $this->skey = $this->get['type'] ?? '';
$this->base = $this->types[$this->skey] ?? []; $this->base = $this->types[$this->skey] ?? [];
if (empty($this->base)) $this->error('未配置基础数据!'); if (empty($this->base)) $this->error('未配置基础数据!');
$this->number = $this->base['number']; $this->number = $this->base['number'];

View File

@ -25,7 +25,7 @@ class Company extends Controller
*/ */
public function index() public function index()
{ {
$this->type = input('get.type', 'index'); $this->type = $this->get['type'] ?? 'index';
BasePostageCompany::mQuery()->layTable(function () { BasePostageCompany::mQuery()->layTable(function () {
$this->title = '快递公司管理'; $this->title = '快递公司管理';
}, function (QueryHelper $query) { }, function (QueryHelper $query) {

View File

@ -26,7 +26,7 @@ class Template extends Controller
*/ */
public function index() public function index()
{ {
$this->type = input('get.type', 'index'); $this->type = $this->get['type'] ?? 'index';
BasePostageTemplate::mQuery()->layTable(function () { BasePostageTemplate::mQuery()->layTable(function () {
$this->title = '快递邮费模板'; $this->title = '快递邮费模板';
}, function (QueryHelper $query) { }, function (QueryHelper $query) {

View File

@ -26,7 +26,7 @@ class Item extends Controller
*/ */
public function index() public function index()
{ {
$this->type = input('get.type', 'index'); $this->type = $this->get['type'] ?? 'index';
DataNewsItem::mQuery($this->get)->layTable(function () { DataNewsItem::mQuery($this->get)->layTable(function () {
$this->title = '文章内容管理'; $this->title = '文章内容管理';
$this->marks = DataNewsMark::items(); $this->marks = DataNewsMark::items();

View File

@ -49,7 +49,7 @@ class Auto extends Controller
*/ */
public function index() public function index()
{ {
$this->type = input('get.type', 'index'); $this->type = $this->get['type'] ?? 'index';
WechatAuto::mQuery()->layTable(function () { WechatAuto::mQuery()->layTable(function () {
$this->title = '关注自动回复'; $this->title = '关注自动回复';
}, function (QueryHelper $query) { }, function (QueryHelper $query) {

View File

@ -60,7 +60,7 @@ class Keys extends Controller
$this->error("生成二维码失败,请稍候再试!<br> {$exception->getMessage()}"); $this->error("生成二维码失败,请稍候再试!<br> {$exception->getMessage()}");
} }
// 数据列表分页处理 // 数据列表分页处理
$this->type = input('get.type', 'index'); $this->type = $this->get['type'] ?? 'index';
WechatKeys::mQuery()->layTable(function () { WechatKeys::mQuery()->layTable(function () {
$this->title = '回复规则管理'; $this->title = '回复规则管理';
}, function (QueryHelper $query) { }, function (QueryHelper $query) {