作者 lyh

gx

@@ -37,95 +37,88 @@ class DomainInfoController extends BaseController @@ -37,95 +37,88 @@ class DomainInfoController extends BaseController
37 37
38 38
39 /** 39 /**
40 - * 添加域名  
41 - * @param DomainInfoRequest $domainInfoRequest  
42 - * @param DomainInfoLogic $domainInfoLogic  
43 - * @return void  
44 - * @throws AsideGlobalException  
45 - * @throws BsideGlobalException 40 + * @remark :保存域名
  41 + * @name :save
  42 + * @author :lyh
  43 + * @method :post
  44 + * @time :2023/8/1 15:36
46 */ 45 */
47 - public function add(DomainInfoRequest $domainInfoRequest, DomainInfoLogic $domainInfoLogic) 46 + public function save(DomainInfoLogic $domainInfoLogic)
48 { 47 {
49 - $domainInfoRequest->validated();  
50 - $domainInfoLogic->create();  
51 - $this->response('域名添加成功!'); 48 + $this->verifyParam();
  49 + $domainInfoLogic->saveDomain();
  50 + $this->response('success');
52 } 51 }
53 52
54 /** 53 /**
55 - * 编辑域名  
56 - * @param DomainInfoRequest $domainInfoRequest  
57 - * @param DomainInfoLogic $domainInfoLogic  
58 - * @return void  
59 - * @throws AsideGlobalException  
60 - * @throws BsideGlobalException 54 + * @remark :验证字段
  55 + * @name :verifyParam
  56 + * @author :lyh
  57 + * @method :post
  58 + * @time :2023/8/1 15:32
61 */ 59 */
62 - public function edit(DomainInfoRequest $domainInfoRequest, DomainInfoLogic $domainInfoLogic)  
63 - {  
64 - $domainInfoRequest->validate([  
65 - 'id' => 'required|integer'  
66 - ], [  
67 - 'id.required' => 'id不能为空',  
68 - 'id.integer' => 'id参数错误' 60 + public function verifyParam(){
  61 + $this->request->validate([
  62 + 'domain'=>'required',
  63 + 'remark'=>'required',
  64 + 'company'=>'required',
  65 + 'belong_to'=>'required',
  66 + ],[
  67 + 'domain.required' => 'domain不能为空',
  68 + 'remark.required' => '备注不能为空',
  69 + 'company.required' => '所属项目不能为空',
  70 + 'belong_to.required' => '域名不能为空'
69 ]); 71 ]);
70 - $domainInfoLogic->update();  
71 - $this->response('域名修改成功!'); 72 + return true;
72 } 73 }
73 74
74 - /**  
75 - * 删除  
76 - * @param DomainInfoLogic $domainInfoLogic  
77 - * @return void  
78 - * @throws AsideGlobalException  
79 - * @throws BsideGlobalException  
80 - */  
81 - public function delete(DomainInfoLogic $domainInfoLogic)  
82 - {  
83 - $domainInfoLogic->get_batch_update();  
84 - $this->response('域名删除成功!'); 75 + public function info(DomainInfoLogic $domainInfoLogic){
  76 + $this->request->validate([
  77 + 'id'=>'required',
  78 + ],[
  79 + 'id.required' => 'id不能为空',
  80 + ]);
  81 + $info = $domainInfoLogic->infoDomain();
  82 + $this->response('success',Code::SUCCESS,$info);
85 } 83 }
86 84
87 /** 85 /**
88 - * 恢复数据  
89 - * @param DomainInfoLogic $domainInfoLogic  
90 - * @return void  
91 - * @throws AsideGlobalException  
92 - * @throws BsideGlobalException 86 + * @remark :修改状态
  87 + * @name :status
  88 + * @author :lyh
  89 + * @method :post
  90 + * @time :2023/8/1 15:47
93 */ 91 */
94 - public function restore(DomainInfoLogic $domainInfoLogic)  
95 - {  
96 - $domainInfoLogic->get_batch_update(DomainInfoLog::ACTION_RECOVER, DomainInfo::DELETED_DELETE);  
97 - $this->response('域名恢复成功!'); 92 + public function status(DomainInfoLogic $domainInfoLogic){
  93 + $this->request->validate([
  94 + 'id'=>'required',
  95 + 'status'=>'required'
  96 + ],[
  97 + 'id.required' => 'id不能为空',
  98 + 'status.required' => 'id不能为空'
  99 + ]);
  100 + $domainInfoLogic->editDomainStatus();
  101 + $this->response('success');
98 } 102 }
99 103
100 /** 104 /**
101 - * 域名信息  
102 - * @param int $deleted  
103 - * @return JsonResponse  
104 - * @throws AsideGlobalException  
105 - * @throws BsideGlobalException  
106 - * @throws ContainerExceptionInterface  
107 - * @throws NotFoundExceptionInterface 105 + * @remark :删除域名
  106 + * @name :del
  107 + * @author :lyh
  108 + * @method :post
  109 + * @time :2023/8/1 15:38
108 */ 110 */
109 - public function info(int $deleted = DomainInfo::DELETED_NORMAL)  
110 - {  
111 - $domainInfoLogic = new DomainInfoLogic();  
112 - $data = $domainInfoLogic->domainInfo($deleted);  
113 - if (!$data) {  
114 - return $this->response('域名信息不存在', Code::USER_ERROR);  
115 - }  
116 - return $this->success($data->toArray()); 111 + public function del(DomainInfoLogic $domainInfoLogic){
  112 + $this->request->validate([
  113 + 'id'=>'required',
  114 + ],[
  115 + 'id.required' => 'id不能为空',
  116 + ]);
  117 + $domainInfoLogic->delDomain();
  118 + $this->response('success');
117 } 119 }
118 120
119 - /**  
120 - * 获取软删除域名信息  
121 - * @return JsonResponse  
122 - * @throws AsideGlobalException  
123 - * @throws BsideGlobalException  
124 - * @throws ContainerExceptionInterface  
125 - * @throws NotFoundExceptionInterface  
126 - */  
127 - public function getDeleteDomainInfo()  
128 - {  
129 - return $this->info(DomainInfo::DELETED_DELETE);  
130 - } 121 +
  122 +
  123 +
