From 5050af2f7360c1e59d31b881e2faaa5acf408baa Mon Sep 17 00:00:00 2001 From: net909 Date: Fri, 6 Jun 2025 09:49:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=98=BF=E9=87=8C=E4=BA=91?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=9D=83=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/Domain.php | 2 +- app/service/CertDeployService.php | 2 +- app/service/CertOrderService.php | 2 +- app/view/domain/weight.html | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/controller/Domain.php b/app/controller/Domain.php index 85ef6c2..14e616d 100644 --- a/app/controller/Domain.php +++ b/app/controller/Domain.php @@ -990,7 +990,7 @@ class Domain extends BaseController return json(['code' => -1, 'msg' => '参数不能为空']); } $dns = DnsHelper::getModel($drow['aid'], $drow['name'], $drow['thirdid']); - if ($dns->setWeightStatus($subdomain, $status, $type, $line)) { + if ($type == 'CNAME' || $dns->setWeightStatus($subdomain, $status, $type, $line)) { if ($status == '1') { $success = 0; foreach($weight as $recordid => $weight) { diff --git a/app/service/CertDeployService.php b/app/service/CertDeployService.php index 2791778..3140641 100644 --- a/app/service/CertDeployService.php +++ b/app/service/CertDeployService.php @@ -89,7 +89,7 @@ class CertDeployService private function saveResult($status, $error = null, $retrytime = null) { $this->task['status'] = $status; - if (mb_strlen($error) > 300) { + if (!empty($error) && strlen($error) > 300) { $error = mb_strcut($error, 0, 300); } $update = ['status' => $status, 'error' => $error, 'retrytime' => $retrytime]; diff --git a/app/service/CertOrderService.php b/app/service/CertOrderService.php index a136949..e532b89 100644 --- a/app/service/CertOrderService.php +++ b/app/service/CertOrderService.php @@ -178,7 +178,7 @@ class CertOrderService private function saveResult($status, $error = null, $retrytime = null) { $this->order['status'] = $status; - if (mb_strlen($error) > 300) { + if (!empty($error) && strlen($error) > 300) { $error = mb_strcut($error, 0, 300); } $update = ['status' => $status, 'error' => $error, 'updatetime' => date('Y-m-d H:i:s'), 'retrytime' => $retrytime]; diff --git a/app/view/domain/weight.html b/app/view/domain/weight.html index 538f13f..02c592e 100644 --- a/app/view/domain/weight.html +++ b/app/view/domain/weight.html @@ -156,6 +156,8 @@ function editframe(id){ $("#form-store input[name=id]").val(id); $("#form-store input[name=subdomain]").val(row.SubDomain); $("#form-store input[name=type]").val(row.Type); + if(row.Type == 'CNAME') $("#weight-switch").prop("disabled", true); + else $("#weight-switch").prop("disabled", false); lineList = []; $.each(recordLine, function(i, item){