作者 周海龙

合并分支 'zhl' 到 'master'

u bug



查看合并请求 !3
@@ -308,7 +308,7 @@ public function setEvent($id, $status, $note = '') @@ -308,7 +308,7 @@ public function setEvent($id, $status, $note = '')
308 if ($times == 2) 308 if ($times == 2)
309 $event->start_at = date('Y-m-d H:i:s', time() + 600); 309 $event->start_at = date('Y-m-d H:i:s', time() + 600);
310 } 310 }
311 - $event->stauts = $status; 311 + $event->status = $status;
312 $event->times = $times; 312 $event->times = $times;
313 $event->note = $note; 313 $event->note = $note;
314 $event->save(); 314 $event->save();
@@ -51,7 +51,7 @@ public function deleteSite(Request $request) @@ -51,7 +51,7 @@ public function deleteSite(Request $request)
51 try { 51 try {
52 // $this->validate(); 52 // $this->validate();
53 $domain = $request->input('domain'); 53 $domain = $request->input('domain');
54 - if (empty($domain) && filter_var($domain, FILTER_VALIDATE_URL)) 54 + if (empty($domain) || filter_var($domain, FILTER_VALIDATE_URL))
55 return $this->error('请提交有效domain信息'); 55 return $this->error('请提交有效domain信息');
56 56
57 $result = app(BtRepository::class)->deleteBtSite($domain); 57 $result = app(BtRepository::class)->deleteBtSite($domain);
@@ -120,7 +120,7 @@ public function deleteBtSite($domain) @@ -120,7 +120,7 @@ public function deleteBtSite($domain)
120 // 获取bt数据 可能要可靠一些 120 // 获取bt数据 可能要可靠一些
121 $result = $bt->Websites($host); 121 $result = $bt->Websites($host);
122 if (empty($result['data'])) 122 if (empty($result['data']))
123 - return false; 123 + return true;
124 $id = 0; 124 $id = 0;
125 foreach ($result['data'] as $v) { 125 foreach ($result['data'] as $v) {
126 if ($v['name'] == $host) { 126 if ($v['name'] == $host) {