131 } 124 }
@@ -19,240 +19,100 @@ use Illuminate\Support\Facades\DB; @@ -19,240 +19,100 @@ use Illuminate\Support\Facades\DB;
19 19
20 class DomainInfoLogic extends BaseLogic 20 class DomainInfoLogic extends BaseLogic
21 { 21 {
22 - /**  
23 - * @var array  
24 - */  
25 - private $param;  
26 22
27 public function __construct() 23 public function __construct()
28 { 24 {
29 parent::__construct(); 25 parent::__construct();
30 - 26 + $this->model = new DomainInfo();
31 $this->param = $this->requestAll; 27 $this->param = $this->requestAll;
32 28
33 } 29 }
34 30
35 /** 31 /**
36 - * 添加数据  
37 - * @return array  
38 - * @throws AsideGlobalException  
39 - * @throws BsideGlobalException 32 + * @remark :保存域名
  33 + * @name :createDomain
  34 + * @author :lyh
  35 + * @method :post
  36 + * @time :2023/8/1 14:52
40 */ 37 */
41 - public function create() 38 + public function saveDomain()
42 { 39 {
43 - $request = $this->param ?? [];  
44 - if ($this->checkDomain($request['domain'])) {  
45 - return $this->fail('域名已存在!'); 40 + //验证域名
  41 + $this->verifyDomain($this->param['domain'],isset($this->param['id']) ?? '');
  42 + if(isset($this->param['id']) && !empty($this->param['id'])){
  43 + $rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
  44 + }else{
  45 + $rs = $this->model->add($this->param);
46 } 46 }
47 - $domain = new DomainInfo();  
48 - $this->extracted($request, $domain, $domain->FieldsArray());  
49 - DB::beginTransaction();  
50 - if ($domain->save()) {  
51 - $original = $domain->getOriginal();  
52 - $original['belong_to'] = $request['belong_to'];  
53 - $original['status'] = $request['status'];  
54 - // 添加日志  
55 - $this->domain_action_log(DomainInfoLog::ACTION_ADD, $original, $original, '添加域名信息成功 - ID : ' . $domain->id);  
56 - DB::commit();  
57 - return $this->success(); 47 + if($rs === false){
  48 + $this->fail('error');
58 } 49 }
59 - DB::rollBack();  
60 - return $this->fail('域名信息添加失败');  
61 - 50 + return $this->success();
62 } 51 }
63 52
64 /** 53 /**
65 - * 修改数据  
66 - * @return array  
67 - * @throws AsideGlobalException  
68 - * @throws BsideGlobalException 54 + * @remark :验证域名是否存在
  55 + * @name :verifyDomain
  56 + * @author :lyh
  57 + * @method :post
  58 + * @time :2023/8/1 14:59
69 */ 59 */
70 - public function update()  
71 - {  
72 - $domain = $this->getDomain();  
73 - $original = $domain->getOriginal();  
74 - $original['belong_to'] = $domain->BelongToStr($original['belong_to']);  
75 - $original['status'] = $domain->StatusToStr($original['status']);  
76 - $request = $this->param;  
77 - $this->extracted($request, $domain, $original);  
78 - // 检查ip是否存在  
79 - if (array_key_exists('domain', $request)) {  
80 - if ($domain->domain != $request['domain']) {  
81 - if ($this->checkDomain($request['domain'])) {  
82 - $this->fail('域名信息修改失败,域名已存在', Code::USER_ERROR);  
83 - } 60 + public function verifyDomain($domain,$id = ''){
  61 + if(!empty($id)){
  62 + $info = $this->model->read(['domain'=>$domain,'id'=>['!=',$id]]);
  63 + if ($info !== false) {
  64 + $this->fail('当前域名已存在');
84 } 65 }
85 - }  
86 - DB::beginTransaction();  
87 - if ($domain->save()) {  
88 - $fields_array = $domain->FieldsArray();  
89 - $revised = $domain->getAttributes();  
90 - $diff = array_diff_assoc($original, $revised);  
91 - unset($diff['created_at']);  
92 - unset($diff['updated_at']);  
93 - unset($diff['deleted']);  
94 - $remarks = '';  
95 - if ($diff) {  
96 - $remarks .= '修改ID为 ' . $domain->id . ' 的服务器信息,修改内容为:';  
97 - foreach ($diff as $key => $value) {  
98 - $remarks .= $fields_array[$key] . ' 由 ' . $value . ' 修改为 ' . $revised[$key] . '; ';  
99 - }  
100 - } else {  
101 - $remarks .= '修改ID为 ' . $domain->id . ' 的域名信息,无修改'; 66 + }else{
  67 + $info = $this->model->read(['domain'=>$domain]);
  68 + if ($info !== false) {
  69 + $this->fail('当前域名已存在');
102 } 70 }
103 - // 添加日志  
104 - $this->domain_action_log(DomainInfoLog::ACTION_UPDATE, $original, $revised, $remarks);  
105 - DB::commit();  
106 - return $this->success();  
107 } 71 }
108 - DB::rollBack();  
109 - return $this->fail('域名信息修改失败'); 72 + return $this->success();
110 } 73 }
111 74
112 /** 75 /**
113 - * 根据ID获取数据  
114 - * @return array  
115 - * @throws AsideGlobalException  
116 - * @throws BsideGlobalException 76 + * @remark :修改当前域名状态
  77 + * @name :editStatus
  78 + * @author :lyh
  79 + * @method :post
  80 + * @time :2023/8/1 15:43
117 */ 81 */
118 - public function getDomain(int $deleted = DomainInfo::DELETED_NORMAL)  
119 - {  
120 - $id = $this->param['id'] ?? 0;  
121 - if (!$id) {  
122 - return $this->fail('ID不能为空'); 82 + public function editDomainStatus(){
  83 + $rs = $this->model->edit(['status'=>$this->param['status']],['id'=>$this->param['id']]);
  84 + if($rs === false){
  85 + $this->fail('error');
123 } 86 }
124 - $data = DomainInfo::query()->where('deleted', $deleted)->find($id);  
125 - if (!$data) {  
126 - return $this->fail('数据不存在!');  
127 - }  
128 - return $data; 87 + return $this->success();
129 } 88 }
130 89
131 /** 90 /**
132 - * 检查域名是否存在  
133 - * @param $domain  
134 - * @return bool 91 + * @remark :删除域名
  92 + * @name :delDomain
  93 + * @author :lyh
  94 + * @method :post
  95 + * @time :2023/8/1 15:41
135 */ 96 */
136 - public function checkDomain($domain)  
137 - {  
138 - $usIp = DomainInfo::query()->where('domain', $domain)->first();  
139 - if ($usIp) {  
140 - return true;  
141 - } else {  
142 - return false; 97 + public function delDomain(){
  98 + $this->param['id'] = ['in',$this->param['id']];
  99 + $rs = $this->model->del($this->param);
  100 + if($rs === false){
  101 + $this->fail('error');
143 } 102 }
  103 + return $this->success();
144 } 104 }
145 105
146 - /**  
147 - * 详情  
148 - * @param int $deleted  
149 - * @return array|Builder|Collection|Model  
150 - * @throws AsideGlobalException  
151 - * @throws BsideGlobalException  
152 - */  
153 - public function domainInfo(int $deleted = DomainInfo::DELETED_NORMAL)  
154 - {  
155 - $id = $this->param['id'] ?? 0;  
156 - if (!$id) {  
157 - return $this->fail('ID不能为空');  
158 - }  
159 - $data = DomainInfo::query()->where('deleted', $deleted)->find($id, ['domain', 'belong_to', 'status', 'domain_start_time', 'domain_end_time', 'certificate_start_time', 'certificate_end_time', 'created_at', 'updated_at']);  
160 - if (!$data) {  
161 - return $this->fail('数据不存在!');  
162 - }  
163 - return $data;  
164 - }  
165 -  
166 - /**  
167 - * 服务器操作日志  
168 - * @param int $action 1:添加 2:修改 3:删除 4:搜索 5:详情 6:列表  
169 - * @param array $original 原始数据  
170 - * @param array $revised 修改后数据  
171 - */  
172 - public function domain_action_log(int $action = DomainInfoLog::ACTION_ADD, array $original = [], array $revised = [], $remarks = '')  
173 - {  
174 - $log = new DomainInfoLog();  
175 - $this->log($log, $action, $original, $revised, $remarks);  
176 - }  
177 106
178 - /**  
179 - * @param array $request  
180 - * @param $domain  
181 - * @param array $original  
182 - * @return void  
183 - */  
184 - public function extracted(array $request, $domain, array $original)  
185 - {  
186 - $request = array_intersect_key($request, $original);  
187 - foreach ($request as $key => $value) {  
188 - $domain->$key = trim($value) ?? $original[$key];  
189 - }  
190 - }  
191 -  
192 - /**  
193 - * 批量获取数据删除  
194 - * @return array  
195 - * @throws AsideGlobalException  
196 - * @throws BsideGlobalException  
197 - */  
198 - public function get_batch_update($action = DomainInfoLog::ACTION_DELETE, $deleted = DomainInfo::DELETED_NORMAL)  
199 - {  
200 - $ids = (new ServerInformationLogic())->getIds();  
201 - $data = DomainInfo::query()->whereIn('id', $ids)->where('deleted', $deleted)->get();  
202 - $restore_ids = $data->pluck('id')->toArray();  
203 - $actionArr = DomainInfoLog::actionArr();  
204 - $actionStr = $actionArr[$action];  
205 - if (empty($restore_ids)) {  
206 - $this->fail($actionStr . '域名信息不存在!', Code::USER_ERROR);  
207 - }  
208 - $original = $data->toArray();  
209 - DB::beginTransaction();  
210 - try {  
211 - $update = $deleted == DomainInfo::DELETED_NORMAL ? DomainInfo::DELETED_DELETE : DomainInfo::DELETED_NORMAL;  
212 - DomainInfo::query()->whereIn('id', $restore_ids)->update(['deleted' => $update]);  
213 - $this->domain_action_log($action, $original, $original, $actionStr . '域名信息 - ID : ' . implode(', ', $restore_ids));  
214 - DB::commit();  
215 - return $this->success();  
216 - } catch (\Exception $e) {  
217 - DB::rollBack();  
218 - return $this->fail('域名信息' . $actionStr . '失败', Code::USER_ERROR); 107 + public function infoDomain(){
  108 + $info = $this->model->read(['id'=>$this->param['id']]);
  109 + if($info === false){
  110 + $this->fail('当前数据不存在或者已被删除');
219 } 111 }
  112 + return $this->success($info);
220 } 113 }
221 114
222 - /**  
223 - * 证书到期时间  
224 - * @return array  
225 - */  
226 - public function getDomainCertificateTime($domain)  
227 - {  
228 - $domain = trim($domain);  
229 - $data = [];  
230 - $context = stream_context_create(['ssl' => ['capture_peer_cert' => true]]); // Notice: only 7.0.7+ supports this  
231 - $stream = stream_socket_client("ssl://$domain:443", $errno, $errstr, 30, STREAM_CLIENT_CONNECT, $context);  
232 - if ($stream) {  
233 - $params = stream_context_get_params($stream);  
234 - $peerCertificate = openssl_x509_parse($params['options']['ssl']['peer_certificate']);  
235 - if ($peerCertificate) {  
236 - $validFrom = date_create_from_format('U', $peerCertificate['validFrom_time_t']); // 有效期开始时间  
237 - $validTo = date_create_from_format('U', $peerCertificate['validTo_time_t']); // 有效期结束时间  
238 - $data['validFrom'] = $validFrom->format('Y-m-d H:i:s');  
239 - $data['validTo'] = $validTo->format('Y-m-d H:i:s');  
240 - }  
241 - }  
242 - return $data;  
243 - }  
244 115
245 - /**  
246 - * 获取所有正常域名信息  
247 - * @return Builder[]|Collection  
248 - */  
249 - public function getAllDomain()  
250 - {  
251 - return DomainInfo::query()->where('status', 1)  
252 - ->where('deleted', DomainInfo::DELETED_NORMAL)  
253 - ->orderBy('updated_at', 'desc')  
254 - ->get();  
255 - }  
256 116
257 /** 117 /**
258 * 域名到期时间 118 * 域名到期时间
@@ -280,21 +140,5 @@ class DomainInfoLogic extends BaseLogic @@ -280,21 +140,5 @@ class DomainInfoLogic extends BaseLogic
280 return $data; 140 return $data;
281 } 141 }
282 142
283 - /**  
284 - * 根据域名更新证书到期时间  
285 - * @param $id  
286 - * @param $updata  
287 - * @return array  
288 - * @throws AsideGlobalException  
289 - * @throws BsideGlobalException  
290 - */  
291 - public function updateDomain($id, $updata)  
292 - {  
293 - $isRes = DomainInfo::query()->where('id', $id)->where('deleted', DomainInfo::DELETED_NORMAL)->update($updata);  
294 - if ($isRes) {  
295 - return $this->success();  
296 - } else {  
297 - return $this->fail('更新域名到期时间失败');  
298 - }  
299 - } 143 +
300 } 144 }
1 -<?php  
2 -  
3 -namespace App\Http\Requests\Aside\Domain;  
4 -  
5 -use App\Models\Aside\Domain\DomainInfo;  
6 -use Illuminate\Foundation\Http\FormRequest;  
7 -use Illuminate\Support\Facades\Validator;  
8 -use Illuminate\Validation\Rule;  
9 -  
10 -class DomainInfoRequest extends FormRequest  
11 -{  
12 - /**  
13 - * Determine if the user is authorized to make this request.  
14 - *  
15 - * @return bool  
16 - */  
17 - public function authorize()  
18 - {  
19 - return true;  
20 - }  
21 -  
22 - /**  
23 - * Get the validation rules that apply to the request.  
24 - *  
25 - * @return array  
26 - */  
27 - public function rules()  
28 - {  
29 - Validator::extend('validate_domain', function ($attribute, $value, $parameters, $validator) {  
30 - return $this->validateDomain($value);  
31 - });  
32 - $domain = new DomainInfo();  
33 - $status_tot_keys = array_keys($domain->StatusToArray());  
34 - $belong_to_keys = array_keys($domain->BelongToArray());  
35 - # 编辑时不需要验证必填  
36 - $required = 'required';  
37 - if ($this->getRequestUri() != '/a/domain/add') {  
38 - $required = '';  
39 - }  
40 - return [  
41 - 'domain' => $required . '|max:200|validate_domain',  
42 - 'belong_to' => [  
43 - $required,  
44 - Rule::in($belong_to_keys)  
45 - ],  
46 - 'status' => [  
47 - $required,  
48 - Rule::in($status_tot_keys)  
49 - ]  
50 - ];  
51 - }  
52 -  
53 - /**  
54 - * 验证给定的值是否是有效的域名。  
55 - *  
56 - * @param mixed $value  
57 - * @return bool  
58 - */  
59 - public function validateDomain($value)  
60 - {  
61 - // 从域中删除任何空间或路径。  
62 - $domain = preg_replace('/\s|\/.*$/', '', $value);  
63 - // 验证域是否至少包含一个句点。  
64 - if (strpos($domain, '.') === false) {  
65 - return false;  
66 - }  
67 - // 验证域是否以句点开始或结束。  
68 - if (strpos($domain, '.') === 0 || strrpos($domain, '.') === strlen($domain) - 1) {  
69 - return false;  
70 - }  
71 - // 验证域是否不包含无效字符。  
72 - if (!preg_match('/^[a-zA-Z0-9\-\.]+$/', $domain)) {  
73 - return false;  
74 - }  
75 - // 验证域是否具有有效的顶级域。  
76 - $tld = substr($domain, strrpos($domain, '.') + 1);  
77 - if (!in_array($tld, ['com', 'net', 'org'])) { // 如有必要,添加更多TLD。  
78 - return false;  
79 - }  
80 - return true;  
81 - }  
82 -  
83 - public function messages()  
84 - {  
85 - return [  
86 - 'domain.required' => '域名不能为空',  
87 - 'domain.max' => '域名长度不能超过200个字符',  
88 - 'domain.validate_domain' => '域名格式不正确',  
89 - 'belong_to.required' => '域名所属不能为空',  
90 - 'belong_to.in' => '域名所属参数错误',  
91 - 'status.required' => '域名状态不能为空',  
92 - 'status.in' => '域名状态参数错误',  
93 - ];  
94 - }  
95 -  
96 -}  
@@ -4,10 +4,28 @@ namespace App\Models\Aside\Domain; @@ -4,10 +4,28 @@ namespace App\Models\Aside\Domain;
4 4
5 use App\Models\Base; 5 use App\Models\Base;
6 6
  7 +/**
  8 + * Class DomainInfo
  9 + *
  10 + * @package App\Models\Aside\DomainLogic
  11 + * @Author YiYuan-LIn
  12 + * @Date : 2019/5/16
  13 + * 域名信息模型
  14 + */
