作者 zhangwei
@@ -24,7 +24,7 @@ class IndexController extends HomeBaseController @@ -24,7 +24,7 @@ class IndexController extends HomeBaseController
24 //banner轮播图 24 //banner轮播图
25 // $coverImg = cache('coverImg'); 25 // $coverImg = cache('coverImg');
26 // if(!$coverImg){ 26 // if(!$coverImg){
27 - $coverImg = $this->getCoverImg(CityCategoryModel::indexImg,3); 27 + $coverImg = $this->getCoverImg(CityCategoryModel::indexImg,10);
28 // cache('coverImg',$coverImg); 28 // cache('coverImg',$coverImg);
29 // } 29 // }
30 $this->assign('coverImg',$coverImg); 30 $this->assign('coverImg',$coverImg);
@@ -404,6 +404,9 @@ class StarController extends HomeBaseController @@ -404,6 +404,9 @@ class StarController extends HomeBaseController
404 //判断是否登录 404 //判断是否登录
405 $login = cmf_is_user_login(); 405 $login = cmf_is_user_login();
406 $article_id = $this->request->param('article_id');//文章id 406 $article_id = $this->request->param('article_id');//文章id
  407 + if(empty($article_id)){
  408 + $this->apiResponse(0,'收藏失败!');
  409 + }
407 $post_url = $this->request->param('post_url');//文章链接 410 $post_url = $this->request->param('post_url');//文章链接
408 if($login){ 411 if($login){
409 $data['uid'] = cmf_get_current_user_id(); 412 $data['uid'] = cmf_get_current_user_id();
@@ -473,6 +476,9 @@ class StarController extends HomeBaseController @@ -473,6 +476,9 @@ class StarController extends HomeBaseController
473 //判断是否登录 476 //判断是否登录
474 $login = cmf_is_user_login(); 477 $login = cmf_is_user_login();
475 $article_id = $this->request->param('article_id');//文章id 478 $article_id = $this->request->param('article_id');//文章id
  479 + if(empty($article_id)){
  480 + $this->apiResponse(0,'点赞失败!');
  481 + }
476 if($login){ 482 if($login){
477 $data['uid'] = cmf_get_current_user_id(); 483 $data['uid'] = cmf_get_current_user_id();
478 $data['post_id'] = $article_id; 484 $data['post_id'] = $article_id;
@@ -508,4 +514,47 @@ class StarController extends HomeBaseController @@ -508,4 +514,47 @@ class StarController extends HomeBaseController
508 $this->apiResponse(0,'请登录后操作!'); 514 $this->apiResponse(0,'请登录后操作!');
509 } 515 }
510 } 516 }
  517 +
  518 +
  519 +
  520 +
  521 +
  522 + //更多视频显示是否收藏与点赞
  523 + //是否收藏
  524 + public function is_collections(){
  525 + //判断是否登录
  526 + $login = cmf_is_user_login();
  527 + $article_id = $this->request->param('id');//文章id
  528 + if($login){
  529 + $uid = cmf_get_current_user_id();
  530 + $collectionModel = new CollectionModel();
  531 + $res = $collectionModel->where(['uid'=>$uid,'post_id'=>$article_id])->find();
  532 + if($res){
  533 + $this->apiResponse(1);
  534 + }else{
  535 + $this->apiResponse(0);
  536 + }
  537 + }else{
  538 + $this->apiResponse(0);
  539 + }
  540 + }
  541 +
  542 + //是否点赞
  543 + public function is_likes(){
  544 + //判断是否登录
  545 + $login = cmf_is_user_login();
  546 + $article_id = $this->request->param('id');//文章id
  547 + if($login){
  548 + $uid = cmf_get_current_user_id();
  549 + $likeModel = new LikeModel();
  550 + $res = $likeModel->where(['uid'=>$uid,'post_id'=>$article_id])->find();
  551 + if($res){
  552 + $this->apiResponse(1);
  553 + }else{
  554 + $this->apiResponse(0);
  555 + }
  556 + }else{
  557 + $this->apiResponse(0);
  558 + }
  559 + }
