完整的html如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title></title>
<script src="../js/mui.min.js"></script>
<link href="../css/mui.css" rel="stylesheet"/>
<script src="../js/base.js"></script>
<script src="../js/app.js"></script>
<script src="../js/handlebars-v3.0.3.js"></script>
</head>
<body>
<header class="mui-bar mui-bar-nav">
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
<h1 id="htitle" class="mui-title">项目详细</h1>
</header>
<style>
.mui-scroll ul{ margin-bottom: 20px;}
#view_h{ background:url(../images/cbd.jpg) no-repeat top center; background-size:100% 100%; color:#FFF;padding: 15px 0;}
#view_h li img{width:70px;border-radius:50%}
#view_h p{color: #FFF;}
.title{ text-align: center; padding: 10px 0 0 0;}
.mui-table-view{top:45px;}
#map {
width: 100%;
position: fixed;
top: 45px;
bottom: 51px;
line-height: 200px;
text-align: center;
background: #FFFFFF;
}
</style>
<div class="mui-content">
<div id="scroll" class="mui-scroll-wrapper">
<div class="mui-scroll" id="mui-scroll">
</div>
</div>
</div>
<script id="entry-template" type="text/x-handlebars-template">
<ul class="mui-table-view" id="view_h">
<li class="mui-table-view-cell mui-media" id="toheader">
<img class="mui-media-object mui-pull-left" src="{{picurl}}">
<div class="mui-media-body">
{{nick}}
<p class="mui-ellipsis">能和心爱的人一起睡觉,是件幸福的事情;可是,打呼噜怎么办?</p>
<p class="mui-ellipsis">能和心爱的人一起睡觉,是件幸福的事情;可是,打呼噜怎么办?</p>
</div>
</li>
</ul>
<ul class="mui-table-view">
<div class="title">热门推荐</div>
<li class="mui-table-view-cell mui-media" >
<div class="mui-media-body">
<p >能和心爱的人一起睡觉,是件幸福的事情;可是,打呼噜怎么办?</p>
<p class="mui-ellipsis">能和心爱的人一起睡觉,是件幸福的事情;可是,打呼噜怎么办?</p>
<p class="mui-ellipsis">能和心爱的人一起睡觉,是件幸福的事情;可是,打呼噜怎么办?</p>
</div>
</li>
</ul>
<ul class="mui-table-view mui-table-view-striped mui-table-view-condensed">
<div class="title">热门推荐</div>
<li><p>教师</p></li>
<li><p>教师</p></li>
<li><p>教师</p></li>
<li><p>教师</p></li>
</ul>
<ul class="mui-table-view mui-table-view-striped mui-table-view-condensed">
<div class="title">热门推荐</div>
<li class="mui-table-view-cell">
<div class="mui-table">
<div class="mui-table-cell mui-col-xs-10">
<h4 class="mui-ellipsis">信息化推进办公室张彦合同付款信息化</h4>
<h5>申请人:李四</h5>
<p class="mui-h6 mui-ellipsis">Hi,李明明,申请交行信息卡,100元等你拿,李明明,申请交行信息卡,100元等你拿,</p>
</div>
<div class="mui-table-cell mui-col-xs-2 mui-text-right">
<span class="mui-h5">12:25</span>
</div>
</div>
</li>
<li class="mui-table-view-cell">
<div class="mui-table">
<div class="mui-table-cell mui-col-xs-10">
<h4 class="mui-ellipsis-2">信息化推进办公室张彦合同付款信息化推进办公室张彦合同付款信息化推进办公室张彦合同付款</h4>
<h5>申请人:李四</h5>
<p class="mui-h6 mui-ellipsis">Hi,李明明,申请交行信息卡,100元等你拿,李明明,申请交行信息卡,100元等你拿,</p>
</div>
<div class="mui-table-cell mui-col-xs-2 mui-text-right">
<span class="mui-h5">12:25</span>
</div>
</div>
</li>
<li class="mui-table-view-cell">
<div class="mui-table">
<div class="mui-table-cell mui-col-xs-10">
<h4 class="mui-ellipsis-2">信息化推进办公室张彦合同付款信息化推进办公室张彦合同付款信息化推进办公室张彦合同付款</h4>
<h5>申请人:李四</h5>
<p class="mui-h6 mui-ellipsis">Hi,李明明,申请交行信息卡,100元等你拿,李明明,申请交行信息卡,100元等你拿,</p>
</div>
<div class="mui-table-cell mui-col-xs-2 mui-text-right">
<span class="mui-h5">12:25</span>
</div>
</div>
</li>
<li class="mui-table-view-cell">
<div class="mui-table">
<div class="mui-table-cell mui-col-xs-10">
<h4 class="mui-ellipsis-2">信息化推进办公室张彦合同付款信息化推进办公室张彦合同付款信息化推进办公室张彦合同付款</h4>
<h5>申请人:李四</h5>
<p class="mui-h6 mui-ellipsis">Hi,李明明,申请交行信息卡,100元等你拿,李明明,申请交行信息卡,100元等你拿,</p>
</div>
<div class="mui-table-cell mui-col-xs-2 mui-text-right">
<span class="mui-h5">12:25</span>
</div>
</div>
</li>
<li class="mui-table-view-cell">
<div class="mui-table">
<div class="mui-table-cell mui-col-xs-10">
<h4 class="mui-ellipsis-2">信息化推进办公室张彦合同付款信息化推进办公室张彦合同付款信息化推进办公室张彦合同付款</h4>
<h5>申请人:李四</h5>
<p class="mui-h6 mui-ellipsis">Hi,李明明,申请交行信息卡,100元等你拿,李明明,申请交行信息卡,100元等你拿,</p>
</div>
<div class="mui-table-cell mui-col-xs-2 mui-text-right">
<span class="mui-h5">12:25</span>
</div>
</div>
</li>
</ul>
</script>
<nav class="mui-bar mui-bar-tab">
<a id="main/index.html" class="mui-tab-item mui-active" href="main/index.html">
<span class="mui-icon mui-icon-phone"></span>
<span class="mui-tab-label">咨询</span>
</a>
</nav>
</body>
<script>
var source =document.getElementById('entry-template').innerHTML;
var template = Handlebars.compile(source);
var da='';
mui.plusReady(function() {
window.addEventListener('newsId',function(event){
var id =event.detail.id;
if(id){
loaddatelist.tutorone(id, function(rs) {
if(rs.status===1){
mui.toast(rs.list.nick);
document.getElementById("mui-scroll").innerHTML=template(rs.list);
}else{
mui.toast(rs.content);
}
});
}else{
mui.toast("参数错误"+id);
}
});
});
</script>
</html>
但是会弹出mui.toast(rs.list.nick);
document.getElementById("mui-scroll").innerHTML=template(rs.list);确无效
是怎么回事
0 个回复