diff --git a/crmeb/app/adminapi/controller/v1/system/SystemFile.php b/crmeb/app/adminapi/controller/v1/system/SystemFile.php
index c9fb5b530..76cfc19bf 100644
--- a/crmeb/app/adminapi/controller/v1/system/SystemFile.php
+++ b/crmeb/app/adminapi/controller/v1/system/SystemFile.php
@@ -72,6 +72,29 @@ class SystemFile extends AuthController
return app('json')->success($this->services->opendir());
}
+ //文件备注
+ public function fileMark()
+ {
+ [$path, $fileToken] = $this->request->postMore([
+ ['path', ''],
+ ['fileToken', ''],
+ ], true);
+ if ($path == '') return app('json')->fail(100100);
+ return app('json')->success($this->services->markForm($path, $fileToken));
+ }
+
+ //文件备注保存
+ public function fileMarkSave()
+ {
+ [$full_path, $mark] = $this->request->postMore([
+ ['full_path', ''],
+ ['mark', ''],
+ ], true);
+ if ($full_path == '') return app('json')->fail(100100);
+ $this->services->fileMarkSave($full_path, $mark);
+ return app('json')->success(100000);
+ }
+
//读取文件
public function openfile()
{
diff --git a/crmeb/app/adminapi/route/system.php b/crmeb/app/adminapi/route/system.php
index 9886a78d2..2f448e904 100644
--- a/crmeb/app/adminapi/route/system.php
+++ b/crmeb/app/adminapi/route/system.php
@@ -160,6 +160,10 @@ Route::group('system', function () {
Route::get('file/delFolder', 'v1.system.SystemFile/delFolder')->option(['real_name' => '删除文件夹']);
//重命名文件
Route::get('file/rename', 'v1.system.SystemFile/rename')->option(['real_name' => '重命名文件夹']);
+ //目录文件备注表单
+ Route::get('file/mark', 'v1.system.SystemFile/fileMark')->option(['real_name' => '目录文件备注表单']);
+ //目录文件备注保存
+ Route::post('file/mark/save', 'v1.system.SystemFile/fileMarkSave')->option(['real_name' => '目录文件备注保存']);
})->middleware([
\app\http\middleware\AllowOriginMiddleware::class,
\app\adminapi\middleware\AdminAuthTokenMiddleware::class,
diff --git a/crmeb/app/api/controller/v1/PublicController.php b/crmeb/app/api/controller/v1/PublicController.php
index e820356b2..789189ac3 100644
--- a/crmeb/app/api/controller/v1/PublicController.php
+++ b/crmeb/app/api/controller/v1/PublicController.php
@@ -681,7 +681,11 @@ class PublicController
$data['recharge_switch'] = sys_config('recharge_switch');//小程序充值开关
$data['member_card_status'] = sys_config('member_card_status');//是否开启付费会员
$data['member_price_status'] = sys_config('member_price_status');//商品会员折扣价展示启用
-
+ $data['ali_pay_status'] = (int)sys_config('ali_pay_status');//支付宝是否启用
+ $data['pay_weixin_open'] = (int)sys_config('pay_weixin_open');//微信是否启用
+ $data['yue_pay_status'] = (int)sys_config('yue_pay_status');//余额是否启用
+ $data['offline_pay_status'] = (int)sys_config('offline_pay_status');//线下是否启用
+ $data['friend_pay_status'] = (int)sys_config('friend_pay_status');//好友是否启用
return app('json')->success($data);
}
}
diff --git a/crmeb/app/api/route/v1.php b/crmeb/app/api/route/v1.php
index a8d2c1b73..a87fd31ee 100644
--- a/crmeb/app/api/route/v1.php
+++ b/crmeb/app/api/route/v1.php
@@ -47,6 +47,9 @@ Route::group(function () {
//查询版权
Route::get('copyright', 'v1.PublicController/copyright')->option(['real_name' => '申请版权']);
+ //商城基础配置汇总接口
+ Route::get('basic_config', 'v1.PublicController/getMallBasicConfig')->option(['real_name' => '商城基础配置汇总接口']);
+
})->middleware(\app\http\middleware\AllowOriginMiddleware::class)->middleware(\app\api\middleware\StationOpenMiddleware::class);
diff --git a/crmeb/app/dao/system/log/SystemFileInfoDao.php b/crmeb/app/dao/system/log/SystemFileInfoDao.php
new file mode 100644
index 000000000..3a97d76de
--- /dev/null
+++ b/crmeb/app/dao/system/log/SystemFileInfoDao.php
@@ -0,0 +1,23 @@
+dao = $dao;
+ }
+}
\ No newline at end of file
diff --git a/crmeb/app/services/system/log/SystemFileServices.php b/crmeb/app/services/system/log/SystemFileServices.php
index 2a8600cbd..8990fa77d 100644
--- a/crmeb/app/services/system/log/SystemFileServices.php
+++ b/crmeb/app/services/system/log/SystemFileServices.php
@@ -19,9 +19,11 @@ use crmeb\exceptions\AdminException;
use crmeb\exceptions\AuthException;
use crmeb\services\CacheService;
use crmeb\services\FileService as FileClass;
+use crmeb\services\FormBuilder as Form;
use crmeb\utils\JwtAuth;
use Firebase\JWT\ExpiredException;
use think\facade\Log;
+use think\facade\Route as Url;
/**
* 文件校验
@@ -233,10 +235,10 @@ class SystemFileServices extends BaseServices
//打开目录
public function opendir()
{
+ $markList = app()->make(SystemFileInfoServices::class)->getColumn([], 'mark', 'full_path');
$fileAll = array('dir' => [], 'file' => []);
//根目录
$rootdir = $this->formatPath(app()->getRootPath());
-// return $rootdir;
//当前目录
$request_dir = app('request')->param('dir');
//防止查看站点以外的目录
@@ -285,6 +287,7 @@ class SystemFileServices extends BaseServices
$navList[$key]['isDir'] = $value['isDir'];
$navList[$key]['pathname'] = $value['pathname'];
$navList[$key]['contextmenu'] = true;
+ $list[$key]['mark'] = $markList[str_replace(root_path(), '/', $value['pathname'])] ?? '';
}
return compact('dir', 'list', 'navList');
}
@@ -426,11 +429,46 @@ class SystemFileServices extends BaseServices
$path = rtrim($path, DS);
if ($name) $path = $path . DS . $name;
$uname = php_uname('s');
-// $search = '/';
if (strstr($uname, 'Windows') !== false)
$path = ltrim(str_replace('\\', '\\\\', $path), '.');
}
return $path;
}
+
+ /**
+ * 文件备注表单
+ * @param $path
+ * @param $fileToken
+ * @return array
+ * @throws \FormBuilder\Exception\FormBuilderException
+ * @author 吴汐
+ * @email 442384644@qq.com
+ * @date 2023/04/10
+ */
+ public function markForm($path, $fileToken)
+ {
+ $full_path = str_replace(root_path(), '/', $path);
+ $mark = app()->make(SystemFileInfoServices::class)->value(['full_path' => str_replace(root_path(), '/', $path)], 'mark');
+ $f = [];
+ $f[] = Form::hidden('full_path', $full_path);
+ $f[] = Form::input('mark', '文件备注', $mark);
+ return create_form('文件备注', $f, Url::buildUrl('/system/file/mark/save?fileToken=' . $fileToken . '&type=mark'), 'POST');
+ }
+
+ /**
+ * 保存文件备注
+ * @param $full_path
+ * @param $mark
+ * @author 吴汐
+ * @email 442384644@qq.com
+ * @date 2023/04/10
+ */
+ public function fileMarkSave($full_path, $mark)
+ {
+ $res = app()->make(SystemFileInfoServices::class)->update(['full_path' => $full_path], ['mark' => $mark]);
+ if (!$res) {
+ throw new AdminException(100006);
+ }
+ }
}
diff --git a/template/admin/src/api/system.js b/template/admin/src/api/system.js
index 71e195d72..2d35ac521 100644
--- a/template/admin/src/api/system.js
+++ b/template/admin/src/api/system.js
@@ -404,6 +404,21 @@ export function delFolder(params) {
});
}
+/**
+ * 文件备注
+ * @param {*} id
+ * @param {*} params
+ * @returns
+ */
+ export function fileMark(params) {
+ return request({
+ url: `system/file/mark`,
+ method: 'get',
+ params,
+ file_edit: true,
+ });
+}
+
/**
* @description 安全维护 -- 更换域名
*/
diff --git a/template/admin/src/pages/system/maintain/systemFile/opendir.vue b/template/admin/src/pages/system/maintain/systemFile/opendir.vue
index a79f57d09..17158da7f 100644
--- a/template/admin/src/pages/system/maintain/systemFile/opendir.vue
+++ b/template/admin/src/pages/system/maintain/systemFile/opendir.vue
@@ -27,6 +27,8 @@
打开
编辑
+
+ 备注
@@ -144,6 +146,7 @@ import {
createFile,
delFolder,
rename,
+ fileMark,
} from '@/api/system';
import CodeMirror from 'codemirror/lib/codemirror';
import loginFrom from './components/loginFrom';
@@ -200,16 +203,16 @@ export default {
key: 'size',
minWidth: 100,
},
- {
- title: '是否可写',
- slot: 'isWritable',
- minWidth: 100,
- },
{
title: '更新时间',
key: 'mtime',
minWidth: 150,
},
+ {
+ title: '备注',
+ key: 'mark',
+ minWidth: 150,
+ },
{
title: '操作',
slot: 'action',
@@ -348,6 +351,17 @@ export default {
}
this.openfile(row.pathname, false);
},
+ /**
+ * 备注
+ */
+ mark(row) {
+ this.$modalForm(
+ fileMark({
+ path: row.pathname,
+ fileToken: this.fileToken,
+ }),
+ ).then(() => this.getList(true, false));
+ },
/**
* 保存
* @param {Object} index // 当前索引
@@ -836,237 +850,341 @@ export default {
}