Initial project files: BESCMS full source

This commit is contained in:
bes
2026-08-13 23:37:46 +08:00
parent fa6cddb540
commit 2e26f85723
2166 changed files with 396625 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
<?php
return [
'type' => 'app',
'name' => '支付',
'author' => '迅睿云软件',
'icon' => 'fa fa-rmb',
];
+11
View File
@@ -0,0 +1,11 @@
<?php
if (!method_exists(\Phpcmf\Service::M('table'), 'install_schema')) {
return dr_return_data(0, '请先升级迅睿系统后再安装本插件');
}
//if (!dr_is_app('member')) {
//return dr_return_data(0, '需要先安装官方版的<用户系统>插件');
//}
return dr_return_data(1, 'ok');
+14
View File
@@ -0,0 +1,14 @@
<?php
/**
* 缓存参数配置
*
* 模型名称 => 项目目录
*
**/
return [
//'模型文件名',
];
+16
View File
@@ -0,0 +1,16 @@
<?php
// 3天清理一次系统缓存
if (!is_file(WRITEPATH.'config/run_auto_pay_time.php')) {
$time = SYS_TIME;
file_put_contents(WRITEPATH.'config/run_auto_pay_time.php', $time);
} else {
$time = file_get_contents(WRITEPATH.'config/run_auto_pay_time.php');
}
// 3天清理一次系统缓存
if (SYS_TIME - $time > 3600 * 24 * 3) {
// 未付款的清理
\Phpcmf\Service::M('pay', 'pay')->clear_paylog();
file_put_contents(WRITEPATH.'config/run_auto_pay_time.php', SYS_TIME);
}
+13
View File
@@ -0,0 +1,13 @@
<?php
/**
* CSRF过滤白名单
*/
return [
'home' => [
'pay/home/ajax'
],
];
+49
View File
@@ -0,0 +1,49 @@
<?php
$rt = \Phpcmf\Service::M('table')->install_schema([
'tables' => [
'member_setting' => [
'comment' => '用户属性参数表',
'fields' => [
'name' => 'varchar(50) NOT NULL',
'value' => 'mediumtext NOT NULL',
],
'indexes' => [
'PRIMARY KEY (`name`)',
],
],
'member_paylog' => [
'comment' => '用户支付记录表',
'fields' => [
'id' => 'bigint(18) unsigned NOT NULL AUTO_INCREMENT',
'site' => 'int(10) NOT NULL COMMENT \'站点\'',
'mid' => 'varchar(100) NOT NULL COMMENT \'支付标识\'',
'uid' => 'int(10) unsigned NOT NULL COMMENT \'付款人\'',
'touid' => 'int(10) unsigned DEFAULT 0 COMMENT \'收款人\'',
'title' => 'varchar(255) NOT NULL COMMENT \'支付标题\'',
'url' => 'varchar(255) NOT NULL COMMENT \'相关链接\'',
'value' => 'decimal(10,2) NOT NULL COMMENT \'支付金额\'',
'money' => 'decimal(10,2) NOT NULL COMMENT \'余额\'',
'type' => 'varchar(20) NOT NULL COMMENT \'支付方式\'',
'status' => 'tinyint(1) unsigned NOT NULL COMMENT \'支付状态\'',
'result' => 'text NOT NULL COMMENT \'支付结果\'',
'paytime' => 'int(10) unsigned NOT NULL COMMENT \'支付时间\'',
'inputtime' => 'int(10) unsigned NOT NULL COMMENT \'创建时间\'',
],
'indexes' => [
'PRIMARY KEY (`id`)',
'KEY `uid` (`uid`)',
'KEY `touid` (`touid`)',
'KEY `mid` (`mid`)',
'KEY `status` (`status`)',
'KEY `value` (`value`)',
'KEY `paytime` (`paytime`)',
'KEY `inputtime` (`inputtime`)',
],
],
],
'seeds' => [],
]);
if (empty($rt['code'])) {
log_message('error', 'Pay install_schema: '.($rt['msg'] ?? ''));
return dr_return_data(0, dr_lang('安装失败').''.($rt['msg'] ?? ''));
}
View File
+95
View File
@@ -0,0 +1,95 @@
<?php
/**
* 菜单配置
*/
return [
'admin' => [
'app-pay' => [
'name' => '支付',
'icon' => 'fa fa-rmb',
'left' => [
'app-pay-list' => [
'name' => '支付管理',
'icon' => 'fa fa-rmb',
'link' => [
[
'name' => '已付流水',
'icon' => 'fa fa-calendar-check-o',
'uri' => 'pay/paylog/index',
'displayorder' => '-1',
],
[
'name' => '未付流水',
'icon' => 'fa fa-calendar-times-o',
'uri' => 'pay/paylog/not_index',
'displayorder' => '-1',
],
[
'name' => '后台充值',
'icon' => 'fa fa-plus',
'uri' => 'pay/pay/index',
'displayorder' => '-1',
],
]
],
'app-config-pay' => [
'name' => '支付设置',
'icon' => 'fa fa-rmb',
'link' => [
[
'name' => '支付设置',
'icon' => 'fa fa-cog',
'uri' => 'pay/payconfig/index',
],
[
'name' => '支付接口',
'icon' => 'fa fa-code',
'uri' => 'pay/payapi/index',
],
],
],
],
],
],
'member' => [
'app-pay' => [
'name' => '支付管理',
'icon' => 'fa fa-rmb',
'link' => [
[
'name' => '在线充值',
'icon' => 'fa fa-rmb',
'uri' => 'pay/recharge/index',
'displayorder' => '-1',
],
[
'name' => '我的交易',
'icon' => 'fa fa-calendar',
'uri' => 'pay/paylog/index',
'displayorder' => '-1',
],
],
],
],
];
+20
View File
@@ -0,0 +1,20 @@
<?php
/**
* https://www.besyun.com
* BESCMS
* 本文件是框架系统文件,二次开发时不可以修改本文件
**/
/**
* 通知动作注册配置
*
* 动作字符 => 动作名称
*
**/
return [
'pay_success' => '前台充值/付款',
'pay_admin' => '后台管理员充值',
];
+4
View File
@@ -0,0 +1,4 @@
<?php
// 加载主程序的路由
require COREPATH.'Config/Routes.php';
+2
View File
@@ -0,0 +1,2 @@
<?php
\Phpcmf\Service::M('table')->drop_table(\Phpcmf\Service::M()->dbprefix('member_paylog'), true);
View File
+12
View File
@@ -0,0 +1,12 @@
<?php
/**
* 更新数据结构
**/
$table = \Phpcmf\Service::M()->dbprefix('member_paylog');
if (\Phpcmf\Service::M()->is_table_exists($table)) {
if (!\Phpcmf\Service::M()->is_field_exists($table, 'money')) {
\Phpcmf\Service::M('table')->add_field($table, 'money', 'decimal(10,2)', 'NOT NULL', '余额');
}
}
+13
View File
@@ -0,0 +1,13 @@
<?php
return [
'id' => '777',
'vip' => '',
'cms' => '4.7.3',
'version' => '2.5',
'license' => '375C71349B295FBE2DCDCA9206F20A1703',
'updatetime' => '2026-08-04 07:49:13',
'downtime' => '2026-08-08 00:54:28',
];