-
Notifications
You must be signed in to change notification settings - Fork 0
/
daily_detaile.html
61 lines (56 loc) · 1.83 KB
/
daily_detaile.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!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.min.css" rel="stylesheet" />
<link href="css/app.css" rel="stylesheet" />
<script type="text/javascript" src="js/mui.zoom.js"></script>
<script type="text/javascript" src="js/mui.previewimage.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 class="mui-title">点击图片放大</h1>
<a class="mui-icon mui-icon mui-icon-plusempty mui-pull-right"></a>
</header>
<div style="height: 50px;"></div>
<div class="img_box">
<img id="daily_cimg" src="" data-preview-src="" data-preview-group="1" />
</div>
</body>
<script type="text/javascript">
// H5 plus事件处理
function plusReady() {
// 每日一练
var self = plus.webview.currentWebview();
var detaileid = self.detaileid;
var contentimg = self.contentimg;
var odaily_cimg = document.getElementById("daily_cimg");
odaily_cimg.src = contentimg;
// 开启一直保持程序唤醒状态
plus.device.setWakelock(true);
}
if(window.plus) {
plusReady();
} else {
document.addEventListener("plusready", plusReady, false);
}
mui('.close').on('tap', 'img', function() {
var ws = plus.webview.currentWebview();
plus.device.setWakelock(false);
plus.webview.close(ws);
});
mui.back = function() {
var ws = plus.webview.currentWebview();
plus.device.setWakelock(false);
plus.webview.close(ws);
}
</script>
<script type="text/javascript" charset="utf-8">
mui.init();
mui.previewImage();
</script>
</html>