mirror of
https://github.com/netcccyun/dnsmgr.git
synced 2026-02-21 15:31:12 +08:00
修复批量操作证书和部署任务
This commit is contained in:
parent
3c00e426cc
commit
479af4fe5f
@ -458,7 +458,7 @@ class Cert extends BaseController
|
||||
$ids = input('post.ids');
|
||||
$success = 0;
|
||||
foreach ($ids as $id) {
|
||||
if (input('post.action') == 'delete') {
|
||||
if (input('post.act') == 'delete') {
|
||||
$dcount = DB::name('cert_deploy')->where('oid', $id)->count();
|
||||
if ($dcount > 0) continue;
|
||||
try {
|
||||
@ -468,7 +468,7 @@ class Cert extends BaseController
|
||||
Db::name('cert_order')->where('id', $id)->delete();
|
||||
Db::name('cert_domain')->where('oid', $id)->delete();
|
||||
$success++;
|
||||
} elseif (input('post.action') == 'reset') {
|
||||
} elseif (input('post.act') == 'reset') {
|
||||
try {
|
||||
$service = new CertOrderService($id);
|
||||
$service->cancel();
|
||||
@ -476,8 +476,8 @@ class Cert extends BaseController
|
||||
$success++;
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
} elseif (input('post.action') == 'open' || input('post.action') == 'close') {
|
||||
$isauto = input('post.action') == 'open' ? 1 : 0;
|
||||
} elseif (input('post.act') == 'open' || input('post.act') == 'close') {
|
||||
$isauto = input('post.act') == 'open' ? 1 : 0;
|
||||
Db::name('cert_order')->where('id', $id)->update(['isauto' => $isauto]);
|
||||
$success++;
|
||||
}
|
||||
@ -754,21 +754,21 @@ class Cert extends BaseController
|
||||
if (!$cert) return json(['code' => -1, 'msg' => '证书订单不存在']);
|
||||
}
|
||||
foreach ($ids as $id) {
|
||||
if (input('post.action') == 'delete') {
|
||||
if (input('post.act') == 'delete') {
|
||||
Db::name('cert_deploy')->where('id', $id)->delete();
|
||||
$success++;
|
||||
} elseif (input('post.action') == 'reset') {
|
||||
} elseif (input('post.act') == 'reset') {
|
||||
try {
|
||||
$service = new CertDeployService($id);
|
||||
$service->reset();
|
||||
$success++;
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
} elseif (input('post.action') == 'open' || input('post.action') == 'close') {
|
||||
$active = input('post.action') == 'open' ? 1 : 0;
|
||||
} elseif (input('post.act') == 'open' || input('post.act') == 'close') {
|
||||
$active = input('post.act') == 'open' ? 1 : 0;
|
||||
Db::name('cert_deploy')->where('id', $id)->update(['active' => $active]);
|
||||
$success++;
|
||||
} elseif (input('post.action') == 'cert') {
|
||||
} elseif (input('post.act') == 'cert') {
|
||||
Db::name('cert_deploy')->where('id', $id)->update(['oid' => $certid]);
|
||||
$success++;
|
||||
}
|
||||
|
||||
@ -454,7 +454,7 @@ function operation(action){
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
url : '/cert/order/operation',
|
||||
data : {action: action, ids: ids},
|
||||
data : {act: action, ids: ids},
|
||||
dataType : 'json',
|
||||
success : function(data) {
|
||||
layer.close(ii);
|
||||
|
||||
@ -317,7 +317,7 @@ function operation(action){
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
url : '/cert/deploy/operation',
|
||||
data : {action: action, ids: ids},
|
||||
data : {act: action, ids: ids},
|
||||
dataType : 'json',
|
||||
success : function(data) {
|
||||
layer.close(ii);
|
||||
@ -337,7 +337,7 @@ function batch_set_cert(ids){
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
url : '/cert/deploy/operation',
|
||||
data : {action: 'cert', ids: ids, certid: text},
|
||||
data : {act: 'cert', ids: ids, certid: text},
|
||||
dataType : 'json',
|
||||
success : function(data) {
|
||||
layer.close(ii);
|
||||
|
||||
24
composer.lock
generated
24
composer.lock
generated
@ -1507,16 +1507,16 @@
|
||||
},
|
||||
{
|
||||
"name": "topthink/think-orm",
|
||||
"version": "v4.0.45",
|
||||
"version": "v4.0.46",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/top-think/think-orm.git",
|
||||
"reference": "ea2e627af7306f7714e4baafc70943cad954cc77"
|
||||
"reference": "4bb0a5679a97db8de1c0eb02bbbe179cb3afd901"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/top-think/think-orm/zipball/ea2e627af7306f7714e4baafc70943cad954cc77",
|
||||
"reference": "ea2e627af7306f7714e4baafc70943cad954cc77",
|
||||
"url": "https://api.github.com/repos/top-think/think-orm/zipball/4bb0a5679a97db8de1c0eb02bbbe179cb3afd901",
|
||||
"reference": "4bb0a5679a97db8de1c0eb02bbbe179cb3afd901",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1561,9 +1561,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/top-think/think-orm/issues",
|
||||
"source": "https://github.com/top-think/think-orm/tree/v4.0.45"
|
||||
"source": "https://github.com/top-think/think-orm/tree/v4.0.46"
|
||||
},
|
||||
"time": "2025-06-24T00:00:32+00:00"
|
||||
"time": "2025-06-26T06:05:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "topthink/think-template",
|
||||
@ -1727,16 +1727,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/var-dumper",
|
||||
"version": "v7.3.0",
|
||||
"version": "v7.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/var-dumper.git",
|
||||
"reference": "548f6760c54197b1084e1e5c71f6d9d523f2f78e"
|
||||
"reference": "6e209fbe5f5a7b6043baba46fe5735a4b85d0d42"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/548f6760c54197b1084e1e5c71f6d9d523f2f78e",
|
||||
"reference": "548f6760c54197b1084e1e5c71f6d9d523f2f78e",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/6e209fbe5f5a7b6043baba46fe5735a4b85d0d42",
|
||||
"reference": "6e209fbe5f5a7b6043baba46fe5735a4b85d0d42",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1791,7 +1791,7 @@
|
||||
"dump"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/var-dumper/tree/v7.3.0"
|
||||
"source": "https://github.com/symfony/var-dumper/tree/v7.3.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1807,7 +1807,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-04-27T18:39:23+00:00"
|
||||
"time": "2025-06-27T19:55:54+00:00"
|
||||
},
|
||||
{
|
||||
"name": "topthink/think-trace",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user