diff --git a/app/controller/ConsoleController.php b/app/controller/ConsoleController.php index 39faec9..386696c 100644 --- a/app/controller/ConsoleController.php +++ b/app/controller/ConsoleController.php @@ -20,7 +20,14 @@ class ConsoleController extends BaseController { // 加载菜单配置 $menu = \think\facade\Config::load("extendconfig/menu", 'extendconfig'); - return \json($menu); + return json($menu); + } + // 管理菜单 + public function message() + { + // 加载菜单配置 + $message = \Plugin::getNotifyMessage(); + return json($message); } // 首页仪表盘 public function console() diff --git a/extend/Plugin.php b/extend/Plugin.php index 1a8f281..5a064d3 100644 --- a/extend/Plugin.php +++ b/extend/Plugin.php @@ -2,10 +2,9 @@ declare(strict_types=1); -use think\facade\Log; - class Plugin { + private static $siteUrl = 'https://api.zhaidashi.cn'; // 获取全部插件(含本地) public static function getAllPlugins(array $local_plugin = []): array { @@ -50,167 +49,14 @@ class Plugin // 获取平台所有支持插件 public static function getAllPlugin(): array { - $app_plugin = array( - 0 => - array( - 'platform' => 'wxpay', - 'name' => '微信支付', - 'class_name' => 'WxPay', - 'price' => '0.00', - 'describe' => '支持微信个人收款码、赞赏码、经营码、商家码收款,监听回调', - 'website' => 'https://weixin.qq.com/', - 'state' => 0, - 'query' => - array(), - ), - 1 => - array( - 'platform' => 'alipay', - 'name' => '支付宝', - 'class_name' => 'AliPay', - 'price' => '0.00', - 'describe' => '支持支付宝个人收款码、经营码收款,监听回调', - 'website' => 'https://www.alipay.com/', - 'state' => 0, - 'query' => - array(), - ), - 2 => - array( - 'platform' => 'sqbpay', - 'name' => '收钱吧', - 'class_name' => 'ShouQianBa', - 'price' => '49.00', - 'describe' => '主流移动支付全能收 信用卡,花呗都能用,生意帮手收钱吧,移动收款就用它!', - 'website' => 'https://www.shouqianba.com/', - 'state' => 0, - 'query' => - array( - 'date_end' => NULL, - 'date_start' => NULL, - 'page' => 1, - 'page_size' => 10, - 'upayQueryType' => 0, - 'status' => '2000', - 'store_sn' => '', - 'type' => '30', - ), - ), - 3 => - array( - 'platform' => 'storepay', - 'name' => '数字门店', - 'class_name' => 'ZhiHuiJingYing', - 'price' => '49.00', - 'describe' => '数字门店', - 'website' => 'https://store.zhihuijingyingba.com/', - 'state' => 0, - 'query' => - array( - 'pageNo' => 1, - 'pageSize' => 10, - 'payClient' => 4, - 'status' => 2, - '_t' => NULL, - 'createTime_begin' => NULL, - 'createTime_end' => NULL, - ), - ), - 4 => - array( - 'platform' => 'ysepay', - 'name' => '小Y经营', - 'class_name' => 'YsePay', - 'price' => '59.00', - 'describe' => '为商户和消费者提供安全、便捷、高效的支付产品与服务助力商户提升运营效率,实现数字化运营', - 'website' => 'https://xym.ysepay.com/', - 'state' => 0, - 'query' => - array( - 'storeNo' => '', - 'bizType' => 3, - 'payType' => '', - 'orderStatus' => 3, - 'trmNo' => '', - 'operatorUser' => '', - 'codeBoardCode' => '', - 'pageSize' => 10, - 'pageNo' => 1, - 'orderNo' => '', - ), - ), - 5 => - array( - 'platform' => 'mqpay', - 'name' => '码钱', - 'class_name' => 'MaQian', - 'price' => '49.00', - 'describe' => '码钱商管平台', - 'website' => 'https://m.hkrt.cn/', - 'state' => 0, - 'query' => - array( - 'terminalType' => '', - 'payType' => '', - 'payMode' => '', - 'tradeStatus' => '1', - 'tradeNo' => '', - 'storeId' => '', - 'page' => 1, - 'rows' => 10, - 'endDate' => NULL, - 'endTime' => NULL, - 'startDate' => NULL, - 'startTime' => NULL, - ), - ), - 6 => - array( - 'platform' => 'lklpay', - 'name' => '拉卡拉', - 'class_name' => 'LaKaLa', - 'price' => '89.00', - 'describe' => '数字支付,更安全,更高效', - 'website' => 'https://customer.lakala.com/', - 'state' => 0, - 'query' => - array( - 'requestTime' => NULL, - 'systemCode' => 'MERDASH', - 'version' => '1.0', - 'openEntity' => NULL, - 'requestId' => NULL, - 'pageSize' => 10, - 'pageNum' => 1, - 'startTime' => NULL, - 'timeOption' => NULL, - 'tranSts' => 'SUCCESS', - 'orderNo' => NULL, - 'srefno' => NULL, - 'ornNo' => NULL, - 'endTime' => NULL, - 'startDate' => NULL, - 'endDate' => NULL, - 'page' => 1, - 'size' => 10, - 'merchantNos' => NULL, - 'merInnerNos' => NULL, - ), - ), - 7 => - array( - 'platform' => 'sftpay', - 'name' => '盛付通', - 'class_name' => 'ShengPay', - 'price' => '69.00', - 'describe' => '轻松生活 放心支付', - 'website' => 'https://b.shengpay.com/', - 'state' => 0, - 'query' => - array(), - ), - ); - return $app_plugin; + $app_plugin = self::getHttpResponse(self::$siteUrl . '/Mpay/getPlugins'); + return json_decode($app_plugin, true); + } + // 获取通知消息 + public static function getNotifyMessage(): array + { + $message = self::getHttpResponse(self::$siteUrl . '/Mpay/message'); + return json_decode($message, true); } // 请求外部资源 private function getHttpResponse($url, $header = [], $post = null, $timeout = 10) diff --git a/public/admin/data/1.png b/public/admin/data/1.png deleted file mode 100644 index 472ccdd..0000000 Binary files a/public/admin/data/1.png and /dev/null differ diff --git a/public/admin/data/2.png b/public/admin/data/2.png deleted file mode 100644 index 32e375a..0000000 Binary files a/public/admin/data/2.png and /dev/null differ diff --git a/public/admin/data/3.png b/public/admin/data/3.png deleted file mode 100644 index ad9fef0..0000000 Binary files a/public/admin/data/3.png and /dev/null differ diff --git a/public/admin/data/4.png b/public/admin/data/4.png deleted file mode 100644 index 08c20cf..0000000 Binary files a/public/admin/data/4.png and /dev/null differ diff --git a/public/admin/data/5.png b/public/admin/data/5.png deleted file mode 100644 index 3ddf501..0000000 Binary files a/public/admin/data/5.png and /dev/null differ diff --git a/public/admin/data/6.png b/public/admin/data/6.png deleted file mode 100644 index 32bedee..0000000 Binary files a/public/admin/data/6.png and /dev/null differ diff --git a/public/admin/data/7.png b/public/admin/data/7.png deleted file mode 100644 index 65203dc..0000000 Binary files a/public/admin/data/7.png and /dev/null differ diff --git a/public/config/pear.config.json b/public/config/pear.config.json index 32d6442..6f28738 100644 --- a/public/config/pear.config.json +++ b/public/config/pear.config.json @@ -65,6 +65,6 @@ "footer": false }, "header": { - "message": "/admin/data/message.json" + "message": "/Console/message" } } \ No newline at end of file diff --git a/public/config/pear.config.yml b/public/config/pear.config.yml index 07d6fe2..12b8f65 100644 --- a/public/config/pear.config.yml +++ b/public/config/pear.config.yml @@ -79,4 +79,4 @@ other: ## 头部配置 header: ## 站内消息,通过 false 设置关闭 - message: "/admin/data/message.json" \ No newline at end of file + message: "/Console/message" \ No newline at end of file diff --git a/runtime/session/sess_7fe60d5e872e6599bf390679ffcd0220 b/runtime/session/sess_7fe60d5e872e6599bf390679ffcd0220 deleted file mode 100644 index 0bbab66..0000000 --- a/runtime/session/sess_7fe60d5e872e6599bf390679ffcd0220 +++ /dev/null @@ -1 +0,0 @@ -a:5:{s:6:"userid";i:1;s:3:"pid";i:1000;s:8:"nickname";s:12:"勇敢牛牛";s:8:"userrole";i:1;s:7:"islogin";b:1;} \ No newline at end of file