-
Notifications
You must be signed in to change notification settings - Fork 0
/
index-menu.html
174 lines (158 loc) · 5.47 KB
/
index-menu.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hello MUI</title>
<meta name="viewport" content="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" type="text/css" href="css/reset.css"/>
<link rel="stylesheet" href="css/mui.min.css">
<link rel="stylesheet" type="text/css" href="css/icons-extra.css"/>
<style type="text/css">
@import url("fonts/mui-icons-extra.ttf");
html{font-size:15.625vw;}
body,.mui-content {background-color: #fff;color: #000;}
.mod-info {padding: .5rem 0 0 0;background-color: #fee080;border-bottom: 1px solid #a1a1a1;display: flex;flex-direction: column;height:3.2rem;}
.mod-info .info-basic {display: flex;}
.info-basic .info-avatar {display: flex;width:1.8rem;height:1.8rem;border-radius:100%;overflow: hidden;margin: 0 .2rem;}
.info-avatar img{width:100%;height:auto;}
.info-msg {margin-top:.35rem;}
.info-msg .msg-tit h3{font-size:.5rem;font-weight: bold;color: #000;}
.info-msg .msg-txt span{font-size:.21rem;}
.info-msg .msg-txt span em{font-size:.42rem;}
.mod-info .info-slo{margin-top: .1rem;margin-left:.28rem;}
.info-slo p{font-size:.3rem;color: #000000;margin-bottom:.1rem;}
.content .box-cont{margin: .2rem 0;padding: 0 .5rem;}
.content .box-cont .cont-list .cont-item{line-height:1rem;}
.content .box-cont .cont-list .cont-item .icon-cont{width:.8rem;font-size:.64rem;color: #000000;vertical-align:middle;margin-right:.2rem;}
.content .box-cont .cont-list .cont-item .tit{font-size:.42rem;color:#000000;}
</style>
</head>
<body>
<div class="mui-content">
<div class="mod-info">
<div class="info-logined" style="display: none;">
<div class="info-basic">
<div class="info-avatar">
<img src="temp/images/avatar.jpg"/>
</div>
<div class="info-msg">
<div class="msg-tit">
<h3>马 小 锴</h3>
</div>
<div class="msg-txt">
<span><em>121</em> 关注</span>
<span><em>18w</em> 粉丝</span>
</div>
</div>
</div>
<div class="info-slo">
<p>从你的全世界路过</p>
</div>
</div>
<div class="info-login">
<a data-title-type="login" href="views/guide/guide.html">登录</a>
</div>
</div>
<div class="content">
<div class="box-cont">
<ul class="cont-list">
<li class="cont-item">
<a href="views/information/collection.html">
<i class="icon-cont mui-icon-extra mui-icon-extra-heart"></i>
<span class="tit">我的收藏</span>
</a>
</li>
<li class="cont-item">
<a href="views/information/collection.html">
<i class="icon-cont mui-icon mui-icon-email"></i>
<span class="tit">消息盒子</span>
</a>
</li>
<li class="cont-item">
<a href="views/information/collection.html">
<i class="icon-cont mui-icon mui-icon-info"></i>
<span class="tit">历史记录</span>
</a>
</li>
<li class="cont-item">
<a href="views/information/collection.html">
<i class="icon-cont mui-icon mui-icon-gear"></i>
<span class="tit">我的设置</span>
</a>
</li>
<li class="cont-item">
<a data-title-type="native" href="views/information/collection.html">
<i class="icon-cont mui-icon-extra mui-icon-extra-custom"></i>
<span class="tit">我的客服</span>
</a>
</li>
</ul>
</div>
</div>
</div>
<script src="js/mui.min.js"></script>
<script type="text/javascript" charset="utf-8">
var aniShow = "slide-in-right";
//关于backbutton和menubutton两个按键的说明,在iOS平台不存在,故需隐藏
if(!mui.os.android) {
var span = document.getElementById("android-only")
if(span) {
span.style.display = "none";
}
}
var subWebview = null,
template = null,
index = null;
mui.plusReady(function() {
//获得主页面webview引用;
index = plus.webview.currentWebview().opener();
var _self = plus.webview.currentWebview();
_self.drag({
direction: "left",
moveMode: "followFinger"
}, {
view: index,
moveMode: "follow"
}, function(e) {});
console.log(JSON.stringify(sessionStorage));
})
mui('.mui-content').on('tap', 'a', function() {
var id = this.getAttribute("href");
var href = this.href;
var webview_style = {
popGesture: "close"
}
var extras = {};
var titleType = this.getAttribute("data-title-type");
if(titleType == "native") {
if(!~id.indexOf('pullrefresh.html')) {
webview_style.bounce = "vertical";
}
webview_style.statusbar = {background: '#F7F7F7'};
var webview = plus.webview.create(href, id, webview_style);
webview.addEventListener("loaded", function() {
webview.show(aniShow, 300, null, extras);
})
} else {
//侧滑菜单需动态控制一下zindex值;
if(~id.indexOf('offcanvas-')) {
webview_style.zindex = 9998;
webview_style.popGesture = ~id.indexOf('offcanvas-with-right') ? "close" : "none";
}
var webview = plus.webview.create(this.href, id, webview_style, extras);
webview.addEventListener("loaded", function() {
webview.show(aniShow, 300);
});
}
});
mui.init({
swipeBack: false,
keyEventBind: {
backbutton: false //关闭back按键监听
}
});
</script>
</body>
</html>