<!doctype html>
|
<html>
|
|
<head>
|
<meta charset="UTF-8">
|
<title></title>
|
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
<link href="css/mui.min.css" rel="stylesheet" />
|
<link rel="stylesheet" href="node_modules/weui/dist/style/weui.min.css"/>
|
|
<!--<link href="css/datouwang.css" rel="stylesheet" type="text/css" />-->
|
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
|
<script type="text/javascript" src="js/koala.min.1.5.js"></script>
|
|
|
<style>
|
.mui-table-view-chevron .mui-table-view-cell{
|
padding-right: 15px !important;
|
}
|
#pullrefresh{
|
font-family: "SimHei", "Helvetica", "Arial", "sans-serif";
|
font-size:15px;
|
}
|
.number{
|
font-size:12px;
|
}
|
|
.mui-table-view-cell{
|
height:105px;
|
}
|
.left_img{
|
width:30%;
|
height: 100%;
|
background-color:pink;
|
float:left;
|
|
}
|
.left_img img{
|
height:100%;
|
width:100%;
|
}
|
.right_content{
|
width:70%;
|
height:100%;
|
/*background-color:yellow;*/
|
float: right;
|
padding:10px 0 0 5px;
|
position: relative;
|
/*border:1px solid #000000;*/
|
}
|
.right_content .title{
|
font-size:15px;
|
}
|
.right_content .data_time{
|
position: absolute;
|
right:0px;
|
bottom:0px;
|
font-size:13px;
|
/*margin-top:20px;*/
|
|
}
|
|
|
/*轮播*/
|
#box {
|
position: relative;
|
width: 100%;
|
height: 172px;
|
background: #fff;
|
/*border-radius: 5px;*/
|
/*border: 8px solid #fff;*/
|
margin: 0px auto;
|
}
|
|
#box .list {
|
position: relative;
|
width: 100%;
|
height: 170px;
|
overflow: hidden;
|
border: 1px solid #ccc;
|
}
|
|
#box .list li {
|
position: absolute;
|
top: 0;
|
left: 0;
|
width: 100%;
|
height: 170px;
|
opacity: 0;
|
transition: opacity 0.5s linear
|
}
|
|
#box .list li.current {
|
opacity: 1;
|
}
|
|
#box .count {
|
display:none;
|
position: absolute;
|
right: 0;
|
bottom: 5px;
|
}
|
|
#box .count li {
|
color: #fff;
|
float: left;
|
width: 20px;
|
height: 20px;
|
cursor: pointer;
|
margin-right: 5px;
|
overflow: hidden;
|
background: #F90;
|
opacity: 0.7;
|
border-radius: 20px;
|
}
|
|
#box .count li.current {
|
color: #fff;
|
opacity: 0.7;
|
font-weight: 700;
|
|
}
|
.title_news{
|
height:50px;
|
background-color:#000000;
|
padding:0 15px;
|
color: #ffffff;
|
/*margin-bottom:-10px;*/
|
}
|
.title_news div{
|
padding-top:5px;
|
}
|
.title_news .close{
|
float: left;
|
width:10%;
|
}
|
.title_news .nav{
|
float: right;
|
width:10%;
|
}
|
.banner img{
|
width:100%;
|
height:207px;
|
}
|
|
</style>
|
</head>
|
|
<body>
|
|
|
|
|
<!--下拉刷新容器-->
|
|
|
|
|
|
|
|
<div id="pullrefresh" class="mui-content mui-scroll-wrapper">
|
<div class="mui-scroll">
|
<!--banner-->
|
<div class="banner" style="line-height:0">
|
<img src="images/news/banner.png" alt="" />
|
</div>
|
|
|
|
|
|
|
<ul class="mui-table-view mui-table-view-chevron" style="line-height:1.6">
|
|
<!--<li class="mui-table-view-cell">-->
|
|
<!--<div class="left_img">-->
|
<!--<img src="images/01.jpg" alt="" />-->
|
<!--</div>-->
|
|
<!--<div class="right_content">-->
|
<!--<div class="title">哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈</div>-->
|
<!--<div class="data_time">2016-03-12</div>-->
|
<!--</div>-->
|
|
|
<!--</li>-->
|
|
|
</ul>
|
|
|
|
|
|
</div>
|
</div>
|
|
|
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
|
<script src="js/mui.min.js"></script>
|
<script src="js/common.js" ></script>
|
|
|
|
|
|
<script type="text/javascript">
|
// if(sessionCache.getSessionCashe("userToken") == null){
|
// location.href="login.html";
|
// }
|
mui_.init({
|
load:true,
|
pull:true,
|
callback:function(){
|
|
mui.ajax(
|
'http://www.fschool365.cn/auth/news/searchPageable.json', {
|
data: JSON.stringify({
|
dataDto: {cstNewsTypeId: "17"},
|
cstNewsTypeId: "17",
|
page:0,
|
size:6
|
}),
|
dataType:'json',
|
async : false,
|
type: 'post', //HTTP请求类型
|
headers: {
|
'Content-Type': 'application/json',
|
'Authorization':'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJoamppYW93ZWkiLCJMb2dpblVzZXIiOiIzNGNiOTMyMGFhNmUxMWU2YTkyNGMwNWE2MTk1MjljNyIsImlhdCI6MTQ3OTQ0ODI1N30.f7bKhrQGI5vQVGKD7v9DvVDnpMm8oEIjhv2--Z6Xqcg'
|
},
|
success: function(data) {
|
$.each(data.data.pageList.content, function (index, entity) {
|
var dateTime = new Date();
|
dateTime.setTime(entity.createTime);
|
var timeStr = ((dateTime.getMonth() + 1) < 10 ? "0" + (dateTime.getMonth() + 1) : (dateTime.getMonth() + 1)) + "-" + (dateTime.getDate() < 10 ? "0" + dateTime.getDate() : dateTime.getDate()) + " " + (dateTime.getHours() < 10 ? "0" + dateTime.getHours() : dateTime.getHours()) + ":" + (dateTime.getMinutes() < 10 ? "0" + dateTime.getMinutes() : dateTime.getMinutes());
|
// var contentElement = jQuery(entity.content);
|
// var content = $(contentElement).text().length > 40 ? $(contentElement).text().substring(0,40)+"..." : $(contentElement).text();
|
var li ='<li class="mui-table-view-cell"><div class="left_img"><img src="images/shuijiao.jpg" alt="" /> </div><div class="right_content">'+
|
'<div class="title">' + entity.title + '</div><div class="data_time">' + timeStr + '</div></div></li>';
|
$(".mui-table-view").prepend(li);
|
|
|
|
$(li).bind("tap", function () {
|
|
sessionCache.setSessionCashe("newsInfo", entity, sessionCache.json_value);
|
window.open("newsInfo.html");
|
mui.openWindow({
|
id: 'newsInfo',
|
url: 'newsInfo.html'
|
});
|
});
|
//
|
//
|
|
|
|
|
});
|
|
|
|
}
|
,
|
error: function (xhr, type, errorThrown) {
|
// 异常处理;
|
console.log(type);
|
}
|
|
|
});
|
|
|
}
|
});
|
</script>
|
</body>
|
|
</html>
|