-
Notifications
You must be signed in to change notification settings - Fork 0
/
taskRecord.html
548 lines (538 loc) · 14.7 KB
/
taskRecord.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
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
<!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" type="text/css" href="css/mui.min.css" />
<link rel="stylesheet" type="text/css" href="css/iconfont.css" />
<style type="text/css">
#list {
/*避免导航边框和列表背景边框重叠,看起来像两条边框似得;*/
margin-top: -1px;
}
.mui-content {
margin: 10px 0px;
}
</style>
</head>
<body>
<!-- 主页面标题 -->
<header class="mui-bar mui-bar-nav" style="background-color: #576574;-webkit-box-shadow: 0 1px 6px #ccc;box-shadow: 0 1px 6px #888; ">
<a class="mui-icon mui-icon-bars mui-pull-left" style="color: white;"></a>
<h1 class="mui-title" style="color: white;font-weight: bold;">任务日志</h1>
</header>
<!-- 主页面内容容器 -->
<!--底部选项卡-->
<nav class="mui-bar mui-bar-tab" style="background-color: #576574;font-weight: bold;box-shadow: 0px -1px 5px #888888;">
<a class="mui-tab-item mui-active " href="taskList.html#list" style="border-right: 1px #230515 solid;">
<span class="mui-tab-label">发布的任务</span>
</a>
<a class="mui-tab-item" href="taskRecord.html#list" style="border-right: 1px #230515 solid;">
<span class="mui-tab-label">接受的任务</span>
</a>
<a id="toGetMoney" class="mui-tab-item" href="getMoney.html">
<span class="mui-tab-label">赏金结算</span>
</a>
</nav>
<!--即使是底部工具条和底部选项卡,也要放在.mui-content之前,否则固定栏会遮住部分主内容-->
<div class="mui-content">
<div class="mui-input-row" style="text-align: center;">
<p>下拉刷新</p>
</div>
<ul id="list" class="mui-table-view">
<li class="mui-table-view-cell mui-media">
<a href="taskDetail.html" class="">
<img class="mui-media-object mui-pull-left" src="images/renwu1.jpg">
<div class="mui-media-body">
帮我ps一张图片
<p class="mui-ellipsis">
时间:
<span id="">
13:00
</span> 赏金:¥
<span id="">
100
</span>
</p>
</div>
</a>
</li>
<li class="mui-table-view-cell mui-media">
<a href="taskDetail.html">
<img class="mui-media-object mui-pull-left" src="images/renwu2.jpg">
<div class="mui-media-body">
帮拿快递
<p class="mui-ellipsis">
时间:
<span id="">
13:00
</span> 赏金:¥
<span id="">
100
</span>
</p>
</div>
</a>
</li>
<li class="mui-table-view-cell mui-media">
<a href="taskDetail.html">
<img class="mui-media-object mui-pull-left" src="images/renwu1.jpg">
<div class="mui-media-body">
帮忙记笔记
<p class="mui-ellipsis">
时间:
<span id="">
13:00
</span> 赏金:¥
<span id="">
100
</span>
</p>
</div>
</a>
</li>
<li class="mui-table-view-cell mui-media">
<a href="taskDetail.html" class="">
<img class="mui-media-object mui-pull-left" src="images/renwu1.jpg">
<div class="mui-media-body">
帮我ps一张图片
<p class="mui-ellipsis">
时间:
<span id="">
13:00
</span> 赏金:¥
<span id="">
100
</span>
</p>
</div>
</a>
</li>
<li class="mui-table-view-cell mui-media">
<a href="taskDetail.html">
<img class="mui-media-object mui-pull-left" src="images/renwu2.jpg">
<div class="mui-media-body">
帮拿快递
<p class="mui-ellipsis">
时间:
<span id="">
13:00
</span> 赏金:¥
<span id="">
100
</span>
</p>
</div>
</a>
</li>
<li class="mui-table-view-cell mui-media">
<a href="taskDetail.html">
<img class="mui-media-object mui-pull-left" src="images/renwu1.jpg">
<div class="mui-media-body">
帮忙记笔记
<p class="mui-ellipsis">
时间:
<span id="">
13:00
</span> 赏金:¥
<span id="">
100
</span>
</p>
</div>
</a>
</li>
<li class="mui-table-view-cell mui-media">
<a href="taskDetail.html" class="">
<img class="mui-media-object mui-pull-left" src="images/renwu1.jpg">
<div class="mui-media-body">
帮我ps一张图片
<p class="mui-ellipsis">
时间:
<span id="">
13:00
</span> 赏金:¥
<span id="">
100
</span>
</p>
</div>
</a>
</li>
<li class="mui-table-view-cell mui-media">
<a href="taskDetail.html">
<img class="mui-media-object mui-pull-left" src="images/renwu2.jpg">
<div class="mui-media-body">
帮拿快递
<p class="mui-ellipsis">
时间:
<span id="">
13:00
</span> 赏金:¥
<span id="">
100
</span>
</p>
</div>
</a>
</li>
<li class="mui-table-view-cell mui-media">
<a href="taskDetail.html" class="">
<img class="mui-media-object mui-pull-left" src="images/renwu1.jpg">
<div class="mui-media-body">
帮我ps一张图片
<p class="mui-ellipsis">
时间:
<span id="">
13:00
</span> 赏金:¥
<span id="">
100
</span>
</p>
</div>
</a>
</li>
<li class="mui-table-view-cell mui-media">
<a href="taskDetail.html">
<img class="mui-media-object mui-pull-left" src="images/renwu2.jpg">
<div class="mui-media-body">
帮拿快递
<p class="mui-ellipsis">
时间:
<span id="">
13:00
</span> 赏金:¥
<span id="">
100
</span>
</p>
</div>
</a>
</li>
<li class="mui-table-view-cell mui-media">
<a href="taskDetail.html">
<img class="mui-media-object mui-pull-left" src="images/renwu1.jpg">
<div class="mui-media-body">
帮忙记笔记
<p class="mui-ellipsis">
时间:
<span id="">
13:00
</span> 赏金:¥
<span id="">
100
</span>
</p>
</div>
</a>
</li>
<li class="mui-table-view-cell mui-media">
<a href="taskDetail.html" class="">
<img class="mui-media-object mui-pull-left" src="images/renwu1.jpg">
<div class="mui-media-body">
帮我ps一张图片
<p class="mui-ellipsis">
时间:
<span id="">
13:00
</span> 赏金:¥
<span id="">
100
</span>
</p>
</div>
</a>
</li>
<li class="mui-table-view-cell mui-media">
<a href="taskDetail.html">
<img class="mui-media-object mui-pull-left" src="images/renwu2.jpg">
<div class="mui-media-body">
帮拿快递
<p class="mui-ellipsis">
时间:
<span id="">
13:00
</span> 赏金:¥
<span id="">
100
</span>
</p>
</div>
</a>
</li>
<li class="mui-table-view-cell mui-media">
<a href="taskDetail.html">
<img class="mui-media-object mui-pull-left" src="images/renwu1.jpg">
<div class="mui-media-body">
帮忙记笔记
<p class="mui-ellipsis">
时间:
<span id="">
13:00
</span> 赏金:¥
<span id="">
100
</span>
</p>
</div>
</a>
</li>
<li class="mui-table-view-cell mui-media">
<a href="taskDetail.html" class="">
<img class="mui-media-object mui-pull-left" src="images/renwu1.jpg">
<div class="mui-media-body">
帮我ps一张图片
<p class="mui-ellipsis">
时间:
<span id="">
13:00
</span> 赏金:¥
<span id="">
100
</span>
</p>
</div>
</a>
</li>
<li class="mui-table-view-cell mui-media">
<a href="taskDetail.html">
<img class="mui-media-object mui-pull-left" src="images/renwu2.jpg">
<div class="mui-media-body">
帮拿快递
<p class="mui-ellipsis">
时间:
<span id="">
13:00
</span> 赏金:¥
<span id="">
100
</span>
</p>
</div>
</a>
</li>
<li class="mui-table-view-cell mui-media">
<a href="taskDetail.html">
<img class="mui-media-object mui-pull-left" src="images/renwu1.jpg">
<div class="mui-media-body">
最下面的任务
<p class="mui-ellipsis">
时间:
<span id="">
13:00
</span> 赏金:¥
<span id="">
100
</span>
</p>
</div>
</a>
</li>
</ul>
<div class="mui-input-row" style="text-align: center;margin-top: 5px;">
<p>上拉加载更多</p>
</div>
</div>
</div>
<script src="js/mui.min.js" type="text/javascript" charset="utf-8"></script>
<script>
var menu = null,
main = null,
mask = mui.createMask(closeMenu);
var showMenu = false; //侧边栏是否显示
var isInTransition = false; //是否在划动中
mui.init({
swipeBack: false,
statusBarBackground: '#f7f7f7',
gestureConfig: {
doubletap: true
}
// subpages: [{
// id: 'list',
// url: 'list.html',
// styles: {
// top: '45px',
// bottom: '50px',
// bounce: 'vertical'
// }
// }]
});
mui.plusReady(function() {
//仅支持竖屏显示
plus.screen.lockOrientation("portrait-primary");
main = plus.webview.currentWebview();
main.addEventListener('maskClick', closeMenu);
//处理侧滑导航,为了避免和子页面初始化等竞争资源,延迟加载侧滑页面;
setTimeout(function() {
menu = mui.preload({
id: 'right-menu',
url: 'right-menu.html',
styles: {
left: 0,
width: '70%',
zindex: -1
},
show: {
aniShow: 'none'
}
});
}, 200);
});
//底部选项卡点击事件
mui('.mui-bar-tab').on('tap', 'a', function() {
var id = this.getAttribute("href");
var href = this.href;
console.log("id=" + id + ",href=" + href);
plus.webview.currentWebview().openWindow({
id: id,
url: href,
show: {
aniShow: "slide-in-right"
},
waiting: {
autoShow: true
}
});
});
/**
* 显示侧滑菜单
*/
// function openMenu() {
// if (isInTransition) {
// return;
// }
// if (!showMenu) {
// //侧滑菜单处于隐藏状态,则立即显示出来;
// isInTransition = true;
// menu.setStyle({
// mask: 'rgba(0,0,0,0)'
// }); //menu设置透明遮罩防止点击
// menu.show('none', 0, function() {
// //主窗体开始侧滑并显示遮罩
// main.setStyle({
// mask: 'rgba(0,0,0,0.4)',
// left: '70%',
// transition: {
// duration: 150
// }
// });
// mui.later(function() {
// isInTransition = false;
// menu.setStyle({
// mask: "none"
// }); //移除menu的mask
// }, 160);
// showMenu = true;
// });
// }
// };
function openMenu() {
if (!showMenu) {
//侧滑菜单处于隐藏状态,则立即显示出来;
//显示完毕后,根据不同动画效果移动窗体;
menu.show('none', 0, function() {
//主窗体开始侧滑并显示遮罩
main.setStyle({
left: '70%',
transition: {
duration: 150
}
});
});
//显示遮罩
mask.show();
showMenu = true;
}
}
/**
* 关闭菜单
*/
// function closeMenu() {
// if (isInTransition) {
// return;
// }
// if (showMenu) {
// //关闭遮罩;
// //主窗体开始侧滑;
// isInTransition = true;
// main.setStyle({
// mask: 'none',
// left: '0',
// transition: {
// duration: 200
// }
// });
// showMenu = false;
// //等动画结束后,隐藏菜单webview,节省资源;
// mui.later(function() {
// isInTransition = false;
// menu.hide();
// }, 300);
// }
// };
function closeMenu() {
if (showMenu) {
//关闭遮罩;
main.setStyle({
left: '0',
transition: {
duration: 200
}
});
//等窗体动画结束后,隐藏菜单webview,节省资源;
setTimeout(function() {
menu.hide();
}, 200);
//改变标志位
showMenu = false;
//关闭遮罩
mask.close();
}
}
//点击左上角侧滑图标,打开侧滑菜单;
document.querySelector('.mui-icon-bars').addEventListener('tap', function(e) {
if (showMenu) {
closeMenu();
} else {
openMenu();
}
});
//敲击顶部导航,内容区回到顶部
document.querySelector('header').addEventListener('doubletap', function() {
main.children()[0].evalJS('mui.scrollTo(0, 100)');
});
//主界面向右滑动,若菜单未显示,则显示菜单;否则不做任何操作
window.addEventListener("swiperight", openMenu);
//主界面向左滑动,若菜单已显示,则关闭菜单;否则,不做任何操作;
window.addEventListener("swipeleft", closeMenu);
//侧滑菜单触发关闭菜单命令
window.addEventListener("menu:close", closeMenu);
window.addEventListener("menu:open", openMenu);
//首页返回键处理
//处理逻辑:1秒内,连续两次按返回键,则退出应用;
var first = null;
mui.back = function() {
if (showMenu) {
closeMenu();
} else {
//首次按键,提示‘再按一次退出应用’
if (!first) {
first = new Date().getTime();
mui.toast('再按一次退出应用');
setTimeout(function() {
first = null;
}, 1000);
} else {
if (new Date().getTime() - first < 1000) {
plus.runtime.quit();
}
}
}
};
</script>
</body>
</html>