-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.html
76 lines (72 loc) · 2.15 KB
/
main.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
71
72
73
74
75
76
<!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>
<link href="css/mui.min.css" rel="stylesheet" />
<style>
ul {
font-size: 14px;
color: #8f8f94;
}
.mui-btn {
padding: 10px;
}
</style>
</head>
<body>
<header class="mui-bar mui-bar-nav" style="padding-right: 15px;">
<h1 class="mui-title">登录模板</h1>
</header>
<div class="mui-content">
<div class="mui-content-padded">
<p>
您好 <span id='account'></span>,您已成功登录。
<ul>
<li>这是mui带登录和设置模板的示例App首页。</li>
<li>您可以点击右上角的 “设置” 按钮,进入设置模板,体验div窗体切换示例。</li>
<li>在 “设置” 中点击 “退出” 可以 “注销当前账户” 或 “直接关闭应用”。</li>
<li>你可以设置 “锁屏图案”,这样可通过手势密码代替输入账号、密码;</li>
</ul>
</p>
<!--<button class="mui-btn mui-btn-block mui-btn-primary">设置</button>-->
<!--
<button id='exit' class="mui-btn mui-btn-block mui-btn-green">关闭</button>
<button id='logout' class="mui-btn mui-btn-red mui-btn-block">注销登录</button>
-->
</div>
</div>
<script src="js/mui.min.js"></script>
<script src="js/app.js"></script>
<script>
(function($, doc) {
$.init();
var settings = app.getSettings();
var account = doc.getElementById('account');
//
window.addEventListener('show', function() {
var state = app.getState();
account.innerText = state.account;
}, false);
$.plusReady(function() {
//--
$.oldBack = mui.back;
var backButtonPress = 0;
$.back = function(event) {
backButtonPress++;
if (backButtonPress > 1) {
plus.runtime.quit();
} else {
plus.nativeUI.toast('再按一次退出应用');
}
setTimeout(function() {
backButtonPress = 0;
}, 1000);
return false;
};
});
}(mui, document));
</script>
</body>
</html>