-
Notifications
You must be signed in to change notification settings - Fork 0
/
daily_contentl.html
70 lines (64 loc) · 1.89 KB
/
daily_contentl.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
62
63
64
65
66
67
68
69
70
<!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" />
</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>
<button id="release" class="mui-btn mui-btn-outlined mui-pull-right" style="height:32px;padding-top:6px">发布作品</button>
</header>
</body>
<script type="text/javascript" src="js/app.js" ></script>
<script type="text/javascript">
//启用双击监听
mui.plusReady(function() {
var self = plus.webview.currentWebview();
var contentid = self.contentid;
mui.init({
gestureConfig: {
doubletap: true
},
subpages: [{
url: 'daily_contentl_sub.html',
id: 'daily_contentl_sub.html',
styles: {
top: '50px',
bottom: '0'
},
extras: {
contentid:contentid
}
}]
});
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 state = app.getState(); //获取登录信息
document.getElementById('release').addEventListener("tap", function() {
if(state.token) {
mui.openWindow({
url: 'release.html',
extras: {
odailyid: contentid,
type:'1',
webvie:'daily_contentl_sub.html'
}
})
} else {
plus.nativeUI.toast("请登录");
}
})
});
</script>
</html>