511 } 560 }
@@ -102,7 +102,7 @@ @@ -102,7 +102,7 @@
102 </notempty> 102 </notempty>
103 <!-- 侧边 --> 103 <!-- 侧边 -->
104 <div class="index_sidebar"> 104 <div class="index_sidebar">
105 - <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=1309572580&site=qq&menu=yes"> 105 + <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=2250343976&site=qq&menu=yes">
106 <img src="__TMPL__/public/assets/starImg/aicon_24.png" alt="独角星球 小众目的地 旅游资讯"> 106 <img src="__TMPL__/public/assets/starImg/aicon_24.png" alt="独角星球 小众目的地 旅游资讯">
107 </a> 107 </a>
108 <img class="index_scrollTop" src="__TMPL__/public/assets/starImg/aicon_25.png" alt="独角星球 小众目的地 旅游资讯"> 108 <img class="index_scrollTop" src="__TMPL__/public/assets/starImg/aicon_25.png" alt="独角星球 小众目的地 旅游资讯">
@@ -69,6 +69,8 @@ @@ -69,6 +69,8 @@
69 <p> 69 <p>
70 {$vo.post_title} 70 {$vo.post_title}
71 </p> 71 </p>
  72 + <!--id-->
  73 + <input type="hidden" value="{$vo.id}" class="li_id">
72 <input type="hidden" value="{:cmf_get_file_download_url($vo.video)}" class="li_video"> 74 <input type="hidden" value="{:cmf_get_file_download_url($vo.video)}" class="li_video">
73 <!--标题--> 75 <!--标题-->
74 <input type="hidden" value="{$vo.post_title}" class="li_post_title"> 76 <input type="hidden" value="{$vo.post_title}" class="li_post_title">
@@ -90,14 +92,19 @@ @@ -90,14 +92,19 @@
90 <!-- 国家 --> 92 <!-- 国家 -->
91 <div class="show_9_video_asideTxt2"> 93 <div class="show_9_video_asideTxt2">
92 <!--<p>国家:<span class="city_name"></span></p>--> 94 <!--<p>国家:<span class="city_name"></span></p>-->
  95 + <input type="hidden" value="" id="li_id">
93 <p>取景:<span class="framing"></span></p> 96 <p>取景:<span class="framing"></span></p>
94 <p>上映时间:<span class="release_time"></span></p> 97 <p>上映时间:<span class="release_time"></span></p>
95 </div> 98 </div>
96 <!-- 分享 --> 99 <!-- 分享 -->
97 <div class="show_9_video_asideTxt3 clearfix"> 100 <div class="show_9_video_asideTxt3 clearfix">
98 <p>分享:</p> 101 <p>分享:</p>
  102 + <input type="hidden" class="collection" value="">
  103 + <input type="hidden" class="like" value="">
99 <img src="__TMPL__/public/assets/starImg/aicon_89.png" alt=""> 104 <img src="__TMPL__/public/assets/starImg/aicon_89.png" alt="">
100 <img src="__TMPL__/public/assets/starImg/aicon_90.png" alt=""> 105 <img src="__TMPL__/public/assets/starImg/aicon_90.png" alt="">
  106 + <img id="collections" src="__TMPL__/public/assets/starImg/bicon_02.png" alt="">
  107 + <img id="likes" src="__TMPL__/public/assets/starImg/bicon_03.png" alt="">
101 </div> 108 </div>
102 </div> 109 </div>
103 </div> 110 </div>
@@ -215,15 +222,24 @@ @@ -215,15 +222,24 @@
215 'z-index': "11", 222 'z-index': "11",
216 "display": "block" 223 "display": "block"
217 }); 224 });
218 - //标题,国家,取景,上映时间 225 + //视频id,标题,国家,取景,上映时间
  226 + var id = li_index.children('.li_id').val();
