修复阿里云设置权重

This commit is contained in:
net909 2025-06-06 09:49:45 +08:00
parent 6418c3a2ee
commit 5050af2f73
4 changed files with 5 additions and 3 deletions

View File

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

View File

@ -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];

View File

@ -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];

View File

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