-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.html
236 lines (235 loc) · 7.22 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
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<!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/app.css" rel="stylesheet"/>
<script src="js/mui.min.js"></script>
<script src="js/config.js"></script>
<style type="text/css">
.ui-page,html,body{
height: 100%;
padding-top:0px;
}
.ui-page{
padding-top:44px;
}
.vip-top{
width:100%;
height:100px;
padding:20px 15px;
overflow:hidden;
background-image: url(images/vip-top.jpg);
background-size:contain;
}
.vip-top .vip-img{
width:60px;
height:60px;
float:left;
margin-right:20px;
}
.vip-top .vip-img img{
width:60px;
height:60px;
border-radius:50%;
-webkit-border-radius:50%;
}
.vip-top .vip-info{
overflow:hidden;
padding-top:7px;
}
.vip-top .vip-info .name{
color:#fff;
font-size:14px;
}
.vip-top .vip-info .name span{
font-size:13px;
margin-left:3px;
}
.icon-vip-customer:before{
font-size:19px
}
.vip-top .vip-info .level{
color:#fff;
font-size:12px;
}
.vip-list li{
margin:10px 0 0 0;
}
.vip-list li a{
display:block;
padding:0 15px;
height:40px;
line-height:40px;
background:#fff;
color:#666;
font-size:14px
}
.vip-list li a:before{
margin-right:15px;
}
.vip-list li a.exit{
text-align:center;
font-size:16px;
background:#FF5053;
color:#fff;
margin:0 10px
}
.mui-page-content{
height:100%;
position:relative;
}
.mui-page{
position: absolute;
left: 0;
right: 0;
top: 44px;
bottom: 0;
width: 100%;
height: 100%;
}
.vip-list li.mui-table-view-cell .mui-active{
background:#e2dfdf;
}
</style>
</head>
<body>
<div class="ui-page" id="ui-page" style="background:#f5f5f5;">
<header class="ui-bar jy-bar" id="header">
<a href="javascript:;" class="icon-back icon" id="back"></a>
<div class="ui-title">个人中心</div>
<a href="javascript:;" class="icon-categorys icon" id="categorys"></a>
</header>
<div class="mui-page-content">
<div class="mui-scroll-wrapper">
<div class="mui-scroll">
<div class="vip-content" id="vip-content">
<div class="vip-top">
<div class="vip-img" id="head">
<a class="headImg">
<img src="" id="avatar_src" />
</a>
</div>
<div class="vip-info">
<p class="name"><span id="account">加载中...</span></p>
<p class="level">等级:<span id="level">加载...</span></p>
</div>
</div>
<div class="vip-list">
<ul>
<li class="mui-table-view-cell"><a href="information.html" class="ui-link icon-vip-data icon" id="info">个人资料</a></li>
<li class="mui-table-view-cell"><a href="vip-reservation.html" class="ui-link icon-vip-reservation icon">我的预订</a></li>
<li class="mui-table-view-cell"><a href="vip-application.html" class="ui-link icon-vip-application icon">我的申请</a></li>
<li class="mui-table-view-cell"><a href="vip-activities.html" class="ui-link icon-vip-activities icon">我的活动</a></li>
<li class="mui-table-view-cell"><a href="vip-survey.html" class="ui-link icon-vip-survey icon">满意度调查</a></li>
<!--<li class="mui-table-view-cell"><a href="javascript:;" class="icon-vip-update icon" id="update">版本更新</a></li>-->
<li class="mui-table-view-cell"><a href="vip-notification.html" class="ui-link icon-vip-notification icon">系统通知</a></li>
<li class="mui-table-view-cell"><a href="vip-survey.html" class="ui-link icon-vip-customer icon">客户信息</a></li>
<li class="mui-table-view-cell"><a href="javascript:;" class="exit" id="exit">退出</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="js/app.js"></script>
<script src="js/mui.view.js"></script>
<script type="text/javascript">
(function($, doc) {
$.init({
statusBarBackground:'#393767',
preloadPages:[
{
url:"information.html",
id:"information.html",
}]
});
//初始化单页的区域滚动
$('.mui-scroll-wrapper').scroll();
$.plusReady(function() {
plus.navigator.setStatusBarStyle('UIStatusBarStyleBlackTranslucent');
$.back = function() {
$.openWindow({
url: 'index.html',
id: 'index.html',
show: {
aniShow: 'slide-in-left',
duration:300
},
waiting: {
autoShow: false
}
});
setTimeout(function(){
var main=plus.webview.currentWebview();
plus.webview.close(main,"none",0);
},300)
plus.navigator.setStatusBarStyle('UIStatusBarStyleBlackTranslucent');
};
var stateDate = app.getStateDate();
var state = app.getState();
var update=doc.getElementById("update");
plus.webview.close("index.html",'none',0);
function getdata(data){
var account=doc.getElementById("account");
var level=doc.getElementById("level");
var headimg=doc.getElementById("avatar_src");
account.innerHTML=data['user_name']; //会员名的
level.innerHTML=data['grade_name']; //会员等级
headimg.src= CONFING.httpUrl+data['head_img_path']; //会员图片;
}
$('.ui-page').on('tap','.exit', function(e) {
if($.os.ios){
app.setStateDate({});
app.setState({});
$.openWindow({
url: 'index.html',
id: 'index.html',
show: {
aniShow: 'slide-in-left',
duration:300
},
waiting: {
autoShow: true
}
});
setTimeout(function(){
var ws=plus.webview.all();
for(var i=0;i<ws.length;i++){
if(ws[i].id!='index.html' && ws[i].id!='HBuilder'){
plus.webview.close(ws[i].id,'none',0);
}
}
},300)
app.getisBrak(false);
return;
}
})
if(state.token){
getdata(stateDate);
}else{
window.addEventListener("mainId",function(event){
getdata(event.detail.msg)
})
}
// //检查更新
// update.addEventListener('tap', function() {
// $.getJSON(CONFING.server,{"appid":plus.runtime.appid,"version":plus.runtime.version,"imei":plus.device.imei},function (data) {
// if(data.status){
// plus.ui.confirm( data.note, function(i){
// if ( 0==i ) {
// plus.runtime.openURL( data.url );
// }
// }, data.title, ["立即更新","取 消"] );
// }else{
// mui.toast('已是最新版本~')
// }
// });
// });
});
}(mui, document));
</script>
</body>
</html>