-
Notifications
You must be signed in to change notification settings - Fork 0
/
bookmark.html
313 lines (298 loc) · 7.69 KB
/
bookmark.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
303
304
305
306
307
308
309
310
311
312
313
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>收藏题目</title>
<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 >
.title{
margin: 20px 15px 10px;
color: #6d6d72;
font-size: 15px;
}
.oa-contact-cell.mui-table .mui-table-cell {
padding: 11px 0;
vertical-align: middle;
}
.oa-contact-cell {
position: relative;
margin: -11px 0;
}
.oa-contact-avatar {
width: 75px;
}
.oa-contact-avatar img {
border-radius: 50%;
}
.oa-contact-content {
width: 100%;
}
.oa-contact-name {
margin-right: 20px;
}
.oa-contact-name, oa-contact-position {
float: left;
}
body {
background-color: #EFEFF4;
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
}
ul
{
list-style-type:none;
margin:0;
padding:0;
overflow:hidden;
}
li
{
float:left;
}
button:link,button:visited
{
display:block;
width:150px;
font-size:30px;
font-weight:bold;
color:#29C4B5;
background-color:#FFFFFF;
text-align:center;
padding:20px;
text-decoration:none;
text-transform:uppercase;
}
button:hover,button:active
{
background-color:#29C4B5;
color:#FFFFFF;
}
.header button{
width:150px;
height: 50px;
-webkit-border-radius:1em;
-moz-border-radius: 1em;
border: 1px solid #29C4B5;
font-size: 30px;
margin-left: 35%;
}
.header ul input{
margin-left: 10%;
margin-right: 10%;
margin-bottom: 1%;
width:500px;
height: 200px;
padding: 5em 5em 5em 5.4em;
-webkit-border-radius:10em;
-moz-border-radius: 10em;
border: 1px solid #29C4B5;
}
.header
{
position: relative;
margin-left: 20%;
margin-right: 20%;
margin-top: 1%;
}
.nav {
background: #FFFFFF;
padding: 20px;
width: 100%;
position: fixed;
left: 0;
bottom: 0;
margin-bottom: 1%;
}
.top
{
margin-left: 38%;
margin-right: 25%;
}
.inner
{
margin-left: 15%;
margin-right: 25%;
}
.inner ul
{
list-style-type:none;
margin:0;
padding:0;
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;
}
.search
{
margin-left: 20%;
}
.search input
{
-webkit-border-radius:1em;
-moz-border-radius: 1em;
border: 1px solid #29C4B5;
}
.mui-content{
margin-left: 30%;
}
.search{
margin-top: 2%;
}
#div2{
width:50px;
height: 30px;
border-radius: 90px;
background-color: #EEA236;
font-size:5px;
color:#FFFFFF;
align-content:center;
}
.slib{
margin-left: 10%;
}
</style>
</head>
<body>
<header class="mui-bar mui-bar-nav">
<a class="mui-icon mui-icon-left-nav mui-pull-left" href="user.html"></a>
<h1 class="mui-title">收藏的题目</h1>
</header>
<div class="mui-content" >
<ul class="slib">
<li><button id="test_in" onclick=javascript:window.location.href="book_test.html">测试</button></li>
<li><button id="test_done" onclick=javascript:window.location.href="test_done.html">练习</button></li>
</ul>
</div>
<nav class="mui-bar mui-bar-tab">
<a class="mui-tab-item " href="test.html" id="test1">
<span class="mui-icon iconfont icon-ceshi"></span>
<span class="mui-tab-label">测试</span>
</a>
<a class="mui-tab-item" href="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="banji.html" id="banji">
<span class="mui-icon mui-icon-contact"></span>
<span class="mui-tab-label">班级</span>
</a>
<a class="mui-tab-item" href="user.html" id="user">
<span class="mui-icon mui-icon-gear"></span>
<span class="mui-tab-label">我</span>
</a>
</nav>
<div id="content"></div>
</body>
<script>
var userid=GetUseridCookie().get("userid");
var usertype = GetUsertypeCookie().get("usertype");
if(usertype==2){
document.getElementById("test1").href = 't_test.html?';
document.getElementById("tiku").href = "t_tiku.html";
document.getElementById("banji").href = "t_banji.html";
document.getElementById("user").href = "t_user.html";
}
mui.init({
swipeBack:true //启用右滑关闭功能
});
mui('body').on('tap','a',function(){document.location.href=this.href;});
$(document).ready(function (){
jQuery.noConflict();
//var url='127.0.0.1:8080';
// var url='210.36.22.231';
var content = document.getElementById("content");
mui.ajax('http://'+url+'/jizhibackend/servlet/GetMarkedQuestionServlet',{
data:
{
userid:userid,
type:'list',
collectionType:'practice',
},
xhrFields: {
withCredentials: true
},
crossDomain: true,
dataType: 'json', //服务器返回json格式数据
type: 'post', //HTTP请求类型
timeout: 10000, //超时时间设置为10秒;
async: false,//同步
headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' },
success: function(data) {
cuoti(data);
},
error: function(xhr, type, errorThrown) {
console.log(errorThrown);
}
});
function cuoti(data){
var data1=data.TestCollection;
name='';
jQuery.each(data1,function(index,item){
var li = document.createElement('li');
var a = document.createElement('a');
a.href='book_test.html?proid='+item.id;
if(item.type==1)
{
name='单选题';
}
else if(item.type==4)
{
name='多选题';
}
else if(item.type==2)
{
name='判断题'
}
else if(item.type==3)
{
name='填空题';
}
li.className="mui-table-view mui-table-view-striped mui-table-view-condensed";
li.innerHTML='<div class="mui-slider-cell">'+
'<div class="oa-contact-cell mui-table">'+
'<div class="oa-contact-avatar mui-table-cell">'+
'<div class="mui-clearfix">'+
'<h4 class="oa-contact-name" style="line-height:10px"> </h4></div>'+
'<div id="div-space" style="width: 3px; height: 20px; background-color: #2DBFB0;padding-left: 5px;float: left;"></div>'+
'<p class="oa-contact-name">  '+name+
'</p>'+
'</div><div class="oa-contact-content mui-table-cell"><div class="mui-clearfix">'+
'<h4 class="oa-contact-name"> </h4></div>'+
'<p class="oa-contact-name">'+item.stem+
'</p></div></div></div>';
a.appendChild(li);
content.appendChild(a);
});
}
});
</script>
</html>