linwu 4 months ago
parent
commit
b7621ab10a

+ 5 - 1
public/themes/default/views/mobile/app/health/attract/ajax_attract_list.blade.php

@@ -1,6 +1,10 @@
 @if($articles->total())
     @foreach($articles as $k=>$v)
-        <div class="news-list-item for-event" onclick="window.location='{{route("mobile.health.attract.show",["id"=>$v->id])}}';">
+        @if(empty($v['is_url']))
+        <div class="news-list-item for-event" onclick="location.href='{{route("mobile.health.attract.show",["id"=>$v->id])}}';">
+        @else
+        <div class="news-list-item for-event" onclick="location.href='{{$v['is_url']}}';">
+        @endif
             <div class="news-info">
                 <div class="thumbnail">
                     @if($v->small_img)

+ 3 - 6
public/themes/default/views/mobile/app/health/hospital/show.blade.php

@@ -58,7 +58,7 @@
 
     <div class="split-block"></div>
 
-    @if(empty($info->video_url))
+    @if(!empty($info->video_url))
     <div class="comshowdes">
         <div class="eattitle list_height">视频介绍</div>
         <video id="player-container-id"  preload="auto" playsinline webkit-playsinline>
@@ -204,13 +204,10 @@
 
         var player = TCPlayer('player-container-id', {
             sources: [{
-                src: '{{ theme_asset('mobile/021622e9b328fade2c7a0f394440fe38.mp4') }}?v=1', // 播放地址
+                src: '{{$info->video_url}}', // 播放地址
             }],
-            autoplay: true,
+            autoplay: false,
             licenseUrl: 'https://license.vod2.myqcloud.com/license/v2/1251164517_1/v_cube.license', // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
-            posterImage: true,
-            bigPlayButton: true,
-            poster: "{{ theme_asset('mobile/images/health_thumb.jpg') }}",
         });
     </script>
 @endsection

+ 5 - 1
public/themes/default/views/mobile/app/health/index.blade.php

@@ -86,7 +86,11 @@
         <ul>
             <li>
                 @foreach($attract_list as $v)
-                    <a href="{{route("mobile.health.attract.show")}}?id={{$v['id']}}" rel="nofollow noopener noreferrer"><b>&gt;</b>{{cut_str($v['title'], 15, 0, '...')}}<span class="jc_rt">{{date('Y-m-d',strtotime($v['created_at']))}}</span></a>
+                    @if(empty($v['is_url']))
+                        <a href="{{route("mobile.health.attract.show")}}?id={{$v['id']}}" rel="nofollow noopener noreferrer"><b>&gt;</b>{{cut_str($v['title'], 15, 0, '...')}}<span class="jc_rt">{{date('Y-m-d',strtotime($v['created_at']))}}</span></a>
+                    @else
+                        <a href="{{$v['is_url']}}" rel="nofollow noopener noreferrer"><b>&gt;</b>{{cut_str($v['title'], 15, 0, '...')}}<span class="jc_rt">{{date('Y-m-d',strtotime($v['created_at']))}}</span></a>
+                    @endif
                 @endforeach
             </li>
         <div onclick="window.location='{{route("mobile.health.attract.index")}}';" style="text-align:center;height:.8rem;line-height:.8rem;background:#fff;">查看更多</div>