切换导航条
此项目
正在载入...
登录
景龙
/
xingqiu
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
景龙
6 years ago
提交
ce506f2f8be6e2fd385343c4d5b318c2beca5618
1 个父辈
95dd58cd
1 个管道 的构建
通过
耗费 5 秒
调试视频定位
变更
2
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
76 行增加
和
27 行删除
public/themes/simpleboot3_mobile/portal/region/get_more_video.html
public/themes/simpleboot3_mobile/public/share.html
public/themes/simpleboot3_mobile/portal/region/get_more_video.html
查看文件 @
ce506f2
...
...
@@ -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
);
}
switch_video
(
video_index
);
//更换视频路径index
video_index_url
(
video_index
);
//点击切换
$
(
'.curren li'
).
click
(
function
()
{
var
index
=
$
(
this
).
index
();
...
...
public/themes/simpleboot3_mobile/public/share.html
查看文件 @
ce506f2
...
...
@@ -2,25 +2,8 @@
<script
src=
"http://res.wx.qq.com/open/js/jweixin-1.4.0.js"
></script>
<script>
$
(
function
()
{
var
pathname
=
window
.
location
.
pathname
;
var
city_id
=
getUrlParam
(
'city_id'
);
// 分享链接
var
url
;
var
title_title
;
if
(
pathname
==
'/portal/region/getMoreVideo'
){
title_title
=
$
(
'.video_title'
).
text
();
if
(
city_id
==
''
){
url
=
$
(
'.video_index_url'
).
val
();
}
else
{
url
=
$
(
'.video_index_url'
).
val
();
}
}
else
{
// 分享标题
title_title
=
$
(
document
).
attr
(
'title'
);
url
=
window
.
location
.
href
;
}
console
.
log
(
444
);
console
.
log
(
url
);
var
url
=
window
.
location
.
href
;
var
title_title
=
$
(
document
).
attr
(
'title'
);
// 分享简介
var
description
=
$
(
'.share_content'
).
text
().
replace
(
/
\s
*/g
,
''
).
substring
(
0
,
50
);
wx
.
config
({
...
...
请
注册
或
登录
后发表评论