mirror of
https://gitee.com/technical-laohu/mpay.git
synced 2025-09-20 18:56:39 +08:00
插件管理更新
This commit is contained in:
parent
27ffbebed7
commit
5ba4dfdc6c
8
.env
8
.env
@ -2,11 +2,11 @@ APP_DEBUG = true
|
||||
|
||||
DB_TYPE = mysql
|
||||
DB_HOST = 127.0.0.1
|
||||
DB_NAME = mpay
|
||||
DB_USER = admin
|
||||
DB_PASS = Aa123456
|
||||
DB_NAME = test1
|
||||
DB_USER = a1
|
||||
DB_PASS = 123456
|
||||
DB_PORT = 3306
|
||||
DB_CHARSET = utf8
|
||||
DB_CHARSET = utf8mb4
|
||||
DB_PREFIX = mpay_
|
||||
|
||||
DEFAULT_LANG = zh-cn
|
@ -11,7 +11,6 @@ class PluginController extends BaseController
|
||||
// 获取插件列表
|
||||
public function getPluginList()
|
||||
{
|
||||
|
||||
$local_plugin_config = self::getPluginConfig();
|
||||
$plugin_config = \Plugin::getPluginList($local_plugin_config);
|
||||
if ($plugin_config) {
|
||||
|
@ -50,119 +50,5 @@ return array (
|
||||
'store_sn' => '',
|
||||
'type' => '30',
|
||||
),
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'platform' => 'storepay',
|
||||
'name' => '数字门店',
|
||||
'class_name' => 'ZhiHuiJingYing',
|
||||
'price' => '49.00',
|
||||
'describe' => '数字门店',
|
||||
'website' => 'https://store.zhihuijingyingba.com/',
|
||||
'state' => 1,
|
||||
'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 (
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
@ -2,9 +2,47 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use think\facade\Log;
|
||||
|
||||
class Plugin
|
||||
{
|
||||
public static function getPluginList(): array
|
||||
public static function getPluginList(array $local_plugin = []): array
|
||||
{
|
||||
$app_plugin = [];
|
||||
$app_plugin_all = self::getAllPlugin();
|
||||
$local_plugin = self::getInstall($local_plugin);
|
||||
$plugin_uninstall = self::getUninstall($app_plugin_all, $local_plugin);
|
||||
$app_plugin = array_merge($local_plugin, $plugin_uninstall);
|
||||
return $app_plugin;
|
||||
}
|
||||
// 获取已安装插件
|
||||
public static function getInstall(array $local_plugin = []): array
|
||||
{
|
||||
foreach ($local_plugin as $key => $value) {
|
||||
$local_plugin[$key]['install'] = true;
|
||||
}
|
||||
return $local_plugin;
|
||||
}
|
||||
// 获取未安装插件
|
||||
public static function getUninstall(array $app_plugin = [], array $local_plugin = []): array
|
||||
{
|
||||
$uninstall_plugin = [];
|
||||
$install = [];
|
||||
foreach ($local_plugin as $e_val) {
|
||||
$install[] = $e_val['platform'];
|
||||
}
|
||||
foreach ($app_plugin as $i_val) {
|
||||
if (in_array($i_val['platform'], $install)) {
|
||||
continue;
|
||||
}
|
||||
$val = $i_val;
|
||||
$val['install'] = false;
|
||||
$uninstall_plugin[] = $val;
|
||||
}
|
||||
return $uninstall_plugin;
|
||||
}
|
||||
// 获取平台所有支持插件
|
||||
public static function getAllPlugin(): array
|
||||
{
|
||||
$app_plugin = array(
|
||||
0 =>
|
||||
@ -168,12 +206,6 @@ class Plugin
|
||||
);
|
||||
return $app_plugin;
|
||||
}
|
||||
public static function getUnInstall(array $local_plugin_config = []): array
|
||||
{
|
||||
$plugin = self::getPluginList();
|
||||
$plugin_UnInst = [];
|
||||
return $plugin_UnInst;
|
||||
}
|
||||
// 请求外部资源
|
||||
private function getHttpResponse($url, $header = [], $post = null, $timeout = 10)
|
||||
{
|
||||
|
1
runtime/install.lock
Normal file
1
runtime/install.lock
Normal file
@ -0,0 +1 @@
|
||||
1732883162
|
83
runtime/log/202411/29.log
Normal file
83
runtime/log/202411/29.log
Normal file
File diff suppressed because one or more lines are too long
1
runtime/session/sess_7fe60d5e872e6599bf390679ffcd0220
Normal file
1
runtime/session/sess_7fe60d5e872e6599bf390679ffcd0220
Normal file
@ -0,0 +1 @@
|
||||
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;}
|
@ -76,6 +76,7 @@
|
||||
page: true,
|
||||
skin: 'line',
|
||||
cols: cols,
|
||||
where: { show: 1 },
|
||||
className: 'header-th',
|
||||
toolbar: '#plugin-toolbar',
|
||||
defaultToolbar: [{ title: '刷新', layEvent: 'refresh', icon: 'layui-icon-refresh' }]
|
||||
|
Loading…
Reference in New Issue
Block a user