7 class DomainInfo extends Base 15 class DomainInfo extends Base
8 { 16 {
  17 + public $btAction = [
  18 + 'create_site' => '/site?action=AddSite',
  19 + ];
  20 +
9 protected $table = 'gl_domain_info'; 21 protected $table = 'gl_domain_info';
10 22
  23 + // 软删除 0:正常 1:删除
  24 + /** @var int 软删除 - 正常 */
  25 + const DELETED_NORMAL = 0;
  26 + /** @var int 软删除 - 删除 */
  27 + const DELETED_DELETE = 1;
  28 +
11 protected $hidden = [ 29 protected $hidden = [
12 'created_at', 30 'created_at',
13 'updated_at' 31 'updated_at'
@@ -172,17 +172,14 @@ Route::middleware(['aloginauth'])->group(function () { @@ -172,17 +172,14 @@ Route::middleware(['aloginauth'])->group(function () {
172 }); 172 });
173 }); 173 });
174 174
175 - // 域名 175 + // 域名管理
176 Route::prefix('domain')->group(function () { 176 Route::prefix('domain')->group(function () {
177 - Route::get('/', [Aside\Domain\DomainInfoController::class, 'lists'])->name('admin.domain'); // 列表 | 搜索  
178 - Route::get('/info', [Aside\Domain\DomainInfoController::class, 'info'])->name('admin.domain_info'); // 详情  
179 - Route::get('/delete_info', [Aside\Domain\DomainInfoController::class, 'getDeleteDomainInfo'])->name('admin.domain_delete_info'); // 删除信息  
180 - Route::post('/add', [Aside\Domain\DomainInfoController::class, 'add'])->name('admin.domain_save'); // 添加  
181 - Route::post('/edit', [Aside\Domain\DomainInfoController::class, 'edit'])->name('admin.domain_edit'); // 编辑  
182 - Route::any('/delete', [Aside\Domain\DomainInfoController::class, 'delete'])->name('admin.domain_delete'); // 删除  
183 - Route::get('/delete_list', [Aside\Domain\DomainInfoController::class, 'delete_list'])->name('admin.domain_delete_list'); // 删除列表  
184 - Route::any('/restore', [Aside\Domain\DomainInfoController::class, 'restore'])->name('admin.domain_restore'); // 恢复  
185 - Route::get('/log', [Aside\Domain\DomainInfoLogController::class, 'lists'])->name('admin.domain_log_lists'); // 日志 177 + Route::any('/', [Aside\Domain\DomainInfoController::class, 'lists'])->name('admin.domain'); // 列表 | 搜索
  178 + Route::any('/info', [Aside\Domain\DomainInfoController::class, 'info'])->name('admin.domain_info'); // 详情
  179 + Route::any('/save', [Aside\Domain\DomainInfoController::class, 'save'])->name('admin.domain_save');
  180 + Route::any('/status', [Aside\Domain\DomainInfoController::class, 'status'])->name('admin.domain_status');
  181 + Route::any('/del', [Aside\Domain\DomainInfoController::class, 'del'])->name('admin.domain_del');
  182 + Route::any('/log', [Aside\Domain\DomainInfoLogController::class, 'lists'])->name('admin.domain_log_lists'); // 日志
186 183
187 }); 184 });
188 //图片操作 185 //图片操作