-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patht_user.html
302 lines (286 loc) · 8.71 KB
/
t_user.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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link href="css/mui.min.css" rel="stylesheet" />
<meta name="viewport" content="width=device-width, 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" href="css/mui.min.css">
<!--App自定义的css-->
<link rel="stylesheet" type="text/css" href="css/app.css"/>
<link rel="stylesheet" type="text/css" href="css/iconfont.css"/>
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
<script src="js/mui.min.js"></script>
<script src="js/tool.js"></script>
<style>
body{
background-color:#DDDDDD;
}
.nav {
background: #FFFFFF;
padding: 30px;
width: 100%;
position: fixed;
left: 0;
bottom: 0;
margin-bottom: 1%;
}
.inner
{
margin-left: 15%;
margin-right: 25%;
}
.inner ul
{
list-style-type:none;
margin:0;
padding:5px;
overflow:hidden;
}
.inner li
{
float:left;
}
.inner a:link,a:visited
{
display:block;
width:150px;
font-weight:bold;
color:#8F8F94;
background-color:#FFFFFF;
text-align:center;
padding:10px;
text-decoration:none;
text-transform:uppercase;
}
.inner a:hover,a:active
{
background-color:#29C4B5;
}
.login_topper{
margin-bottom: 4%;
}
.login{
padding: 15px;
background-color:#FFFFFF;
color:#6D6D72;
text-align: center;
}
a { text-decoration:none; }
a:hover { text-decoration:underline; }
.login a
{
display:block;
font-size:40px;
padding:5px;
color:#6D6D72;
}
.login ul
{
width:100%;
height:100%;
padding-left: 1px;
padding-right: 1px;
padding-bottom: 1px;
overflow:hidden;
border: 1px solid #6D6D72;
}
.login a:link,a:visited
{
display:block;
font-weight:bold;
color:#6D6D72;
background-color:#FFFFFF;
text-align:center;
text-decoration:none;
text-transform:uppercase;
}
.login a:hover,a:active
{
background-color:#AAAAAA;
color:#FFFFFF;
border:1px solid #6D6D72;
}
.topper_inner
{
margin-top: 0;
margin-left: 65%;
}
.topper_inner ul
{
list-style-type:none;
overflow:hidden;
}
.topper_inner li
{
float: left;
}
.topper_inner a:link,a:visited
{
display:block;
width:80px;
font-weight:bold;
text-align:center;
padding:0;
text-decoration:none;
text-transform:uppercase;
}
.picture
{
margin-left: 42%;
}
#name{
text-align: center;
padding: 10px,10px;
font-size:20px;
}
</style>
</head>
<body>
<div class="topper" style="background-image:url(images/user_info_bg.png);">
<div class="picture">
<img src="images/userhead.png" width="60" height="60">
</div>
<div id="name">
</div>
<ul class="mui-table-view mui-table-view-chevron">
<!--<li class="mui-table-view-cell"><a href="bookmark.html" class="mui-navigate-right">收藏的题目</a></li>-->
<!--<li class="mui-table-view-cell"><a href="cuotiji.html" class="mui-navigate-right">错题集</a></li>-->
<!--<li class="mui-table-view-cell"><a href="" class="mui-navigate-right">个性化设置</a></li>-->
<!--<li class="mui-table-view-cell"><a href="dismissclass.html" class="mui-navigate-right">解散班级</a></li>-->
<!-- <li class="mui-table-view-cell"><a href="t_message.html" class="mui-navigate-right">消息<span style="background-color:#DF6659;color:#FFFFFF" class="mui-badge" id="count"></span></a></li>-->
<li class="mui-table-view-cell"><a href="about.html" class="mui-navigate-right">关于</a></li>
<!-- <li class="mui-table-view-cell"><a id="calculate" href=""class="mui-navigate-right">计算学生积分</a></li>-->
<li class="mui-table-view-cell"><a href="t_shop.html"class="mui-navigate-right">礼品</a></li>
<li class="mui-table-view-cell"><a href="messageproduct.html"class="mui-navigate-right">礼品兑换信息<span style="background-color:#DF6659;color:#FFFFFF" class="mui-badge" id="count"></span></a></li>
<li class="mui-table-view-cell"><a href="userinfo.html" class="mui-navigate-right">设置</a></li>
</ul>
<!--</div>
<div class="login_topper">
<div class="login"><ul><a href="timu.html">收藏的题目</a></ul></div>
<div class="login"><ul><a href="timu.html">收藏的题目</a></ul></div>
<div class="login"><ul><a href="self_setting.html">个性化设置</a></ul></div>
</div>
<div class="login_botton">
<div class="login"><ul><a href="message.html">消息</a></div>
<div class="login"><ul><a href="setting.html">设置</a></div>
</div>-->
<nav class="mui-bar mui-bar-tab">
<a class="mui-tab-item " id="test1" href="t_test.html">
<span class="mui-icon iconfont icon-ceshi"></span>
<span class="mui-tab-label">测试</span>
</a>
<a class="mui-tab-item" href="t_tiku.html" id="tiku">
<span class="mui-icon mui-icon-email"></span>
<span class="mui-tab-label">题库</span>
</a>
<a class="mui-tab-item" href="t_banji.html" id="banji">
<span class="mui-icon mui-icon-contact"></span>
<span class="mui-tab-label">班级</span>
</a>
<a class="mui-tab-item mui-active" href="t_user.html" id="user">
<span class="mui-icon mui-icon-gear"></span>
<span class="mui-tab-label">我</span>
</a>
</nav>
<script>
// var userid = UrlParm.parm("userid");
var btnlogin=document.getElementById("logout");
var userid = GetUseridCookie().get("userid");
var cal = document.getElementById("calculate");
if(userid==undefined){
alert("登录过期,请重新登录!");
javascript:window.location.href="login.html"
}
mui('body').on('tap','a',function(){document.location.href=this.href+"?userid="+userid;});
(function($,doc){
jQuery.noConflict();
//var url=127.0.0.1:8080;
// var url='210.36.22.231';
var name = document.getElementById("name");
// mui.ajax('http://'+url+'/jizhibackend/servlet/GetApplyJoinRequest',{
// data:
// {
// userid:userid,
// },
// xhrFields: {
//
// withCredentials: true
//
// },
// crossDomain: true,
// dataType: 'text', //服务器返回json格式数据
// type: 'post', //HTTP请求类型
// timeout: 10000, //超时时间设置为10秒;
// headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' },
// success: function(data) {
// var count=0;
// jQuery.each(JSON.parse(data),function(index,item){
// count=count+(item.length-1);
// });
// document.getElementById("count").innerHTML=''+count;
// },
// error: function(xhr, type, errorThrown) {
// console.log(errorThrown);
// }
// });
mui.ajax('http://'+url+'/jizhibackend/servlet/GetApplyGiftServlet',{
data:
{
userid:userid,
},
xhrFields: {
withCredentials: true
},
crossDomain: true,
dataType: 'json', //服务器返回json格式数据
type: 'post', //HTTP请求类型
timeout: 10000, //超时时间设置为10秒;
headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' },
success: function(data) {
var count=0;
jQuery.each(data,function(index,item){
if(item.isRead==0)
{
count++;
}
});
document.getElementById("count").innerHTML=''+count;
},
error: function(xhr, type, errorThrown) {
console.log(errorThrown);
}
});
mui.ajax('http://'+url+'/jizhibackend/servlet/GetUserInfoServlet',{
data:
{
userid:userid,
},
xhrFields: {
withCredentials: true
},
crossDomain: true,
dataType: 'json', //服务器返回json格式数据
type: 'post', //HTTP请求类型
timeout: 10000, //超时时间设置为10秒;
headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' },
success: function(data) {
document.getElementById('name').innerHTML=data.nickname;
},
error: function(xhr, type, errorThrown) {
console.log(errorThrown);
}
});
}
)(mui.document);
// btnlogin.onclick = function() {
// if(confirm("确定退出当前账号吗?")){
// clearCookie();
// javascript:window.location.href="login.html"
// }
// }
</script>
</body>
</html>