作者 景龙
1 个管道 的构建 通过 耗费 11 秒

测试视频分享定位

@@ -106,6 +106,8 @@ @@ -106,6 +106,8 @@
106 <input type="hidden" value="" id="li_id"> 106 <input type="hidden" value="" id="li_id">
107 <p>取景:<span class="framing"></span></p> 107 <p>取景:<span class="framing"></span></p>
108 <p>上映时间:<span class="release_time"></span></p> 108 <p>上映时间:<span class="release_time"></span></p>
  109 + <!--视频索引-->
  110 + <input type="hidden" value="0" class="video_index">
109 </div> 111 </div>
110 <!-- 分享 --> 112 <!-- 分享 -->
111 <div class="show_9_video_asideTxt3 clearfix"> 113 <div class="show_9_video_asideTxt3 clearfix">
@@ -176,6 +178,7 @@ @@ -176,6 +178,7 @@
176 $('.curren').children('li').children('.li_img').css('opacity', '0.3'); 178 $('.curren').children('li').children('.li_img').css('opacity', '0.3');
177 $('.curren').children('li').children('p').css('color', 'rgba(153, 153, 153, 1)'); 179 $('.curren').children('li').children('p').css('color', 'rgba(153, 153, 153, 1)');
178 switch_video(index); 180 switch_video(index);
  181 + $('.video_index').val(index);
179 }); 182 });
180 183
181 //鼠标滑过 184 //鼠标滑过
@@ -20,7 +20,21 @@ @@ -20,7 +20,21 @@
20 <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script> 20 <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
21 <script src="https://cdn.bootcss.com/jquery.qrcode/1.0/jquery.qrcode.min.js"></script> 21 <script src="https://cdn.bootcss.com/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
22 <script> 22 <script>
23 - var url = window.location.href; 23 + var pathname = window.location.pathname;
  24 + var video_index = $('.video_index').val();
  25 + var city_id = getUrlParam('city_id');
  26 + // 分享链接
  27 + var url;
  28 + if(pathname == '/portal/region/getMoreVideo'){
  29 + if(city_id == ''){
  30 + url = window.location.href+'?video_index='+video_index;
  31 + }else{
  32 + url = window.location.href+'&video_index='+video_index;
  33 + }
  34 +
  35 + }else{
  36 + url = window.location.href;
  37 + }
24 /* 生成二维码 */ 38 /* 生成二维码 */
25 $("#qrcode").qrcode({ 39 $("#qrcode").qrcode({
26 text: url, //设置二维码内容 40 text: url, //设置二维码内容
@@ -133,6 +133,9 @@ @@ -133,6 +133,9 @@
133 <!-- <div class="index_seventh_bottom_two">国家:<span class="city_name"></span></div> --> 133 <!-- <div class="index_seventh_bottom_two">国家:<span class="city_name"></span></div> -->
134 <div class="index_seventh_bottom_three">取景:<span class="framing"></span></div> 134 <div class="index_seventh_bottom_three">取景:<span class="framing"></span></div>
135 <div class="index_seventh_bottom_four">上映时间:<span class="release_time"></span></div> 135 <div class="index_seventh_bottom_four">上映时间:<span class="release_time"></span></div>
  136 + <!--视频索引-->
  137 + <input type="hidden" value="0" class="video_index">
  138 +
136 <div class="index_seventh_bottom_five"> 139 <div class="index_seventh_bottom_five">
137 <div class="index_seventh_bottom_title">分享:</div> 140 <div class="index_seventh_bottom_title">分享:</div>
138 <div class="index_seventh_bottom_img1"> 141 <div class="index_seventh_bottom_img1">
@@ -233,8 +236,9 @@ @@ -233,8 +236,9 @@
233 $(".select ul").toggle(); 236 $(".select ul").toggle();
234 } 237 }
235 }); 238 });
  239 + var video_index = getUrlParam('video_index');
236 //默认第一个视频 240 //默认第一个视频
237 - switch_video(0); 241 + switch_video(video_index);
238 242
239 //点击切换 243 //点击切换
240 $('.curren li').click(function() { 244 $('.curren li').click(function() {
@@ -242,6 +246,7 @@ @@ -242,6 +246,7 @@
242 $('.curren').children('li').find('.li_img').css('opacity', '0.3'); 246 $('.curren').children('li').find('.li_img').css('opacity', '0.3');
243 $('.curren').children('li').find('.txt-cut').css('color', 'rgba(153, 153, 153, 1)'); 247 $('.curren').children('li').find('.txt-cut').css('color', 'rgba(153, 153, 153, 1)');
244 switch_video(index); 248 switch_video(index);
  249 + $('.video_index').val(index);
245 }); 250 });
246 251
247 // $(".select ul li").click(function() { 252 // $(".select ul li").click(function() {
@@ -2,8 +2,21 @@ @@ -2,8 +2,21 @@
2 <script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script> 2 <script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
3 <script> 3 <script>
4 $(function () { 4 $(function () {
  5 + var pathname = window.location.pathname;
  6 + var video_index = $('.video_index').val();
  7 + var city_id = getUrlParam('city_id');
5 // 分享链接 8 // 分享链接
6 - var url = window.location.href; 9 + var url;
  10 + if(pathname == '/portal/region/getMoreVideo'){
  11 + if(city_id == ''){
  12 + url = window.location.href+'?video_index='+video_index;
  13 + }else{
  14 + url = window.location.href+'&video_index='+video_index;
  15 + }
  16 +
  17 + }else{
  18 + url = window.location.href;
  19 + }
7 // 分享标题 20 // 分享标题
8 var title_title = $(document).attr('title'); 21 var title_title = $(document).attr('title');
9 // 分享简介 22 // 分享简介