From 646ccde5fae038fb42204030eb41b7a769bbf422 Mon Sep 17 00:00:00 2001
From: wolfcode <37436228+wolf-leo@users.noreply.github.com>
Date: Sun, 19 Nov 2023 11:16:13 +0800
Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8C=96Textarea=E5=86=99=E6=B3=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/admin/view/mall/goods/add.html | 6 +-----
app/admin/view/mall/goods/edit.html | 6 +-----
app/common.php | 21 ++++++++++++++++++---
3 files changed, 20 insertions(+), 13 deletions(-)
diff --git a/app/admin/view/mall/goods/add.html b/app/admin/view/mall/goods/add.html
index 7b6e39e..e76d973 100644
--- a/app/admin/view/mall/goods/add.html
+++ b/app/admin/view/mall/goods/add.html
@@ -61,11 +61,7 @@
diff --git a/app/admin/view/mall/goods/edit.html b/app/admin/view/mall/goods/edit.html
index c13b7a8..832d1b2 100644
--- a/app/admin/view/mall/goods/edit.html
+++ b/app/admin/view/mall/goods/edit.html
@@ -62,11 +62,7 @@
diff --git a/app/common.php b/app/common.php
index 421e679..5c8bb6c 100644
--- a/app/common.php
+++ b/app/common.php
@@ -40,12 +40,12 @@ if (!function_exists('xdebug')) {
/**
* debug调试
- * @deprecated 不建议使用,建议直接使用框架自带的log组件
* @param string|array $data 打印信息
* @param string $type 类型
* @param string $suffix 文件后缀名
* @param bool $force
* @param null $file
+ * @deprecated 不建议使用,建议直接使用框架自带的log组件
*/
function xdebug($data, $type = 'xdebug', $suffix = null, $force = false, $file = null)
{
@@ -74,7 +74,7 @@ if (!function_exists('sysconfig')) {
if (empty($value)) {
if (!empty($name)) {
$where['name'] = $name;
- $value = \app\admin\model\SystemConfig::where($where)->value('value');
+ $value = \app\admin\model\SystemConfig::where($where)->value('value');
Cache::tag('sysconfig')->set("sysconfig_{$group}_{$name}", $value, 3600);
} else {
$value = \app\admin\model\SystemConfig::where($where)->column('value', 'name');
@@ -117,8 +117,23 @@ if (!function_exists('auth')) {
function auth($node = null)
{
$authService = new AuthService(session('admin.id'));
- $check = $authService->checkNode($node);
+ $check = $authService->checkNode($node);
return $check;
}
+ /**
+ * @param $row
+ * @param string $name
+ * @param string $placeholder
+ * @return string
+ */
+ function editor_textarea($row, string $name = 'desc', string $placeholder = '请输入'): string
+ {
+ $editor_type = sysconfig('site', 'editor_type');
+ $detail = $row[$name] ?? '';
+ return match ($editor_type) {
+ 'ckeditor' => "",
+ default => "",
+ };
+ }
}
\ No newline at end of file