正在显示
1 个修改的文件
包含
310 行增加
和
305 行删除
@@ -12,20 +12,20 @@ | @@ -12,20 +12,20 @@ | ||
12 | video::-internal-media-controls-download-button { | 12 | video::-internal-media-controls-download-button { |
13 | display: none; | 13 | display: none; |
14 | } | 14 | } |
15 | - | 15 | + |
16 | video::-webkit-media-controls-enclosure { | 16 | video::-webkit-media-controls-enclosure { |
17 | overflow: hidden; | 17 | overflow: hidden; |
18 | } | 18 | } |
19 | - | 19 | + |
20 | video::-webkit-media-controls-panel { | 20 | video::-webkit-media-controls-panel { |
21 | width: calc(100% + 30px); | 21 | width: calc(100% + 30px); |
22 | } | 22 | } |
23 | - | 23 | + |
24 | #collections { | 24 | #collections { |
25 | width: 30px; | 25 | width: 30px; |
26 | height: 30px; | 26 | height: 30px; |
27 | } | 27 | } |
28 | - | 28 | + |
29 | #likes { | 29 | #likes { |
30 | width: 32px; | 30 | width: 32px; |
31 | height: 32px; | 31 | height: 32px; |
@@ -34,343 +34,348 @@ | @@ -34,343 +34,348 @@ | ||
34 | </head> | 34 | </head> |
35 | 35 | ||
36 | <body ondragstart="window.event.returnValue=false" oncontextmenu="window.event.returnValue=false" onselectstart="event.returnValue=false"> | 36 | <body ondragstart="window.event.returnValue=false" oncontextmenu="window.event.returnValue=false" onselectstart="event.returnValue=false"> |
37 | - <include file="public@header" /> | 37 | +<include file="public@header" /> |
38 | + | ||
39 | +<!-- 弹出框 --> | ||
40 | +<div class="mask"> | ||
41 | +</div> | ||
42 | +<div class="show_9 clearfix"> | ||
43 | + <!-- 视频 --> | ||
44 | + <div class="show_9_video"> | ||
45 | + <img class="video_poster iop" src="" alt=""> | ||
46 | + <video id="video" width="100%" height="426" src="" controlsList="nodownload"></video> | ||
47 | + <img class="play_button" onclick="bofang()" src="__TMPL__/public/assets/starImg/aicon_30.png" alt=""> | ||
48 | + <div class="video_box"></div> | ||
38 | 49 | ||
39 | - <!-- 弹出框 --> | ||
40 | - <div class="mask"> | ||
41 | </div> | 50 | </div> |
42 | - <div class="show_9 clearfix"> | 51 | + <!-- 视频侧边选择 --> |
52 | + <div class="show_9_video_aside"> | ||
53 | + <!-- 顶部 --> | ||
54 | + <div class="show_9_video_asideTie clearfix"> | ||
55 | + <p>专辑</p> | ||
56 | + <input type="hidden" value="{$cityName}" id="cityName"> | ||
57 | + <form method="GET" action="/portal/region/getMoreVideo"> | ||
58 | + <div class="select"> | ||
59 | + <input type="text" class="show_city" value="所有" readonly="readonly"> | ||
60 | + <img src="__TMPL__/public/assets/starImg/down.png" alt=""> | ||
61 | + <ul style="min-height:98px;max-height:300px;overflow-y: scroll;width:145px;"> | ||
62 | + <li>所有</li> | ||
63 | + <volist name="city_name" id="vo"> | ||
64 | + <li value="{$vo.id}">{$vo.name}</li> | ||
65 | + </volist> | ||
66 | + </ul> | ||
67 | + <input type="hidden" value="0" name="city_id" id="city_id"> | ||
68 | + <div style="display:none;"> | ||
69 | + <input type="submit" id="city_submit" /> | ||
70 | + </div> | ||
71 | + </div> | ||
72 | + </form> | ||
73 | + </div> | ||
43 | <!-- 视频 --> | 74 | <!-- 视频 --> |
44 | - <div class="show_9_video"> | ||
45 | - <img class="video_poster iop" src="" alt=""> | ||
46 | - <video id="video" width="100%" height="426" src="" controlsList="nodownload"></video> | ||
47 | - <img class="play_button" onclick="bofang()" src="__TMPL__/public/assets/starImg/aicon_30.png" alt=""> | ||
48 | - <div class="video_box"></div> | ||
49 | - | 75 | + <div class="show_9_video_asideCon"> |
76 | + <ul class="curren"> | ||
77 | + <volist name="res['data']" id="vo"> | ||
78 | + <li class="clearfix"> | ||
79 | + <img class="li_img" src="{:cmf_get_image_url($vo.thumbnail)}" alt="" style="opacity: 0.3;"> | ||
80 | + <p> | ||
81 | + {$vo.post_title} | ||
82 | + </p> | ||
83 | + <!--id--> | ||
84 | + <input type="hidden" value="{$vo.id}" class="li_id"> | ||
85 | + <input type="hidden" value="{:cmf_get_file_download_url($vo.video)}" class="li_video"> | ||
86 | + <!--标题--> | ||
87 | + <input type="hidden" value="{$vo.post_title}" class="li_post_title"> | ||
88 | + <!--国家--> | ||
89 | + <input type="hidden" value="{$vo.city_name}" class="li_city_name"> | ||
90 | + <!--取景--> | ||
91 | + <input type="hidden" value="{$vo.framing}" class="li_framing"> | ||
92 | + <!--上映时间--> | ||
93 | + <input type="hidden" value="{$vo.release_time}" class="li_release_time"> | ||
94 | + </li> | ||
95 | + </volist> | ||
96 | + </ul> | ||
50 | </div> | 97 | </div> |
51 | - <!-- 视频侧边选择 --> | ||
52 | - <div class="show_9_video_aside"> | ||
53 | - <!-- 顶部 --> | ||
54 | - <div class="show_9_video_asideTie clearfix"> | ||
55 | - <p>专辑</p> | ||
56 | - <input type="hidden" value="{$cityName}" id="cityName"> | ||
57 | - <form method="GET" action="/portal/region/getMoreVideo"> | ||
58 | - <div class="select"> | ||
59 | - <input type="text" class="show_city" value="所有" readonly="readonly"> | ||
60 | - <img src="__TMPL__/public/assets/starImg/down.png" alt=""> | ||
61 | - <ul style="min-height:98px;max-height:300px;overflow-y: scroll;width:145px;"> | ||
62 | - <li>所有</li> | ||
63 | - <volist name="city_name" id="vo"> | ||
64 | - <li value="{$vo.id}">{$vo.name}</li> | ||
65 | - </volist> | ||
66 | - </ul> | ||
67 | - <input type="hidden" value="0" name="city_id" id="city_id"> | ||
68 | - <div style="display:none;"> | ||
69 | - <input type="submit" id="city_submit" /> | ||
70 | - </div> | ||
71 | - </div> | ||
72 | - </form> | ||
73 | - </div> | ||
74 | - <!-- 视频 --> | ||
75 | - <div class="show_9_video_asideCon"> | ||
76 | - <ul class="curren"> | ||
77 | - <volist name="res['data']" id="vo"> | ||
78 | - <li class="clearfix"> | ||
79 | - <img class="li_img" src="{:cmf_get_image_url($vo.thumbnail)}" alt="" style="opacity: 0.3;"> | ||
80 | - <p> | ||
81 | - {$vo.post_title} | ||
82 | - </p> | ||
83 | - <!--id--> | ||
84 | - <input type="hidden" value="{$vo.id}" class="li_id"> | ||
85 | - <input type="hidden" value="{:cmf_get_file_download_url($vo.video)}" class="li_video"> | ||
86 | - <!--标题--> | ||
87 | - <input type="hidden" value="{$vo.post_title}" class="li_post_title"> | ||
88 | - <!--国家--> | ||
89 | - <input type="hidden" value="{$vo.city_name}" class="li_city_name"> | ||
90 | - <!--取景--> | ||
91 | - <input type="hidden" value="{$vo.framing}" class="li_framing"> | ||
92 | - <!--上映时间--> | ||
93 | - <input type="hidden" value="{$vo.release_time}" class="li_release_time"> | ||
94 | - </li> | ||
95 | - </volist> | ||
96 | - </ul> | ||
97 | - </div> | 98 | + </div> |
99 | + <!-- 底部 --> | ||
100 | + <div class="show_9_video_asideTxt clearfix"> | ||
101 | + <!-- 标题 --> | ||
102 | + <h1 class="post_title"></h1> | ||
103 | + <!-- 国家 --> | ||
104 | + <div class="show_9_video_asideTxt2"> | ||
105 | + <!--<p>国家:<span class="city_name"></span></p>--> | ||
106 | + <input type="hidden" value="" id="li_id"> | ||
107 | + <p>取景:<span class="framing"></span></p> | ||
108 | + <p>上映时间:<span class="release_time"></span></p> | ||
109 | + <!--视频索引--> | ||
110 | + <input type="hidden" value="0" class="video_index"> | ||
111 | + <!--视频url--> | ||
112 | + <input type="hidden" value="0" class="video_index_url"> | ||
98 | </div> | 113 | </div> |
99 | - <!-- 底部 --> | ||
100 | - <div class="show_9_video_asideTxt clearfix"> | ||
101 | - <!-- 标题 --> | ||
102 | - <h1 class="post_title"></h1> | ||
103 | - <!-- 国家 --> | ||
104 | - <div class="show_9_video_asideTxt2"> | ||
105 | - <!--<p>国家:<span class="city_name"></span></p>--> | ||
106 | - <input type="hidden" value="" id="li_id"> | ||
107 | - <p>取景:<span class="framing"></span></p> | ||
108 | - <p>上映时间:<span class="release_time"></span></p> | ||
109 | - <!--视频索引--> | ||
110 | - <input type="hidden" value="0" class="video_index"> | ||
111 | - <!--视频url--> | ||
112 | - <input type="hidden" value="0" class="video_index_url"> | ||
113 | - </div> | ||
114 | - <!-- 分享 --> | ||
115 | - <div class="show_9_video_asideTxt3 clearfix"> | ||
116 | - <p>分享:</p> | ||
117 | - <input type="hidden" class="collection" value=""> | ||
118 | - <input type="hidden" class="like" value=""> | ||
119 | - <img src="__TMPL__/public/assets/starImg/aicon_89.png" alt="" onclick="wxShow()"> | ||
120 | - <img src="__TMPL__/public/assets/starImg/aicon_90.png" alt="" class="wb_share_video"> | ||
121 | - <img id="collections" src="__TMPL__/public/assets/starImg/bicon_02.png" alt=""> | ||
122 | - <img id="likes" src="__TMPL__/public/assets/starImg/bicon_031.png" alt=""> | ||
123 | - </div> | 114 | + <!-- 分享 --> |
115 | + <div class="show_9_video_asideTxt3 clearfix"> | ||
116 | + <p>分享:</p> | ||
117 | + <input type="hidden" class="collection" value=""> | ||
118 | + <input type="hidden" class="like" value=""> | ||
119 | + <img src="__TMPL__/public/assets/starImg/aicon_89.png" alt="" onclick="wxShow()"> | ||
120 | + <img src="__TMPL__/public/assets/starImg/aicon_90.png" alt="" class="wb_share_video"> | ||
121 | + <img id="collections" src="__TMPL__/public/assets/starImg/bicon_02.png" alt=""> | ||
122 | + <img id="likes" src="__TMPL__/public/assets/starImg/bicon_031.png" alt=""> | ||
124 | </div> | 123 | </div> |
125 | </div> | 124 | </div> |
126 | - <!--微信分享--> | ||
127 | - <!-- 二维码弹出层 --> | ||
128 | - <div class="wx-qrcode-wrapper"> | ||
129 | - <!-- 遮罩层 --> | ||
130 | - <div class="mask"></div> | ||
131 | - <div class="wx-qrcode" style="width:230px;"> | ||
132 | - <div class="share"> | ||
133 | - <span style="font-size: 14px;text-align: center;">分享到微信朋友圈</span> | ||
134 | - <!-- 关闭图标 --> | ||
135 | - <a href="javascript:;" class="icon-close2" onclick="wxHide()">×</a> | ||
136 | - </div> | ||
137 | - | ||
138 | - <!-- 生成的二维码容器 --> | ||
139 | - <div id="qrcode"></div> | ||
140 | - <div class="bd_weixin_popup_foot"> | ||
141 | - 打开微信,使用“扫一扫”<br> | ||
142 | - 点击右上角,即可将网页分享至朋友圈。 | ||
143 | - </div> | 125 | +</div> |
126 | +<!--微信分享--> | ||
127 | +<!-- 二维码弹出层 --> | ||
128 | +<div class="wx-qrcode-wrapper"> | ||
129 | + <!-- 遮罩层 --> | ||
130 | + <div class="mask"></div> | ||
131 | + <div class="wx-qrcode" style="width:230px;"> | ||
132 | + <div class="share"> | ||
133 | + <span style="font-size: 14px;text-align: center;">分享到微信朋友圈</span> | ||
134 | + <!-- 关闭图标 --> | ||
135 | + <a href="javascript:;" class="icon-close2" onclick="wxHide()">×</a> | ||
136 | + </div> | ||
137 | + | ||
138 | + <!-- 生成的二维码容器 --> | ||
139 | + <div id="qrcode"></div> | ||
140 | + <input type="hidden" id="code1" value="0"> | ||
141 | + <div class="bd_weixin_popup_foot"> | ||
142 | + 打开微信,使用“扫一扫”<br> | ||
143 | + 点击右上角,即可将网页分享至朋友圈。 | ||
144 | </div> | 144 | </div> |
145 | </div> | 145 | </div> |
146 | - <include file="public@footer" /> | ||
147 | - <script src="__TMPL__/public/assets/js/jquery-3.2.1.min.js"></script> | ||
148 | - <script src="__TMPL__/public/assets/js/public.js"></script> | ||
149 | - <script src="https://cdn.bootcss.com/jquery.qrcode/1.0/jquery.qrcode.min.js"></script> | ||
150 | - <script> | ||
151 | - /* 点微信图标,触发二维码弹出层显示 */ | ||
152 | - function wxShow() { | 146 | +</div> |
147 | +<include file="public@footer" /> | ||
148 | +<script src="__TMPL__/public/assets/js/jquery-3.2.1.min.js"></script> | ||
149 | +<script src="__TMPL__/public/assets/js/public.js"></script> | ||
150 | +<script src="https://cdn.bootcss.com/jquery.qrcode/1.0/jquery.qrcode.min.js"></script> | ||
151 | +<script> | ||
152 | + /* 点微信图标,触发二维码弹出层显示 */ | ||
153 | + function wxShow() { | ||
154 | + if($('#code1').val() == 0){ | ||
153 | $('.wx-qrcode-wrapper').show(); | 155 | $('.wx-qrcode-wrapper').show(); |
154 | qrcode(); | 156 | qrcode(); |
155 | } | 157 | } |
158 | + $('#code1').val(1); | ||
159 | + } | ||
156 | 160 | ||
157 | - /* 关闭二维码弹出层 */ | ||
158 | - function wxHide() { | ||
159 | - $('.wx-qrcode-wrapper').hide(); | ||
160 | - $('#qrcode').children().remove(); | ||
161 | - } | 161 | + /* 关闭二维码弹出层 */ |
162 | + function wxHide() { | ||
163 | + $('.wx-qrcode-wrapper').hide(); | ||
164 | + $('#qrcode').children().remove(); | ||
165 | + $('#code1').val(0); | ||
166 | + } | ||
162 | 167 | ||
163 | - function qrcode(){ | ||
164 | - /* 生成二维码 */ | ||
165 | - var url = $('.video_index_url').val(); | ||
166 | - $("#qrcode").qrcode({ | ||
167 | - text: url, //设置二维码内容 | ||
168 | - render: "canvas", //设置渲染方式 | ||
169 | - width: 220, //设置宽度,默认生成的二维码大小是 256×256 | ||
170 | - height: 220, //设置高度 | ||
171 | - typeNumber: -1, //计算模式 | ||
172 | - background: "#ffffff", //背景颜色 | ||
173 | - foreground: "#000000" //前景颜色 | ||
174 | - }); | ||
175 | - } | 168 | + function qrcode(){ |
169 | + /* 生成二维码 */ | ||
170 | + var url = $('.video_index_url').val(); | ||
171 | + $("#qrcode").qrcode({ | ||
172 | + text: url, //设置二维码内容 | ||
173 | + render: "canvas", //设置渲染方式 | ||
174 | + width: 220, //设置宽度,默认生成的二维码大小是 256×256 | ||
175 | + height: 220, //设置高度 | ||
176 | + typeNumber: -1, //计算模式 | ||
177 | + background: "#ffffff", //背景颜色 | ||
178 | + foreground: "#000000" //前景颜色 | ||
179 | + }); | ||
180 | + } | ||
181 | + | ||
182 | +</script> | ||
183 | +<script> | ||
184 | + // 星域秀场视频 | ||
185 | + $(function() { | ||
186 | + //禁止下载 | ||
187 | + $('video').bind('contextmenu', function() { | ||
188 | + return false; | ||
189 | + }); | ||
190 | + //登录 | ||
191 | + var users = $('#users').val(); | ||
192 | + if (users == 0) { | ||
193 | + //监听播放时间 | ||
194 | + video_mask('您还不是会员,可试看20秒'); | ||
195 | + var video = document.getElementById('video'); | ||
176 | 196 | ||
177 | - </script> | ||
178 | - <script> | ||
179 | - // 星域秀场视频 | ||
180 | - $(function() { | ||
181 | - //禁止下载 | ||
182 | - $('video').bind('contextmenu', function() { | ||
183 | - return false; | ||
184 | - }); | ||
185 | - //登录 | ||
186 | - var users = $('#users').val(); | ||
187 | - if (users == 0) { | ||
188 | - //监听播放时间 | ||
189 | - video_mask('您还不是会员,可试看20秒'); | ||
190 | - var video = document.getElementById('video'); | ||
191 | - | ||
192 | - //使用事件监听方式捕捉事件 | ||
193 | - video.addEventListener("timeupdate", function() { | ||
194 | - var timeDisplay; | ||
195 | - //用秒数来显示当前播放进度 | ||
196 | - timeDisplay = Math.floor(video.currentTime); | ||
197 | - console.log(Math.floor(video.currentTime)); | 197 | + //使用事件监听方式捕捉事件 |
198 | + video.addEventListener("timeupdate", function() { | ||
199 | + var timeDisplay; | ||
200 | + //用秒数来显示当前播放进度 | ||
201 | + timeDisplay = Math.floor(video.currentTime); | ||
202 | + console.log(Math.floor(video.currentTime)); | ||
203 | + video.addEventListener('play', function() { | ||
204 | + video.currentTime = 0; | ||
205 | + }); | ||
206 | + //当视频播放到 15s的时候做处理 | ||
207 | + if (timeDisplay >= 20) { | ||
198 | video.addEventListener('play', function() { | 208 | video.addEventListener('play', function() { |
199 | video.currentTime = 0; | 209 | video.currentTime = 0; |
200 | - }); | ||
201 | - //当视频播放到 15s的时候做处理 | ||
202 | - if (timeDisplay >= 20) { | ||
203 | - video.addEventListener('play', function() { | ||
204 | - video.currentTime = 0; | ||
205 | - }), | ||
206 | - video_mask('会员可观看完整视频'); | ||
207 | - video.pause(); | ||
208 | - } | ||
209 | - }, false); | ||
210 | - } | ||
211 | - //默认第一个视频 | ||
212 | - switch_video(0); | ||
213 | - //更换视频路径index | ||
214 | - video_index_url(0); | 210 | + }), |
211 | + video_mask('会员可观看完整视频'); | ||
212 | + video.pause(); | ||
213 | + } | ||
214 | + }, false); | ||
215 | + } | ||
216 | + //默认第一个视频 | ||
217 | + switch_video(0); | ||
218 | + //更换视频路径index | ||
219 | + video_index_url(0); | ||
215 | 220 | ||
216 | - var value = $('#cityName').val(); | ||
217 | - if (value != '') { | ||
218 | - $('.show_city').val(value); | ||
219 | - } else { | ||
220 | - $('.show_city').val('所有'); | ||
221 | - } | 221 | + var value = $('#cityName').val(); |
222 | + if (value != '') { | ||
223 | + $('.show_city').val(value); | ||
224 | + } else { | ||
225 | + $('.show_city').val('所有'); | ||
226 | + } | ||
227 | + | ||
228 | + $('.curren').children('li').children('.li_img').css('opacity', '0.3'); | ||
229 | + $('.curren').children('li').eq(0).children('.li_img').css('opacity', '1'); | ||
222 | 230 | ||
231 | + | ||
232 | + //点击切换 | ||
233 | + $('.curren li').click(function() { | ||
234 | + var index = $(this).index(); | ||
223 | $('.curren').children('li').children('.li_img').css('opacity', '0.3'); | 235 | $('.curren').children('li').children('.li_img').css('opacity', '0.3'); |
224 | - $('.curren').children('li').eq(0).children('.li_img').css('opacity', '1'); | ||
225 | - | ||
226 | - | ||
227 | - //点击切换 | ||
228 | - $('.curren li').click(function() { | ||
229 | - var index = $(this).index(); | ||
230 | - $('.curren').children('li').children('.li_img').css('opacity', '0.3'); | ||
231 | - $('.curren').children('li').children('p').css('color', 'rgba(153, 153, 153, 1)'); | ||
232 | - switch_video(index); | ||
233 | - $('.video_index').val(index); | ||
234 | - //更换视频路径index | ||
235 | - video_index_url(index); | ||
236 | - }); | ||
237 | - | ||
238 | - //鼠标滑过 | ||
239 | - $('.curren li').hover(function() { | ||
240 | - $('.curren').children('li').children('.li_img').css('opacity', '0.3'); | ||
241 | - $('.curren').children('li').children('p').css('color', 'rgba(153, 153, 153, 1)'); | ||
242 | - $(this).children('.li_img').css('opacity', '1'); | ||
243 | - $(this).children('p').css('color', 'rgba(9, 255, 142, 1)'); | ||
244 | - }); | ||
245 | - | ||
246 | - // 点击input下拉 | ||
247 | - $('.select input').click(function() { | ||
248 | - if ($(this).next('img').attr('src') == "__TMPL__/public/assets/starImg/down.png") { | ||
249 | - $(this).next('img').attr('src', "__TMPL__/public/assets/starImg/up.png"); | ||
250 | - $('.select ul').toggle(); | ||
251 | - } else { | ||
252 | - $(this).next('img').attr('src', "__TMPL__/public/assets/starImg/down.png"); | ||
253 | - $('.select ul').toggle(); | ||
254 | - } | 236 | + $('.curren').children('li').children('p').css('color', 'rgba(153, 153, 153, 1)'); |
237 | + switch_video(index); | ||
238 | + $('.video_index').val(index); | ||
239 | + //更换视频路径index | ||
240 | + video_index_url(index); | ||
241 | + }); | ||
255 | 242 | ||
256 | - }); | 243 | + //鼠标滑过 |
244 | + $('.curren li').hover(function() { | ||
245 | + $('.curren').children('li').children('.li_img').css('opacity', '0.3'); | ||
246 | + $('.curren').children('li').children('p').css('color', 'rgba(153, 153, 153, 1)'); | ||
247 | + $(this).children('.li_img').css('opacity', '1'); | ||
248 | + $(this).children('p').css('color', 'rgba(9, 255, 142, 1)'); | ||
249 | + }); | ||
257 | 250 | ||
258 | - //下拉框选择城市 | ||
259 | - $('.select ul li').click(function() { | ||
260 | - $('.show_city').val($(this).text()); | ||
261 | - $('.select ul').hide(); | 251 | + // 点击input下拉 |
252 | + $('.select input').click(function() { | ||
253 | + if ($(this).next('img').attr('src') == "__TMPL__/public/assets/starImg/down.png") { | ||
254 | + $(this).next('img').attr('src', "__TMPL__/public/assets/starImg/up.png"); | ||
255 | + $('.select ul').toggle(); | ||
256 | + } else { | ||
257 | + $(this).next('img').attr('src', "__TMPL__/public/assets/starImg/down.png"); | ||
258 | + $('.select ul').toggle(); | ||
259 | + } | ||
262 | 260 | ||
263 | - $('#city_id').val($(this).val()); | 261 | + }); |
264 | 262 | ||
265 | - $('form').submit(); | ||
266 | - }); | 263 | + //下拉框选择城市 |
264 | + $('.select ul li').click(function() { | ||
265 | + $('.show_city').val($(this).text()); | ||
266 | + $('.select ul').hide(); | ||
267 | 267 | ||
268 | - // 弹出框 | ||
269 | - setInterval(function() { | ||
270 | - $('.video_mask').hide(); | ||
271 | - }, 4000); | 268 | + $('#city_id').val($(this).val()); |
272 | 269 | ||
273 | - $('.curren').eq(0).addClass('video_active'); | 270 | + $('form').submit(); |
274 | }); | 271 | }); |
275 | 272 | ||
276 | - function video_index_url(index){ | ||
277 | - var city_id = getUrlParam('city_id'); | ||
278 | - if(city_id == ''){ | ||
279 | - $('.video_index_url').val(window.location.href+'?video_index='+index); | ||
280 | - }else{ | ||
281 | - $('.video_index_url').val(window.location.href+'&video_index='+index); | ||
282 | - } | ||
283 | - } | 273 | + // 弹出框 |
274 | + setInterval(function() { | ||
275 | + $('.video_mask').hide(); | ||
276 | + }, 4000); | ||
284 | 277 | ||
285 | - //切换视频 | ||
286 | - function switch_video(index) { | ||
287 | - //视频路径 | ||
288 | - var li_index = $('.curren').children('li').eq(index); | ||
289 | - //选中颜色 | ||
290 | - li_index.children('.li_img').css('opacity', '1'); | ||
291 | - li_index.children('p').css('color', 'rgba(9, 255, 142, 1)'); | ||
292 | - | ||
293 | - var oneVideo = li_index.children('.li_video').val(); | ||
294 | - $('#video').attr('src', oneVideo); | ||
295 | - // 视频封面图 | ||
296 | - $('.video_poster').css('z-index', '10'); | ||
297 | - | ||
298 | - var oneCover = li_index.children('.li_img').attr('src'); | ||
299 | - $('.video_poster').attr('src', oneCover); | ||
300 | - $('.play_button').css({ | ||
301 | - 'z-index': "11", | ||
302 | - "display": "block" | ||
303 | - }); | ||
304 | - //视频id,标题,国家,取景,上映时间 | ||
305 | - var id = li_index.children('.li_id').val(); | ||
306 | - var post_title = li_index.children('.li_post_title').val(); | ||
307 | - var city_name = li_index.children('.li_city_name').val(); | ||
308 | - var framing = li_index.children('.li_framing').val(); | ||
309 | - var release_time = li_index.children('.li_release_time').val(); | ||
310 | - $('#li_id').val(id); | ||
311 | - $('.post_title').text(post_title); | ||
312 | - $('.city_name').text(city_name); | ||
313 | - $('.framing').text(framing); | ||
314 | - $('.release_time').text(release_time); | ||
315 | - | ||
316 | - //是否收藏 | ||
317 | - is_collections(id); | ||
318 | - | ||
319 | - //是否点赞 | ||
320 | - is_likes(id); | 278 | + $('.curren').eq(0).addClass('video_active'); |
279 | + }); | ||
321 | 280 | ||
281 | + function video_index_url(index){ | ||
282 | + var city_id = getUrlParam('city_id'); | ||
283 | + if(city_id == ''){ | ||
284 | + $('.video_index_url').val(window.location.href+'?video_index='+index); | ||
285 | + }else{ | ||
286 | + $('.video_index_url').val(window.location.href+'&video_index='+index); | ||
322 | } | 287 | } |
323 | - // 点击播放 | ||
324 | - function bofang() { | ||
325 | - video.play(); | ||
326 | - $('#video').attr('controls', 'controls'); | ||
327 | - $('.play_button').hide(); | ||
328 | - $('.video_poster').css('z-index', '-1'); | ||
329 | - } | 288 | + } |
289 | + | ||
290 | + //切换视频 | ||
291 | + function switch_video(index) { | ||
292 | + //视频路径 | ||
293 | + var li_index = $('.curren').children('li').eq(index); | ||
294 | + //选中颜色 | ||
295 | + li_index.children('.li_img').css('opacity', '1'); | ||
296 | + li_index.children('p').css('color', 'rgba(9, 255, 142, 1)'); | ||
297 | + | ||
298 | + var oneVideo = li_index.children('.li_video').val(); | ||
299 | + $('#video').attr('src', oneVideo); | ||
300 | + // 视频封面图 | ||
301 | + $('.video_poster').css('z-index', '10'); | ||
302 | + | ||
303 | + var oneCover = li_index.children('.li_img').attr('src'); | ||
304 | + $('.video_poster').attr('src', oneCover); | ||
305 | + $('.play_button').css({ | ||
306 | + 'z-index': "11", | ||
307 | + "display": "block" | ||
308 | + }); | ||
309 | + //视频id,标题,国家,取景,上映时间 | ||
310 | + var id = li_index.children('.li_id').val(); | ||
311 | + var post_title = li_index.children('.li_post_title').val(); | ||
312 | + var city_name = li_index.children('.li_city_name').val(); | ||
313 | + var framing = li_index.children('.li_framing').val(); | ||
314 | + var release_time = li_index.children('.li_release_time').val(); | ||
315 | + $('#li_id').val(id); | ||
316 | + $('.post_title').text(post_title); | ||
317 | + $('.city_name').text(city_name); | ||
318 | + $('.framing').text(framing); | ||
319 | + $('.release_time').text(release_time); | ||
330 | 320 | ||
331 | //是否收藏 | 321 | //是否收藏 |
332 | - function is_collections(article_id) { | ||
333 | - var host = 'http://' + window.location.host; | ||
334 | - $.ajax({ | ||
335 | - type: 'POST', | ||
336 | - url: '/portal/star/is_collections', | ||
337 | - data: { | ||
338 | - 'id': article_id, | ||
339 | - }, | ||
340 | - dataType: 'json', | ||
341 | - async: false, | ||
342 | - success: function(data) { | ||
343 | - console.log(data); | ||
344 | - if (data.code == 1) { | ||
345 | - $('#collections').attr('src', host + '/themes/simpleboot3/public/assets/starImg/bicon_15.png') | ||
346 | - } else { | ||
347 | - $('#collections').attr('src', host + '/themes/simpleboot3/public/assets/starImg/bicon_02.png') | ||
348 | - } | ||
349 | - } | ||
350 | - }); | ||
351 | - } | 322 | + is_collections(id); |
352 | 323 | ||
353 | //是否点赞 | 324 | //是否点赞 |
354 | - function is_likes(article_id) { | ||
355 | - var host = 'http://' + window.location.host; | ||
356 | - $.ajax({ | ||
357 | - type: 'POST', | ||
358 | - url: '/portal/star/is_likes', | ||
359 | - data: { | ||
360 | - 'id': article_id, | ||
361 | - }, | ||
362 | - dataType: 'json', | ||
363 | - async: false, | ||
364 | - success: function(data) { | ||
365 | - if (data.code == 1) { | ||
366 | - $('#likes').attr('src', host + '/themes/simpleboot3/public/assets/starImg/bicon_161.png') | ||
367 | - } else { | ||
368 | - $('#likes').attr('src', host + '/themes/simpleboot3/public/assets/starImg/bicon_031.png') | ||
369 | - } | 325 | + is_likes(id); |
326 | + | ||
327 | + } | ||
328 | + // 点击播放 | ||
329 | + function bofang() { | ||
330 | + video.play(); | ||
331 | + $('#video').attr('controls', 'controls'); | ||
332 | + $('.play_button').hide(); | ||
333 | + $('.video_poster').css('z-index', '-1'); | ||
334 | + } | ||
335 | + | ||
336 | + //是否收藏 | ||
337 | + function is_collections(article_id) { | ||
338 | + var host = 'http://' + window.location.host; | ||
339 | + $.ajax({ | ||
340 | + type: 'POST', | ||
341 | + url: '/portal/star/is_collections', | ||
342 | + data: { | ||
343 | + 'id': article_id, | ||
344 | + }, | ||
345 | + dataType: 'json', | ||
346 | + async: false, | ||
347 | + success: function(data) { | ||
348 | + console.log(data); | ||
349 | + if (data.code == 1) { | ||
350 | + $('#collections').attr('src', host + '/themes/simpleboot3/public/assets/starImg/bicon_15.png') | ||
351 | + } else { | ||
352 | + $('#collections').attr('src', host + '/themes/simpleboot3/public/assets/starImg/bicon_02.png') | ||
370 | } | 353 | } |
371 | - }); | ||
372 | - } | ||
373 | - </script> | 354 | + } |
355 | + }); | ||
356 | + } | ||
357 | + | ||
358 | + //是否点赞 | ||
359 | + function is_likes(article_id) { | ||
360 | + var host = 'http://' + window.location.host; | ||
361 | + $.ajax({ | ||
362 | + type: 'POST', | ||
363 | + url: '/portal/star/is_likes', | ||
364 | + data: { | ||
365 | + 'id': article_id, | ||
366 | + }, | ||
367 | + dataType: 'json', | ||
368 | + async: false, | ||
369 | + success: function(data) { | ||
370 | + if (data.code == 1) { | ||
371 | + $('#likes').attr('src', host + '/themes/simpleboot3/public/assets/starImg/bicon_161.png') | ||
372 | + } else { | ||
373 | + $('#likes').attr('src', host + '/themes/simpleboot3/public/assets/starImg/bicon_031.png') | ||
374 | + } | ||
375 | + } | ||
376 | + }); | ||
377 | + } | ||
378 | +</script> | ||
374 | </body> | 379 | </body> |
375 | 380 | ||
376 | </html> | 381 | </html> |
-
请 注册 或 登录 后发表评论