dcloud动态页面b1父页面mui
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>血压历史记录</title>
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="../../css/mui.min.css">
<link href="../../css/icons-extra.css" rel="stylesheet" />
<link rel="stylesheet" href="../../css/health.css" />
<style>
.mui-icon-extra.mui-icon-extra-outline {
font-size: px;
color: #646464;
float: left;
}
.mui-navigate-right:after,
.mui-push-right:after {
color: #ec6941;
}
.jays-record-datetime {
color: #7d7d7d;
margin-left: 10px;
}
/*.mui-icon-extra.mui-icon-extra-lamp{font-size: 26px; color: #ec6941;}
.mui-icon-extra.mui-icon-extra-lamp + .jays-record-datetime{color: #ec6941; font-weight: 300;}
.worning-msg{margin-left: 35px; color: #ec6941; font-weight: 200;}*/
.tapin-msg {
margin-left: 32px;
font-weight: 300;
}
</style>
</head>
<body>
<header class="mui-bar mui-bar-nav">
<a class="mui-action-back">
<b class="mui-icon mui-icon-left-nav mui-pull-left c5"></b>
<h1 class="mui-title mui-text-left c5">血压历史记录</h1>
</a>
</header>
<div class="mui-content"></div>
</body>
<script src="../../js/mui.min.js"></script>
<script type="text/javascript">
//启用双击监听
mui.init({
gestureConfig: {
doubletap: true
},
subpages: [{
url: 'blood_pressure_sub.html',
id: 'blood_pressure_sub.html',
styles: {
top: '45px',
bottom: '0px',
}
}]
});
var contentWebview = null;
document.querySelector('header').addEventListener('doubletap', function() {
if(contentWebview == null) {
contentWebview = plus.webview.currentWebview().children()[0];
}
contentWebview.evalJS("mui('#pullrefresh').pullRefresh().scrollTo(0,0,100)");
});
var old_back = mui.back;
mui.back = function() {
mui.openWindow({
url: 'blood_pressure.html',
id: 'blood_pressure.html',
show: {
aniShow: 'slide-in-left',
duration: 200
},
waiting: {
autoShow: false
}
});
old_back();
}
function refresh() {
location.reload();
}
</script>
</html>