|
@@ -414,9 +414,105 @@ pre {
|
|
|
left: 0px;
|
|
|
right: 0px;
|
|
|
}
|
|
|
+/*深度阅读分享*/
|
|
|
+.depthread-share{
|
|
|
+ position: fixed;
|
|
|
+ left: 0px;
|
|
|
+ right: 0px;
|
|
|
+ top: 0px;
|
|
|
+ bottom: 0px;
|
|
|
+ background-color: rgba(0,0,0,0.7);
|
|
|
+ z-index: 1;
|
|
|
+ display: none;
|
|
|
+}
|
|
|
+.depthread-share>div{
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: 4px;
|
|
|
+ width: 300px;
|
|
|
+ height: 214px;
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ left: 50%;
|
|
|
+ margin-top: -107px;
|
|
|
+ margin-left: -150px;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+.depthread-share ul li span.jyapp-icon-weixin {
|
|
|
+ color: #0ab70e;
|
|
|
+}
|
|
|
+.depthread-share ul li span.jyapp-icon-pengyouquan {
|
|
|
+ color: #a5e537;
|
|
|
+}
|
|
|
+.depthread-share ul li span.jyapp-icon-qq {
|
|
|
+ color: #4cafe9;
|
|
|
+}
|
|
|
+.depthread-share>div>span{
|
|
|
+ display: block;
|
|
|
+}
|
|
|
+.depthread-share>div>span:first-of-type{
|
|
|
+ position: absolute;
|
|
|
+ padding: 15px;
|
|
|
+ right: 0px;
|
|
|
+ top: 0px;
|
|
|
+}
|
|
|
+.depthread-share>div>span:first-of-type>img{
|
|
|
+ width: 13px;
|
|
|
+}
|
|
|
+.depthread-share>div>span:nth-of-type(2){
|
|
|
+ font-size: 17px;
|
|
|
+ color: #1d1d1d;
|
|
|
+ padding-top: 25px;
|
|
|
+ padding-bottom: 25px;
|
|
|
+}
|
|
|
+.depthread-share>div>span:last-of-type{
|
|
|
+ margin-bottom: 25px;
|
|
|
+ font-size: 15px;
|
|
|
+}
|
|
|
+.depthread-share>div>span:last-of-type>a{
|
|
|
+ display: inline-block;
|
|
|
+ height: 1px;
|
|
|
+ background-color: #cecece;
|
|
|
+ width: 90px;
|
|
|
+ vertical-align: middle;
|
|
|
+ margin: 0px 15px;
|
|
|
+}
|
|
|
+.depthread-share ul{
|
|
|
+ padding: 0px 42px;
|
|
|
+}
|
|
|
+.depthread-share ul li{
|
|
|
+ float: left;
|
|
|
+}
|
|
|
+.depthread-share ul li:nth-child(2){
|
|
|
+ width: 115px;
|
|
|
+}
|
|
|
+.depthread-share ul span{
|
|
|
+ font-size: 50px;
|
|
|
+}
|
|
|
+.depthread-share ul font{
|
|
|
+ display: block;
|
|
|
+ font-size: 15px;
|
|
|
+ color: #686868;
|
|
|
+}
|
|
|
+.depthread-share ul:after{
|
|
|
+ content: " ";
|
|
|
+ clear: both;
|
|
|
+ display: table;
|
|
|
+}
|
|
|
</style>
|
|
|
</head>
|
|
|
<body>
|
|
|
+<div class="depthread-share">
|
|
|
+ <div class="depthread-share-main">
|
|
|
+ <span id="depthread-share-close"><img src="/jyapp/images/close.png"></span>
|
|
|
+ <span>好东西更要一起分享</span>
|
|
|
+ <span><a></a>分享到<a></a></span>
|
|
|
+ <ul class="clear-both">
|
|
|
+ <li><span class="jyapp-icon jyapp-icon-weixin"></span><font>微信</font></li>
|
|
|
+ <li><span class="jyapp-icon jyapp-icon-pengyouquan"></span><font>朋友圈</font></li>
|
|
|
+ <li><span class="jyapp-icon jyapp-icon-qq"></span><font>QQ</font></li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
<div class="app-layout-header">
|
|
|
<span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
|
|
|
公告信息
|
|
@@ -442,7 +538,7 @@ pre {
|
|
|
</ul>
|
|
|
</div>
|
|
|
</span>
|
|
|
- </div>
|
|
|
+</div>
|
|
|
<div class="app-layout-content-b">
|
|
|
<div class="info">
|
|
|
<div class="title myfollow" id="title">{{.T.obj.title}}</div>
|
|
@@ -651,11 +747,15 @@ $("body").click(function(e){
|
|
|
},100)
|
|
|
});
|
|
|
$(".header-share").click(function(){
|
|
|
+ $(".depthread-share").hide();
|
|
|
$("#sharelist").toggleClass("hide");
|
|
|
});
|
|
|
$("#sharelist li").click(function(){
|
|
|
setLiActive(this);
|
|
|
- var shareType = $(this).index() + 1;
|
|
|
+ execShare($(this).index());
|
|
|
+});
|
|
|
+function execShare(thisIndex){
|
|
|
+ var shareType = thisIndex + 1;
|
|
|
var content = "您的好友";
|
|
|
if(shareType !=2 && {{session "i_type"}} == 2){
|
|
|
content += {{session "s_nickname"}};
|
|
@@ -672,7 +772,7 @@ $("#sharelist li").click(function(){
|
|
|
link += "source=app_infocontentshare";
|
|
|
}
|
|
|
JyObj.share(shareType,{{.T.obj.title}},content,link);
|
|
|
-});
|
|
|
+}
|
|
|
///////////////////////
|
|
|
var backUrl = null;
|
|
|
if(sessionStorage){
|
|
@@ -1189,6 +1289,24 @@ $(function(){
|
|
|
//深度阅读
|
|
|
$.post("/jyapp/info/shareTip",{id:{{.T.obj._id}}},function(r){
|
|
|
if(r.status){
|
|
|
+ $(".depthread-share li").click(function(){
|
|
|
+ var thisIndex = $(this).index();
|
|
|
+ if(thisIndex == 1){
|
|
|
+ thisIndex = 2;
|
|
|
+ }else if(thisIndex == 2){
|
|
|
+ thisIndex = 1;
|
|
|
+ }
|
|
|
+ execShare(thisIndex);
|
|
|
+ });
|
|
|
+ $(".depthread-share").click(function(){
|
|
|
+ $(".depthread-share").fadeOut();
|
|
|
+ });
|
|
|
+ $(".depthread-share-main").click(function(e){
|
|
|
+ e.stopPropagation();
|
|
|
+ });
|
|
|
+ $("#depthread-share-close").click(function(){
|
|
|
+ $(".depthread-share").fadeOut();
|
|
|
+ });
|
|
|
deepReading();
|
|
|
}
|
|
|
});
|
|
@@ -1215,19 +1333,19 @@ function openAttachment(o){
|
|
|
}
|
|
|
}
|
|
|
function deepReading(){
|
|
|
- var infoOffsetTop = $(".info").offset().top;
|
|
|
//正文高度
|
|
|
var contentHeight = $(".content").height() + $(".content").offset().top - $(".info").offset().top;
|
|
|
- //窗口高度
|
|
|
- var windowHeight = $(window).height();
|
|
|
//可视区域高度
|
|
|
var clientHeight = document.body.clientHeight - $(".app-layout-header").outerHeight();
|
|
|
//总屏数
|
|
|
- var countScreen = Math.floor(contentHeight / clientHeight);
|
|
|
- //console.info("countScreen---"+countScreen)
|
|
|
- if(contentHeight <= 0){
|
|
|
+ if(contentHeight <= 0 || clientHeight <= 0){
|
|
|
return;
|
|
|
}
|
|
|
+ var countScreen = Math.floor(contentHeight / clientHeight);
|
|
|
+ if(countScreen == 0){
|
|
|
+ countScreen = 1;
|
|
|
+ }
|
|
|
+ //console.info("countScreen---"+countScreen)
|
|
|
var screenObj = {};
|
|
|
var depthReadTime = setInterval(function(){
|
|
|
var thisScrollTop = $(window).scrollTop();
|
|
@@ -1282,7 +1400,7 @@ function deepReading(){
|
|
|
if(isPassShow){
|
|
|
clearInterval(depthReadTime);
|
|
|
$.post("/jyapp/info/shareTip",{reqType:"save",id:{{.T.obj._id}}});
|
|
|
- alert("分享");
|
|
|
+ $(".depthread-share").fadeIn();
|
|
|
}
|
|
|
},1000);
|
|
|
}
|