From 70d392201376e0bd3eb3c096febe119fb5e5937b Mon Sep 17 00:00:00 2001 From: net909 Date: Thu, 22 Jan 2026 21:43:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=B7=BB=E5=8A=A0=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE=E5=A4=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/Domain.php | 3 ++- app/controller/Index.php | 5 ++--- app/lib/DeployHelper.php | 4 +++- app/view/domain/batchadd.html | 6 ++++++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app/controller/Domain.php b/app/controller/Domain.php index 89b1faf..913b55b 100644 --- a/app/controller/Domain.php +++ b/app/controller/Domain.php @@ -837,6 +837,7 @@ class Domain extends BaseController $line = input('post.line', null, 'trim'); $ttl = input('post.ttl/d', 600); $mx = input('post.mx/d', 1); + $remark = input('post.remark', null, 'trim'); $recordlist = explode("\n", $record); if (empty($record) || empty($recordlist)) { @@ -858,7 +859,7 @@ class Domain extends BaseController $arr = explode(' ', $record); if (empty($record) || empty($arr[0]) || empty($arr[1])) continue; $thistype = empty($type) ? getDnsType($arr[1]) : $type; - $recordid = $dns->addDomainRecord($arr[0], $thistype, $arr[1], $line, $ttl, $mx); + $recordid = $dns->addDomainRecord($arr[0], $thistype, $arr[1], $line, $ttl, $mx, null, $remark); if ($recordid) { $this->add_log($drow['name'], '添加解析', $arr[0].' ['.$thistype.'] '.$arr[1].' (线路:'.$line.' TTL:'.$ttl.')'); $success++; diff --git a/app/controller/Index.php b/app/controller/Index.php index 4dfdeb4..8c8b1ba 100644 --- a/app/controller/Index.php +++ b/app/controller/Index.php @@ -54,8 +54,6 @@ class Index extends BaseController if (config('app.dbversion') && config_get('version') != config('app.dbversion')) { $this->db_update(); - config_set('version', config('app.dbversion')); - Cache::clear(); } $tmp = 'version()'; @@ -87,8 +85,9 @@ class Index extends BaseController } catch (Exception $e) { } } + config_set('version', config('app.dbversion')); + Cache::clear(); if(Db::name('account')->count() > 0 && Db::name('account')->whereNotNull('config')->count() == 0) { - Cache::clear(); $accounts = Db::name('account')->select(); foreach ($accounts as $account) { if (!empty($account['config']) || !isset(\app\lib\DnsHelper::$dns_config[$account['type']])) continue; diff --git a/app/lib/DeployHelper.php b/app/lib/DeployHelper.php index 325a74b..61334cb 100644 --- a/app/lib/DeployHelper.php +++ b/app/lib/DeployHelper.php @@ -880,7 +880,9 @@ class DeployHelper sudo visudo
#在文件最后一行增加以下内容,需要将username替换成自己的用户名
username ALL=(ALL) NOPASSWD: NOPASSWD: ALL
-ctrl+x 保存退出', +ctrl+x 保存退出
+sudo mkdir -p /home/<用户名>
+sudo chown -R <用户名>: /home/<用户名>
', 'tasknote' => '系统会根据关联SSL证书的域名,自动更新对应证书', 'inputs' => [ 'host' => [ diff --git a/app/view/domain/batchadd.html b/app/view/domain/batchadd.html index a36599a..5088eea 100644 --- a/app/view/domain/batchadd.html +++ b/app/view/domain/batchadd.html @@ -48,6 +48,12 @@ + {if $dnsconfig.remark == 2}
+ +
+ +
+
{/if}