diff --git a/app/admin/controller/Menu.php b/app/admin/controller/Menu.php index 9e1cb9c4b..12e569f07 100644 --- a/app/admin/controller/Menu.php +++ b/app/admin/controller/Menu.php @@ -41,7 +41,7 @@ class Menu extends Controller public function index() { $this->title = '系统菜单管理'; - $this->type = input('get.type', 'index'); + $this->type = $this->get['type'] ?? 'index'; SystemMenu::mQuery()->layTable(); } diff --git a/app/admin/controller/User.php b/app/admin/controller/User.php index 040eb5958..bc6446044 100644 --- a/app/admin/controller/User.php +++ b/app/admin/controller/User.php @@ -41,8 +41,7 @@ class User extends Controller */ public function index() { - $this->type = input('get.type', 'index'); - + $this->type = $this->get['type'] ?? 'index'; // 创建快捷查询工具 SystemUser::mQuery()->layTable(function () { $this->title = '系统用户管理'; diff --git a/app/data/controller/base/Discount.php b/app/data/controller/base/Discount.php index e8f470cda..2ce7fec5f 100644 --- a/app/data/controller/base/Discount.php +++ b/app/data/controller/base/Discount.php @@ -25,7 +25,7 @@ class Discount extends Controller */ public function index() { - $this->type = input('get.type', 'index'); + $this->type = $this->get['type'] ?? 'index'; BaseUserDiscount::mQuery()->layTable(function () { $this->title = '折扣方案管理'; }, function (QueryHelper $query) { diff --git a/app/data/controller/base/Pager.php b/app/data/controller/base/Pager.php index 799c9c67e..26f16d847 100644 --- a/app/data/controller/base/Pager.php +++ b/app/data/controller/base/Pager.php @@ -53,7 +53,7 @@ class Pager extends Controller */ public function edit() { - $this->skey = input('get.type', ''); + $this->skey = $this->get['type'] ?? ''; $this->base = $this->types[$this->skey] ?? []; if (empty($this->base)) $this->error('未配置基础数据!'); $this->title = "编辑{$this->base['name']}"; diff --git a/app/data/controller/base/Payment.php b/app/data/controller/base/Payment.php index 37d7e0d5c..d4854819f 100644 --- a/app/data/controller/base/Payment.php +++ b/app/data/controller/base/Payment.php @@ -32,7 +32,7 @@ class Payment extends Controller */ public function index() { - $this->type = input('get.type', 'index'); + $this->type = $this->get['type'] ?? 'index'; BaseUserPayment::mQuery()->layTable(function () { $this->title = '支付通道管理'; }, function (QueryHelper $query) { diff --git a/app/data/controller/base/Slider.php b/app/data/controller/base/Slider.php index f51dadae9..305ef6dc0 100644 --- a/app/data/controller/base/Slider.php +++ b/app/data/controller/base/Slider.php @@ -72,7 +72,7 @@ class Slider extends Controller */ public function edit() { - $this->skey = input('get.type', ''); + $this->skey = $this->get['type'] ?? ''; $this->base = $this->types[$this->skey] ?? []; if (empty($this->base)) $this->error('未配置基础数据!'); $this->number = $this->base['number']; diff --git a/app/data/controller/base/postage/Company.php b/app/data/controller/base/postage/Company.php index 8ff38586a..8f8e60916 100644 --- a/app/data/controller/base/postage/Company.php +++ b/app/data/controller/base/postage/Company.php @@ -25,7 +25,7 @@ class Company extends Controller */ public function index() { - $this->type = input('get.type', 'index'); + $this->type = $this->get['type'] ?? 'index'; BasePostageCompany::mQuery()->layTable(function () { $this->title = '快递公司管理'; }, function (QueryHelper $query) { diff --git a/app/data/controller/base/postage/Template.php b/app/data/controller/base/postage/Template.php index ef7a327fb..f96d2498f 100644 --- a/app/data/controller/base/postage/Template.php +++ b/app/data/controller/base/postage/Template.php @@ -26,7 +26,7 @@ class Template extends Controller */ public function index() { - $this->type = input('get.type', 'index'); + $this->type = $this->get['type'] ?? 'index'; BasePostageTemplate::mQuery()->layTable(function () { $this->title = '快递邮费模板'; }, function (QueryHelper $query) { diff --git a/app/data/controller/news/Item.php b/app/data/controller/news/Item.php index 2cc538aa2..853c71f30 100644 --- a/app/data/controller/news/Item.php +++ b/app/data/controller/news/Item.php @@ -26,7 +26,7 @@ class Item extends Controller */ public function index() { - $this->type = input('get.type', 'index'); + $this->type = $this->get['type'] ?? 'index'; DataNewsItem::mQuery($this->get)->layTable(function () { $this->title = '文章内容管理'; $this->marks = DataNewsMark::items(); diff --git a/app/wechat/controller/Auto.php b/app/wechat/controller/Auto.php index e4188ce61..1640e7814 100644 --- a/app/wechat/controller/Auto.php +++ b/app/wechat/controller/Auto.php @@ -49,7 +49,7 @@ class Auto extends Controller */ public function index() { - $this->type = input('get.type', 'index'); + $this->type = $this->get['type'] ?? 'index'; WechatAuto::mQuery()->layTable(function () { $this->title = '关注自动回复'; }, function (QueryHelper $query) { diff --git a/app/wechat/controller/Keys.php b/app/wechat/controller/Keys.php index dcb88cee9..9233e5d1a 100644 --- a/app/wechat/controller/Keys.php +++ b/app/wechat/controller/Keys.php @@ -60,7 +60,7 @@ class Keys extends Controller $this->error("生成二维码失败,请稍候再试!
{$exception->getMessage()}"); } // 数据列表分页处理 - $this->type = input('get.type', 'index'); + $this->type = $this->get['type'] ?? 'index'; WechatKeys::mQuery()->layTable(function () { $this->title = '回复规则管理'; }, function (QueryHelper $query) {