...
|
...
|
@@ -104,7 +104,7 @@ |
|
|
<div class="idnex_seventh_swiper_contant_img">
|
|
|
<img class="li_img" src="{:cmf_get_image_url($vo.thumbnail)}" alt="" />
|
|
|
</div>
|
|
|
<div class="idnex_seventh_swiper_contant_title txt-cut video_title" style="-webkit-line-clamp: 2;">
|
|
|
<div class="idnex_seventh_swiper_contant_title txt-cut" style="-webkit-line-clamp: 2;">
|
|
|
{$vo.post_title}
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -157,14 +157,76 @@ |
|
|
<input type="hidden" class="like" value="">
|
|
|
</div>
|
|
|
</div>
|
|
|
<!--微信分享-->
|
|
|
<include file="public@share" />
|
|
|
<include file="public@footer" />
|
|
|
</body>
|
|
|
<script src="__TMPL__/public/assets/js/base.js"></script>
|
|
|
<script src="__TMPL__/public/assets/js/jquery-2.1.0.js"></script>
|
|
|
<script src="__TMPL__/public/assets/js/swiper.min.js"></script>
|
|
|
<script src="__TMPL__/public/assets/js/public.js"></script>
|
|
|
|
|
|
<script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
|
|
|
<script>
|
|
|
$(function () {
|
|
|
// 分享标题
|
|
|
var title_title = $(document).attr('title');
|
|
|
// 分享简介
|
|
|
wx.config({
|
|
|
debug: false,
|
|
|
appId: '{$data.appId}',
|
|
|
timestamp: '{$data.timestamp}',
|
|
|
nonceStr: '{$data.nonceStr}',
|
|
|
signature: '{$data.signature}',
|
|
|
jsApiList: [
|
|
|
'onMenuShareAppMessage',
|
|
|
'onMenuShareTimeline',
|
|
|
]
|
|
|
});
|
|
|
wx.ready(function () { //需在用户可能点击分享按钮前就先调用
|
|
|
wx.onMenuShareAppMessage({
|
|
|
title: '独角星球-'+title_title, // 分享标题朋友
|
|
|
desc: $('.post_title').text(), // 分享描述
|
|
|
link: $('.video_index_url').val(), // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
|
|
imgUrl: 'http://www.starplanet.cn/themes/simpleboot3_mobile/public/assets/images/cicon_01@2x.png', // 分享图标
|
|
|
type: '', // 分享类型,music、video或link,不填默认为link
|
|
|
dataUrl: '', // 如果type是music或video,则要提供数据链接,默认为空
|
|
|
success: function () {
|
|
|
wx_Share();
|
|
|
},
|
|
|
});
|
|
|
wx.onMenuShareTimeline({
|
|
|
title: '独角星球-'+title_title, // 分享标题朋友圈
|
|
|
desc: $('.post_title').text(),
|
|
|
link: $('.video_index_url').val(), // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
|
|
imgUrl: 'http://www.starplanet.cn/themes/simpleboot3_mobile/public/assets/images/cicon_01@2x.png', // 分享图标
|
|
|
success: function () {
|
|
|
// 用户点击了分享后执行的回调函数
|
|
|
wx_Share();
|
|
|
},
|
|
|
});
|
|
|
});
|
|
|
wx.error(function (res) {
|
|
|
// config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
|
|
|
});
|
|
|
});
|
|
|
|
|
|
function wx_Share(){
|
|
|
var article_id = getUrlParam('id');
|
|
|
$.ajax({
|
|
|
type: 'POST',
|
|
|
url: '/portal/login/wx_share',
|
|
|
data: {
|
|
|
'id': article_id,
|
|
|
},
|
|
|
dataType: 'json',
|
|
|
async: false,
|
|
|
success: function(data) {
|
|
|
|
|
|
}
|
|
|
});
|
|
|
window.location.reload();
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
<script>
|
|
|
$('.navImg1 img').click(function() {
|
|
|
if ($(this).attr('src') == "__TMPL__/public/assets/images/xx.png") {
|
...
|
...
|
@@ -239,13 +301,17 @@ |
|
|
}
|
|
|
});
|
|
|
var video_index = getUrlParam('video_index');
|
|
|
console.log(1111);
|
|
|
console.log(video_index);
|
|
|
//默认第一个视频
|
|
|
|
|
|
if(video_index == ''){
|
|
|
switch_video(0);
|
|
|
//更换视频路径index
|
|
|
video_index_url(0);
|
|
|
}else{
|
|
|
switch_video(video_index);
|
|
|
//更换视频路径index
|
|
|
video_index_url(video_index);
|
|
|
}
|
|
|
|
|
|
//点击切换
|
|
|
$('.curren li').click(function() {
|
|
|
var index = $(this).index();
|
...
|
...
|
|