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){