219 var post_title = li_index.children('.li_post_title').val(); 227 var post_title = li_index.children('.li_post_title').val();
220 var city_name = li_index.children('.li_city_name').val(); 228 var city_name = li_index.children('.li_city_name').val();
221 var framing = li_index.children('.li_framing').val(); 229 var framing = li_index.children('.li_framing').val();
222 var release_time = li_index.children('.li_release_time').val(); 230 var release_time = li_index.children('.li_release_time').val();
  231 + $('#li_id').val(id);
223 $('.post_title').text(post_title); 232 $('.post_title').text(post_title);
224 $('.city_name').text(city_name); 233 $('.city_name').text(city_name);
225 $('.framing').text(framing); 234 $('.framing').text(framing);
226 $('.release_time').text(release_time); 235 $('.release_time').text(release_time);
  236 +
  237 + //是否收藏
  238 + is_collections(id);
  239 +
  240 + //是否点赞
  241 + is_likes(id);
  242 +
227 } 243 }
228 // 点击播放 244 // 点击播放
229 function bofang() { 245 function bofang() {
@@ -232,6 +248,49 @@ @@ -232,6 +248,49 @@
232 $('.play_button').hide(); 248 $('.play_button').hide();
233 $('.video_poster').css('z-index', '-1'); 249 $('.video_poster').css('z-index', '-1');
234 } 250 }
  251 +
  252 + //是否收藏
  253 + function is_collections(article_id){
  254 + var host = 'http://'+window.location.host;
  255 + $.ajax({
  256 + type: 'POST',
  257 + url: '/portal/star/is_collections',
  258 + data: {
  259 + 'id':article_id,
  260 + },
  261 + dataType: 'json',
  262 + async : false,
  263 + success: function (data) {
  264 + console.log(data);
  265 + if (data.code == 1) {
  266 + $('#collections').attr('src',host+'/themes/simpleboot3/public/assets/starImg/bicon_15.png')
  267 + } else {
  268 + $('#collections').attr('src',host+'/themes/simpleboot3/public/assets/starImg/bicon_02.png')
  269 + }
  270 + }
  271 + });
  272 + }
  273 +
  274 + //是否点赞
  275 + function is_likes(article_id){
  276 + var host = 'http://'+window.location.host;
  277 + $.ajax({
  278 + type: 'POST',
  279 + url: '/portal/star/is_likes',
  280 + data: {
  281 + 'id':article_id,
  282 + },
  283 + dataType: 'json',
  284 + async : false,
  285 + success: function (data) {
  286 + if (data.code == 1) {
  287 + $('#likes').attr('src',host+'/themes/simpleboot3/public/assets/starImg/bicon_16.png')
  288 + } else {
  289 + $('#likes').attr('src',host+'/themes/simpleboot3/public/assets/starImg/bicon_03.png')
  290 + }
  291 + }
  292 + });
  293 + }
