From 0ece66bf5833948af00c21dc8989bf060eadf347 Mon Sep 17 00:00:00 2001 From: 178146582 <178146582@qq.com> Date: Wed, 31 Oct 2018 09:45:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/IndexController.php | 10 ++++++---- public/css/main.css | 4 ++-- resources/views/list.blade.php | 15 +++++++++++---- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/app/Http/Controllers/IndexController.php b/app/Http/Controllers/IndexController.php index 44938fb..e0d9e1c 100644 --- a/app/Http/Controllers/IndexController.php +++ b/app/Http/Controllers/IndexController.php @@ -56,7 +56,11 @@ class IndexController extends Controller { $data = curl_get_https('https://www.360kan.com/'.$type.'/list.php?year='.$year.'&area='.$area.'&act=all&cat='.$cat.'&pageno='.$page); // 匹配当前影视 - preg_match_all('|[\s\S]*?
[\s\S]*?[\s\S]*?(.*?)[\s\S]*?
[\s\S]*?
[\s\S]*?

[\s\S]*?(.*?)[\s\S]*?(.*?)[\s\S]*?

[\s\S]*?

(.*?)

|', $data, $matches); + if ($type == 'dongman') { + preg_match_all('|
[\s\S]*?[\s\S]*?(.*?)[\s\S]*?(.*?)|', $data, $matches); + }else{ + preg_match_all('|[\s\S]*?[\s\S]*?(.*?)([\s\S]*?)(.*?)[\s\S]*?

(.*?)

|', $data, $matches); + } // 匹配页数 preg_match_all("|target='_self'.*?>(\d*?)
|",$data,$pages); @@ -79,13 +83,11 @@ class IndexController extends Controller { // 匹配分类 preg_match_all('!&cat=(.*?)" target="_self">(.*?)\s|\s*?(.*?)!',getSubstr($data,'类型:','收起'),$cats); - // 匹配年代 preg_match_all('!&year=(.*?)" target="_self">(.*?)\s|\s*?(.*?)!',getSubstr($data,'年代:','收起'),$years); - // 匹配地区 preg_match_all('!&area=(.*?)" target="_self">(.*?)\s|\s*?(.*?)!',getSubstr($data,'地区:','收起'),$areas); - + return view('list', [ 'page_count' => $page_count, //总页数 'start' => $start, diff --git a/public/css/main.css b/public/css/main.css index 5f44cff..e51fc70 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -10,9 +10,9 @@ li{list-style:none} .s-tab-main .hint{position:absolute;right:4px;bottom:4px;padding:2px 6px;background:rgba(0,0,0,.8);color:#fff;border-radius:2px} .s-tab-main .detail{width:100%;height:53px;background:#fff;overflow:hidden} .s-tab-main .title{font-size:14px;padding:7px 5px 3px 5px} -.s-tab-main .title .s1{display:inline-block;float:left;width:144px;height:20px;line-height:20px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#222} +.s-tab-main .title .s1{display:inline-block;float:left;width: 120px;height:20px;line-height:20px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#222} .s-tab-main .title .s2{float:right;color:#ff7b00;font-size:16px} -.s-tab-main .star{font-size:12px;color:#999;margin:0 5px;width:170px;height:18px;line-height:18px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-top:-20px} +.s-tab-main .star{font-size:12px;color:#999;margin:0 5px;width: 148px;height:18px;line-height:18px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-top:-20px} .s-tab-main{margin-top:20px;overflow:hidden} .g-playicon{overflow:hidden;position:relative} .g-playicon:after{visibility:hidden;position:absolute;overflow:hidden;cursor:pointer} diff --git a/resources/views/list.blade.php b/resources/views/list.blade.php index 8de101c..0b5e434 100644 --- a/resources/views/list.blade.php +++ b/resources/views/list.blade.php @@ -79,12 +79,10 @@ - -
-
+ @if ($type == 'dongman')

{{$res[4][$i]}} - {{$res[5][$i]}} +

+
+
+ @else +
+

+ {{$res[5][$i]}} + {{strip_tags($res[4][$i])}}

{{$res[6][$i]}}

+ @endif @endfor