237 lines
9.2 KiB
HTML
237 lines
9.2 KiB
HTML
|
|
<!doctype html>
|
|||
|
|
<html>
|
|||
|
|
|
|||
|
|
<head>
|
|||
|
|
<meta charset="utf-8">
|
|||
|
|
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
|
|||
|
|
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
|
|||
|
|
<title>资讯详情</title>
|
|||
|
|
<link rel="stylesheet" type="text/css" href="/css/api.css" />
|
|||
|
|
<link rel="stylesheet" type="text/css" href="/css/content.css" />
|
|||
|
|
<script type="text/javascript" src="/scripts/jquery-2.0.2.min.js"></script>
|
|||
|
|
<script type="text/javascript" src="/scripts/jquery.cookie.min.js"></script>
|
|||
|
|
<!--<script type="text/javascript" src="/scripts/iscroll.js"></script>-->
|
|||
|
|
<script type="text/javascript" src="/script/main.js?t=0"></script>
|
|||
|
|
<script type="text/javascript" src="/layer/layer.js"></script>
|
|||
|
|
<script type="text/javascript" src="/Scripts/long.js"></script>
|
|||
|
|
<script type="text/javascript" src="/script/moment.js"></script>
|
|||
|
|
<script type="text/javascript" src="/script/api.js"></script>
|
|||
|
|
<script type="text/javascript" src="/Scripts/clipboard.min.js"></script>
|
|||
|
|
<style type="text/css">
|
|||
|
|
html, body {
|
|||
|
|
overflow: hidden;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#wrapper {
|
|||
|
|
flex: 1;
|
|||
|
|
overflow-y: auto;
|
|||
|
|
-webkit-overflow-scrolling: touch;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.pullDown {
|
|||
|
|
position: absolute;
|
|||
|
|
top: -1.25rem;
|
|||
|
|
left: 0;
|
|||
|
|
width: 100%;
|
|||
|
|
z-index: 100;
|
|||
|
|
text-align: center;
|
|||
|
|
display: none;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.pullUp {
|
|||
|
|
position: absolute;
|
|||
|
|
bottom: -1.25rem;
|
|||
|
|
left: 0;
|
|||
|
|
width: 100%;
|
|||
|
|
z-index: 100;
|
|||
|
|
text-align: center;
|
|||
|
|
display: none;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.pullDown.loading, .pullUp.loading, .pullDown.refresh, .pullUp.refresh {
|
|||
|
|
display: block;
|
|||
|
|
}
|
|||
|
|
</style>
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
var userId = null;
|
|||
|
|
var LoginId = null;
|
|||
|
|
var CartId = null;
|
|||
|
|
var opentimes = null;
|
|||
|
|
var id = 0, ifapp=0;
|
|||
|
|
var myScroll = null;
|
|||
|
|
var pullDown = 1; // 下拉刷新避免多次执行
|
|||
|
|
var pullUp = 1; // 上拉加载避免多次执行
|
|||
|
|
var downHeight = 0;
|
|||
|
|
var upHeight = 0;
|
|||
|
|
var isload = true;//设置是否终止滚动加载
|
|||
|
|
var curScrollHeight = 0;//当前滚动位置
|
|||
|
|
var curCount = 1;//计数器,防止滚动时重复执行加载下一页
|
|||
|
|
$(document).ready(function () {
|
|||
|
|
userId = getlocalStorage("userId");
|
|||
|
|
LoginId = getlocalStorage("LoginId");
|
|||
|
|
var aifapp = getlocalStorage("ifapp");
|
|||
|
|
if (aifapp != null) {
|
|||
|
|
ifapp = aifapp;
|
|||
|
|
}
|
|||
|
|
var did = $.getUrlParam("id");
|
|||
|
|
if (did != null) {
|
|||
|
|
id = did;
|
|||
|
|
}
|
|||
|
|
rdata();
|
|||
|
|
var clipboard = new Clipboard('#copybtn');
|
|||
|
|
|
|||
|
|
clipboard.on('success', function (e) {
|
|||
|
|
tishi3("复制成功");
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
clipboard.on('error', function (e) {
|
|||
|
|
tishi3("复制失败");
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
|
|||
|
|
});
|
|||
|
|
function oncopy0(font) {
|
|||
|
|
$("#copyinput").val(font);
|
|||
|
|
$("#copybtn").click();
|
|||
|
|
}
|
|||
|
|
function onScroll0() {
|
|||
|
|
isload = true;//设置是否终止滚动加载
|
|||
|
|
curScrollHeight = 0;//当前滚动位置
|
|||
|
|
curCount = 1;//计数器,防止滚动时重复执行加载下一页
|
|||
|
|
$("#wrapper").scroll(function () {
|
|||
|
|
var pageHeight = $("#sysnew").height();
|
|||
|
|
var showHeight = $("#wrapper").height();
|
|||
|
|
var scrollHeight = $("#wrapper").scrollTop();
|
|||
|
|
|
|||
|
|
if (curScrollHeight - scrollHeight < 10 && curScrollHeight > 0) {
|
|||
|
|
if (curCount == 1 && isload) {
|
|||
|
|
|
|||
|
|
rdata(0);
|
|||
|
|
}
|
|||
|
|
curCount++; //加载下一页后计数器+1
|
|||
|
|
}
|
|||
|
|
if (curScrollHeight < scrollHeight) {
|
|||
|
|
curScrollHeight = pageHeight - showHeight;//滚动到页面底部时,重设当前滚动位置
|
|||
|
|
curCount = 1;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function rdata() {
|
|||
|
|
userId = getlocalStorage("userId");
|
|||
|
|
LoginId = getlocalStorage("LoginId");
|
|||
|
|
|
|||
|
|
$(".ajaxLoader").removeClass("uhide");
|
|||
|
|
$.ajax({
|
|||
|
|
type: 'GET',
|
|||
|
|
url: "/apiajax.ashx",
|
|||
|
|
data: "&action=getsysmsgdetail&ifweb=1&id=" + id + "&userId=" + (userId != null ? userId : "") + "&LoginId=" + (LoginId != null ? LoginId : ""),
|
|||
|
|
dataType: "JSON",//" + (ifapp==1?"0":"1") +"
|
|||
|
|
error: function (xhr, type) {
|
|||
|
|
tishi3("发生错误:" + JSON.stringify(xhr));
|
|||
|
|
},
|
|||
|
|
success: function (data) {
|
|||
|
|
|
|||
|
|
|
|||
|
|
if (data) {
|
|||
|
|
if (data.status == 1) {
|
|||
|
|
if (data.ptitle == "信息详情" || data.ptitle == "公告详情" || data.ptitle == "教程详情" || data.ptitle == "健康知识" || data.ptitle == "发图素材") {
|
|||
|
|
$(".msg_title").css("display", "block");
|
|||
|
|
$("header h1").html(data.ptitle);
|
|||
|
|
} else {
|
|||
|
|
$(".msg_title").css("display", "none");
|
|||
|
|
$("header h1").html(data.title);
|
|||
|
|
}
|
|||
|
|
$(".msg_title").html(data.title);
|
|||
|
|
$("#msgcontent").html(data.content);
|
|||
|
|
|
|||
|
|
$(".ajaxLoader").addClass("uhide");
|
|||
|
|
var t = $("header").height()+80;
|
|||
|
|
var w = $("#msgcontent").width();
|
|||
|
|
if (data.video != "") {
|
|||
|
|
var videoPlayer = api.require('videoPlayer');
|
|||
|
|
videoPlayer.open({
|
|||
|
|
rect:{
|
|||
|
|
x: 10, //(可选项)数字类型;插件左上角的 x 坐标(相对于所属的 Window 或 Frame);默认:0
|
|||
|
|
y: t, //(可选项)数字类型;插件左上角的 y 坐标(相对于所属的 Window 或 Frame);默认:0
|
|||
|
|
w: w //(可选项)数字类型;插件的宽度;默认:所属的 Window 或 Frame 的宽度
|
|||
|
|
},
|
|||
|
|
fixedOn:"main",
|
|||
|
|
path: data.video,
|
|||
|
|
scalingMode: 'scaleToFill'
|
|||
|
|
}, function (ret, err) {
|
|||
|
|
if (ret.status) {
|
|||
|
|
|
|||
|
|
} else {
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
var videos = $("#msgcontent video");
|
|||
|
|
|
|||
|
|
for (var i = 0; i < videos.length; i++) {
|
|||
|
|
$(videos[i]).attr("width", w + "px");
|
|||
|
|
$(videos[i]).attr("height", (data.ltype == 1 ? (w * 1.6) : (w / 1.6)) + "px");
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
} else {
|
|||
|
|
|
|||
|
|
tishi3(data.msg);
|
|||
|
|
$(".ajaxLoader").addClass("uhide");
|
|||
|
|
if (data.msg == "您未登录") {
|
|||
|
|
//$api.rmStorage("userId");
|
|||
|
|
//$api.rmStorage("LoginId");
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
} else {
|
|||
|
|
tishi3("网络错误!");
|
|||
|
|
$(".ajaxLoader").addClass("uhide");
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
</script>
|
|||
|
|
</head>
|
|||
|
|
|
|||
|
|
<body class="wrap">
|
|||
|
|
<header>
|
|||
|
|
<div class="ub">
|
|||
|
|
<div class="nav-btn" id="nav-left" style=" margin:0; padding:0; padding-top:0.2em; min-width:3em" onclick="closeWin()">
|
|||
|
|
|
|||
|
|
<img src="../image/faifei.png" style="margin-left:0; margin-top:0em; height:1.2em;width:1.2em;" />
|
|||
|
|
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
<h1 class="ub-f1">
|
|||
|
|
动态详情
|
|||
|
|
</h1>
|
|||
|
|
<div class="nav-btn blue" id="nav-right" style=" margin:0; padding:0; min-width:3em; padding-right:1em;">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</header>
|
|||
|
|
<section class="ub-f1" id="wrapper" style="padding:0.8em;">
|
|||
|
|
|
|||
|
|
<div class="maxcontent" style="background-color:#fff;border-radius:.4em;">
|
|||
|
|
<div class="clear"></div>
|
|||
|
|
<h3 class="msg_title"></h3>
|
|||
|
|
<div class="clear"></div>
|
|||
|
|
<div id="msgcontent" class="Body">
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
</section>
|
|||
|
|
|
|||
|
|
<div class="ajaxLoader ub ub-ac uhide" onclick="reload()">
|
|||
|
|
<div class="ub ub-ac ub-ver"><img src="image/load.gif" /><br>正在加载...</div>
|
|||
|
|
</div>
|
|||
|
|
<div style="height:1px;width:1px; overflow:hidden;"><input id="copyinput" type="text" /><input type="button" id="copybtn" data-clipboard-action="copy" data-clipboard-target="#copyinput" value="copy" /></div>
|
|||
|
|
</body>
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
</html>
|