235 </script> 294 </script>
236 </body> 295 </body>
237 296
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 </div> 31 </div>
32 <a href="{$res.pay_url}"> 32 <a href="{$res.pay_url}">
33 <div class="wares_right_pay"> 33 <div class="wares_right_pay">
34 - 立即前往购买 34 + 立即前往咨询
35 </div> 35 </div>
36 </a> 36 </a>
37 </div> 37 </div>
@@ -48,7 +48,7 @@ @@ -48,7 +48,7 @@
48 </div> 48 </div>
49 <div class="Travel_right_spec_pay"> 49 <div class="Travel_right_spec_pay">
50 <a href="{$res.pay_url}"> 50 <a href="{$res.pay_url}">
51 - 立即前往购买 51 + 立即前往咨询
52 </a> 52 </a>
53 </div> 53 </div>
54 </div> 54 </div>
@@ -32,6 +32,42 @@ $(function(){ @@ -32,6 +32,42 @@ $(function(){
32 $(this).children('img').attr('src', host+'/themes/simpleboot3/public/assets/starImg/bicon_03.png'); 32 $(this).children('img').attr('src', host+'/themes/simpleboot3/public/assets/starImg/bicon_03.png');
33 } 33 }
34 }); 34 });
  35 +
  36 + // 收藏更多视频
  37 + $('#collections').click(function() {
  38 + if ($(this).attr('src') == host+'/themes/simpleboot3/public/assets/starImg/bicon_02.png') {
  39 + var login = operation('/portal/star/collection',1);
  40 + if(login == 0){
  41 + return false;
  42 + }
  43 + $(this).attr('src', host+'/themes/simpleboot3/public/assets/starImg/bicon_15.png');
  44 + } else {
  45 + var login = operation('/portal/star/cancelCollection',1);
  46 + if(login == 0){
  47 + return false;
  48 + }
  49 + $(this).attr('src', host+'/themes/simpleboot3/public/assets/starImg/bicon_02.png');
  50 + }
  51 + });
  52 +
  53 + //点赞
  54 + $('#likes').click(function() {
  55 + if ($(this).attr('src') == host+'/themes/simpleboot3/public/assets/starImg/bicon_03.png') {
  56 + var login = operation('/portal/star/like',1);
  57 + if(login == 0){
  58 + return false;
  59 + }
  60 + $(this).attr('src', host+'/themes/simpleboot3/public/assets/starImg/bicon_16.png');
  61 + } else {
  62 + var login = operation('/portal/star/cancelLike',1);
  63 + if(login == 0){
  64 + return false;
  65 + }
  66 + $(this).attr('src', host+'/themes/simpleboot3/public/assets/starImg/bicon_03.png');
  67 + }
  68 + });
  69 +
  70 +
35 // 评论判断长度显示与隐藏 71 // 评论判断长度显示与隐藏
36 if ($('.show_2_pinL').length < 3) { 72 if ($('.show_2_pinL').length < 3) {
37 $('.show_main_more').hide(); 73 $('.show_main_more').hide();
@@ -138,11 +174,31 @@ $(function(){ @@ -138,11 +174,31 @@ $(function(){
138 $("#searchForm").submit();//处理事件 174 $("#searchForm").submit();//处理事件
139 } 175 }
140 }); 176 });
  177 +
  178 + var share_url = encodeURIComponent(location.href);
  179 + var share_title = encodeURIComponent(document.title);
  180 + //分享到微博
  181 + $('.weibo').click(function(){
  182 + var param = {
  183 + url: share_url,
  184 + title: share_title,
  185 + rnd: new Date().valueOf()
  186 + };
  187 + var temp = [];
  188 + for (var p in param) {
  189 + temp.push(p + '=' + encodeURIComponent(param[p] || ''))
  190 + }
  191 + window.open('http://v.t.sina.com.cn/share/share.php?' + temp.join('&'));
  192 + });
