正在显示
1 个修改的文件
包含
4 行增加
和
3 行删除
| @@ -12,6 +12,7 @@ namespace App\Http\Logic\Bside\SeoSetting; | @@ -12,6 +12,7 @@ namespace App\Http\Logic\Bside\SeoSetting; | ||
| 12 | use App\Http\Logic\Bside\BaseLogic; | 12 | use App\Http\Logic\Bside\BaseLogic; |
| 13 | use App\Models\SeoSetting\LinkData; | 13 | use App\Models\SeoSetting\LinkData; |
| 14 | use App\Services\Geo\GeoService; | 14 | use App\Services\Geo\GeoService; |
| 15 | +use Illuminate\Support\Carbon; | ||
| 15 | use Nette\Utils\DateTime; | 16 | use Nette\Utils\DateTime; |
| 16 | 17 | ||
| 17 | /** | 18 | /** |
| @@ -68,9 +69,9 @@ class LinkDataLogic extends BaseLogic | @@ -68,9 +69,9 @@ class LinkDataLogic extends BaseLogic | ||
| 68 | } | 69 | } |
| 69 | $geoService = new GeoService(); | 70 | $geoService = new GeoService(); |
| 70 | if(!empty($info['time'])){ | 71 | if(!empty($info['time'])){ |
| 71 | - $date1 = new DateTime($info['time']); | ||
| 72 | - $date2 = new DateTime(date('Y-m-d')); | ||
| 73 | - $diff = $date1->diff($date2); | 72 | + $start = Carbon::parse($info['time']); |
| 73 | + $end = Carbon::parse(date('Y-m-d')); | ||
| 74 | + $diff = $start->diffInDays($end); | ||
| 74 | if($diff >= 60){ | 75 | if($diff >= 60){ |
| 75 | $host = $this->getDomainWithWWW($info['da_values']); | 76 | $host = $this->getDomainWithWWW($info['da_values']); |
| 76 | $result = $geoService->daResult($host); | 77 | $result = $geoService->daResult($host); |
-
请 注册 或 登录 后发表评论