141 }); 193 });
142 194
143 //点赞收藏 195 //点赞收藏
144 -function operation(url){  
145 - var article_id = getUrlParam('id'); 196 +function operation(url,id =''){
  197 + if(id == ''){
  198 + var article_id = getUrlParam('id');
  199 + }else{
  200 + var article_id = $('#li_id').val();
  201 + }
146 var is_login = 1; 202 var is_login = 1;
147 var post_url = window.location.pathname+window.location.search; 203 var post_url = window.location.pathname+window.location.search;
148 $.ajax({ 204 $.ajax({
@@ -17,12 +17,12 @@ @@ -17,12 +17,12 @@
17 </notempty> 17 </notempty>
18 </div> 18 </div>
19 <!-- wx分享 --> 19 <!-- wx分享 -->
20 - <div class="wx_go"> 20 + <div class="wx_go weixin">
21 <img src="__TMPL__/public/assets/starImg/bicon_04.png" alt=""> 21 <img src="__TMPL__/public/assets/starImg/bicon_04.png" alt="">
22 <p>168</p> 22 <p>168</p>
23 </div> 23 </div>
24 <!-- wb分享 --> 24 <!-- wb分享 -->
25 - <div class="wb_go"> 25 + <div class="wb_go weibo">
26 <img src="__TMPL__/public/assets/starImg/bicon_05.png" alt=""> 26 <img src="__TMPL__/public/assets/starImg/bicon_05.png" alt="">
27 <p>168</p> 27 <p>168</p>
28 </div> 28 </div>
@@ -87,7 +87,8 @@ @@ -87,7 +87,8 @@
87 {$vo.post_title} 87 {$vo.post_title}
88 </div> 88 </div>
89 </div> 89 </div>
90 - 90 + <!--id-->
  91 + <input type="hidden" value="{$vo.id}" class="li_id">
91 <input type="hidden" value="{:cmf_get_file_download_url($vo.video)}" class="li_video"> 92 <input type="hidden" value="{:cmf_get_file_download_url($vo.video)}" class="li_video">
92 <!--标题--> 93 <!--标题-->
93 <input type="hidden" value="{$vo.post_title}" class="li_post_title"> 94 <input type="hidden" value="{$vo.post_title}" class="li_post_title">
@@ -106,6 +107,8 @@ @@ -106,6 +107,8 @@
106 <!-- 影片信息 --> 107 <!-- 影片信息 -->
107 <div class="index_seventh_bottom"> 108 <div class="index_seventh_bottom">
108 <div class="index_seventh_bottom_one"><span class="post_title"></span></div> 109 <div class="index_seventh_bottom_one"><span class="post_title"></span></div>
  110 +
  111 + <input type="hidden" value="" id="li_id">
109 <!-- <div class="index_seventh_bottom_two">国家:<span class="city_name"></span></div> --> 112 <!-- <div class="index_seventh_bottom_two">国家:<span class="city_name"></span></div> -->
110 <div class="index_seventh_bottom_three">取景:<span class="framing"></span></div> 113 <div class="index_seventh_bottom_three">取景:<span class="framing"></span></div>
111 <div class="index_seventh_bottom_four">上映时间:<span class="release_time"></span></div> 114 <div class="index_seventh_bottom_four">上映时间:<span class="release_time"></span></div>
@@ -117,6 +120,15 @@ @@ -117,6 +120,15 @@
117 <div class="index_seventh_bottom_img1"> 120 <div class="index_seventh_bottom_img1">
118 <img src="__TMPL__/public/assets/images/cicon_72@2x.png" alt="" /> 121 <img src="__TMPL__/public/assets/images/cicon_72@2x.png" alt="" />
119 </div> 122 </div>
  123 + <div class="index_seventh_bottom_img1">
  124 + <img id="collections" src="__TMPL__/public/assets/images/bicon_02.png" alt="">
  125 + </div>
  126 + <div class="index_seventh_bottom_img1">
  127 + <img id="likes" src="__TMPL__/public/assets/images/bicon_03.png" alt="">
  128 + </div>
  129 +
  130 + <input type="hidden" class="collection" value="">
  131 + <input type="hidden" class="like" value="">
120 </div> 132 </div>
121 </div> 133 </div>
122 134
@@ -269,14 +281,65 @@ @@ -269,14 +281,65 @@
269 // }); 281 // });
270 282
271 //标题,国家,取景,上映时间 283 //标题,国家,取景,上映时间
  284 + var id = li_index.children('.li_id').val();
272 var post_title = li_index.children('.li_post_title').val(); 285 var post_title = li_index.children('.li_post_title').val();
273 var city_name = li_index.children('.li_city_name').val(); 286 var city_name = li_index.children('.li_city_name').val();
274 var framing = li_index.children('.li_framing').val(); 287 var framing = li_index.children('.li_framing').val();
275 var release_time = li_index.children('.li_release_time').val(); 288 var release_time = li_index.children('.li_release_time').val();
  289 + $('#li_id').val(id);
276 $('.post_title').text(post_title); 290 $('.post_title').text(post_title);
277 $('.city_name').text(city_name); 291 $('.city_name').text(city_name);
278 $('.framing').text(framing); 292 $('.framing').text(framing);
279 $('.release_time').text(release_time); 293 $('.release_time').text(release_time);
  294 +
  295 + //是否收藏
  296 + is_collections(id);
  297 +
  298 + //是否点赞
  299 + is_likes(id);
  300 + }
  301 +
  302 + //是否收藏
  303 + function is_collections(article_id){
  304 + var host = 'http://' + window.location.host + '/themes/simpleboot3_mobile/public/assets';
  305 + $.ajax({
  306 + type: 'POST',
  307 + url: '/portal/star/is_collections',
  308 + data: {
  309 + 'id':article_id,
  310 + },
  311 + dataType: 'json',
  312 + async : false,
  313 + success: function (data) {
  314 + console.log(data);
  315 + if (data.code == 1) {
  316 + $('#collections').attr('src',host+'/images/bicon_15.png')
  317 + } else {
  318 + $('#collections').attr('src',host+'/images/bicon_02.png')
  319 + }
  320 + }
  321 + });
  322 + }
  323 +
  324 + //是否点赞
  325 + function is_likes(article_id){
  326 + var host = 'http://' + window.location.host + '/themes/simpleboot3_mobile/public/assets';
  327 + $.ajax({
  328 + type: 'POST',
  329 + url: '/portal/star/is_likes',
  330 + data: {
  331 + 'id':article_id,
  332 + },
  333 + dataType: 'json',
  334 + async : false,
  335 + success: function (data) {
  336 + if (data.code == 1) {
  337 + $('#likes').attr('src',host+'/images/bicon_16.png')
  338 + } else {
  339 + $('#likes').attr('src',host+'/images/bicon_03.png')
  340 + }
  341 + }
  342 + });
280 } 343 }
281 </script> 344 </script>
282 345
@@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
34 {$res.post_excerpt} 34 {$res.post_excerpt}
35 </div> 35 </div>
36 <a href="{$res.pay_url}"> 36 <a href="{$res.pay_url}">
37 - <div class="index_fifteenth_five">立即前往资讯</div> 37 + <div class="index_fifteenth_five">立即前往咨询</div>
38 </a> 38 </a>
39 </div> 39 </div>
40 </div> 40 </div>
@@ -61,7 +61,7 @@ @@ -61,7 +61,7 @@
61 </div> 61 </div>
62 <a href="{$res.pay_url}"> 62 <a href="{$res.pay_url}">
63 <div class="index_fifteenth_five"> 63 <div class="index_fifteenth_five">
64 - 立即前往资讯 64 + 立即前往咨询
65 </div> 65 </div>
66 </a> 66 </a>
67 </div> 67 </div>
@@ -117,7 +117,7 @@ @@ -117,7 +117,7 @@
117 </div> 117 </div>
118 <div class="first_scene_top_ch">旅游<span>地产</span></div> 118 <div class="first_scene_top_ch">旅游<span>地产</span></div>
119 <div class="first_scene_top_en"> 119 <div class="first_scene_top_en">
120 - Tourism Real Estate 120 + Overseas Investment
121 </div> 121 </div>
122 </div> 122 </div>
123 </div> 123 </div>
@@ -74,6 +74,41 @@ $(function() { @@ -74,6 +74,41 @@ $(function() {
74 } 74 }
75 }); 75 });
76 76
  77 + // 收藏更多视频
  78 + $('#collections').click(function() {
  79 + if ($(this).attr('src') == host + '/images/bicon_02.png') {
  80 + var login = operation('/portal/star/collection',1);
  81 + if(login == 0){
  82 + return false;
  83 + }
  84 + $(this).attr('src', host + '/images/bicon_15.png');
  85 + } else {
  86 + var login = operation('/portal/star/cancelCollection',1);
  87 + if(login == 0){
  88 + return false;
  89 + }
  90 + $(this).attr('src', host + '/images/bicon_02.png');
  91 + }
  92 + });
  93 +
  94 + //点赞
  95 + $('#likes').click(function() {
  96 + if ($(this).attr('src') == host + '/images/bicon_03.png') {
  97 + var login = operation('/portal/star/like',1);
  98 + if(login == 0){
  99 + return false;
  100 + }
  101 + $(this).attr('src', host + '/images/bicon_16.png');
  102 + } else {
  103 + var login = operation('/portal/star/cancelLike',1);
  104 + if(login == 0){
  105 + return false;
  106 + }
  107 + $(this).attr('src', host + '/images/bicon_03.png');
  108 + }
  109 + });
  110 +
  111 +
77 // 评论判断长度显示与隐藏 112 // 评论判断长度显示与隐藏
78 if ($('.show_2_pinL').length < 3) { 113 if ($('.show_2_pinL').length < 3) {
79 $('.show_main_more').hide(); 114 $('.show_main_more').hide();
@@ -173,6 +208,27 @@ $(function() { @@ -173,6 +208,27 @@ $(function() {
173 $("#searchForm").submit(); //处理事件 208 $("#searchForm").submit(); //处理事件
174 } 209 }
175 }); 210 });
  211 + var share_url = encodeURIComponent(location.href);
  212 + var share_title = encodeURIComponent(document.title);
  213 + //分享到微博
  214 + $('.weibo').click(function(){
  215 + var param = {
  216 + url: share_url,
  217 + title: share_title,
  218 + rnd: new Date().valueOf()
  219 + };
  220 + var temp = [];
  221 + for (var p in param) {
  222 + temp.push(p + '=' + encodeURIComponent(param[p] || ''))
  223 + }
  224 + window.open('http://v.t.sina.com.cn/share/share.php?' + temp.join('&'));
  225 + });
  226 +
  227 + //分享到微信
  228 + // $('.weixin').click(function(){
  229 + // var target_url = "http://qr.liantu.com/api.php?text="+share_url;
  230 + // window.open(target_url, 'weixin', 'height=320, width=320');
  231 + // });
176 }); 232 });
177 233
178 //弹框 234 //弹框
@@ -195,8 +251,12 @@ function video_mask(msg) { @@ -195,8 +251,12 @@ function video_mask(msg) {
195 }, 6000); 251 }, 6000);
196 } 252 }
197 //点赞收藏 253 //点赞收藏
198 -function operation(url) {  
199 - var article_id = getUrlParam('id'); 254 +function operation(url,id ='') {
  255 + if(id == ''){
  256 + var article_id = getUrlParam('id');
  257 + }else{
  258 + var article_id = $('#li_id').val();
  259 + }
200 var is_login = 1; 260 var is_login = 1;
201 var post_url = window.location.pathname + window.location.search; 261 var post_url = window.location.pathname + window.location.search;
202 $.ajax({ 262 $.ajax({
1 <div class="share"> 1 <div class="share">
2 <ul> 2 <ul>
3 <li class="share1"> 3 <li class="share1">
4 - <div class="share1_Img"> 4 + <div class="share1_Img weixin">
5 <img src="__TMPL__/public/assets/images/bicon_04.png" alt="" /> 5 <img src="__TMPL__/public/assets/images/bicon_04.png" alt="" />
6 </div> 6 </div>
7 <p class="share1_Txt">3.6k</p> 7 <p class="share1_Txt">3.6k</p>
8 </li> 8 </li>
9 <li class="share1"> 9 <li class="share1">
10 - <div class="share1_Img"> 10 + <div class="share1_Img weibo">
11 <img src="__TMPL__/public/assets/images/bicon_05.png" alt="" /> 11 <img src="__TMPL__/public/assets/images/bicon_05.png" alt="" />
12 </div> 12 </div>
13 <p class="share1_Txt">168</p> 13 <p class="share1_Txt">168</p>