zhoufan 7 anni fa
commit
ebec05b569
100 ha cambiato i file con 32638 aggiunte e 0 eliminazioni
  1. 306 0
      WebAPP/WorkDetails.html
  2. 80 0
      WebAPP/css/feedback-page.css
  3. 112 0
      WebAPP/css/mui.indexedlist.css
  4. 4417 0
      WebAPP/css/mui.min.css
  5. 8 0
      WebAPP/css/style.css
  6. BIN
      WebAPP/fonts/mui.ttf
  7. 81 0
      WebAPP/forget_password.html
  8. BIN
      WebAPP/images/iconfont-tianjia.png
  9. BIN
      WebAPP/images/logo1.png
  10. BIN
      WebAPP/images/password.png
  11. BIN
      WebAPP/images/peson.png
  12. BIN
      WebAPP/images/phone.png
  13. BIN
      WebAPP/images/qihoo.png
  14. BIN
      WebAPP/images/qq.png
  15. BIN
      WebAPP/images/shuijiao.jpg
  16. BIN
      WebAPP/images/sinaweibo.png
  17. BIN
      WebAPP/images/start.png
  18. BIN
      WebAPP/images/start1.png
  19. BIN
      WebAPP/images/time.png
  20. BIN
      WebAPP/images/user-photo.png
  21. BIN
      WebAPP/images/weixin.png
  22. 115 0
      WebAPP/index.html
  23. 837 0
      WebAPP/indexs.html
  24. 148 0
      WebAPP/js/app.js
  25. 99 0
      WebAPP/js/feedback-page.js
  26. 118 0
      WebAPP/js/feedback.js
  27. 229 0
      WebAPP/js/jquery.md5.js
  28. 4 0
      WebAPP/js/jquery.min.js
  29. 20 0
      WebAPP/js/mui.enterfocus.js
  30. 187 0
      WebAPP/js/mui.indexedlist.js
  31. 304 0
      WebAPP/js/mui.locker.js
  32. 9 0
      WebAPP/js/mui.min.js
  33. 613 0
      WebAPP/js/mui.view.js
  34. 2189 0
      WebAPP/libs/easymob-webim-sdk/easemob.im-1.0.5.js
  35. 10308 0
      WebAPP/libs/easymob-webim-sdk/jquery-1.11.1.js
  36. 489 0
      WebAPP/libs/easymob-webim-sdk/json2.js
  37. 781 0
      WebAPP/libs/easymob-webim-sdk/quickstart.md
  38. 5234 0
      WebAPP/libs/easymob-webim-sdk/strophe-custom-2.0.0.js
  39. 481 0
      WebAPP/login.html
  40. 479 0
      WebAPP/main.html
  41. 135 0
      WebAPP/pullrefresh_main.html
  42. 100 0
      WebAPP/pullrefresh_sub.html
  43. 122 0
      WebAPP/reg.html
  44. 277 0
      WebAPP/setting.html
  45. 264 0
      WebAPP/tx.html
  46. 121 0
      WebAPP/unlock.html
  47. 124 0
      WebAPP/unpackage/.confirmed_dependencies
  48. 1 0
      WebAPP/unpackage/.dependencies
  49. BIN
      WebAPP/unpackage/res/icons/100x100.png
  50. BIN
      WebAPP/unpackage/res/icons/114x114.png
  51. BIN
      WebAPP/unpackage/res/icons/120x120.png
  52. BIN
      WebAPP/unpackage/res/icons/144x144.png
  53. BIN
      WebAPP/unpackage/res/icons/152x152.png
  54. BIN
      WebAPP/unpackage/res/icons/180x180.png
  55. BIN
      WebAPP/unpackage/res/icons/192x192.png
  56. BIN
      WebAPP/unpackage/res/icons/256x256.png
  57. BIN
      WebAPP/unpackage/res/icons/29x29.png
  58. BIN
      WebAPP/unpackage/res/icons/40x40.png
  59. BIN
      WebAPP/unpackage/res/icons/48x48.png
  60. BIN
      WebAPP/unpackage/res/icons/50x50.png
  61. BIN
      WebAPP/unpackage/res/icons/57x57.png
  62. BIN
      WebAPP/unpackage/res/icons/58x58.png
  63. BIN
      WebAPP/unpackage/res/icons/72x72.png
  64. BIN
      WebAPP/unpackage/res/icons/76x76.png
  65. BIN
      WebAPP/unpackage/res/icons/80x80.png
  66. BIN
      WebAPP/unpackage/res/icons/87x87.png
  67. BIN
      WebAPP/unpackage/res/icons/96x96.png
  68. 317 0
      WebChart/Script/Class/DateHelper.js
  69. 13 0
      WebChart/Script/Common/huayi.config.js
  70. 13 0
      WebChart/Script/Common/huayi.cookies.js
  71. 594 0
      WebChart/Script/Common/huayi.http.js
  72. 49 0
      WebChart/Script/Common/huayi.load.js
  73. 7 0
      WebChart/Script/test.js
  74. 6 0
      WebChart/css/bootstrap.min.css
  75. 700 0
      WebChart/css/index.css
  76. 128 0
      WebChart/fuWuZhiShi.html
  77. 136 0
      WebChart/huaWuLiang.html
  78. BIN
      WebChart/img/123.png
  79. BIN
      WebChart/img/32.ico
  80. BIN
      WebChart/img/circle_03.png
  81. BIN
      WebChart/img/midmap_03.png
  82. BIN
      WebChart/img/sqLogo.png
  83. 45 0
      WebChart/index.html
  84. 69 0
      WebChart/jieDanBuMen.html
  85. 10 0
      WebChart/js/coment.js
  86. 37 0
      WebChart/js/echarts.min.js
  87. 153 0
      WebChart/js/fuwuzhishi.js
  88. 326 0
      WebChart/js/gray.js
  89. 402 0
      WebChart/js/highcharts.js
  90. 260 0
      WebChart/js/huawu.js
  91. 219 0
      WebChart/js/jiedanbumen.js
  92. 117 0
      WebChart/js/jquery.cookie.js
  93. 4 0
      WebChart/js/jquery.min.js
  94. 236 0
      WebChart/js/laiyuanqudao.js
  95. 2 0
      WebChart/js/layer/layer.js
  96. 2 0
      WebChart/js/layer/mobile/layer.js
  97. 1 0
      WebChart/js/layer/mobile/need/layer.css
  98. BIN
      WebChart/js/layer/skin/default/icon-ext.png
  99. BIN
      WebChart/js/layer/skin/default/icon.png
  100. 0 0
      WebChart/js/layer/skin/default/layer.css

+ 306 - 0
WebAPP/WorkDetails.html

@@ -0,0 +1,306 @@
1
+<!doctype html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<title></title>
7
+		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
8
+		<meta name="apple-mobile-web-app-capable" content="yes">
9
+		<meta name="apple-mobile-web-app-status-bar-style" content="black">
10
+		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
11
+		<link href="css/mui.min.css" rel="stylesheet" />
12
+		<script src="js/mui.min.js"></script>
13
+		<style>
14
+			/*通过CSS*/
15
+			
16
+			.mui-bar-nav {
17
+				background-color: #00a1cb;
18
+			}
19
+			
20
+			.mui-title {
21
+				line-height: 50px;
22
+				color: #fff;
23
+			}
24
+			
25
+			.mui-action-back {
26
+				color: #fff;
27
+			}
28
+			
29
+			.Phone img {
30
+				width: 13px;
31
+				height: 13px;
32
+				border-radius: 50%;
33
+				/*		 vertical-align: text-bottom;*/
34
+				margin-right: 3px;
35
+				vertical-align: initial;
36
+			}
37
+			
38
+			.size-16 {
39
+				font-size: 16px;
40
+			}
41
+			
42
+			.States {
43
+				background: #fd7c7d;
44
+				color: #fff;
45
+				padding: 3px 6px;
46
+				border-radius: 5px;
47
+			}
48
+			
49
+			.mui-table-view-cell {
50
+				padding-right: 20px!important;
51
+			}
52
+			
53
+			.Active {
54
+				color: #00a1cb;
55
+			}
56
+			
57
+			.size-12 {
58
+				font-size: 12px;
59
+			}
60
+			
61
+			.size-14 {
62
+				font-size: 14px;
63
+			}
64
+			
65
+			.mui-card-footer a {
66
+				display: inline-block;
67
+				width: 30%;
68
+				text-align: center;
69
+				font-size: 14px;
70
+			}
71
+			.mui-card-footer a:active{
72
+				color: #00a1cb;
73
+			}
74
+			.mui-padding {
75
+				padding: 11px 15px;
76
+				padding-right: 20px!important;
77
+				/*border-bottom: 1px solid #c8c7cc;*/
78
+			}
79
+			
80
+			.GDgz {
81
+				background-color: #fff
82
+			}
83
+			
84
+			.GDgz span {
85
+				line-height: 18px;
86
+				margin-right: 3px;
87
+			}
88
+			
89
+			.mui-modal {
90
+				display: block
91
+			}
92
+			
93
+			.work-content {
94
+				padding: 5px 12px;
95
+			}
96
+			
97
+			.work-content span {
98
+				line-height: 20px;
99
+			}
100
+			
101
+			.Caozuo a {
102
+				color: #000;
103
+			}
104
+			
105
+			#Popover_0 a {
106
+				color: #00a1cb;
107
+				line-height: 50px;
108
+			}
109
+			
110
+			#Popover_0 {
111
+				top: 50px;
112
+				background-color: #fff;
113
+			}
114
+			
115
+			#next-header {
116
+				background-color: #fff;
117
+			}
118
+		</style>
119
+	</head>
120
+
121
+	<body>
122
+		<header class="mui-bar mui-bar-nav" style="padding-right: 15px;height: 50px;color: #fff;">
123
+			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
124
+			<h1 class="mui-title">工单详情</h1>
125
+		</header>
126
+		<div class="mui-content">
127
+			<!--<ul class="mui-table-view mui-table-view-chevron">-->
128
+			<!--<li class="mui-padding">-->
129
+			<div class=" mui-table mui-table-view mui-padding" style="margin-top: 0;">
130
+				<div class="mui-table-cell mui-col-xs-10">
131
+					<h4 class="mui-ellipsis size-16">
132
+		                    	<i class="mui-icon  Phone">
133
+													<img src="images/start.png" alt="" />
134
+												</i>
135
+		                    	<span>工单编号:</span><span id="ID"></span>
136
+		                    </h4>
137
+
138
+				</div>
139
+				<div class="mui-table-cell mui-col-xs-2 mui-text-right">
140
+					<span class="mui-h5 States">待解决</span>
141
+				</div>
142
+			</div>
143
+			<div class="mui-table mui-table-view work-content ">
144
+				<h5 class=" Active size-14">		                    	
145
+		                    	<span >投诉标题:</span><span id="F_ComTitle" class="mui-ellipsis"></span>
146
+		                    </h5>
147
+				<h5 class="size-14 " style="line-height: 15px;">		                    	
148
+		                    	<span>投诉内容:</span><span id="F_ComContent"></span>
149
+		                   </h5>
150
+			</div>
151
+			<!--</ul>-->
152
+			<!--信息展示-->
153
+			<ul class="mui-table-view size-14 message-box" style="background: #fafafa;">
154
+				<li class="work-content">
155
+					<span>
156
+						<i class="mui-icon mui-icon-location size-16"></i>
157
+						投诉地址:
158
+					</span>
159
+					<span id="AreaName">河南省郑州市大学科技园东区4号楼</span>
160
+				</li>
161
+				<li class="work-content">
162
+					<span>
163
+						<i class="mui-icon mui-icon-location size-16"></i>
164
+						投诉人:
165
+					</span>
166
+					<span id="F_CusName"></span>
167
+				</li>
168
+				<li class="work-content">
169
+					<span>
170
+						<i class="mui-icon mui-icon-location size-16"></i>
171
+						投诉人电话:
172
+					</span>
173
+					<span id="F_CusPhone">
174
+					</span>
175
+				</li>
176
+				<li class="work-content">
177
+					<span>
178
+						<i class="mui-icon mui-icon-location size-16"></i>
179
+						工单类型:
180
+					</span>
181
+					<span id="TypeName1"></span>
182
+				</li>
183
+				<li class="work-content">
184
+					<span>
185
+						<i class="mui-icon mui-icon-location size-16"></i>
186
+						提交时间:
187
+					</span><span id="F_CreateTime"></span>
188
+				</li>
189
+
190
+			</ul>
191
+			<div class="mui-table-view Caozuo " style="padding: 10px 12px;">
192
+				<div class="mui-card-footer">
193
+					<!--<a ><i class="mui-icon mui-icon-more "></i>催单</a>
194
+					<a><i class="mui-icon mui-icon-paperplane"></i>指派</a>
195
+					<a class="Finish"><i class="mui-icon mui-icon-checkmarkempty"></i>完成</a>-->
196
+					
197
+				</div>
198
+			</div>
199
+			<!--工单进程-->
200
+			<div class="mui-table-view work-content ">
201
+				<div class="mui-table-cell mui-col-xs-10">
202
+					<h4 class="mui-ellipsis size-16" style="padding: 6px ;">工单跟踪信息</h4>
203
+				</div>
204
+			</div>
205
+			<!--工单进度-->
206
+			<div class="mui-padding GDgz">
207
+				<!--<div style="padding-left: 20px; ">
208
+					<h5 class="mui-badge-success mui-badge-inverted">2017-06-23  15:30:20   朱慧娟  已完此成工单</h5>
209
+					<h5><span>操作人:</span><span>蓝胖纸</span></h5>
210
+					<h5><span>操作人电话:</span><span>18839115206</span></h5>
211
+					<h5><span>备注信息:</span><span>圆圆的头,大大的眼睛圆圆的头,大大的眼睛圆圆的头,大大的眼睛圆圆的头,大大的眼睛圆圆的头,大大的眼睛圆圆的头,大大的眼睛圆圆的头,大大的眼睛</span></h5>
212
+				</div>
213
+				<div style="padding-left: 20px; ">
214
+					<h5 class="mui-badge-danger mui-badge-inverted">2017-06-23  15:30:20   朱慧娟  已完此成工单</h5>
215
+					<h5><span>操作人:</span><span>蓝胖纸</span></h5>
216
+					<h5><span>操作人电话:</span><span>18839115206</span></h5>
217
+					<h5><span>备注信息:</span><span>圆圆的头,大大的眼睛圆圆的头,大大的眼睛圆圆的头,大大的眼睛圆圆的头,大大的眼睛圆圆的头,大大的眼睛圆圆的头,大大的眼睛圆圆的头,大大的眼睛</span></h5>
218
+				</div>
219
+				<div style="padding-left: 20px; ">
220
+					<h5 class="mui-badge-warning mui-badge-inverted"><span>2017-06-23</span><span>15:20:20</span><span>蓝胖子</span><span>创建工单</span>
221
+					</h5>
222
+					<h5><span>操作人:</span><span>蓝胖纸</span></h5>
223
+					<h5><span>操作人电话:</span><span>18839115206</span></h5>
224
+					<h5><span>备注信息:</span><span>圆圆的头,大大的眼睛圆圆的头,大大的眼睛圆圆的头,大大的眼睛圆圆的头,大大的眼睛圆圆的头,大大的眼睛圆圆的头,大大的眼睛圆圆的头,大大的眼睛</span></h5>
225
+				</div>-->
226
+
227
+			</div>
228
+
229
+			<!--<nav class="mui-bar mui-bar-tab ">
230
+				<a href="#Popover_0" class="mui-tab-item">
231
+					<span class="mui-icon mui-icon-compose"></span>添加评论</a>
232
+			</nav>-->
233
+		</div>
234
+		<script src="js/app.js"></script>
235
+		<script type="text/javascript">
236
+			mui.init();
237
+			mui.init({
238
+				swipeBack: true //启用右滑关闭功能
239
+			});
240
+			mui.plusReady(function() {
241
+				var wv = plus.webview.currentWebview();
242
+				var vText = wv.name;
243
+				var token = wv.token;
244
+				var ID = document.getElementById("ID").innerHTML = vText;
245
+				//工单详情
246
+				//获取工单
247
+				mui.ajax('http://192.168.4.18:4010/WorkOrder/GetWorkOrder', {
248
+					data: {
249
+						workorderid: vText,
250
+						"token": token
251
+					},
252
+					dataType: 'json', //服务器返回json格式数据
253
+					type: 'get', //HTTP请求类型
254
+					timeout: 10000, //超时时间设置为10秒;
255
+					headers: {
256
+						'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
257
+					},
258
+					success: function(data) {
259
+						var Data = data.data.data;
260
+						document.getElementById("F_ComTitle").innerHTML = Data[0].F_ComTitle; //标题
261
+						document.getElementById("F_ComContent").innerHTML = Data[0].F_ComContent; //内容
262
+						//地址
263
+						document.getElementById("AreaName").innerHTML = Data[0].AreaName;
264
+						//投诉人
265
+						document.getElementById("F_CusName").innerHTML = Data[0].F_CusName;
266
+						//电话
267
+						document.getElementById("F_CusPhone").innerHTML = Data[0].F_CusPhone;
268
+						//类型
269
+						document.getElementById("TypeName1").innerHTML = Data[0].TypeName1;
270
+						//时间
271
+						document.getElementById("F_CreateTime").innerHTML = Data[0].F_CreateTime;
272
+						//办理过程
273
+						for(var i = 0; i < data.data.gcdata.length; i++) {
274
+							var table = document.body.querySelector('.GDgz');
275
+							var div = document.createElement('div');
276
+//							div.className = 'mui-collapse-content';
277
+							div.innerHTML =
278
+								'<h5 class="mui-badge-success mui-badge-inverted">'+data.data.gcdata[i].F_CreateTime+' ' +
279
+								'<h5><span>操作人:</span><span>' + data.data.gcdata[i].UserName + '</span></h5>' +
280
+								'<h5><span>备注信息:</span><span>' + data.data.gcdata[i].F_Message + '</span></h5>' ;
281
+								table.appendChild(div);
282
+						}
283
+						//按钮显示
284
+						for(var i = 0; i < data.data.btndata.length; i++) {
285
+							var btns= data.data.btndata[i].key;
286
+							var table = document.body.querySelector('.mui-card-footer');
287
+							var a = document.createElement('a');
288
+//							div.className = 'mui-collapse-content';
289
+							a.innerHTML =							
290
+							'<i class="mui-icon mui-icon-more "></i>'+ data.data.btndata[i].value+''
291
+								table.appendChild(a);
292
+						}
293
+					},
294
+					error: function(xhr, type, errorThrown) {
295
+						//异常处理;
296
+
297
+					}
298
+				});
299
+				mui(".mui-card-footer").on("tap",".Finish",function(){
300
+					mui.alert("完成")
301
+				})
302
+			})
303
+		</script>
304
+	</body>
305
+
306
+</html>

+ 80 - 0
WebAPP/css/feedback-page.css

@@ -0,0 +1,80 @@
1
+.feedback body {
2
+	background-color: #EFEFF4;
3
+}
4
+.feedback input,
5
+.feedback textarea {
6
+	border: none !important;
7
+}
8
+.feedback textarea {
9
+	height: 100px;
10
+	margin-bottom: 0 !important;
11
+	padding-bottom: 0 !important;
12
+}
13
+.feedback .row {
14
+	width: 100%;
15
+	background-color: #fff;
16
+}
17
+.feedback p {
18
+	padding: 10px 15px 0;
19
+}
20
+.feedback button#submit { 
21
+	width: 90%;
22
+	height: 46px;
23
+	left: 50%;
24
+	-webkit-transform: translate(-50%);
25
+}
26
+.feedback .hidden {
27
+	display: none;
28
+}
29
+.feedback .image-list {
30
+	width: 100%;
31
+	height: 85px;
32
+	background-size: cover;
33
+	padding: 10px 10px;
34
+	overflow: hidden;
35
+}
36
+.feedback .image-item {
37
+	width: 65px;
38
+	height: 65px;
39
+	background-image: url(../images/iconfont-tianjia.png);
40
+	background-size: 100% 100%;
41
+	display: inline-block;
42
+	position: relative;
43
+	border-radius: 5px;
44
+	margin-right: 10px;
45
+	margin-bottom: 10px;
46
+	border: solid 1px #e8e8e8;
47
+}
48
+.feedback .image-item input[type="file"] {
49
+	position: absolute;
50
+	left: 0px;
51
+	top: 0px;
52
+	width: 100%;
53
+	height: 100%;
54
+	opacity: 0;
55
+	cursor: pointer;
56
+	z-index: 0;
57
+}
58
+.feedback .image-item.space {
59
+	border: none;
60
+}
61
+.feedback .image-item .image-close {
62
+	position: absolute;
63
+	display: inline-block;
64
+	right: -6px;
65
+	top: -6px;
66
+	width: 20px;
67
+	height: 20px;
68
+	text-align: center;
69
+	line-height: 20px;
70
+	border-radius: 12px;
71
+	background-color: #FF5053;
72
+	color: #f3f3f3;
73
+	border: solid 1px #FF5053;
74
+	font-size: 9px;
75
+	font-weight: 200;
76
+	z-index: 1;
77
+}
78
+.feedback .image-item.space .image-close {
79
+	display: none;
80
+}

+ 112 - 0
WebAPP/css/mui.indexedlist.css

@@ -0,0 +1,112 @@
1
+.mui-indexed-list {
2
+	position: relative;
3
+	border-top: solid 1px #e3e3e3;
4
+	border-bottom: solid 1px #e3e3e3;
5
+	overflow: hidden;
6
+	background-color: #fafafa;
7
+	height: 300px;
8
+	cursor: default;
9
+}
10
+.mui-indexed-list-inner {
11
+	margin: 0px;
12
+	padding: 0px;
13
+	overflow-y: auto;
14
+	border: none;
15
+}
16
+.mui-indexed-list-inner::-webkit-scrollbar {
17
+	width: 0px;
18
+	height: 0px;
19
+	visibility: hidden;
20
+}
21
+.mui-indexed-list-empty-alert,
22
+.mui-indexed-list-inner.empty ul {
23
+	display: none;
24
+}
25
+.mui-indexed-list-inner.empty .mui-indexed-list-empty-alert {
26
+	display: block;
27
+}
28
+.mui-indexed-list-empty-alert {
29
+	padding: 30px 15px;
30
+	text-align: center;
31
+	color: #ccc;
32
+	padding-right: 45px;
33
+}
34
+.mui-ios .mui-indexed-list-inner {
35
+	width: calc(100% + 10px);
36
+}
37
+.mui-indexed-list-group,
38
+.mui-indexed-list-item {
39
+	padding-right: 45px;
40
+}
41
+.mui-ios .mui-indexed-list-group,
42
+.mui-ios .mui-indexed-list-item,
43
+.mui-ios .mui-indexed-list-empty-alert {
44
+	padding-right: 55px;
45
+}
46
+.mui-indexed-list-group {
47
+	background-color: #f7f7f7;
48
+}
49
+.mui-indexed-list-group {
50
+	padding-top: 3px;
51
+	padding-bottom: 3px;
52
+}
53
+.mui-indexed-list-search {
54
+	border-bottom: solid 1px #e3e3e3;
55
+	z-index: 15;
56
+}
57
+.mui-indexed-list-search.mui-search:before {
58
+	margin-top: -10px;
59
+}
60
+.mui-indexed-list-search input {
61
+	border-radius: 0px;
62
+	margin: 0px;
63
+	background-color: #fafafa;
64
+}
65
+.mui-indexed-list-bar {
66
+	width: 23px;
67
+	background-color: lightgrey;
68
+	position: absolute;
69
+	height: 100%;
70
+	z-index: 10;
71
+	right: 0px;
72
+	-webkit-transition: .2s;
73
+}
74
+.mui-indexed-list-bar a {
75
+	display: block;
76
+	text-align: center;
77
+	font-size: 11px;
78
+	padding: 0px;
79
+	margin: 0px;
80
+	line-height: 15px;
81
+	color: #aaa;
82
+}
83
+.mui-indexed-list-bar.active {
84
+	background-color: rgb(200,200,200);
85
+}
86
+.mui-indexed-list-bar.active a {
87
+	color: #333;
88
+}
89
+.mui-indexed-list-bar.active a.active {
90
+	color: #007aff;
91
+}
92
+.mui-indexed-list-alert {
93
+	position: absolute;
94
+	z-index: 20;
95
+	background-color: rgba(0, 0, 0, 0.5);
96
+	width: 80px;
97
+	height: 80px;
98
+	left: 50%;
99
+	top: 50%;
100
+	margin-left: -40px;
101
+	margin-top: -40px;
102
+	border-radius: 40px;
103
+	text-align: center;
104
+	line-height: 80px;
105
+	font-size: 35px;
106
+	color: #fff;
107
+	display: none;
108
+	-webkit-transition: .2s;
109
+}
110
+.mui-indexed-list-alert.active {
111
+	display: block;
112
+}

File diff suppressed because it is too large
+ 4417 - 0
WebAPP/css/mui.min.css


+ 8 - 0
WebAPP/css/style.css

@@ -0,0 +1,8 @@
1
+.ui-page-login,
2
+body {
3
+	width: 100%;
4
+	height: 100%;
5
+	margin: 0px;
6
+	padding: 0px;
7
+}
8
+.mui-content{height: 100%;}

BIN
WebAPP/fonts/mui.ttf


+ 81 - 0
WebAPP/forget_password.html

@@ -0,0 +1,81 @@
1
+<!DOCTYPE html>
2
+<html class="ui-page-login">
3
+
4
+	<head>
5
+		<meta charset="utf-8">
6
+		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
7
+		<title></title>
8
+		<link href="css/mui.min.css" rel="stylesheet" />
9
+		<link href="css/style.css" rel="stylesheet" />
10
+		<style>
11
+			.area {
12
+				margin: 20px auto 0px auto;
13
+			}
14
+			.mui-input-group:first-child {
15
+				margin-top: 20px;
16
+			}
17
+			.mui-input-group label {
18
+				width: 22%;
19
+			}
20
+			.mui-input-row label~input,
21
+			.mui-input-row label~select,
22
+			.mui-input-row label~textarea {
23
+				width: 78%;
24
+			}
25
+			.mui-checkbox input[type=checkbox],
26
+			.mui-radio input[type=radio] {
27
+				top: 6px;
28
+			}
29
+			.mui-content-padded {
30
+				margin-top: 25px;
31
+			}
32
+			.mui-btn {
33
+				padding: 10px;
34
+			}
35
+			.mui-input-row label~input, .mui-input-row label~select, .mui-input-row label~textarea{
36
+				margin-top: 1px;
37
+			}
38
+		</style>
39
+	</head>
40
+
41
+	<body>
42
+		<header class="mui-bar mui-bar-nav">
43
+			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
44
+			<h1 class="mui-title">找回密码</h1>
45
+		</header>
46
+		<div class="mui-content">
47
+			<form class="mui-input-group">
48
+				<!--
49
+				<div class="mui-input-row">
50
+					<label>账号</label>
51
+					<input id='account' type="text" class="mui-input-clear mui-input" placeholder="请输入账号">
52
+				</div>             	
53
+                -->
54
+				<div class="mui-input-row">
55
+					<label>邮箱</label>
56
+					<input id='email' type="email" class="mui-input-clear mui-input" placeholder="请输入注册邮箱">
57
+				</div>
58
+			</form>
59
+			<div class="mui-content-padded">
60
+				<button id='sendMail' class="mui-btn mui-btn-block mui-btn-primary">提交</button>
61
+			</div>
62
+		</div>
63
+		<script src="js/mui.min.js"></script>
64
+		<script src="js/app.js"></script>
65
+		<script>
66
+			(function($, doc) {
67
+				$.init();
68
+				$.plusReady(function() {
69
+					var sendButton = doc.getElementById('sendMail');
70
+					var emailBox = doc.getElementById('email');
71
+					sendButton.addEventListener('tap', function() {
72
+						app.forgetPassword(emailBox.value, function(err, info) {
73
+							plus.nativeUI.toast(err || info);
74
+						});
75
+					}, false);
76
+				});
77
+			}(mui, document));
78
+		</script>
79
+	</body>
80
+
81
+</html>

BIN
WebAPP/images/iconfont-tianjia.png


BIN
WebAPP/images/logo1.png


BIN
WebAPP/images/password.png


BIN
WebAPP/images/peson.png


BIN
WebAPP/images/phone.png


BIN
WebAPP/images/qihoo.png


BIN
WebAPP/images/qq.png


BIN
WebAPP/images/shuijiao.jpg


BIN
WebAPP/images/sinaweibo.png


BIN
WebAPP/images/start.png


BIN
WebAPP/images/start1.png


BIN
WebAPP/images/time.png


BIN
WebAPP/images/user-photo.png


BIN
WebAPP/images/weixin.png


+ 115 - 0
WebAPP/index.html

@@ -0,0 +1,115 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="utf-8">
6
+		<title>Hello MUI</title>
7
+		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
8
+		<meta name="apple-mobile-web-app-capable" content="yes">
9
+		<meta name="apple-mobile-web-app-status-bar-style" content="black">
10
+
11
+		<link rel="stylesheet" href="css/mui.min.css">
12
+		<style>
13
+			html,
14
+			body {
15
+				background-color: #efeff4;
16
+			}
17
+		</style>
18
+	</head>
19
+
20
+	<body>
21
+		<header class="mui-bar mui-bar-nav">
22
+			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
23
+			<h1 id="title" class="mui-title">任务列表</h1>
24
+		</header>
25
+		<nav class="mui-bar mui-bar-tab">
26
+			<a id="defaultTab" class="mui-tab-item mui-active" href="main.html">
27
+				<span class="mui-icon mui-icon-home"></span>
28
+				<span class="mui-tab-label">我的任务</span>
29
+			</a>
30
+			<a class="mui-tab-item" href="pullrefresh_main.html">
31
+				<span class="mui-icon mui-icon-email"><span class="mui-badge">9</span></span>
32
+				<span class="mui-tab-label">动态</span>
33
+			</a>
34
+			<a class="mui-tab-item" href="tx.html">
35
+				<span class="mui-icon mui-icon-contact"></span>
36
+				<span class="mui-tab-label">通讯录</span>
37
+			</a>
38
+			<a class="mui-tab-item" href="setting.html">
39
+				<span class="mui-icon mui-icon-gear"></span>
40
+				<span class="mui-tab-label">我的</span>
41
+			</a>
42
+		</nav>
43
+		<script src="js/mui.min.js"></script>
44
+		<script type="text/javascript" charset="utf-8">
45
+			 //mui初始化
46
+			mui.init();							
47
+			var subpages = ['main.html', 'pullrefresh_main.html', 'tx.html', 'setting.html'];
48
+			var subpage_style = {
49
+				top: '45px',
50
+				bottom: '51px'
51
+			};
52
+			var aniShow = {};
53
+			mui.plusReady(function() {
54
+				var self = plus.webview.currentWebview();
55
+				var vText = self.name; 
56
+				plus.nativeUI.toast(vText);
57
+				for (var i = 0; i < 4; i++) {
58
+					var temp = {};
59
+					var extras=self.name;
60
+					var sub = plus.webview.create(subpages[i], subpages[i], subpage_style,extras);
61
+					if (i > 0) {
62
+						sub.hide();
63
+					}else{
64
+						temp[subpages[i]] = "true";
65
+						mui.extend(aniShow,temp);
66
+					}
67
+					self.append(sub);
68
+				}
69
+			});
70
+			 //当前激活选项
71
+			var activeTab = subpages[0];
72
+			var title = document.getElementById("title");
73
+			 //选项卡点击事件
74
+			mui('.mui-bar-tab').on('tap', 'a', function(e) {
75
+				var targetTab = this.getAttribute('href');
76
+				if (targetTab == activeTab) {
77
+					return;
78
+				}
79
+				//更换标题
80
+				title.innerHTML = this.querySelector('.mui-tab-label').innerHTML;
81
+				//显示目标选项卡
82
+				//若为iOS平台或非首次显示,则直接显示
83
+				if(mui.os.ios||aniShow[targetTab]){
84
+					plus.webview.show(targetTab);
85
+				}else{
86
+					//否则,使用fade-in动画,且保存变量
87
+					var temp = {};
88
+					temp[targetTab] = "true";
89
+					mui.extend(aniShow,temp);
90
+					plus.webview.show(targetTab,"fade-in",300);
91
+				}
92
+				//隐藏当前;
93
+				plus.webview.hide(activeTab);
94
+				//更改当前活跃的选项卡
95
+				activeTab = targetTab;
96
+			});
97
+			  mui.fire(detailPage,'newsId',{
98
+    id:id
99
+  });
100
+			 //自定义事件,模拟点击“首页选项卡”
101
+			document.addEventListener('gohome', function() {
102
+				var defaultTab = document.getElementById("defaultTab");
103
+				//模拟首页点击
104
+				mui.trigger(defaultTab, 'tap');
105
+				//切换选项卡高亮
106
+				var current = document.querySelector(".mui-bar-tab>.mui-tab-item.mui-active");
107
+				if (defaultTab !== current) {
108
+					current.classList.remove('mui-active');
109
+					defaultTab.classList.add('mui-active');
110
+				}
111
+			});
112
+		</script>
113
+	</body>
114
+
115
+</html>

+ 837 - 0
WebAPP/indexs.html

@@ -0,0 +1,837 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="utf-8">
6
+		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
7
+		<meta name="apple-mobile-web-app-capable" content="yes">
8
+		<meta name="apple-mobile-web-app-status-bar-style" content="black">
9
+		<title>任务列表</title>
10
+		<link href="css/mui.min.css" rel="stylesheet" />
11
+
12
+		<style>
13
+			body {
14
+				background-color: #fafafa;
15
+			}
16
+			
17
+			.mui-content {
18
+				background-color: #fafafa;
19
+			}
20
+			
21
+			ul {
22
+				font-size: 16px;
23
+				color: #8f8f94;
24
+			}
25
+			
26
+			.mui-btn {
27
+				padding: 10px;
28
+			}
29
+			
30
+			.mui-content-padded {
31
+				margin: 0;
32
+			}
33
+			
34
+			.mui-active {
35
+				background: #fff;
36
+			}
37
+			
38
+			.mui-bar-nav {
39
+				background-color: #00a1cb;
40
+			}
41
+			
42
+			.mui-title {
43
+				line-height: 50px;
44
+				color: #fff;
45
+			}
46
+			
47
+			#icon-menu {
48
+				color: #fff;
49
+			}
50
+			
51
+			.size-16 {
52
+				font-size: 16px;
53
+			}
54
+			
55
+			.Dwc {
56
+				margin-bottom: 20px;
57
+			}
58
+			
59
+			.mui-icon {
60
+				font-size: 20px;
61
+			}
62
+			
63
+			.red {
64
+				color: red;
65
+			}
66
+			
67
+			.cheng {
68
+				color: #f88868;
69
+			}
70
+			
71
+			.mui-col-xs-10 {
72
+				padding-left: 15px;
73
+			}
74
+			/*.mui-navigate-right{
75
+				margin-left: 15px!important;
76
+			}*/
77
+			
78
+			.mui-h {
79
+				font-size: 16px;
80
+				color: #000;
81
+			}
82
+			
83
+			.List-box span {
84
+				letter-spacing: 1px;
85
+			}
86
+			
87
+			.mui-table-view-cell.mui-active {
88
+				background-color: #fff;
89
+			}
90
+			
91
+			.mui-table-view li {
92
+				padding-left: 0;
93
+			}
94
+			
95
+			.mui-collapse-content {
96
+				position: relative;
97
+			}
98
+			
99
+			.mui-collapse-content:after {
100
+				position: absolute;
101
+				right: 0;
102
+				bottom: 0;
103
+				left: 15px;
104
+				height: 1px;
105
+				content: '';
106
+				-webkit-transform: scaleY(.5);
107
+				transform: scaleY(.5);
108
+				background-color: #c8c7cc;
109
+			}
110
+			
111
+			.mui-collapse-content:before {
112
+				position: absolute;
113
+				right: 0;
114
+				bottom: 0;
115
+				left: 15px;
116
+				height: 1px;
117
+				content: '';
118
+				-webkit-transform: scaleY(.5);
119
+				transform: scaleY(.5);
120
+				background-color: #c8c7cc;
121
+			}
122
+			
123
+			.mui-mix-left {
124
+				padding-left: 20px;
125
+				margin-left: 10px;
126
+			}
127
+			
128
+			.mui-segmented-control .mui-control-item.mui-active {
129
+				border-color: #00a1cb;
130
+				border: 1px solid #00a1cb;
131
+				color: #fff;
132
+				background-color: #00a1cb;
133
+			}
134
+			
135
+			.mui-segmented-control {
136
+				border: 1px solid #00a1cb;
137
+			}
138
+			
139
+			.mui-action-back {
140
+				color: #fff;
141
+			}
142
+			
143
+			.Phone img {
144
+				width: 13px;
145
+				height: 13px;
146
+				border-radius: 50%;
147
+				/*		 vertical-align: text-bottom;*/
148
+				margin-right: 3px;
149
+				vertical-align: initial;
150
+			}
151
+			
152
+			.mui-h6 {
153
+				font-size: 12px;
154
+			}
155
+			
156
+			.mui-span-box {
157
+				margin-left: 25px;
158
+			}
159
+			
160
+			.dwc {
161
+				color: #34ad37;
162
+			}
163
+			
164
+			.mui-control-item {
165
+				line-height: 30px!important;
166
+			}
167
+		</style>
168
+	</head>
169
+
170
+	<body>
171
+		<!--<header class="mui-bar mui-bar-nav" style="padding-right: 15px;height: 50px;color: #fff;">
172
+			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
173
+			<h1 class="mui-title">任务列表</h1>
174
+		</header>-->
175
+		<div class="mui-content">
176
+			<div class="mui-content-padded">
177
+				<div style="padding: 10px 10px;margin: 10px;">
178
+					<div id="segmentedControl" class="mui-segmented-control">
179
+						<a class="mui-control-item mui-active" href="#item1">我负责的</a>
180
+					</div>
181
+				</div>
182
+				<div class="Dwc">
183
+					<ul class="mui-table-view pullrefresh">
184
+						<li class="mui-table-view-cell mui-collapse mui-active Dwc_box">
185
+							<a class="mui-navigate-right" href="#">
186
+								<div class="mui-mix-left">
187
+									<span class="mui-h">待处理</span><span class="mui-h5 " id="Dwc_num"></span></div>
188
+							</a>
189
+							<!--<div class="mui-collapse-content DWC" style="border-top: 1px solid #ccc;">
190
+								<div class="mui-table ">
191
+									<div class="mui-table-cell mui-col-xs-10 List-box">
192
+										<h5 class="mui-ellipsis mui-h">
193
+											<span class=" mui-icon ">
194
+												<i class="mui-icon  Phone">
195
+													<img src="images/start.png" alt="" />
196
+												</i>
197
+											</span>开发电销版呼叫中心</h5>
198
+										<h4 class="mui-span-box"><span class="mui-h6">
199
+											<i class="mui-icon  Phone">
200
+												<img src="images/qq.png" alt="" />
201
+											</i>朱慧娟</span> 
202
+											<span class="mui-h6 cheng">
203
+												<i class="mui-icon Phone ">
204
+													<img src="images/time.png" alt="" />
205
+												</i>
206
+												4月12日
207
+											</span>
208
+												<span class="mui-h6"> 
209
+													<i class="mui-icon mui-icon-compose"></i>投诉建议
210
+												</span>
211
+										</h4>
212
+									</div>
213
+									<div class="mui-table-cell mui-col-xs-2 mui-text-right" style="top: 20px;">
214
+										<span class="mui-badge mui-badge-danger">45</span>
215
+									</div>
216
+								</div>
217
+							</div>
218
+							<div class="mui-collapse-content">
219
+								<div class="mui-table ">
220
+									<div class="mui-table-cell mui-col-xs-10 List-box">
221
+										<h5 class="mui-ellipsis mui-h">
222
+											<span class=" mui-icon ">
223
+												<i class="mui-icon  Phone">
224
+													<img src="images/start1.png" alt="" />
225
+												</i>
226
+											</span>开发电销版呼叫中心</h5>
227
+										<h4 class="mui-span-box"><span class="mui-h6"><i class="mui-icon  Phone"><img src="images/qq.png" alt="" /></i>朱慧娟</span> <span class="mui-h6 cheng"><i class="mui-icon mui-icon-compose"></i>4月12日</span><span class="mui-h6"> <i class="mui-icon mui-icon-compose"></i>投诉建议</span></h4>
228
+									</div>
229
+									<div class="mui-table-cell mui-col-xs-2 mui-text-right" style="top: 20px;">
230
+										<span class="mui-badge mui-badge-danger">45</span>
231
+									</div>
232
+								</div>
233
+							</div>-->
234
+						</li>
235
+					</ul>
236
+				</div>
237
+				<div class="Dwc">
238
+					<ul class="mui-table-view">
239
+						<li class="mui-table-view-cell mui-collapse YBL">
240
+							<a class="mui-navigate-right" href="#">
241
+								<div class="mui-mix-left">
242
+									<span class="mui-h">已办理</span><span class="mui-h5">(2)</span></div>
243
+							</a>
244
+							
245
+						</li>
246
+					</ul>
247
+				</div>
248
+				<div class="Dwc" id="Rush">
249
+					<ul class="mui-table-view">
250
+						<li class="mui-table-view-cell mui-collapse YCS">
251
+							<a class="mui-navigate-right" href="#">
252
+								<div class="mui-mix-left">
253
+									<span class="mui-h">已查收</span><span class="mui-h5" id="Ycs"></span></div>
254
+							</a>
255
+							<!--<div class="mui-collapse-content" style="border-top: 1px solid #ccc;">
256
+								<div class="mui-table ">
257
+									<div class="mui-table-cell mui-col-xs-10 List-box">
258
+										<h5 class="mui-ellipsis mui-h">
259
+											<span class=" mui-icon ">
260
+												<i class="mui-icon  Phone">
261
+													<img src="images/start1.png" alt="" />
262
+												</i>
263
+											</span>开发电销版呼叫中心</h5>
264
+										<h4 class="mui-span-box">
265
+											<span class="mui-h6">
266
+												<i class="mui-icon  Phone">
267
+													<img src="images/qq.png" alt="" />
268
+												</i>朱慧娟
269
+											</span>
270
+											<span class="mui-h6 ">
271
+												<i class="mui-icon mui-icon-compose"></i>
272
+												已持续<strong class="dwc">15</strong>小时<strong class="dwc">15</strong>分<strong class="dwc">15</strong>秒
273
+											</span>
274
+											<span class="mui-h6"> <i class="mui-icon mui-icon-compose"></i>投诉建议</span>
275
+										</h4>
276
+									</div>
277
+									0
278
+
279
+								</div>
280
+
281
+							</div>
282
+							<div class="mui-collapse-content">
283
+								<div class="mui-table ">
284
+									<div class="mui-table-cell mui-col-xs-10 List-box">
285
+										<h5 class="mui-ellipsis mui-h">
286
+											<span class=" mui-icon ">
287
+												<i class="mui-icon  Phone">
288
+													<img src="images/start1.png" alt="" />
289
+												</i>
290
+											</span>开发电销版呼叫中心</h5>
291
+										<h4 class="mui-span-box">
292
+											<span class="mui-h6">
293
+												<i class="mui-icon  Phone">
294
+													<img src="images/qq.png" alt="" />
295
+												</i>朱慧娟
296
+											</span>
297
+											<span class="mui-h6 ">
298
+												<i class="mui-icon mui-icon-compose"></i>
299
+												已持续<strong class="dwc">15</strong>小时<strong class="dwc">15</strong>分<strong class="dwc">15</strong>秒
300
+											</span>
301
+											<span class="mui-h6"> <i class="mui-icon mui-icon-compose"></i>投诉建议</span>
302
+										</h4>
303
+									</div>
304
+
305
+								</div>
306
+
307
+							</div>-->
308
+
309
+						</li>
310
+					</ul>
311
+				</div>
312
+				<div class="Dwc">
313
+					<ul class="mui-table-view">
314
+						<li class="mui-table-view-cell mui-collapse TH ">
315
+							<a class="mui-navigate-right" href="#">
316
+								<div class="mui-mix-left">
317
+									<span class="mui-h">已申请退回</span><span class="mui-h5">(2)</span></div>
318
+							</a>
319
+							
320
+						</li>
321
+					</ul>
322
+				</div>
323
+				<div class="Dwc">
324
+					<ul class="mui-table-view">
325
+						<li class="mui-table-view-cell mui-collapse YH">
326
+							<a class="mui-navigate-right" href="#">
327
+								<div class="mui-mix-left">
328
+									<span class="mui-h">已申请延时</span><span class="mui-h5">(2)</span></div>
329
+							</a>
330
+							
331
+						</li>
332
+					</ul>
333
+				</div>
334
+			</div>
335
+			<nav class="mui-bar mui-bar-tab">
336
+				<a id="defaultTab" class="mui-tab-item mui-active" href="main.html">
337
+					<span class="mui-icon mui-icon-home"></span>
338
+					<span class="mui-tab-label">我的任务</span>
339
+				</a>
340
+				<!--<a id="DT" class="mui-tab-item" href="pullrefresh_main.html">
341
+					<span class="mui-icon mui-icon-email"><span class="mui-badge">9</span></span>
342
+					<span class="mui-tab-label">动态</span>
343
+				</a>-->
344
+				<a id="TX" class="mui-tab-item" href="tx.html">
345
+					<span class="mui-icon mui-icon-contact"></span>
346
+					<span class="mui-tab-label">通讯录</span>
347
+				</a>
348
+				<a id="setting" class="mui-tab-item" href="setting.html">
349
+					<span class="mui-icon mui-icon-person"></span>
350
+					<span class="mui-tab-label">我的</span>
351
+				</a>
352
+			</nav>
353
+		</div>
354
+		<script src="js/mui.min.js"></script>
355
+		<script src="js/app.js"></script>
356
+		<script>
357
+			mui.init();
358
+			mui.plusReady(function() {
359
+				var wv = plus.webview.currentWebview();
360
+				var vText = wv.name; //这样就能接收到上个页面传过来的值了
361
+				YBL();
362
+				YCS();
363
+				TH();
364
+				YH();
365
+				//获取工单
366
+				mui.ajax('http://192.168.4.18:4010/WorkOrder/GetDWDealList', {
367
+					data: {
368
+						tab: 0,
369
+						token: vText,
370
+						extensionphone: 1
371
+					},
372
+					dataType: 'json', //服务器返回json格式数据
373
+					type: 'get', //HTTP请求类型
374
+					timeout: 10000, //超时时间设置为10秒;
375
+					headers: {
376
+						'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
377
+					},
378
+					success: function(data) {
379
+						document.getElementById("Dwc_num").innerHTML = ('(' + data.total + ')');
380
+						for(var i = 0; i < data.rows.length; i++) {
381
+							var table = document.body.querySelector('.Dwc_box');
382
+							var div = document.createElement('div');
383
+							var a = data.rows[i].TypeName;
384
+							var TypeName = '';
385
+							if(!a) {
386
+								TypeName = "其他来源"
387
+							} else {
388
+								TypeName = a
389
+							}
390
+
391
+							div.className = 'mui-collapse-content';
392
+							div.innerHTML =
393
+								'<div class="mui-collapse-content DWC" style="border-top: 1px solid #ccc;">' +
394
+								'<div class="mui-table " index=' + data.rows[i].F_WorkOrderId + '>' +
395
+								'<div class="mui-table-cell mui-col-xs-10 List-box">' +
396
+								'<h5 class="mui-ellipsis mui-h">' +
397
+								'<span class=" mui-icon ">' +
398
+								'<i class="mui-icon  Phone">' +
399
+								'<img src="images/start.png" alt="" />' +
400
+								'</i>' +
401
+								'</span>' + data.rows[i].F_ComTitle + '</h5>' +
402
+								'<h4 class="mui-span-box"><span class="mui-h6">' +
403
+								'<i class="mui-icon  Phone">' +
404
+								'<img src="images/qq.png" alt="" />' +
405
+								'</i>' + data.rows[i].UserName + '</span> ' +
406
+								'<span class="mui-h6 cheng">' +
407
+								'<i class="mui-icon Phone ">' +
408
+								'<img src="images/time.png" alt="" />' +
409
+								'</i>' +
410
+								'	4月12日' +
411
+								'</span>' +
412
+								'<span class="mui-h6"> ' +
413
+								'<i class="mui-icon mui-icon-compose"></i>' + TypeName + '' +
414
+								'</span>' +
415
+								'</h4>' +
416
+								'</div>' +
417
+								'<div class="mui-table-cell mui-col-xs-2 mui-text-right" style="top: 20px;">' +
418
+								'<span class="mui-badge mui-badge-danger">45</span>' +
419
+								'</div>' +
420
+								'</div>' +
421
+								'</div>';
422
+							table.appendChild(div);
423
+						}
424
+					},
425
+					error: function(xhr, type, errorThrown) {
426
+						//异常处理;
427
+
428
+					}
429
+				});
430
+				mui(".mui-table-view").on('tap', '.mui-table ', function(e) {
431
+					var id = this.getAttribute("index");
432
+
433
+					//打开新闻详情
434
+					mui.openWindow({
435
+						id: 'WorkDetails',
436
+						url: 'WorkDetails.html',
437
+						show: {
438
+							aniShow: 'pop-in'
439
+						},
440
+						styles: {
441
+							popGesture: 'hide'
442
+						},
443
+						waiting: {
444
+							autoShow: false
445
+						},
446
+						extras: {
447
+							name: id,
448
+							token: vText
449
+						}
450
+
451
+					});
452
+
453
+				});
454
+				//设置
455
+				var settingButton = document.getElementById('setting');
456
+				settingButton.addEventListener('tap', function(event) {
457
+					mui.openWindow({
458
+						id: 'setting',
459
+						url: 'setting.html',
460
+						show: {
461
+							aniShow: 'pop-in'
462
+						},
463
+						styles: {
464
+							popGesture: 'hide'
465
+						},
466
+						waiting: {
467
+							autoShow: false
468
+						}
469
+					});
470
+				});
471
+
472
+				//通讯录
473
+				var settingButton = document.getElementById('TX');
474
+				settingButton.addEventListener('tap', function(event) {
475
+					mui.openWindow({
476
+						id: 'tx',
477
+						url: 'tx.html',
478
+						show: {
479
+							aniShow: 'pop-in'
480
+						},
481
+						styles: {
482
+							popGesture: 'hide'
483
+						},
484
+						waiting: {
485
+							autoShow: false
486
+						}
487
+					});
488
+				});
489
+				//已办理工单
490
+				function YBL() {
491
+					mui.ajax('http://192.168.4.18:4010/WorkOrder/GetDWDealList', {
492
+						data: {
493
+							tab: 4,
494
+							token: vText,
495
+							extensionphone: 1
496
+						},
497
+						dataType: 'json', //服务器返回json格式数据
498
+						type: 'get', //HTTP请求类型
499
+						timeout: 10000, //超时时间设置为10秒;
500
+						headers: {
501
+							'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
502
+						},
503
+						success: function(data) {
504
+							document.getElementById("Dwc_num").innerHTML = ('(' + data.total + ')');
505
+							for(var i = 0; i < data.rows.length; i++) {
506
+								var table = document.body.querySelector('.YBL');
507
+								var div = document.createElement('div');
508
+								var a = data.rows[i].TypeName;
509
+								var TypeName = '';
510
+								if(!a) {
511
+									TypeName = "其他来源"
512
+								} else {
513
+									TypeName = a
514
+								}
515
+
516
+								div.className = 'mui-collapse-content';
517
+								div.innerHTML =
518
+									'<div class="mui-collapse-content DWC" style="border-top: 1px solid #ccc;">' +
519
+									'<div class="mui-table " index=' + data.rows[i].F_WorkOrderId + '>' +
520
+									'<div class="mui-table-cell mui-col-xs-10 List-box">' +
521
+									'<h5 class="mui-ellipsis mui-h">' +
522
+									'<span class=" mui-icon ">' +
523
+									'<i class="mui-icon  Phone">' +
524
+									'<img src="images/start.png" alt="" />' +
525
+									'</i>' +
526
+									'</span>' + data.rows[i].F_ComTitle + '</h5>' +
527
+									'<h4 class="mui-span-box"><span class="mui-h6">' +
528
+									'<i class="mui-icon  Phone">' +
529
+									'<img src="images/qq.png" alt="" />' +
530
+									'</i>' + data.rows[i].UserName + '</span> ' +
531
+									'<span class="mui-h6 cheng">' +
532
+									'<i class="mui-icon Phone ">' +
533
+									'<img src="images/time.png" alt="" />' +
534
+									'</i>' +
535
+									'	4月12日' +
536
+									'</span>' +
537
+									'<span class="mui-h6"> ' +
538
+									'<i class="mui-icon mui-icon-compose"></i>' + TypeName + '' +
539
+									'</span>' +
540
+									'</h4>' +
541
+									'</div>' +
542
+									'<div class="mui-table-cell mui-col-xs-2 mui-text-right" style="top: 20px;">' +
543
+									'<span class="mui-badge mui-badge-danger">45</span>' +
544
+									'</div>' +
545
+									'</div>' ;
546
+//									'</div>';
547
+								table.appendChild(div);
548
+							}
549
+						},
550
+						error: function(xhr, type, errorThrown) {
551
+							//异常处理;
552
+
553
+						}
554
+					});
555
+					//已完成工单
556
+
557
+				}
558
+				//已办理工单
559
+				function YBL() {
560
+					mui.ajax('http://192.168.4.18:4010/WorkOrder/GetDWDealList', {
561
+						data: {
562
+							tab: 4,
563
+							token: vText,
564
+							extensionphone: 1
565
+						},
566
+						dataType: 'json', //服务器返回json格式数据
567
+						type: 'get', //HTTP请求类型
568
+						timeout: 10000, //超时时间设置为10秒;
569
+						headers: {
570
+							'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
571
+						},
572
+						success: function(data) {
573
+							document.getElementById("Dwc_num").innerHTML = ('(' + data.total + ')');
574
+							for(var i = 0; i < data.rows.length; i++) {
575
+								var table = document.body.querySelector('.YBL');
576
+								var div = document.createElement('div');
577
+								var a = data.rows[i].TypeName;
578
+								var TypeName = '';
579
+								if(!a) {
580
+									TypeName = "其他来源"
581
+								} else {
582
+									TypeName = a
583
+								}
584
+
585
+								div.className = 'mui-collapse-content';
586
+								div.innerHTML =
587
+//									'<div class="mui-collapse-content DWC" style="border-top: 1px solid #ccc;">' +
588
+									'<div class="mui-table " index=' + data.rows[i].F_WorkOrderId + '>' +
589
+									'<div class="mui-table-cell mui-col-xs-10 List-box">' +
590
+									'<h5 class="mui-ellipsis mui-h">' +
591
+									'<span class=" mui-icon ">' +
592
+									'<i class="mui-icon  Phone">' +
593
+									'<img src="images/start.png" alt="" />' +
594
+									'</i>' +
595
+									'</span>' + data.rows[i].F_ComTitle + '</h5>' +
596
+									'<h4 class="mui-span-box"><span class="mui-h6">' +
597
+									'<i class="mui-icon  Phone">' +
598
+									'<img src="images/qq.png" alt="" />' +
599
+									'</i>' + data.rows[i].UserName + '</span> ' +
600
+									'<span class="mui-h6 cheng">' +
601
+									'<i class="mui-icon Phone ">' +
602
+									'<img src="images/time.png" alt="" />' +
603
+									'</i>' +
604
+									'	4月12日' +
605
+									'</span>' +
606
+									'<span class="mui-h6"> ' +
607
+									'<i class="mui-icon mui-icon-compose"></i>' + TypeName + '' +
608
+									'</span>' +
609
+									'</h4>' +
610
+									'</div>' +
611
+									'<div class="mui-table-cell mui-col-xs-2 mui-text-right" style="top: 20px;">' +
612
+									'<span class="mui-badge mui-badge-danger">45</span>' +
613
+									'</div>' +
614
+									'</div>' ;
615
+//									'</div>';
616
+								table.appendChild(div);
617
+							}
618
+						},
619
+						error: function(xhr, type, errorThrown) {
620
+							//异常处理;
621
+
622
+						}
623
+					});
624
+					//已完成工单
625
+
626
+				}
627
+				//已查收
628
+				function YCS() {
629
+					mui.ajax('http://192.168.4.18:4010/WorkOrder/GetDWDealList', {
630
+						data: {
631
+							tab: 1,
632
+							token: vText,
633
+							extensionphone: 1
634
+						},
635
+						dataType: 'json', //服务器返回json格式数据
636
+						type: 'get', //HTTP请求类型
637
+						timeout: 10000, //超时时间设置为10秒;
638
+						headers: {
639
+							'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
640
+						},
641
+						success: function(data) {
642
+							document.getElementById("Ycs").innerHTML = ('(' + data.total + ')');
643
+							for(var i = 0; i < data.rows.length; i++) {
644
+								var table = document.body.querySelector('.YCS');
645
+								var div = document.createElement('div');
646
+								var a = data.rows[i].TypeName;
647
+								var TypeName = '';
648
+								if(!a) {
649
+									TypeName = "其他来源"
650
+								} else {
651
+									TypeName = a
652
+								}
653
+
654
+								div.className = 'mui-collapse-content';
655
+								div.innerHTML =
656
+									'<div class="mui-collapse-content DWC" style="border-top: 1px solid #ccc;">' +
657
+									'<div class="mui-table " index=' + data.rows[i].F_WorkOrderId + '>' +
658
+									'<div class="mui-table-cell mui-col-xs-10 List-box">' +
659
+									'<h5 class="mui-ellipsis mui-h">' +
660
+									'<span class=" mui-icon ">' +
661
+									'<i class="mui-icon  Phone">' +
662
+									'<img src="images/start.png" alt="" />' +
663
+									'</i>' +
664
+									'</span>' + data.rows[i].F_ComTitle + '</h5>' +
665
+									'<h4 class="mui-span-box"><span class="mui-h6">' +
666
+									'<i class="mui-icon  Phone">' +
667
+									'<img src="images/qq.png" alt="" />' +
668
+									'</i>' + data.rows[i].UserName + '</span> ' +
669
+									'<span class="mui-h6 cheng">' +
670
+									'<i class="mui-icon Phone ">' +
671
+									'<img src="images/time.png" alt="" />' +
672
+									'</i>' +
673
+									'	4月12日' +
674
+									'</span>' +
675
+									'<span class="mui-h6"> ' +
676
+									'<i class="mui-icon mui-icon-compose"></i>' + TypeName + '' +
677
+									'</span>' +
678
+									'</h4>' +
679
+									'</div>' +
680
+									'<div class="mui-table-cell mui-col-xs-2 mui-text-right" style="top: 20px;">' +
681
+									'<span class="mui-badge mui-badge-danger">45</span>' +
682
+									'</div>' +
683
+									'</div>' +
684
+									'</div>';
685
+								table.appendChild(div);
686
+							}
687
+						},
688
+						error: function(xhr, type, errorThrown) {
689
+							//异常处理;
690
+
691
+						}
692
+					});
693
+
694
+				}
695
+				//已申请退回
696
+				function TH() {
697
+					mui.ajax('http://192.168.4.18:4010/WorkOrder/GetDWDealList', {
698
+						data: {
699
+							tab: 2,
700
+							token: vText,
701
+							extensionphone: 1
702
+						},
703
+						dataType: 'json', //服务器返回json格式数据
704
+						type: 'get', //HTTP请求类型
705
+						timeout: 10000, //超时时间设置为10秒;
706
+						headers: {
707
+							'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
708
+						},
709
+						success: function(data) {
710
+							document.getElementById("Ycs").innerHTML = ('(' + data.total + ')');
711
+							for(var i = 0; i < data.rows.length; i++) {
712
+								var table = document.body.querySelector('.TH');
713
+								var div = document.createElement('div');
714
+								var a = data.rows[i].TypeName;
715
+								var TypeName = '';
716
+								if(!a) {
717
+									TypeName = "其他来源"
718
+								} else {
719
+									TypeName = a
720
+								}
721
+
722
+								div.className = 'mui-collapse-content';
723
+								div.innerHTML =
724
+									'<div class="mui-collapse-content DWC" style="border-top: 1px solid #ccc;">' +
725
+									'<div class="mui-table " index=' + data.rows[i].F_WorkOrderId + '>' +
726
+									'<div class="mui-table-cell mui-col-xs-10 List-box">' +
727
+									'<h5 class="mui-ellipsis mui-h">' +
728
+									'<span class=" mui-icon ">' +
729
+									'<i class="mui-icon  Phone">' +
730
+									'<img src="images/start.png" alt="" />' +
731
+									'</i>' +
732
+									'</span>' + data.rows[i].F_ComTitle + '</h5>' +
733
+									'<h4 class="mui-span-box"><span class="mui-h6">' +
734
+									'<i class="mui-icon  Phone">' +
735
+									'<img src="images/qq.png" alt="" />' +
736
+									'</i>' + data.rows[i].UserName + '</span> ' +
737
+									'<span class="mui-h6 cheng">' +
738
+									'<i class="mui-icon Phone ">' +
739
+									'<img src="images/time.png" alt="" />' +
740
+									'</i>' +
741
+									'	4月12日' +
742
+									'</span>' +
743
+									'<span class="mui-h6"> ' +
744
+									'<i class="mui-icon mui-icon-compose"></i>' + TypeName + '' +
745
+									'</span>' +
746
+									'</h4>' +
747
+									'</div>' +
748
+									'<div class="mui-table-cell mui-col-xs-2 mui-text-right" style="top: 20px;">' +
749
+									'<span class="mui-badge mui-badge-danger">45</span>' +
750
+									'</div>' +
751
+									'</div>' +
752
+									'</div>';
753
+								table.appendChild(div);
754
+							}
755
+						},
756
+						error: function(xhr, type, errorThrown) {
757
+							//异常处理;
758
+
759
+						}
760
+					});
761
+
762
+				}
763
+				//已申请延时
764
+				//已申请退回
765
+				function YH() {
766
+					mui.ajax('http://192.168.4.18:4010/WorkOrder/GetDWDealList', {
767
+						data: {
768
+							tab: 3,
769
+							token: vText,
770
+							extensionphone: 1
771
+						},
772
+						dataType: 'json', //服务器返回json格式数据
773
+						type: 'get', //HTTP请求类型
774
+						timeout: 10000, //超时时间设置为10秒;
775
+						headers: {
776
+							'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
777
+						},
778
+						success: function(data) {
779
+							document.getElementById("Ycs").innerHTML = ('(' + data.total + ')');
780
+							for(var i = 0; i < data.rows.length; i++) {
781
+								var table = document.body.querySelector('.YH');
782
+								var div = document.createElement('div');
783
+								var a = data.rows[i].TypeName;
784
+								var TypeName = '';
785
+								if(!a) {
786
+									TypeName = "其他来源"
787
+								} else {
788
+									TypeName = a
789
+								}
790
+
791
+								div.className = 'mui-collapse-content';
792
+								div.innerHTML =
793
+									'<div class="mui-collapse-content DWC" style="border-top: 1px solid #ccc;">' +
794
+									'<div class="mui-table " index=' + data.rows[i].F_WorkOrderId + '>' +
795
+									'<div class="mui-table-cell mui-col-xs-10 List-box">' +
796
+									'<h5 class="mui-ellipsis mui-h">' +
797
+									'<span class=" mui-icon ">' +
798
+									'<i class="mui-icon  Phone">' +
799
+									'<img src="images/start.png" alt="" />' +
800
+									'</i>' +
801
+									'</span>' + data.rows[i].F_ComTitle + '</h5>' +
802
+									'<h4 class="mui-span-box"><span class="mui-h6">' +
803
+									'<i class="mui-icon  Phone">' +
804
+									'<img src="images/qq.png" alt="" />' +
805
+									'</i>' + data.rows[i].UserName + '</span> ' +
806
+									'<span class="mui-h6 cheng">' +
807
+									'<i class="mui-icon Phone ">' +
808
+									'<img src="images/time.png" alt="" />' +
809
+									'</i>' +
810
+									'	4月12日' +
811
+									'</span>' +
812
+									'<span class="mui-h6"> ' +
813
+									'<i class="mui-icon mui-icon-compose"></i>' + TypeName + '' +
814
+									'</span>' +
815
+									'</h4>' +
816
+									'</div>' +
817
+									'<div class="mui-table-cell mui-col-xs-2 mui-text-right" style="top: 20px;">' +
818
+									'<span class="mui-badge mui-badge-danger">45</span>' +
819
+									'</div>' +
820
+									'</div>' +
821
+									'</div>';
822
+								table.appendChild(div);
823
+							}
824
+						},
825
+						error: function(xhr, type, errorThrown) {
826
+							//异常处理;
827
+
828
+						}
829
+					});
830
+
831
+				}
832
+
833
+			})
834
+		</script>
835
+	</body>
836
+
837
+</html>

+ 148 - 0
WebAPP/js/app.js

@@ -0,0 +1,148 @@
1
+/**
2
+ * 演示程序当前的 “注册/登录” 等操作,是基于 “本地存储” 完成的
3
+ * 当您要参考这个演示程序进行相关 app 的开发时,
4
+ * 请注意将相关方法调整成 “基于服务端Service” 的实现。
5
+ **/
6
+(function($, owner) {
7
+	/**
8
+	 * 用户登录
9
+	 **/
10
+	owner.login = function(loginInfo, callback) {
11
+		callback = callback || $.noop;
12
+		loginInfo = loginInfo || {};
13
+		loginInfo.account = loginInfo.account || '';
14
+		loginInfo.password = loginInfo.password || '';
15
+		if (loginInfo.account.length < 5) {
16
+			return callback('账号最短为 5 个字符');
17
+		}
18
+		if (loginInfo.password.length < 6) {
19
+			return callback('密码最短为 6 个字符');
20
+		}
21
+		var users = JSON.parse(localStorage.getItem('$users') || '[]');
22
+		var authed = users.some(function(user) {
23
+			return loginInfo.account == user.account && loginInfo.password == user.password;
24
+		});
25
+		if (authed) {
26
+			return owner.createState(loginInfo.account, callback);
27
+		} else {
28
+			return callback('用户名或密码错误');
29
+		}
30
+	};
31
+
32
+	owner.createState = function(name, callback) {
33
+		var state = owner.getState();
34
+		state.account = name;
35
+		state.token = "token123456789";
36
+		owner.setState(state);
37
+		return callback();
38
+	};
39
+
40
+	/**
41
+	 * 新用户注册
42
+	 **/
43
+	owner.reg = function(regInfo, callback) {
44
+		callback = callback || $.noop;
45
+		regInfo = regInfo || {};
46
+		regInfo.account = regInfo.account || '';
47
+		regInfo.password = regInfo.password || '';
48
+		if (regInfo.account.length < 5) {
49
+			return callback('用户名最短需要 5 个字符');
50
+		}
51
+		if (regInfo.password.length < 6) {
52
+			return callback('密码最短需要 6 个字符');
53
+		}
54
+		if (!checkEmail(regInfo.email)) {
55
+			return callback('邮箱地址不合法');
56
+		}
57
+		var users = JSON.parse(localStorage.getItem('$users') || '[]');
58
+		users.push(regInfo);
59
+		localStorage.setItem('$users', JSON.stringify(users));
60
+		return callback();
61
+	};
62
+
63
+	/**
64
+	 * 获取当前状态
65
+	 **/
66
+	owner.getState = function() {
67
+		var stateText = localStorage.getItem('$state') || "{}";
68
+		return JSON.parse(stateText);
69
+	};
70
+
71
+	/**
72
+	 * 设置当前状态
73
+	 **/
74
+	owner.setState = function(state) {
75
+		state = state || {};
76
+		localStorage.setItem('$state', JSON.stringify(state));
77
+		//var settings = owner.getSettings();
78
+		//settings.gestures = '';
79
+		//owner.setSettings(settings);
80
+	};
81
+
82
+	var checkEmail = function(email) {
83
+		email = email || '';
84
+		return (email.length > 3 && email.indexOf('@') > -1);
85
+	};
86
+
87
+	/**
88
+	 * 找回密码
89
+	 **/
90
+	owner.forgetPassword = function(email, callback) {
91
+		callback = callback || $.noop;
92
+		if (!checkEmail(email)) {
93
+			return callback('邮箱地址不合法');
94
+		}
95
+		return callback(null, '新的随机密码已经发送到您的邮箱,请查收邮件。');
96
+	};
97
+
98
+	/**
99
+	 * 获取应用本地配置
100
+	 **/
101
+	owner.setSettings = function(settings) {
102
+		settings = settings || {};
103
+		localStorage.setItem('$settings', JSON.stringify(settings));
104
+	}
105
+
106
+	/**
107
+	 * 设置应用本地配置
108
+	 **/
109
+	owner.getSettings = function() {
110
+			var settingsText = localStorage.getItem('$settings') || "{}";
111
+			return JSON.parse(settingsText);
112
+		}
113
+		/**
114
+		 * 获取本地是否安装客户端
115
+		 **/
116
+	owner.isInstalled = function(id) {
117
+		if (id === 'qihoo' && mui.os.plus) {
118
+			return true;
119
+		}
120
+		if (mui.os.android) {
121
+			var main = plus.android.runtimeMainActivity();
122
+			var packageManager = main.getPackageManager();
123
+			var PackageManager = plus.android.importClass(packageManager)
124
+			var packageName = {
125
+				"qq": "com.tencent.mobileqq",
126
+				"weixin": "com.tencent.mm",
127
+				"sinaweibo": "com.sina.weibo"
128
+			}
129
+			try {
130
+				return packageManager.getPackageInfo(packageName[id], PackageManager.GET_ACTIVITIES);
131
+			} catch (e) {}
132
+		} else {
133
+			switch (id) {
134
+				case "qq":
135
+					var TencentOAuth = plus.ios.import("TencentOAuth");
136
+					return TencentOAuth.iphoneQQInstalled();
137
+				case "weixin":
138
+					var WXApi = plus.ios.import("WXApi");
139
+					return WXApi.isWXAppInstalled()
140
+				case "sinaweibo":
141
+					var SinaAPI = plus.ios.import("WeiboSDK");
142
+					return SinaAPI.isWeiboAppInstalled()
143
+				default:
144
+					break;
145
+			}
146
+		}
147
+	}
148
+}(mui, window.app = {}));

+ 99 - 0
WebAPP/js/feedback-page.js

@@ -0,0 +1,99 @@
1
+(function(mui, window, document, undefined) {
2
+	mui.init();
3
+	var get = function(id) {
4
+		return document.getElementById(id);
5
+	};
6
+	var qsa = function(sel) {
7
+		return [].slice.call(document.querySelectorAll(sel));
8
+	};
9
+	var ui = {
10
+		question: get('question'),
11
+		contact: get('contact'),
12
+		imageList: get('image-list'),
13
+		submit: get('submit')
14
+	};
15
+	ui.clearForm = function() {
16
+		ui.question.value = '';
17
+		ui.contact.value = '';
18
+		ui.imageList.innerHTML = '';
19
+		ui.newPlaceholder();
20
+	};
21
+	ui.getFileInputArray = function() {
22
+		return [].slice.call(ui.imageList.querySelectorAll('input[type="file"]'));
23
+	};
24
+	ui.getFileInputIdArray = function() {
25
+		var fileInputArray = ui.getFileInputArray();
26
+		var idArray = [];
27
+		fileInputArray.forEach(function(fileInput) {
28
+			if (fileInput.value != '') {
29
+				idArray.push(fileInput.getAttribute('id'));
30
+			}
31
+		});
32
+		return idArray;
33
+	};
34
+	var imageIndexIdNum = 0;
35
+	ui.newPlaceholder = function() {
36
+		var fileInputArray = ui.getFileInputArray();
37
+		if (fileInputArray &&
38
+			fileInputArray.length > 0 &&
39
+			fileInputArray[fileInputArray.length - 1].parentNode.classList.contains('space')) {
40
+			return;
41
+		}
42
+		imageIndexIdNum++;
43
+		var placeholder = document.createElement('div');
44
+		placeholder.setAttribute('class', 'image-item space');
45
+		var closeButton = document.createElement('div');
46
+		closeButton.setAttribute('class', 'image-close');
47
+		closeButton.innerHTML = 'X';
48
+		closeButton.addEventListener('click', function(event) {
49
+			event.stopPropagation();
50
+			event.cancelBubble = true;
51
+			setTimeout(function() {
52
+				ui.imageList.removeChild(placeholder);
53
+			}, 0);
54
+			return false;
55
+		}, false);
56
+		var fileInput = document.createElement('input');
57
+		fileInput.setAttribute('type', 'file');
58
+		fileInput.setAttribute('accept', 'image/*');
59
+		fileInput.setAttribute('id', 'image-' + imageIndexIdNum);
60
+		fileInput.addEventListener('change', function(event) {
61
+			var file = fileInput.files[0];
62
+			if (file) {
63
+				var reader = new FileReader();
64
+				reader.onload = function() {
65
+					//处理 android 4.1 兼容问题
66
+					var base64 = reader.result.split(',')[1];
67
+					var dataUrl = 'data:image/png;base64,' + base64;
68
+					//
69
+					placeholder.style.backgroundImage = 'url(' + dataUrl + ')';
70
+				}
71
+				reader.readAsDataURL(file);
72
+				placeholder.classList.remove('space');
73
+				ui.newPlaceholder();
74
+			}
75
+		}, false);
76
+		placeholder.appendChild(closeButton);
77
+		placeholder.appendChild(fileInput);
78
+		ui.imageList.appendChild(placeholder);
79
+	};
80
+	ui.newPlaceholder();
81
+	ui.submit.addEventListener('tap', function(event) {
82
+		if (ui.question.value == '' ||
83
+			(ui.contact.value != '' &&
84
+				ui.contact.value.search(/^(\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+)|([1-9]\d{4,9})$/) != 0)) {
85
+			return mui.toast('信息填写不符合规范');
86
+		} 
87
+		plus.nativeUI.showWaiting();
88
+		feedback.send({
89
+			question: ui.question.value,
90
+			contact: ui.contact.value,
91
+			images: ui.getFileInputIdArray()
92
+		}, function() {
93
+			plus.nativeUI.closeWaiting();
94
+			mui.toast('感谢您的建议~');
95
+			ui.clearForm();
96
+			mui.back();
97
+		});
98
+	}, false);
99
+})(mui, window, document, undefined);

+ 118 - 0
WebAPP/js/feedback.js

@@ -0,0 +1,118 @@
1
+(function($, feedback, window, document) {
2
+
3
+	/*************** 环信配置开始 ****************/
4
+	//以后信息更改后,需卸载 “调试 app” 重新调用运行
5
+	var APP_KEY = 'dcloudio#mui';
6
+	var CUSTOM_ID = 'customer';
7
+	/*************** 环信配置结束 ****************/
8
+
9
+	//一组 “常量”
10
+	var PASSWORD = 'pass01!';
11
+	var LOCAL_STORE_KEY = 'mui://user';
12
+	var USER_PREFIX = 'mui-user-';
13
+
14
+
15
+	/**
16
+	 * 生成一个 IM 用户名
17
+	 **/
18
+	var createUsername = function() {
19
+		return USER_PREFIX + (new Date()).getTime();
20
+	};
21
+
22
+	/**
23
+	 * 获取用户,如果在本地存储中已有用户则直接返回。
24
+	 * 否则,注册新的用户
25
+	 **/
26
+	feedback.getUser = function(callback) {
27
+		var storeUserText = localStorage.getItem(LOCAL_STORE_KEY);
28
+		if (storeUserText) {
29
+			if (callback) callback(JSON.parse(storeUserText));
30
+			return;
31
+		}
32
+		var newUsername = createUsername();
33
+		Easemob.im.Helper.registerUser({
34
+			username: newUsername,
35
+			password: PASSWORD,
36
+			appKey: APP_KEY,
37
+			success: function(result) {
38
+				var userInfo = {
39
+					username: newUsername,
40
+					password: PASSWORD
41
+				};
42
+				localStorage.setItem(LOCAL_STORE_KEY, JSON.stringify(userInfo));
43
+				if (callback) callback(userInfo);
44
+			},
45
+			error: function(e) {
46
+				plus.nativeUI.toast(e.message);
47
+			}
48
+		});
49
+	};
50
+
51
+	/**
52
+	 * 登录环信息服务器
53
+	 **/
54
+	feedback.login = function(callback) {
55
+		feedback.getUser(function(user) {
56
+			var conn = new Easemob.im.Connection();
57
+			conn.init({
58
+				onOpened: function() {
59
+					//alert("成功登录");
60
+					conn.setPresence();
61
+					if (callback) callback(user, conn);
62
+				}
63
+			});
64
+			conn.open({
65
+				user: user.username,
66
+				pwd: user.password,
67
+				appKey: APP_KEY
68
+			});
69
+		});
70
+	};
71
+
72
+	/**
73
+	 * 发送反馈信息
74
+	 **/
75
+	feedback.send = function(content, callback) {
76
+		feedback.login(function(user, conn) {
77
+			//发送文本消息
78
+			var msgText = '问题:' + content.question;
79
+			if (content.contact) {
80
+				msgText += '; 联系方式:' + content.contact + ';'
81
+			}
82
+			conn.sendTextMessage({
83
+				to: CUSTOM_ID,
84
+				msg: msgText,
85
+				type: "chat"
86
+			});
87
+			//如果没有截图
88
+			if (!content.images || content.images.length < 1) {
89
+				if (callback) callback();
90
+				return;
91
+			}
92
+			//如果有截图
93
+			var sendImageCount = 0;
94
+			var hasError = false;
95
+			content.images.forEach(function(fileInputId) {
96
+				//alert(fileInputId)
97
+				conn.sendPicture({
98
+					fileInputId: fileInputId,
99
+					to: CUSTOM_ID,
100
+					onFileUploadError: function(error) {
101
+						//处理图片上传失败
102
+						alert(JSON.stringify(error));
103
+						hasError = true;
104
+					},
105
+					onFileUploadComplete: function(data) {
106
+						//处理图片上传成功,如本地消息显示
107
+						sendImageCount++;
108
+						if (!hasError && sendImageCount >= content.images.length) {
109
+							if (callback) callback();
110
+						}
111
+					}
112
+				});
113
+			});
114
+			//--
115
+		});
116
+	};
117
+
118
+})(mui, window.feedback = {}, window, document);

+ 229 - 0
WebAPP/js/jquery.md5.js

@@ -0,0 +1,229 @@
1
+	/**
2
+	 * jQuery MD5 hash algorithm function
3
+	 * 
4
+	 * 	<code>
5
+	 * 		Calculate the md5 hash of a String 
6
+	 * 		String $.md5 ( String str )
7
+	 * 	</code>
8
+	 * 
9
+	 * Calculates the MD5 hash of str using the » RSA Data Security, Inc. MD5 Message-Digest Algorithm, and returns that hash. 
10
+	 * MD5 (Message-Digest algorithm 5) is a widely-used cryptographic hash function with a 128-bit hash value. MD5 has been employed in a wide variety of security applications, and is also commonly used to check the integrity of data. The generated hash is also non-reversable. Data cannot be retrieved from the message digest, the digest uniquely identifies the data.
11
+	 * MD5 was developed by Professor Ronald L. Rivest in 1994. Its 128 bit (16 byte) message digest makes it a faster implementation than SHA-1.
12
+	 * This script is used to process a variable length message into a fixed-length output of 128 bits using the MD5 algorithm. It is fully compatible with UTF-8 encoding. It is very useful when u want to transfer encrypted passwords over the internet. If you plan using UTF-8 encoding in your project don't forget to set the page encoding to UTF-8 (Content-Type meta tag). 
13
+	 * This function orginally get from the WebToolkit and rewrite for using as the jQuery plugin.
14
+	 * 
15
+	 * Example
16
+	 * 	Code
17
+	 * 		<code>
18
+	 * 			$.md5("I'm Persian."); 
19
+	 * 		</code>
20
+	 * 	Result
21
+	 * 		<code>
22
+	 * 			"b8c901d0f02223f9761016cfff9d68df"
23
+	 * 		</code>
24
+	 * 
25
+	 * @alias Muhammad Hussein Fattahizadeh < muhammad [AT] semnanweb [DOT] com >
26
+	 * @link http://www.semnanweb.com/jquery-plugin/md5.html
27
+	 * @see http://www.webtoolkit.info/
28
+	 * @license http://www.gnu.org/licenses/gpl.html [GNU General Public License]
29
+	 * @param {jQuery} {md5:function(string))
30
+	 * @return string
31
+	 */
32
+	
33
+	(function($){
34
+		
35
+		var rotateLeft = function(lValue, iShiftBits) {
36
+			return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits));
37
+		}
38
+		
39
+		var addUnsigned = function(lX, lY) {
40
+			var lX4, lY4, lX8, lY8, lResult;
41
+			lX8 = (lX & 0x80000000);
42
+			lY8 = (lY & 0x80000000);
43
+			lX4 = (lX & 0x40000000);
44
+			lY4 = (lY & 0x40000000);
45
+			lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);
46
+			if (lX4 & lY4) return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
47
+			if (lX4 | lY4) {
48
+				if (lResult & 0x40000000) return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
49
+				else return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
50
+			} else {
51
+				return (lResult ^ lX8 ^ lY8);
52
+			}
53
+		}
54
+		
55
+		var F = function(x, y, z) {
56
+			return (x & y) | ((~ x) & z);
57
+		}
58
+		
59
+		var G = function(x, y, z) {
60
+			return (x & z) | (y & (~ z));
61
+		}
62
+		
63
+		var H = function(x, y, z) {
64
+			return (x ^ y ^ z);
65
+		}
66
+		
67
+		var I = function(x, y, z) {
68
+			return (y ^ (x | (~ z)));
69
+		}
70
+		
71
+		var FF = function(a, b, c, d, x, s, ac) {
72
+			a = addUnsigned(a, addUnsigned(addUnsigned(F(b, c, d), x), ac));
73
+			return addUnsigned(rotateLeft(a, s), b);
74
+		};
75
+		
76
+		var GG = function(a, b, c, d, x, s, ac) {
77
+			a = addUnsigned(a, addUnsigned(addUnsigned(G(b, c, d), x), ac));
78
+			return addUnsigned(rotateLeft(a, s), b);
79
+		};
80
+		
81
+		var HH = function(a, b, c, d, x, s, ac) {
82
+			a = addUnsigned(a, addUnsigned(addUnsigned(H(b, c, d), x), ac));
83
+			return addUnsigned(rotateLeft(a, s), b);
84
+		};
85
+		
86
+		var II = function(a, b, c, d, x, s, ac) {
87
+			a = addUnsigned(a, addUnsigned(addUnsigned(I(b, c, d), x), ac));
88
+			return addUnsigned(rotateLeft(a, s), b);
89
+		};
90
+		
91
+		var convertToWordArray = function(string) {
92
+			var lWordCount;
93
+			var lMessageLength = string.length;
94
+			var lNumberOfWordsTempOne = lMessageLength + 8;
95
+			var lNumberOfWordsTempTwo = (lNumberOfWordsTempOne - (lNumberOfWordsTempOne % 64)) / 64;
96
+			var lNumberOfWords = (lNumberOfWordsTempTwo + 1) * 16;
97
+			var lWordArray = Array(lNumberOfWords - 1);
98
+			var lBytePosition = 0;
99
+			var lByteCount = 0;
100
+			while (lByteCount < lMessageLength) {
101
+				lWordCount = (lByteCount - (lByteCount % 4)) / 4;
102
+				lBytePosition = (lByteCount % 4) * 8;
103
+				lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition));
104
+				lByteCount++;
105
+			}
106
+			lWordCount = (lByteCount - (lByteCount % 4)) / 4;
107
+			lBytePosition = (lByteCount % 4) * 8;
108
+			lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition);
109
+			lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
110
+			lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
111
+			return lWordArray;
112
+		};
113
+		
114
+		var wordToHex = function(lValue) {
115
+			var WordToHexValue = "", WordToHexValueTemp = "", lByte, lCount;
116
+			for (lCount = 0; lCount <= 3; lCount++) {
117
+				lByte = (lValue >>> (lCount * 8)) & 255;
118
+				WordToHexValueTemp = "0" + lByte.toString(16);
119
+				WordToHexValue = WordToHexValue + WordToHexValueTemp.substr(WordToHexValueTemp.length - 2, 2);
120
+			}
121
+			return WordToHexValue;
122
+		};
123
+		
124
+		var uTF8Encode = function(string) {
125
+			string = string.replace(/\x0d\x0a/g, "\x0a");
126
+			var output = "";
127
+			for (var n = 0; n < string.length; n++) {
128
+				var c = string.charCodeAt(n);
129
+				if (c < 128) {
130
+					output += String.fromCharCode(c);
131
+				} else if ((c > 127) && (c < 2048)) {
132
+					output += String.fromCharCode((c >> 6) | 192);
133
+					output += String.fromCharCode((c & 63) | 128);
134
+				} else {
135
+					output += String.fromCharCode((c >> 12) | 224);
136
+					output += String.fromCharCode(((c >> 6) & 63) | 128);
137
+					output += String.fromCharCode((c & 63) | 128);
138
+				}
139
+			}
140
+			return output;
141
+		};
142
+		
143
+		$.extend({
144
+			md5: function(string) {
145
+				var x = Array();
146
+				var k, AA, BB, CC, DD, a, b, c, d;
147
+				var S11=7, S12=12, S13=17, S14=22;
148
+				var S21=5, S22=9 , S23=14, S24=20;
149
+				var S31=4, S32=11, S33=16, S34=23;
150
+				var S41=6, S42=10, S43=15, S44=21;
151
+				string = uTF8Encode(string);
152
+				x = convertToWordArray(string);
153
+				a = 0x67452301; b = 0xEFCDAB89; c = 0x98BADCFE; d = 0x10325476;
154
+				for (k = 0; k < x.length; k += 16) {
155
+					AA = a; BB = b; CC = c; DD = d;
156
+					a = FF(a, b, c, d, x[k+0],  S11, 0xD76AA478);
157
+					d = FF(d, a, b, c, x[k+1],  S12, 0xE8C7B756);
158
+					c = FF(c, d, a, b, x[k+2],  S13, 0x242070DB);
159
+					b = FF(b, c, d, a, x[k+3],  S14, 0xC1BDCEEE);
160
+					a = FF(a, b, c, d, x[k+4],  S11, 0xF57C0FAF);
161
+					d = FF(d, a, b, c, x[k+5],  S12, 0x4787C62A);
162
+					c = FF(c, d, a, b, x[k+6],  S13, 0xA8304613);
163
+					b = FF(b, c, d, a, x[k+7],  S14, 0xFD469501);
164
+					a = FF(a, b, c, d, x[k+8],  S11, 0x698098D8);
165
+					d = FF(d, a, b, c, x[k+9],  S12, 0x8B44F7AF);
166
+					c = FF(c, d, a, b, x[k+10], S13, 0xFFFF5BB1);
167
+					b = FF(b, c, d, a, x[k+11], S14, 0x895CD7BE);
168
+					a = FF(a, b, c, d, x[k+12], S11, 0x6B901122);
169
+					d = FF(d, a, b, c, x[k+13], S12, 0xFD987193);
170
+					c = FF(c, d, a, b, x[k+14], S13, 0xA679438E);
171
+					b = FF(b, c, d, a, x[k+15], S14, 0x49B40821);
172
+					a = GG(a, b, c, d, x[k+1],  S21, 0xF61E2562);
173
+					d = GG(d, a, b, c, x[k+6],  S22, 0xC040B340);
174
+					c = GG(c, d, a, b, x[k+11], S23, 0x265E5A51);
175
+					b = GG(b, c, d, a, x[k+0],  S24, 0xE9B6C7AA);
176
+					a = GG(a, b, c, d, x[k+5],  S21, 0xD62F105D);
177
+					d = GG(d, a, b, c, x[k+10], S22, 0x2441453);
178
+					c = GG(c, d, a, b, x[k+15], S23, 0xD8A1E681);
179
+					b = GG(b, c, d, a, x[k+4],  S24, 0xE7D3FBC8);
180
+					a = GG(a, b, c, d, x[k+9],  S21, 0x21E1CDE6);
181
+					d = GG(d, a, b, c, x[k+14], S22, 0xC33707D6);
182
+					c = GG(c, d, a, b, x[k+3],  S23, 0xF4D50D87);
183
+					b = GG(b, c, d, a, x[k+8],  S24, 0x455A14ED);
184
+					a = GG(a, b, c, d, x[k+13], S21, 0xA9E3E905);
185
+					d = GG(d, a, b, c, x[k+2],  S22, 0xFCEFA3F8);
186
+					c = GG(c, d, a, b, x[k+7],  S23, 0x676F02D9);
187
+					b = GG(b, c, d, a, x[k+12], S24, 0x8D2A4C8A);
188
+					a = HH(a, b, c, d, x[k+5],  S31, 0xFFFA3942);
189
+					d = HH(d, a, b, c, x[k+8],  S32, 0x8771F681);
190
+					c = HH(c, d, a, b, x[k+11], S33, 0x6D9D6122);
191
+					b = HH(b, c, d, a, x[k+14], S34, 0xFDE5380C);
192
+					a = HH(a, b, c, d, x[k+1],  S31, 0xA4BEEA44);
193
+					d = HH(d, a, b, c, x[k+4],  S32, 0x4BDECFA9);
194
+					c = HH(c, d, a, b, x[k+7],  S33, 0xF6BB4B60);
195
+					b = HH(b, c, d, a, x[k+10], S34, 0xBEBFBC70);
196
+					a = HH(a, b, c, d, x[k+13], S31, 0x289B7EC6);
197
+					d = HH(d, a, b, c, x[k+0],  S32, 0xEAA127FA);
198
+					c = HH(c, d, a, b, x[k+3],  S33, 0xD4EF3085);
199
+					b = HH(b, c, d, a, x[k+6],  S34, 0x4881D05);
200
+					a = HH(a, b, c, d, x[k+9],  S31, 0xD9D4D039);
201
+					d = HH(d, a, b, c, x[k+12], S32, 0xE6DB99E5);
202
+					c = HH(c, d, a, b, x[k+15], S33, 0x1FA27CF8);
203
+					b = HH(b, c, d, a, x[k+2],  S34, 0xC4AC5665);
204
+					a = II(a, b, c, d, x[k+0],  S41, 0xF4292244);
205
+					d = II(d, a, b, c, x[k+7],  S42, 0x432AFF97);
206
+					c = II(c, d, a, b, x[k+14], S43, 0xAB9423A7);
207
+					b = II(b, c, d, a, x[k+5],  S44, 0xFC93A039);
208
+					a = II(a, b, c, d, x[k+12], S41, 0x655B59C3);
209
+					d = II(d, a, b, c, x[k+3],  S42, 0x8F0CCC92);
210
+					c = II(c, d, a, b, x[k+10], S43, 0xFFEFF47D);
211
+					b = II(b, c, d, a, x[k+1],  S44, 0x85845DD1);
212
+					a = II(a, b, c, d, x[k+8],  S41, 0x6FA87E4F);
213
+					d = II(d, a, b, c, x[k+15], S42, 0xFE2CE6E0);
214
+					c = II(c, d, a, b, x[k+6],  S43, 0xA3014314);
215
+					b = II(b, c, d, a, x[k+13], S44, 0x4E0811A1);
216
+					a = II(a, b, c, d, x[k+4],  S41, 0xF7537E82);
217
+					d = II(d, a, b, c, x[k+11], S42, 0xBD3AF235);
218
+					c = II(c, d, a, b, x[k+2],  S43, 0x2AD7D2BB);
219
+					b = II(b, c, d, a, x[k+9],  S44, 0xEB86D391);
220
+					a = addUnsigned(a, AA);
221
+					b = addUnsigned(b, BB);
222
+					c = addUnsigned(c, CC);
223
+					d = addUnsigned(d, DD);
224
+				}
225
+				var tempValue = wordToHex(a) + wordToHex(b) + wordToHex(c) + wordToHex(d);
226
+				return tempValue.toLowerCase();
227
+			}
228
+		});
229
+	})(jQuery);

File diff suppressed because it is too large
+ 4 - 0
WebAPP/js/jquery.min.js


+ 20 - 0
WebAPP/js/mui.enterfocus.js

@@ -0,0 +1,20 @@
1
+(function($) {
2
+	$.enterfocus = function(selector, callback) {
3
+		var boxArray = [].slice.call(document.querySelectorAll(selector));
4
+		for (var index in boxArray) {
5
+			var box = boxArray[index];
6
+			box.addEventListener('keyup', function(event) {
7
+				if (event.keyCode == 13) {
8
+					var boxIndex = boxArray.indexOf(this);
9
+					if (boxIndex == boxArray.length - 1) {
10
+						if (callback) callback();
11
+					} else {
12
+						//console.log(boxIndex);
13
+						var nextBox = boxArray[++boxIndex];
14
+						nextBox.focus();
15
+					}
16
+				}
17
+			}, false);
18
+		}
19
+	};
20
+}(window.mui = window.mui || {}));

+ 187 - 0
WebAPP/js/mui.indexedlist.js

@@ -0,0 +1,187 @@
1
+/**
2
+ * IndexedList
3
+ * 类似联系人应用中的联系人列表,可以按首字母分组
4
+ * 右侧的字母定位工具条,可以快速定位列表位置
5
+ * varstion 1.0.0
6
+ * by Houfeng
7
+ * Houfeng@DCloud.io
8
+ **/
9
+
10
+(function($, window, document) {
11
+
12
+	var classSelector = function(name) {
13
+		return '.' + $.className(name);
14
+	}
15
+
16
+	var IndexedList = $.IndexedList = $.Class.extend({
17
+		/**
18
+		 * 通过 element 和 options 构造 IndexedList 实例
19
+		 **/
20
+		init: function(holder, options) {
21
+			var self = this;
22
+			self.options = options || {};
23
+			self.box = holder;
24
+			if (!self.box) {
25
+				throw "实例 IndexedList 时需要指定 element";
26
+			}
27
+			self.createDom();
28
+			self.findElements();
29
+			self.caleLayout();
30
+			self.bindEvent();
31
+		},
32
+		createDom: function() {
33
+			var self = this;
34
+			self.el = self.el || {};
35
+			//styleForSearch 用于搜索,此方式能在数据较多时获取很好的性能
36
+			self.el.styleForSearch = document.createElement('style');
37
+			(document.head || document.body).appendChild(self.el.styleForSearch);
38
+		},
39
+		findElements: function() {
40
+			var self = this;
41
+			self.el = self.el || {};
42
+			self.el.search = self.box.querySelector(classSelector('indexed-list-search'));
43
+			self.el.searchInput = self.box.querySelector(classSelector('indexed-list-search-input'));
44
+			self.el.searchClear = self.box.querySelector(classSelector('indexed-list-search') + ' ' + classSelector('icon-clear'));
45
+			self.el.bar = self.box.querySelector(classSelector('indexed-list-bar'));
46
+			self.el.barItems = [].slice.call(self.box.querySelectorAll(classSelector('indexed-list-bar') + ' a'));
47
+			self.el.inner = self.box.querySelector(classSelector('indexed-list-inner'));
48
+			self.el.items = [].slice.call(self.box.querySelectorAll(classSelector('indexed-list-item')));
49
+			self.el.liArray = [].slice.call(self.box.querySelectorAll(classSelector('indexed-list-inner') + ' li'));
50
+			self.el.alert = self.box.querySelector(classSelector('indexed-list-alert'));
51
+		},
52
+		caleLayout: function() {
53
+			var self = this;
54
+			var withoutSearchHeight = (self.box.offsetHeight - self.el.search.offsetHeight) + 'px';
55
+			self.el.bar.style.height = withoutSearchHeight;
56
+			self.el.inner.style.height = withoutSearchHeight;
57
+			var barItemHeight = ((self.el.bar.offsetHeight - 40) / self.el.barItems.length) + 'px';
58
+			self.el.barItems.forEach(function(item) {
59
+				item.style.height = barItemHeight;
60
+				item.style.lineHeight = barItemHeight;
61
+			});
62
+		},
63
+		scrollTo: function(group) {
64
+			var self = this;
65
+			var groupElement = self.el.inner.querySelector('[data-group="' + group + '"]');
66
+			if (!groupElement || (self.hiddenGroups && self.hiddenGroups.indexOf(groupElement) > -1)) {
67
+				return;
68
+			}
69
+			self.el.inner.scrollTop = groupElement.offsetTop;
70
+		},
71
+		bindBarEvent: function() {
72
+			var self = this;
73
+			var pointElement = null;
74
+			var findStart = function(event) {
75
+				if (pointElement) {
76
+					pointElement.classList.remove('active');
77
+					pointElement = null;
78
+				}
79
+				self.el.bar.classList.add('active');
80
+				var point = event.changedTouches ? event.changedTouches[0] : event;
81
+				pointElement = document.elementFromPoint(point.pageX, point.pageY);
82
+				if (pointElement) {
83
+					var group = pointElement.innerText;
84
+					if (group && group.length == 1) {
85
+						pointElement.classList.add('active');
86
+						self.el.alert.innerText = group;
87
+						self.el.alert.classList.add('active');
88
+						self.scrollTo(group);
89
+					}
90
+				}
91
+				event.preventDefault();
92
+			};
93
+			var findEnd = function(event) {
94
+				self.el.alert.classList.remove('active');
95
+				self.el.bar.classList.remove('active');
96
+				if (pointElement) {
97
+					pointElement.classList.remove('active');
98
+					pointElement = null;
99
+				}
100
+			};
101
+			self.el.bar.addEventListener($.EVENT_MOVE, function(event) {
102
+				findStart(event);
103
+			}, false);
104
+			self.el.bar.addEventListener($.EVENT_START, function(event) {
105
+				findStart(event);
106
+			}, false);
107
+			document.body.addEventListener($.EVENT_END, function(event) {
108
+				findEnd(event);
109
+			}, false);
110
+			document.body.addEventListener($.EVENT_CANCEL, function(event) {
111
+				findEnd(event);
112
+			}, false);
113
+		},
114
+		search: function(keyword) {
115
+			var self = this;
116
+			keyword = (keyword || '').toLowerCase();
117
+			var selectorBuffer = [];
118
+			var groupIndex = -1;
119
+			var itemCount = 0;
120
+			var liArray = self.el.liArray;
121
+			var itemTotal = liArray.length;
122
+			self.hiddenGroups = [];
123
+			var checkGroup = function(currentIndex, last) {
124
+				if (itemCount >= currentIndex - groupIndex - (last ? 0 : 1)) {
125
+					selectorBuffer.push(classSelector('indexed-list-inner li') + ':nth-child(' + (groupIndex + 1) + ')');
126
+					self.hiddenGroups.push(liArray[groupIndex]);
127
+				};
128
+				groupIndex = currentIndex;
129
+				itemCount = 0;
130
+			}
131
+			liArray.forEach(function(item) {
132
+				var currentIndex = liArray.indexOf(item);
133
+				if (item.classList.contains($.className('indexed-list-group'))) {
134
+					checkGroup(currentIndex, false);
135
+				} else {
136
+					var text = (item.innerText || '').toLowerCase();
137
+					var value = (item.getAttribute('data-value') || '').toLowerCase();
138
+					var tags = (item.getAttribute('data-tags') || '').toLowerCase();
139
+					if (keyword && text.indexOf(keyword) < 0 &&
140
+						value.indexOf(keyword) < 0 &&
141
+						tags.indexOf(keyword) < 0) {
142
+						selectorBuffer.push(classSelector('indexed-list-inner li') + ':nth-child(' + (currentIndex + 1) + ')');
143
+						itemCount++;
144
+					}
145
+					if (currentIndex >= itemTotal - 1) {
146
+						checkGroup(currentIndex, true);
147
+					}
148
+				}
149
+			});
150
+			if (selectorBuffer.length >= itemTotal) {
151
+				self.el.inner.classList.add('empty');
152
+			} else if (selectorBuffer.length > 0) {
153
+				self.el.inner.classList.remove('empty');
154
+				self.el.styleForSearch.innerText = selectorBuffer.join(', ') + "{display:none;}";
155
+			} else {
156
+				self.el.inner.classList.remove('empty');
157
+				self.el.styleForSearch.innerText = "";
158
+			}
159
+		},
160
+		bindSearchEvent: function() {
161
+			var self = this;
162
+			self.el.searchInput.addEventListener('input', function() {
163
+				var keyword = this.value;
164
+				self.search(keyword);
165
+			}, false);
166
+			$(self.el.search).on('tap', classSelector('icon-clear'), function() {
167
+				self.search('');
168
+			}, false);
169
+		},
170
+		bindEvent: function() {
171
+			var self = this;
172
+			self.bindBarEvent();
173
+			self.bindSearchEvent();
174
+		}
175
+	});
176
+
177
+	//mui(selector).indexedList 方式
178
+	$.fn.indexedList = function(options) {
179
+		//遍历选择的元素
180
+		this.each(function(i, element) {
181
+			if (element.indexedList) return;
182
+			element.indexedList = new IndexedList(element, options);
183
+		});
184
+		return this[0] ? this[0].indexedList : null;
185
+	};
186
+
187
+})(mui, window, document);

+ 304 - 0
WebAPP/js/mui.locker.js

@@ -0,0 +1,304 @@
1
+/**
2
+ * 手势锁屏插件
3
+ * varstion 1.0.5
4
+ * by Houfeng
5
+ * Houfeng@DCloud.io
6
+ */
7
+
8
+(function($, doc) {
9
+
10
+	var touchSupport = ('ontouchstart' in document);
11
+	var startEventName = touchSupport ? 'touchstart' : 'mousedown';
12
+	var moveEventName = touchSupport ? 'touchmove' : 'mousemove';
13
+	var endEventName = touchSupport ? 'touchend' : 'mouseup';
14
+	var lockerHolderClassName = $.className('locker-holder');
15
+	var lockerClassName = $.className('locker');
16
+
17
+	var styleHolder = doc.querySelector('head') || doc.querySelector('body');
18
+	styleHolder.innerHTML += "<style>.mui-locker-holder{overflow:hidden;position:relative;padding:0px;}.mui-locker-holder canvas{width:100%;height:100%;}</style>";
19
+
20
+	var times = 4;
21
+
22
+	function getElementLeft(element) {    
23
+		var actualLeft = element.offsetLeft;    
24
+		var current = element.offsetParent;    
25
+		while (current !== null) {      
26
+			actualLeft += current.offsetLeft;      
27
+			current = current.offsetParent;    
28
+		}    
29
+		return actualLeft;  
30
+	}  
31
+
32
+	function getElementTop(element) {    
33
+		var actualTop = element.offsetTop;    
34
+		var current = element.offsetParent;    
35
+		while (current !== null) {      
36
+			actualTop += current.offsetTop;      
37
+			current = current.offsetParent;    
38
+		}    
39
+		return actualTop;  
40
+	}
41
+
42
+	//定义 Locker 类
43
+	var Locker = $.Locker = $.Class.extend({
44
+		R: 26,
45
+		CW: 400,
46
+		CH: 320,
47
+		OffsetX: 30,
48
+		OffsetY: 30,
49
+
50
+		/**
51
+		 * 构造函数
52
+		 * */
53
+		init: function(holder, options) {
54
+			var self = this;
55
+			if (!holder) {
56
+				throw "构造 Locker 时缺少容器元素";
57
+			}
58
+			self.holder = holder;
59
+			//避免重复初始化开始
60
+			if (self.holder.__locker_inited) return;
61
+			self.holder.__locker_inited = true;
62
+			//避免重复初始化结束
63
+			//
64
+			self.options = options || {};
65
+			self.options.callback = self.options.callback || self.options.done || $.noop;
66
+			self.holder.innerHTML = '<canvas></canvas>';
67
+			//
68
+			self.holder.classList.add(lockerHolderClassName);
69
+			//初始化
70
+			var canvas = self.canvas = $.qsa('canvas', self.holder)[0];
71
+			canvas.on = canvas.addEventListener || function(name, handler, capture) {
72
+				canvas.attachEvent('on' + name, handler, capture);
73
+			};
74
+			canvas.off = canvas.removeEventListener || function(name, handler, capture) {
75
+				canvas.detachEvent('on' + name, handler, capture);
76
+			};
77
+			//
78
+			if (self.options.width) self.holder.style.width = self.options.width + 'px';
79
+			if (self.options.height) self.holder.style.height = self.options.height + 'px';
80
+			self.CW = self.options.width || self.holder.offsetWidth || self.CW;
81
+			self.CH = self.options.height || self.holder.offsetHeight || self.CH;
82
+			//处理 “宽、高” 等数值, 全部扩大 times 倍
83
+			self.R *= times;
84
+			self.CW *= times;
85
+			self.CH *= times;
86
+			self.OffsetX *= times;
87
+			self.OffsetY *= times;
88
+			//
89
+			canvas.width = self.CW;
90
+			canvas.height = self.CH;
91
+			var cxt = self.cxt = canvas.getContext("2d");
92
+			//两个圆之间的外距离 就是说两个圆心的距离去除两个半径
93
+			var X = (self.CW - 2 * self.OffsetX - self.R * 2 * 3) / 2;
94
+			var Y = (self.CH - 2 * self.OffsetY - self.R * 2 * 3) / 2;
95
+			self.pointLocationArr = self.caculateNinePointLotion(X, Y);
96
+			self.initEvent(canvas, cxt, self.holder);
97
+			//console.log(X);
98
+			self.draw(cxt, self.pointLocationArr, [], null);
99
+			setTimeout(function() {
100
+				self.draw(cxt, self.pointLocationArr, [], null);
101
+			}, 0);
102
+		},
103
+
104
+		/**
105
+		 * 计算
106
+		 */
107
+		caculateNinePointLotion: function(diffX, diffY) {
108
+			var self = this;
109
+			var Re = [];
110
+			for (var row = 0; row < 3; row++) {
111
+				for (var col = 0; col < 3; col++) {
112
+					var Point = {
113
+						X: (self.OffsetX + col * diffX + (col * 2 + 1) * self.R),
114
+						Y: (self.OffsetY + row * diffY + (row * 2 + 1) * self.R)
115
+					};
116
+					Re.push(Point);
117
+				}
118
+			}
119
+			return Re;
120
+		},
121
+
122
+		/**
123
+		 * 绘制
124
+		 */
125
+		draw: function(cxt, _PointLocationArr, _LinePointArr, touchPoint) {
126
+			var self = this;
127
+			var R = self.R;
128
+			if (_LinePointArr.length > 0) {
129
+				cxt.beginPath();
130
+				for (var i = 0; i < _LinePointArr.length; i++) {
131
+					var pointIndex = _LinePointArr[i];
132
+					cxt.lineTo(_PointLocationArr[pointIndex].X, _PointLocationArr[pointIndex].Y);
133
+				}
134
+				cxt.lineWidth = 2 * times;
135
+				cxt.strokeStyle = self.options.lineColor || "#999"; //连结线颜色
136
+				cxt.stroke();
137
+				cxt.closePath();
138
+				if (touchPoint != null) {
139
+					var lastPointIndex = _LinePointArr[_LinePointArr.length - 1];
140
+					var lastPoint = _PointLocationArr[lastPointIndex];
141
+					cxt.beginPath();
142
+					cxt.moveTo(lastPoint.X, lastPoint.Y);
143
+					cxt.lineTo(touchPoint.X, touchPoint.Y);
144
+					cxt.stroke();
145
+					cxt.closePath();
146
+				}
147
+			}
148
+			for (var i = 0; i < _PointLocationArr.length; i++) {
149
+				var Point = _PointLocationArr[i];
150
+				cxt.fillStyle = self.options.ringColor || "#888"; //圆圈边框颜色
151
+				cxt.beginPath();
152
+				cxt.arc(Point.X, Point.Y, R, 0, Math.PI * times, true);
153
+				cxt.closePath();
154
+				cxt.fill();
155
+				cxt.fillStyle = self.options.fillColor || "#f3f3f3"; //圆圈填充颜色
156
+				cxt.beginPath();
157
+				cxt.arc(Point.X, Point.Y, R - (2 * times), 0, Math.PI * times, true);
158
+				cxt.closePath();
159
+				cxt.fill();
160
+				if (_LinePointArr.indexOf(i) >= 0) {
161
+					cxt.fillStyle = self.options.pointColor || "#777"; //圆圈中心点颜色
162
+					cxt.beginPath();
163
+					cxt.arc(Point.X, Point.Y, R - (16 * times), 0, Math.PI * times, true);
164
+					cxt.closePath();
165
+					cxt.fill();
166
+				}
167
+			}
168
+		},
169
+
170
+		isPointSelect: function(touches, linePoint) {
171
+			var self = this;
172
+			for (var i = 0; i < self.pointLocationArr.length; i++) {
173
+				var currentPoint = self.pointLocationArr[i];
174
+				var xdiff = Math.abs(currentPoint.X - touches.elementX);
175
+				var ydiff = Math.abs(currentPoint.Y - touches.elementY);
176
+				var dir = Math.pow((xdiff * xdiff + ydiff * ydiff), 0.5);
177
+				if (dir < self.R) {
178
+					if (linePoint.indexOf(i) < 0) {
179
+						linePoint.push(i);
180
+					}
181
+					break;
182
+				}
183
+			}
184
+		},
185
+
186
+		initEvent: function(canvas, cxt, holder) {
187
+			var self = this;
188
+			var linePoint = [];
189
+			var isDown = false; //针对鼠标事件
190
+			//start
191
+			self._startHandler = function(e) {
192
+				e.point = event.changedTouches ? event.changedTouches[0] : event;
193
+				e.point.elementX = (e.point.pageX - getElementLeft(holder)) * times;
194
+				e.point.elementY = (e.point.pageY - getElementTop(holder)) * times;
195
+				self.isPointSelect(e.point, linePoint);
196
+				isDown = true;
197
+			};
198
+			canvas.on(startEventName, self._startHandler, false);
199
+			//move
200
+			self._moveHanlder = function(e) {
201
+				if (!isDown) return;
202
+				e.preventDefault();
203
+				e.point = event.changedTouches ? event.changedTouches[0] : event;
204
+				e.point.elementX = (e.point.pageX - getElementLeft(holder)) * times;
205
+				e.point.elementY = (e.point.pageY - getElementTop(holder)) * times;
206
+				var touches = e.point;
207
+				self.isPointSelect(touches, linePoint);
208
+				cxt.clearRect(0, 0, self.CW, self.CH);
209
+				self.draw(cxt, self.pointLocationArr, linePoint, {
210
+					X: touches.elementX,
211
+					Y: touches.elementY
212
+				});
213
+			};
214
+			canvas.on(moveEventName, self._moveHanlder, false);
215
+			//end
216
+			self._endHandler = function(e) {
217
+				e.point = event.changedTouches ? event.changedTouches[0] : event;
218
+				e.point.elementX = (e.point.pageX - getElementLeft(holder)) * times;
219
+				e.point.elementY = (e.point.pageY - getElementTop(holder)) * times;
220
+				cxt.clearRect(0, 0, self.CW, self.CH);
221
+				self.draw(cxt, self.pointLocationArr, linePoint, null);
222
+				//事件数据
223
+				var eventData = {
224
+					sender: self,
225
+					points: linePoint
226
+				};
227
+				/*
228
+				 * 回调完成事件
229
+				 *
230
+				 * 备注:
231
+				 * 比较理想的做法是为 Locker 的实例启用事件机制,比如 locker.on('done',handler);
232
+				 * 在 mui 没有完整的公共事件模块前,此版本中 locker 实例暂通过 options.callback 处理
233
+				 */
234
+				self.options.callback(eventData);
235
+				//触发声明的DOM的自定义事件(暂定 done 为事件名,可以考虑更有针对的事件名 )
236
+				$.trigger(self.holder, 'done', eventData);
237
+				//-
238
+				linePoint = [];
239
+				isDown = false;
240
+			};
241
+			canvas.on(endEventName, self._endHandler, false);
242
+		},
243
+
244
+		pointLocationArr: [],
245
+
246
+		/**
247
+		 * 清除图形
248
+		 * */
249
+		clear: function() {
250
+			var self = this;
251
+			//self.pointLocationArr = [];
252
+			if (self.cxt) {
253
+				self.cxt.clearRect(0, 0, self.CW, self.CH);
254
+				self.draw(self.cxt, self.pointLocationArr, [], {
255
+					X: 0,
256
+					Y: 0
257
+				});
258
+			}
259
+		},
260
+
261
+		/**
262
+		 * 释放资源
263
+		 * */
264
+		dispose: function() {
265
+			var self = this;
266
+			self.cxt = null;
267
+			self.canvas.off(startEventName, self._startHandler);
268
+			self.canvas.off(moveEventName, self._moveHandler);
269
+			self.canvas.off(endEventName, self._endHandler);
270
+			self.holder.innerHTML = '';
271
+			self.canvas = null;
272
+		}
273
+	});
274
+
275
+	//添加 locker 插件
276
+	$.fn.locker = function(options) {
277
+		//遍历选择的元素
278
+		this.each(function(i, element) {
279
+			if (options) {
280
+				new Locker(element, options);
281
+			} else {
282
+				var optionsText = element.getAttribute('data-locker-options');
283
+				var options = optionsText ? JSON.parse(optionsText) : {};
284
+				options.lineColor = element.getAttribute('data-locker-line-color') || options.lineColor;
285
+				options.ringColor = element.getAttribute('data-locker-ring-color') || options.ringColor;
286
+				options.fillColor = element.getAttribute('data-locker-fill-color') || options.fillColor;
287
+				options.pointColor = element.getAttribute('data-locker-point-color') || options.pointColor;
288
+				options.width = element.getAttribute('data-locker-width') || options.width;
289
+				options.height = element.getAttribute('data-locker-height') || options.height;
290
+				new Locker(element, options);
291
+			}
292
+		});
293
+		return this;
294
+	};
295
+
296
+	//自动处理 class='mui-locker' 的 dom
297
+	try {
298
+		$('.' + lockerClassName).locker();
299
+	} catch (ex) {}
300
+	$.ready(function() {
301
+		$('.' + lockerClassName).locker();
302
+	});
303
+
304
+}(mui, document));

File diff suppressed because it is too large
+ 9 - 0
WebAPP/js/mui.min.js


+ 613 - 0
WebAPP/js/mui.view.js

@@ -0,0 +1,613 @@
1
+/**
2
+ * <div id="app" class="mui-views">
3
+	<div class="mui-view">
4
+		<div class="mui-navbar">
5
+		</div>
6
+		<div class="mui-pages">
7
+		</div>
8
+	</div>
9
+</div>
10
+ * @param {Object} $
11
+ * @param {Object} window
12
+ */
13
+(function($, window) {
14
+	var CLASS_LEFT = $.className('left');
15
+	var CLASS_CENTER = $.className('center');
16
+	var CLASS_RIGHT = $.className('right');
17
+	var CLASS_PAGE = $.className('page');
18
+	var CLASS_PAGE_LEFT = $.className('page-left');
19
+	var CLASS_PAGE_CENTER = $.className('page-center');
20
+	var CLASS_NAVBAR_LEFT = $.className('navbar-left');
21
+	var CLASS_NAVBAR_CENTER = $.className('navbar-center');
22
+	var CLASS_PAGE_SHADOW = $.className('page-shadow');
23
+
24
+	var CLASS_TRANSITIONING = $.className('transitioning');
25
+
26
+	var SELECTOR_LEFT = '.' + CLASS_LEFT;
27
+	var SELECTOR_CENTER = '.' + CLASS_CENTER;
28
+	var SELECTOR_RIGHT = '.' + CLASS_RIGHT;
29
+
30
+	var SELECTOR_ICON = $.classSelector('.icon');
31
+	var SELECTOR_NAVBAR = $.classSelector('.navbar');
32
+	var SELECTOR_NAVBAR_INNER = $.classSelector('.navbar-inner');
33
+	var SELECTOR_PAGES = $.classSelector('.pages');
34
+	var SELECTOR_BTN_NAV = $.classSelector('.btn-nav');
35
+	var SELECTOR_PAGE_LEFT = '.' + CLASS_PAGE_LEFT;
36
+	var SELECTOR_PAGE_CENTER = '.' + CLASS_PAGE_CENTER;
37
+	var SELECTOR_NAVBAR_LEFT = '.' + CLASS_NAVBAR_LEFT;
38
+	var SELECTOR_NAVBAR_CENTER = '.' + CLASS_NAVBAR_CENTER;
39
+
40
+	var View = $.Class.extend({
41
+		init: function(element, options) {
42
+			this.view = this.element = element;
43
+			this.options = $.extend({
44
+				animateNavbar: true,
45
+				swipeBackPageActiveArea: 30,
46
+				hardwareAccelerated: true
47
+			}, options);
48
+			this.navbars = this.view.querySelector(SELECTOR_NAVBAR);
49
+			this.pages = this.view.querySelector(SELECTOR_PAGES);
50
+
51
+			this.history = []; //history
52
+
53
+			this.maxScrollX = this.view.offsetWidth;
54
+			this.x = this.y = 0;
55
+			this.translateZ = this.options.hardwareAccelerated ? ' translateZ(0)' : '';
56
+			this.ratio = 0;
57
+			this.isBack = true;
58
+			this.moved = this.dragging = false;
59
+
60
+			this.activeNavbar = this.previousNavbar = null;
61
+			this.activePage = this.previousPage = null;
62
+
63
+			this._initPageEventMethod();
64
+
65
+			this._initDefaultPage();
66
+
67
+			this._initNavBar();
68
+
69
+			this.initEvent();
70
+		},
71
+		_initPageEventMethod: function() {
72
+			var self = this;
73
+			$.each(['onPageBeforeShow', 'onPageShow', 'onPageBeforeBack', 'onPageBack'], function(index, event) {
74
+				self[event + 'Callbacks'] = {};
75
+				self[event] = function(page, callback) {
76
+					var eventCallbacks = event + 'Callbacks';
77
+					if (!self[eventCallbacks].hasOwnProperty(page)) {
78
+						self[eventCallbacks][page] = [callback];
79
+					} else {
80
+						self[eventCallbacks][page].push(callback);
81
+					}
82
+				};
83
+			});
84
+		},
85
+		_initDefaultPage: function() {
86
+			var defaultPage = document.querySelector(this.options.defaultPage);
87
+			if (defaultPage) {
88
+				this._appendPage(defaultPage);
89
+			} else {
90
+				throw new Error('defaultPage[' + this.options.defaultPage + '] does not exist');
91
+			}
92
+		},
93
+		initEvent: function() {
94
+			this.view.addEventListener('click', this);
95
+			this.view.addEventListener('tap', this);
96
+			this.pages.addEventListener('drag', this);
97
+			this.pages.addEventListener('dragend', this);
98
+			this.pages.addEventListener('webkitTransitionEnd', this);
99
+		},
100
+		handleEvent: function(event) {
101
+			switch (event.type) {
102
+				case 'click':
103
+					this._click(event);
104
+					break;
105
+				case 'tap':
106
+					this._tap(event);
107
+					break;
108
+				case 'drag':
109
+					this._drag(event);
110
+					break;
111
+				case 'dragend':
112
+					this._dragend(event);
113
+					break;
114
+				case 'webkitTransitionEnd':
115
+					this._webkitTransitionEnd(event);
116
+					break;
117
+			}
118
+		},
119
+		shadow: function() {
120
+			var shadow = document.createElement('div');
121
+			shadow.className = CLASS_PAGE_SHADOW;
122
+			return shadow;
123
+		}(),
124
+		_removePage: function(page, navbar) {
125
+			this._removeNavbar(page, navbar);
126
+			document.body.appendChild(page);
127
+			this._cleanPageClass(page);
128
+		},
129
+		_prependPage: function(page) {
130
+			var navbar = page.querySelector(SELECTOR_NAVBAR_INNER);
131
+			this._prependNavbar(navbar);
132
+			page.classList.add(CLASS_PAGE_LEFT);
133
+			this.pages.insertBefore(page, this.pages.firstElementChild);
134
+		},
135
+		_appendPage: function(page) {
136
+			var navbar = page.querySelector(SELECTOR_NAVBAR_INNER);
137
+			this._appendNavbar(navbar);
138
+			page.classList.add(CLASS_PAGE_CENTER);
139
+			this.pages.appendChild(page);
140
+		},
141
+		_removeNavbar: function(page, navbar) {
142
+			page.insertBefore(navbar, page.firstElementChild);
143
+			this._cleanNavbarClass(navbar);
144
+		},
145
+		_prependNavbar: function(navbar) {
146
+			navbar.classList.add(CLASS_NAVBAR_LEFT);
147
+			this.navbars.insertBefore(navbar, this.navbars.firstElementChild);
148
+		},
149
+		_appendNavbar: function(navbar) {
150
+			navbar.classList.add(CLASS_NAVBAR_CENTER);
151
+			this.navbars.appendChild(navbar);
152
+		},
153
+		_cleanPageClass: function(page) {
154
+			page.classList.remove(CLASS_PAGE_CENTER);
155
+			page.classList.remove(CLASS_PAGE_LEFT);
156
+		},
157
+		_cleanNavbarClass: function(navbar) {
158
+			navbar.classList.remove(CLASS_NAVBAR_CENTER);
159
+			navbar.classList.remove(CLASS_NAVBAR_LEFT);
160
+		},
161
+		_tap: function(event) {
162
+			var target = event.target;
163
+			for (; target && target !== document; target = target.parentNode) {
164
+				if (target.tagName === 'A' && target.hash) {
165
+					var page = document.getElementById(target.hash.replace('#', ''));
166
+					if (page && page.classList.contains(CLASS_PAGE)) {
167
+						event.stopPropagation();
168
+						event.detail.gesture.preventDefault();
169
+						this.go(target.hash);
170
+						break;
171
+					}
172
+				}
173
+			}
174
+		},
175
+		_click: function(event) {
176
+			var target = event.target;
177
+			for (; target && target !== document; target = target.parentNode) {
178
+				if (target.tagName === 'A' && target.hash) {
179
+					var page = document.getElementById(target.hash.replace('#', ''));
180
+					if (page && page.classList.contains(CLASS_PAGE)) {
181
+						event.preventDefault();
182
+						break;
183
+					}
184
+				}
185
+			}
186
+		},
187
+		_cleanStyle: function(el) {
188
+			if (el) {
189
+				el.style.webkitTransform = '';
190
+				el.style.opacity = '';
191
+			}
192
+		},
193
+		_webkitTransitionEnd: function(event) {
194
+			this.dragging = this.moved = false;
195
+			if (this.activePage !== event.target) {
196
+				return;
197
+			}
198
+
199
+			this.isInTransition = false;
200
+
201
+			this.shadow.parentNode === this.activePage && this.activePage.removeChild(this.shadow);
202
+			this.previousPageClassList.remove(CLASS_TRANSITIONING);
203
+			this.activePageClassList.remove(CLASS_TRANSITIONING);
204
+
205
+			var self = this;
206
+			if ($.os.ios && this.options.animateNavbar && this.previousNavElements && this.activeNavElements) {
207
+				var isBack = this.isBack;
208
+				$.each(this.previousNavElements, function(i, el) {
209
+					el.classList.remove(CLASS_TRANSITIONING);
210
+					isBack && self._cleanStyle(el);
211
+				});
212
+				$.each(this.activeNavElements, function(i, el) {
213
+					el.classList.remove(CLASS_TRANSITIONING);
214
+					self._cleanStyle(el);
215
+				});
216
+				if (this.previousNavBackIcon) {
217
+					this.previousNavBackIcon.classList.remove(CLASS_TRANSITIONING);
218
+					isBack && this._cleanStyle(this.previousNavBackIcon);
219
+				}
220
+				if (this.activeNavBackIcon) {
221
+					this.activeNavBackIcon.classList.remove(CLASS_TRANSITIONING);
222
+					this._cleanStyle(this.activeNavBackIcon);
223
+				}
224
+			} else {
225
+				this.previousNavbar.classList.remove(CLASS_TRANSITIONING);
226
+				this.activeNavbar.classList.remove(CLASS_TRANSITIONING);
227
+				this._cleanStyle(this.previousNavbar);
228
+				this._cleanStyle(this.activeNavbar);
229
+			}
230
+
231
+			this._cleanStyle(this.previousPage);
232
+			this._cleanStyle(this.activePage);
233
+
234
+			if (this.ratio <= 0.5) {
235
+				return;
236
+			}
237
+			if (this.isBack) {
238
+				this._removePage(this.activePage, this.activeNavbar);
239
+				this.previousPageClassList.remove(CLASS_PAGE_LEFT);
240
+				this.previousPageClassList.add(CLASS_PAGE_CENTER);
241
+				this.previousNavbar.classList.remove(CLASS_NAVBAR_LEFT);
242
+				this.previousNavbar.classList.add(CLASS_NAVBAR_CENTER);
243
+				if (this.history.length > 0) {
244
+					this._prependPage(this.history.pop());
245
+				}
246
+				this._initNavBar();
247
+				this._trigger('pageBack', this.activePage);
248
+				this._trigger('pageShow', this.previousPage);
249
+			} else {
250
+				this.previousPageClassList.add(CLASS_PAGE_LEFT);
251
+				this.activePageClassList.add(CLASS_PAGE_CENTER);
252
+				this._trigger('pageShow', this.activePage);
253
+			}
254
+
255
+
256
+		},
257
+		_trigger: function(eventType, page) {
258
+			var eventCallbacks = 'on' + eventType.charAt(0).toUpperCase() + eventType.slice(1) + 'Callbacks';
259
+			if (this[eventCallbacks].hasOwnProperty(page.id)) {
260
+				var callbacks = this[eventCallbacks][page.id];
261
+				var event = new CustomEvent(eventType, {
262
+					detail: {
263
+						page: page
264
+					},
265
+					bubbles: true,
266
+					cancelable: true
267
+				});
268
+				for (var len = callbacks.length; len--;) {
269
+					callbacks[len].apply(this, event);
270
+				}
271
+			}
272
+			$.trigger(this.view, eventType, {
273
+				page: page
274
+			});
275
+		},
276
+		_initPageTransform: function() {
277
+			this.previousPage = this.pages.querySelector(SELECTOR_PAGE_LEFT);
278
+			this.activePage = this.pages.querySelector(SELECTOR_PAGE_CENTER);
279
+			if (this.previousPage && this.activePage) {
280
+				this.activePage.appendChild(this.shadow);
281
+				this.previousPageClassList = this.previousPage.classList;
282
+				this.activePageClassList = this.activePage.classList;
283
+
284
+				this.previousPageStyle = this.previousPage.style;
285
+				this.activePageStyle = this.activePage.style;
286
+
287
+				this.previousPageClassList.remove(CLASS_TRANSITIONING);
288
+				this.activePageClassList.remove(CLASS_TRANSITIONING);
289
+
290
+				if (this.options.animateNavbar && this.navbars) {
291
+					this.previousNavbar = this.navbars.querySelector(SELECTOR_NAVBAR_LEFT);
292
+					this.activeNavbar = this.navbars.querySelector(SELECTOR_NAVBAR_CENTER);
293
+					if (this.previousNavbar && this.activeNavbar) {
294
+						this.previousNavElements = this.previousNavbar.querySelectorAll(SELECTOR_LEFT + ',' + SELECTOR_CENTER + ',' + SELECTOR_RIGHT);
295
+						this.activeNavElements = this.activeNavbar.querySelectorAll(SELECTOR_LEFT + ',' + SELECTOR_CENTER + ',' + SELECTOR_RIGHT);
296
+						this.previousNavBackIcon = this.previousNavbar.querySelector(SELECTOR_LEFT + SELECTOR_BTN_NAV + ' ' + SELECTOR_ICON);
297
+						this.activeNavBackIcon = this.activeNavbar.querySelector(SELECTOR_LEFT + SELECTOR_BTN_NAV + ' ' + SELECTOR_ICON);
298
+					}
299
+				}
300
+				this.x = 0;
301
+				this.dragging = true;
302
+				return true;
303
+			}
304
+			return false;
305
+		},
306
+		_initNavBar: function() {
307
+			if (this.options.animateNavbar && this.navbars) {
308
+				var inners = this.navbars.querySelectorAll(SELECTOR_NAVBAR_INNER);
309
+				var inner, left, right, center, leftWidth, rightWidth, centerWidth, noLeft, onRight, currLeft, diff, navbarWidth;
310
+				for (var i = 0, len = inners.length; i < len; i++) {
311
+					inner = inners[i];
312
+					left = inner.querySelector(SELECTOR_LEFT);
313
+					right = inner.querySelector(SELECTOR_RIGHT);
314
+					center = inner.querySelector(SELECTOR_CENTER);
315
+					noLeft = !left;
316
+					noRight = !right;
317
+					leftWidth = noLeft ? 0 : left.offsetWidth;
318
+					rightWidth = noRight ? 0 : right.offsetWidth;
319
+					centerWidth = center ? center.offsetWidth : 0;
320
+					navbarWidth = this.maxScrollX;
321
+					onLeft = inner.classList.contains('navbar-left');
322
+					if (noRight) {
323
+						currLeft = navbarWidth - centerWidth;
324
+					}
325
+					if (noLeft) {
326
+						currLeft = 0;
327
+					}
328
+					if (!noLeft && !noRight) {
329
+						currLeft = (navbarWidth - rightWidth - centerWidth + leftWidth) / 2;
330
+					}
331
+					var requiredLeft = (navbarWidth - centerWidth) / 2;
332
+					if (navbarWidth - leftWidth - rightWidth > centerWidth) {
333
+						if (requiredLeft < leftWidth) {
334
+							requiredLeft = leftWidth;
335
+						}
336
+						if (requiredLeft + centerWidth > navbarWidth - rightWidth) {
337
+							requiredLeft = navbarWidth - rightWidth - centerWidth;
338
+						}
339
+						diff = requiredLeft - currLeft;
340
+					} else {
341
+						diff = 0;
342
+					}
343
+
344
+					var centerLeft = diff;
345
+					if (center) {
346
+						center.style.marginLeft = -leftWidth + 'px';
347
+						center.mNavbarLeftOffset = -(currLeft + diff) + 30; //这个30是测出来的。后续要实际计算一下
348
+						center.mNavbarRightOffset = navbarWidth - currLeft - diff - centerWidth;
349
+					}
350
+
351
+					if (onLeft) center.style.webkitTransform = ('translate3d(' + center.mNavbarLeftOffset + 'px, 0, 0)');
352
+
353
+					if (!noLeft) {
354
+						left.mNavbarLeftOffset = -leftWidth;
355
+						left.mNavbarRightOffset = (navbarWidth - leftWidth) / 2;
356
+						if (onLeft) left.style.webkitTransform = ('translate3d(' + left[0].mNavbarLeftOffset + 'px, 0, 0)');
357
+					}
358
+
359
+					if (!noRight) {
360
+						right.mNavbarLeftOffset = -(navbarWidth - rightWidth) / 2;
361
+						right.mNavbarRightOffset = rightWidth;
362
+						if (onLeft) right.style.webkitTransform = ('translate3d(' + right[0].mNavbarLeftOffset + 'px, 0, 0)');
363
+					}
364
+
365
+				}
366
+			}
367
+		},
368
+		_drag: function(event) {
369
+			if (this.isInTransition) {
370
+				return;
371
+			}
372
+			var detail = event.detail;
373
+			if (!this.dragging) {
374
+				if ((detail.start.x - this.view.offsetLeft) < this.options.swipeBackPageActiveArea) {
375
+					this.isBack = true;
376
+					this._initPageTransform();
377
+				}
378
+			}
379
+			if (this.dragging) {
380
+				var deltaX = 0;
381
+				if (!this.moved) { //start
382
+					deltaX = detail.deltaX;
383
+					$.gestures.touch.lockDirection = true; //锁定方向
384
+					$.gestures.touch.startDirection = detail.direction;
385
+				} else { //move
386
+					deltaX = detail.deltaX - detail.lastDeltaX;
387
+				}
388
+				var newX = this.x + deltaX;
389
+				if (newX < 0 || newX > this.maxScrollX) {
390
+					newX = newX < 0 ? 0 : this.maxScrollX;
391
+				}
392
+
393
+				event.stopPropagation();
394
+				detail.gesture.preventDefault();
395
+
396
+				if (!this.requestAnimationFrame) {
397
+					this._updateTranslate();
398
+				}
399
+
400
+				this.moved = true;
401
+				this.x = newX;
402
+				this.y = 0;
403
+			}
404
+		},
405
+		_dragend: function(event) {
406
+			if (!this.moved) {
407
+				return;
408
+			}
409
+
410
+			event.stopPropagation();
411
+
412
+			var detail = event.detail;
413
+
414
+			this._clearRequestAnimationFrame();
415
+
416
+			this._prepareTransition();
417
+
418
+			this.ratio = this.x / this.maxScrollX;
419
+			if (this.ratio === 1 || this.ratio === 0) {
420
+				$.trigger(this.activePage, 'webkitTransitionEnd');
421
+				return;
422
+			}
423
+			if (this.ratio > 0.5) {
424
+				this.setTranslate(this.maxScrollX, 0);
425
+			} else {
426
+				this._cleanStyle(this.previousPage);
427
+				this._cleanStyle(this.activePage);
428
+			}
429
+		},
430
+		_prepareTransition: function() {
431
+			this.isInTransition = true;
432
+			this.previousPageClassList.add(CLASS_TRANSITIONING);
433
+			this.activePageClassList.add(CLASS_TRANSITIONING);
434
+			var self = this;
435
+			if (this.options.animateNavbar && this.previousNavElements && this.activeNavElements) {
436
+				this.previousNavbar.classList.add(CLASS_TRANSITIONING);
437
+				this.activeNavbar.classList.add(CLASS_TRANSITIONING);
438
+				$.each(this.previousNavElements, function(i, el) {
439
+					el.classList.add(CLASS_TRANSITIONING);
440
+					self._cleanStyle(el);
441
+				});
442
+				$.each(this.activeNavElements, function(i, el) {
443
+					el.classList.add(CLASS_TRANSITIONING);
444
+					self._cleanStyle(el);
445
+				});
446
+				if (this.previousNavBackIcon) {
447
+					this._cleanStyle(this.previousNavBackIcon);
448
+					this.previousNavBackIcon.classList.add(CLASS_TRANSITIONING);
449
+				}
450
+				if (this.activeNavBackIcon) {
451
+					this._cleanStyle(this.activeNavBackIcon);
452
+					this.activeNavBackIcon.classList.add(CLASS_TRANSITIONING);
453
+				}
454
+			}
455
+		},
456
+		_clearRequestAnimationFrame: function() {
457
+			if (this.requestAnimationFrame) {
458
+				cancelAnimationFrame(this.requestAnimationFrame);
459
+				this.requestAnimationFrame = null;
460
+			}
461
+		},
462
+		_getTranslateStr: function(x, y) {
463
+			if (this.options.hardwareAccelerated) {
464
+				return 'translate3d(' + x + 'px,' + y + 'px,0px) ' + this.translateZ;
465
+			}
466
+			return 'translate(' + x + 'px,' + y + 'px) ';
467
+		},
468
+
469
+		_updateTranslate: function() {
470
+			var self = this;
471
+			if (self.x !== self.lastX || self.y !== self.lastY) {
472
+				self.setTranslate(self.x, self.y);
473
+			}
474
+			self.requestAnimationFrame = requestAnimationFrame(function() {
475
+				self._updateTranslate();
476
+			});
477
+		},
478
+		_setNavbarTranslate: function(x, y) {
479
+			var percentage = x / this.maxScrollX;
480
+			//only for ios
481
+			if ($.os.ios && this.options.animateNavbar && this.previousNavElements && this.activeNavElements) {
482
+				var i, len, style, el;
483
+				for (i = 0, len = this.activeNavElements.length; i < len; i++) {
484
+					el = this.activeNavElements[i];
485
+					style = el.style;
486
+					style.opacity = (1 - percentage * (el.classList.contains(CLASS_LEFT) ? 3.5 : 1.3));
487
+					if (!el.classList.contains(CLASS_RIGHT)) {
488
+						var activeNavTranslate = percentage * el.mNavbarRightOffset;
489
+						el.style.webkitTransform = ('translate3d(' + activeNavTranslate + 'px,0,0)');
490
+						if (el.classList.contains(CLASS_LEFT) && this.activeNavBackIcon) {
491
+							this.activeNavBackIcon.style.webkitTransform = ('translate3d(' + -activeNavTranslate + 'px,0,0)');
492
+						}
493
+					}
494
+				}
495
+				for (i = 0, len = this.previousNavElements.length; i < len; i++) {
496
+					el = this.previousNavElements[i];
497
+					style = el.style;
498
+					style.opacity = percentage * 1.3 - 0.3;
499
+					if (!el.classList.contains(CLASS_RIGHT)) {
500
+						var previousNavTranslate = el.mNavbarLeftOffset * (1 - percentage);
501
+						el.style.webkitTransform = ('translate3d(' + previousNavTranslate + 'px,0,0)');
502
+						if (el.classList.contains(CLASS_LEFT) && this.previousNavBackIcon) {
503
+							this.previousNavBackIcon.style.webkitTransform = ('translate3d(' + -previousNavTranslate + 'px,0,0)');
504
+						}
505
+					}
506
+				}
507
+			} else {
508
+				this.activeNavbar.style.opacity = 1 - percentage * 1.3;
509
+				this.previousNavbar.style.opacity = percentage * 1.3 - 0.3;
510
+			}
511
+		},
512
+		setTranslate: function(x, y) {
513
+			this.x = x;
514
+			this.y = y;
515
+			this.previousPage.style.opacity = 0.9 + 0.1 * x / this.maxScrollX;
516
+			if ($.os.ios) { //only for ios
517
+				this.previousPage.style['webkitTransform'] = this._getTranslateStr((x / 5 - this.maxScrollX / 5), y);
518
+			}
519
+			this.activePage.style['webkitTransform'] = this._getTranslateStr(x, y);
520
+
521
+			if (this.options.animateNavbar) {
522
+				this._setNavbarTranslate(x, y);
523
+			}
524
+			this.lastX = this.x;
525
+			this.lastY = this.y;
526
+		},
527
+		canBack: function() {
528
+			return this.pages.querySelector(SELECTOR_PAGE_LEFT);
529
+		},
530
+		back: function() {
531
+			if (this.isInTransition) {
532
+				return;
533
+			}
534
+			this.isBack = true;
535
+			this.ratio = 1;
536
+			if (this._initPageTransform()) {
537
+				this._trigger('pageBeforeBack', this.activePage);
538
+				this._trigger('pageBeforeShow', this.previousPage);
539
+				this._prepareTransition();
540
+				this.previousPage.offsetHeight;
541
+				this.activePage.offsetHeight;
542
+				this.setTranslate(this.maxScrollX, 0);
543
+			}
544
+		},
545
+		go: function(pageSelector) {
546
+			if (this.isInTransition) {
547
+				return;
548
+			}
549
+			var nextPage = document.querySelector(pageSelector);
550
+
551
+			if (nextPage) {
552
+				var nextNavbar = nextPage.querySelector(SELECTOR_NAVBAR_INNER);
553
+
554
+				var previousNavbar = this.navbars.querySelector(SELECTOR_NAVBAR_LEFT);
555
+				var activeNavbar = this.navbars.querySelector(SELECTOR_NAVBAR_CENTER);
556
+				var previousPage = this.pages.querySelector(SELECTOR_PAGE_LEFT);
557
+				var activePage = this.pages.querySelector(SELECTOR_PAGE_CENTER);
558
+
559
+				if (previousNavbar && previousPage) {
560
+					this._removePage(previousPage, previousNavbar);
561
+					this.history.push(previousPage); //add to history
562
+				}
563
+				if (activeNavbar) {
564
+					activeNavbar.classList.remove(CLASS_NAVBAR_CENTER);
565
+					activeNavbar.classList.add(CLASS_NAVBAR_LEFT);
566
+				}
567
+
568
+				if (activePage) {
569
+					activePage.classList.remove(CLASS_PAGE_CENTER);
570
+					activePage.style.webkitTransform = 'translate3d(0,0,0)';
571
+					activePage.classList.add(CLASS_PAGE_LEFT);
572
+				}
573
+
574
+				nextPage.style.webkitTransform = 'translate3d(100%,0,0)';
575
+				this._appendPage(nextPage);
576
+				nextPage.appendChild(this.shadow); //shadow
577
+				nextPage.offsetHeight; //force
578
+				this.isBack = false;
579
+				this.ratio = 1;
580
+
581
+				this._initPageTransform();
582
+				this._initNavBar();
583
+
584
+				this._setNavbarTranslate(this.maxScrollX, 0);
585
+				//force
586
+				this.previousPage.offsetHeight;
587
+				this.activePage.offsetHeight;
588
+				this.previousNavbar.offsetHeight;
589
+				this.activeNavbar.offsetHeight;
590
+
591
+				this._trigger('pageBeforeShow', this.activePage);
592
+				this._prepareTransition();
593
+				this.setTranslate(0, 0);
594
+			}
595
+		}
596
+
597
+	});
598
+
599
+
600
+	$.fn.view = function(options) {
601
+		var self = this[0];
602
+		var viewApi = null;
603
+		var id = self.getAttribute('data-view');
604
+		if (!id) {
605
+			id = ++$.uuid;
606
+			$.data[id] = viewApi = new View(self, options);
607
+		} else {
608
+			viewApi = $.data[id];
609
+		}
610
+		return viewApi;
611
+
612
+	}
613
+})(mui, window);

File diff suppressed because it is too large
+ 2189 - 0
WebAPP/libs/easymob-webim-sdk/easemob.im-1.0.5.js


File diff suppressed because it is too large
+ 10308 - 0
WebAPP/libs/easymob-webim-sdk/jquery-1.11.1.js


+ 489 - 0
WebAPP/libs/easymob-webim-sdk/json2.js

@@ -0,0 +1,489 @@
1
+/*
2
+    json2.js
3
+    2014-02-04
4
+
5
+    Public Domain.
6
+
7
+    NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
8
+
9
+    See http://www.JSON.org/js.html
10
+
11
+
12
+    This code should be minified before deployment.
13
+    See http://javascript.crockford.com/jsmin.html
14
+
15
+    USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
16
+    NOT CONTROL.
17
+
18
+
19
+    This file creates a global JSON object containing two methods: stringify
20
+    and parse.
21
+
22
+        JSON.stringify(value, replacer, space)
23
+            value       any JavaScript value, usually an object or array.
24
+
25
+            replacer    an optional parameter that determines how object
26
+                        values are stringified for objects. It can be a
27
+                        function or an array of strings.
28
+
29
+            space       an optional parameter that specifies the indentation
30
+                        of nested structures. If it is omitted, the text will
31
+                        be packed without extra whitespace. If it is a number,
32
+                        it will specify the number of spaces to indent at each
33
+                        level. If it is a string (such as '\t' or '&nbsp;'),
34
+                        it contains the characters used to indent at each level.
35
+
36
+            This method produces a JSON text from a JavaScript value.
37
+
38
+            When an object value is found, if the object contains a toJSON
39
+            method, its toJSON method will be called and the result will be
40
+            stringified. A toJSON method does not serialize: it returns the
41
+            value represented by the name/value pair that should be serialized,
42
+            or undefined if nothing should be serialized. The toJSON method
43
+            will be passed the key associated with the value, and this will be
44
+            bound to the value
45
+
46
+            For example, this would serialize Dates as ISO strings.
47
+
48
+                Date.prototype.toJSON = function (key) {
49
+                    function f(n) {
50
+                        // Format integers to have at least two digits.
51
+                        return n < 10 ? '0' + n : n;
52
+                    }
53
+
54
+                    return this.getUTCFullYear()   + '-' +
55
+                         f(this.getUTCMonth() + 1) + '-' +
56
+                         f(this.getUTCDate())      + 'T' +
57
+                         f(this.getUTCHours())     + ':' +
58
+                         f(this.getUTCMinutes())   + ':' +
59
+                         f(this.getUTCSeconds())   + 'Z';
60
+                };
61
+
62
+            You can provide an optional replacer method. It will be passed the
63
+            key and value of each member, with this bound to the containing
64
+            object. The value that is returned from your method will be
65
+            serialized. If your method returns undefined, then the member will
66
+            be excluded from the serialization.
67
+
68
+            If the replacer parameter is an array of strings, then it will be
69
+            used to select the members to be serialized. It filters the results
70
+            such that only members with keys listed in the replacer array are
71
+            stringified.
72
+
73
+            Values that do not have JSON representations, such as undefined or
74
+            functions, will not be serialized. Such values in objects will be
75
+            dropped; in arrays they will be replaced with null. You can use
76
+            a replacer function to replace those with JSON values.
77
+            JSON.stringify(undefined) returns undefined.
78
+
79
+            The optional space parameter produces a stringification of the
80
+            value that is filled with line breaks and indentation to make it
81
+            easier to read.
82
+
83
+            If the space parameter is a non-empty string, then that string will
84
+            be used for indentation. If the space parameter is a number, then
85
+            the indentation will be that many spaces.
86
+
87
+            Example:
88
+
89
+            text = JSON.stringify(['e', {pluribus: 'unum'}]);
90
+            // text is '["e",{"pluribus":"unum"}]'
91
+
92
+
93
+            text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
94
+            // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
95
+
96
+            text = JSON.stringify([new Date()], function (key, value) {
97
+                return this[key] instanceof Date ?
98
+                    'Date(' + this[key] + ')' : value;
99
+            });
100
+            // text is '["Date(---current time---)"]'
101
+
102
+
103
+        JSON.parse(text, reviver)
104
+            This method parses a JSON text to produce an object or array.
105
+            It can throw a SyntaxError exception.
106
+
107
+            The optional reviver parameter is a function that can filter and
108
+            transform the results. It receives each of the keys and values,
109
+            and its return value is used instead of the original value.
110
+            If it returns what it received, then the structure is not modified.
111
+            If it returns undefined then the member is deleted.
112
+
113
+            Example:
114
+
115
+            // Parse the text. Values that look like ISO date strings will
116
+            // be converted to Date objects.
117
+
118
+            myData = JSON.parse(text, function (key, value) {
119
+                var a;
120
+                if (typeof value === 'string') {
121
+                    a =
122
+/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
123
+                    if (a) {
124
+                        return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
125
+                            +a[5], +a[6]));
126
+                    }
127
+                }
128
+                return value;
129
+            });
130
+
131
+            myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
132
+                var d;
133
+                if (typeof value === 'string' &&
134
+                        value.slice(0, 5) === 'Date(' &&
135
+                        value.slice(-1) === ')') {
136
+                    d = new Date(value.slice(5, -1));
137
+                    if (d) {
138
+                        return d;
139
+                    }
140
+                }
141
+                return value;
142
+            });
143
+
144
+
145
+    This is a reference implementation. You are free to copy, modify, or
146
+    redistribute.
147
+*/
148
+
149
+/*jslint evil: true, regexp: true */
150
+
151
+/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
152
+    call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
153
+    getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
154
+    lastIndex, length, parse, prototype, push, replace, slice, stringify,
155
+    test, toJSON, toString, valueOf
156
+*/
157
+
158
+
159
+// Create a JSON object only if one does not already exist. We create the
160
+// methods in a closure to avoid creating global variables.
161
+
162
+if (typeof JSON !== 'object') {
163
+    JSON = {};
164
+}
165
+
166
+(function () {
167
+    'use strict';
168
+
169
+    function f(n) {
170
+        // Format integers to have at least two digits.
171
+        return n < 10 ? '0' + n : n;
172
+    }
173
+
174
+    if (typeof Date.prototype.toJSON !== 'function') {
175
+
176
+        Date.prototype.toJSON = function () {
177
+
178
+            return isFinite(this.valueOf())
179
+                ? this.getUTCFullYear()     + '-' +
180
+                    f(this.getUTCMonth() + 1) + '-' +
181
+                    f(this.getUTCDate())      + 'T' +
182
+                    f(this.getUTCHours())     + ':' +
183
+                    f(this.getUTCMinutes())   + ':' +
184
+                    f(this.getUTCSeconds())   + 'Z'
185
+                : null;
186
+        };
187
+
188
+        String.prototype.toJSON      =
189
+            Number.prototype.toJSON  =
190
+            Boolean.prototype.toJSON = function () {
191
+                return this.valueOf();
192
+            };
193
+    }
194
+
195
+    var cx,
196
+        escapable,
197
+        gap,
198
+        indent,
199
+        meta,
200
+        rep;
201
+
202
+
203
+    function quote(string) {
204
+
205
+// If the string contains no control characters, no quote characters, and no
206
+// backslash characters, then we can safely slap some quotes around it.
207
+// Otherwise we must also replace the offending characters with safe escape
208
+// sequences.
209
+
210
+        escapable.lastIndex = 0;
211
+        return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
212
+            var c = meta[a];
213
+            return typeof c === 'string'
214
+                ? c
215
+                : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
216
+        }) + '"' : '"' + string + '"';
217
+    }
218
+
219
+
220
+    function str(key, holder) {
221
+
222
+// Produce a string from holder[key].
223
+
224
+        var i,          // The loop counter.
225
+            k,          // The member key.
226
+            v,          // The member value.
227
+            length,
228
+            mind = gap,
229
+            partial,
230
+            value = holder[key];
231
+
232
+// If the value has a toJSON method, call it to obtain a replacement value.
233
+
234
+        if (value && typeof value === 'object' &&
235
+                typeof value.toJSON === 'function') {
236
+            value = value.toJSON(key);
237
+        }
238
+
239
+// If we were called with a replacer function, then call the replacer to
240
+// obtain a replacement value.
241
+
242
+        if (typeof rep === 'function') {
243
+            value = rep.call(holder, key, value);
244
+        }
245
+
246
+// What happens next depends on the value's type.
247
+
248
+        switch (typeof value) {
249
+        case 'string':
250
+            return quote(value);
251
+
252
+        case 'number':
253
+
254
+// JSON numbers must be finite. Encode non-finite numbers as null.
255
+
256
+            return isFinite(value) ? String(value) : 'null';
257
+
258
+        case 'boolean':
259
+        case 'null':
260
+
261
+// If the value is a boolean or null, convert it to a string. Note:
262
+// typeof null does not produce 'null'. The case is included here in
263
+// the remote chance that this gets fixed someday.
264
+
265
+            return String(value);
266
+
267
+// If the type is 'object', we might be dealing with an object or an array or
268
+// null.
269
+
270
+        case 'object':
271
+
272
+// Due to a specification blunder in ECMAScript, typeof null is 'object',
273
+// so watch out for that case.
274
+
275
+            if (!value) {
276
+                return 'null';
277
+            }
278
+
279
+// Make an array to hold the partial results of stringifying this object value.
280
+
281
+            gap += indent;
282
+            partial = [];
283
+
284
+// Is the value an array?
285
+
286
+            if (Object.prototype.toString.apply(value) === '[object Array]') {
287
+
288
+// The value is an array. Stringify every element. Use null as a placeholder
289
+// for non-JSON values.
290
+
291
+                length = value.length;
292
+                for (i = 0; i < length; i += 1) {
293
+                    partial[i] = str(i, value) || 'null';
294
+                }
295
+
296
+// Join all of the elements together, separated with commas, and wrap them in
297
+// brackets.
298
+
299
+                v = partial.length === 0
300
+                    ? '[]'
301
+                    : gap
302
+                    ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']'
303
+                    : '[' + partial.join(',') + ']';
304
+                gap = mind;
305
+                return v;
306
+            }
307
+
308
+// If the replacer is an array, use it to select the members to be stringified.
309
+
310
+            if (rep && typeof rep === 'object') {
311
+                length = rep.length;
312
+                for (i = 0; i < length; i += 1) {
313
+                    if (typeof rep[i] === 'string') {
314
+                        k = rep[i];
315
+                        v = str(k, value);
316
+                        if (v) {
317
+                            partial.push(quote(k) + (gap ? ': ' : ':') + v);
318
+                        }
319
+                    }
320
+                }
321
+            } else {
322
+
323
+// Otherwise, iterate through all of the keys in the object.
324
+
325
+                for (k in value) {
326
+                    if (Object.prototype.hasOwnProperty.call(value, k)) {
327
+                        v = str(k, value);
328
+                        if (v) {
329
+                            partial.push(quote(k) + (gap ? ': ' : ':') + v);
330
+                        }
331
+                    }
332
+                }
333
+            }
334
+
335
+// Join all of the member texts together, separated with commas,
336
+// and wrap them in braces.
337
+
338
+            v = partial.length === 0
339
+                ? '{}'
340
+                : gap
341
+                ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}'
342
+                : '{' + partial.join(',') + '}';
343
+            gap = mind;
344
+            return v;
345
+        }
346
+    }
347
+
348
+// If the JSON object does not yet have a stringify method, give it one.
349
+
350
+    if (typeof JSON.stringify !== 'function') {
351
+        escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
352
+        meta = {    // table of character substitutions
353
+            '\b': '\\b',
354
+            '\t': '\\t',
355
+            '\n': '\\n',
356
+            '\f': '\\f',
357
+            '\r': '\\r',
358
+            '"' : '\\"',
359
+            '\\': '\\\\'
360
+        };
361
+        JSON.stringify = function (value, replacer, space) {
362
+
363
+// The stringify method takes a value and an optional replacer, and an optional
364
+// space parameter, and returns a JSON text. The replacer can be a function
365
+// that can replace values, or an array of strings that will select the keys.
366
+// A default replacer method can be provided. Use of the space parameter can
367
+// produce text that is more easily readable.
368
+
369
+            var i;
370
+            gap = '';
371
+            indent = '';
372
+
373
+// If the space parameter is a number, make an indent string containing that
374
+// many spaces.
375
+
376
+            if (typeof space === 'number') {
377
+                for (i = 0; i < space; i += 1) {
378
+                    indent += ' ';
379
+                }
380
+
381
+// If the space parameter is a string, it will be used as the indent string.
382
+
383
+            } else if (typeof space === 'string') {
384
+                indent = space;
385
+            }
386
+
387
+// If there is a replacer, it must be a function or an array.
388
+// Otherwise, throw an error.
389
+
390
+            rep = replacer;
391
+            if (replacer && typeof replacer !== 'function' &&
392
+                    (typeof replacer !== 'object' ||
393
+                    typeof replacer.length !== 'number')) {
394
+                throw new Error('JSON.stringify');
395
+            }
396
+
397
+// Make a fake root object containing our value under the key of ''.
398
+// Return the result of stringifying the value.
399
+
400
+            return str('', {'': value});
401
+        };
402
+    }
403
+
404
+
405
+// If the JSON object does not yet have a parse method, give it one.
406
+
407
+    if (typeof JSON.parse !== 'function') {
408
+        cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
409
+        JSON.parse = function (text, reviver) {
410
+
411
+// The parse method takes a text and an optional reviver function, and returns
412
+// a JavaScript value if the text is a valid JSON text.
413
+
414
+            var j;
415
+
416
+            function walk(holder, key) {
417
+
418
+// The walk method is used to recursively walk the resulting structure so
419
+// that modifications can be made.
420
+
421
+                var k, v, value = holder[key];
422
+                if (value && typeof value === 'object') {
423
+                    for (k in value) {
424
+                        if (Object.prototype.hasOwnProperty.call(value, k)) {
425
+                            v = walk(value, k);
426
+                            if (v !== undefined) {
427
+                                value[k] = v;
428
+                            } else {
429
+                                delete value[k];
430
+                            }
431
+                        }
432
+                    }
433
+                }
434
+                return reviver.call(holder, key, value);
435
+            }
436
+
437
+
438
+// Parsing happens in four stages. In the first stage, we replace certain
439
+// Unicode characters with escape sequences. JavaScript handles many characters
440
+// incorrectly, either silently deleting them, or treating them as line endings.
441
+
442
+            text = String(text);
443
+            cx.lastIndex = 0;
444
+            if (cx.test(text)) {
445
+                text = text.replace(cx, function (a) {
446
+                    return '\\u' +
447
+                        ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
448
+                });
449
+            }
450
+
451
+// In the second stage, we run the text against regular expressions that look
452
+// for non-JSON patterns. We are especially concerned with '()' and 'new'
453
+// because they can cause invocation, and '=' because it can cause mutation.
454
+// But just to be safe, we want to reject all unexpected forms.
455
+
456
+// We split the second stage into 4 regexp operations in order to work around
457
+// crippling inefficiencies in IE's and Safari's regexp engines. First we
458
+// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
459
+// replace all simple value tokens with ']' characters. Third, we delete all
460
+// open brackets that follow a colon or comma or that begin the text. Finally,
461
+// we look to see that the remaining characters are only whitespace or ']' or
462
+// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
463
+
464
+            if (/^[\],:{}\s]*$/
465
+                    .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
466
+                        .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
467
+                        .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
468
+
469
+// In the third stage we use the eval function to compile the text into a
470
+// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
471
+// in JavaScript: it can begin a block or an object literal. We wrap the text
472
+// in parens to eliminate the ambiguity.
473
+
474
+                j = eval('(' + text + ')');
475
+
476
+// In the optional fourth stage, we recursively walk the new structure, passing
477
+// each name/value pair to a reviver function for possible transformation.
478
+
479
+                return typeof reviver === 'function'
480
+                    ? walk({'': j}, '')
481
+                    : j;
482
+            }
483
+
484
+// If the text is not JSON parseable, then a SyntaxError is thrown.
485
+
486
+            throw new SyntaxError('JSON.parse');
487
+        };
488
+    }
489
+}());

+ 781 - 0
WebAPP/libs/easymob-webim-sdk/quickstart.md

@@ -0,0 +1,781 @@
1
+---
2
+title: WebIM 开发指南
3
+sidebar: webimsidebar
4
+secondnavwebim: true
5
+---
6
+
7
+# 快速入门  
8
+
9
+## 初始化
10
+
11
+### 创建连接{#conn_new}
12
+<pre class="hll"><code class="language-javascript">
13
+var conn = new Easemob.im.Connection();
14
+</code></pre>
15
+
16
+### 初始化连接{#conn_init}
17
+<pre class="hll"><code class="language-javascript">
18
+conn.init({
19
+    https : true,//非必填,url值未设置时有效,优先采用url配置的参数。默认采用http连接,地址为‘http://im-api.easemob.com/http-bind/’,启用https时传递此值,地址为:‘https://im-api.easemob.com/http-bind/’
20
+    url : 'http://im-api.easemob.com/http-bind/',//非必填,默认聊天服务器地址,
21
+    domain : 'aa.com',//非必填,默认:‘easemob.com’
22
+    wait : '60',//非必填,连接超时,默认:60,单位seconds
23
+    onOpened : function() {
24
+        curUserId = conn.context.userId;
25
+        //查询好友列表
26
+        conn.getRoster(....);
27
+    },
28
+    onClosed : function() {
29
+        //处理登出事件
30
+    },
31
+    onTextMessage : function(message) {
32
+        /**处理文本消息,消息格式为:
33
+            {	type :'chat',//群聊为“groupchat”
34
+                from : from,
35
+                to : too,
36
+                data : { "type":"txt",
37
+                    "msg":"hello from test2"
38
+                }
39
+            }
40
+        */
41
+        handleTextMessage(message);
42
+    },
43
+    onEmotionMessage : function(message) {
44
+        /*处理表情消息,消息格式为:
45
+            {	type :'chat',//群聊为“groupchat”
46
+                from : from,
47
+                to : too,
48
+                data : [{ "type":"txt",
49
+                    "msg":"hello from test2"
50
+                },
51
+                { "type":"emotion",
52
+                  "msg":"data:image/png;base64, ……"//图片的base64编码
53
+                }]
54
+            }
55
+        */
56
+        handleEmotion(message);
57
+    },
58
+    onPictureMessage : function(message) {
59
+        /**处理图片消息,消息格式为:
60
+            {	type :'chat',//群聊为“groupchat”
61
+                from : "test1",
62
+                to : "test2",
63
+                url : "http://s1.easemob.com/weiquan2/a2/chatfiles/0c0f5f3a-e66b-11e3-8863-f1c202c2b3ae",
64
+                secret : "NSgGYPCxEeOou00jZasg9e-GqKUZGdph96EFxJ4WxW-qkxV4",
65
+                filename : "logo.png",
66
+                thumb : "http://s1.easemob.com/weiquan2/a2/chatfiles/0c0f5f3a-e66b-11e3-8863-f1c202c2b3ae",
67
+                thumb_secret : "0595b06a-ed8b-11e3-9b85-93fade9c198c",
68
+                file_length : 42394,
69
+                width : 280,
70
+                height : 160,
71
+                filetype : "image/png",
72
+                accessToken :"YWMtjPPoovCqEeOQs7myPqqaOwAAAUaqNH0a8rRj4PwJLQju6-S47ZO6wYs3Lwo"
73
+            }
74
+        */
75
+
76
+        handlePictureMessage(message);
77
+    },
78
+    onAudioMessage : function(message) {
79
+        /**处理音频消息,消息格式为:
80
+           {	type :'chat',//群聊为“groupchat”
81
+                from : "test1",
82
+                to : "test2",
83
+                url : "http://s1.easemob.com/weiquan2/a2/chatfiles/0c0f5f3a-e66b-11e3-8863-f1c202c2b3ae",
84
+                secret :"NSgGYPCxEeOou00jZasg9e-GqKUZGdph96EFxJ4WxW-qkxV4",
85
+                filename : "风雨无阻.mp3",
86
+                length :45223,
87
+                file_length : 304,
88
+                filetype : "mp3",
89
+                accessToken :"YWMtjPPoovCqEeOQs7myPqqaOwAAAUaqNH0a8rRj4PwJLQju6-S47ZO6wYs3Lwo"
90
+            }
91
+        */
92
+        handleAudioMessage(message);
93
+    },
94
+    //收到联系人订阅请求的回调方法
95
+    onPresence : function (message){
96
+        /**
97
+            {
98
+                from: "l2",
99
+                fromJid: "easemob-demo#chatdemoui_l2@easemob.com",
100
+                status: "下午11:44:47",
101
+                to: "test1",
102
+                toJid: "easemob-demo#chatdemoui_test1@easemob.com/13856640471403797405809685",
103
+                type: "subscribed"
104
+            }
105
+        */
106
+        handlePresence(message);
107
+    },
108
+    //收到联系人信息的回调方法
109
+    onRoster : function (message){
110
+        /**
111
+            [{
112
+                groups: [{0: "default",
113
+                        length: 1}],
114
+                jid: "easemob-demo#chatdemoui_l2@easemob.com",
115
+                name: "l2",
116
+                subscription: "to"
117
+            }]
118
+        */
119
+        handleRoster(message);
120
+    },
121
+    onError : function(e) {
122
+        //异常处理
123
+        alert(e.msg);
124
+    }
125
+});
126
+</code></pre>
127
+
128
+### 打开连接{#conn_open}
129
+
130
+支持username/password和username/token登录两种方式,sdk中会根据传入的参数进行自动选择是否登录usergrid,获取登录成功的token后再进行登录聊天,如果使用token的打开连接将跳过登录usergird,直接登录IM服务器。
131
+
132
+<pre class="hll"><code class="language-javascript">
133
+//用户名
134
+var user = $("#username").val();
135
+//密码
136
+var pass = $("#password").val();
137
+if (user == '' || pass == '') {
138
+    alert("请输入用户名和密码");
139
+    return;
140
+}
141
+conn.open({
142
+    user : user,
143
+    pwd : pass,
144
+    appKey : 'easemob-demo#chatdemoui'//开发者APPKey
145
+    //accessToken : 'YWMt8bfZfFk5EeSiAzsQ0OXu4QAAAUpoZFOMJ66ic5m2LOZRhYUsRKZWINA06HI'
146
+});
147
+</code></pre>
148
+
149
+## 单聊{#single_chat}
150
+
151
+### 查询好友列表{#getRoster}
152
+
153
+查询好友列表时,要注意susciption(both,to,from)为不同值得处理,此处默认both和to的为好友,开发者自定义处理,保持跟APP端处理一致即可。
154
+
155
+<pre class="hll"><code class="language-javascript">
156
+conn.getRoster({
157
+    success : function(roster) {
158
+        //获取好友列表,并进行好友列表渲染,roster格式为:
159
+        /** [
160
+                {
161
+                    jid:"asemoemo#chatdemoui_test1@easemob.com",
162
+                    name:"test1",
163
+                    subscription: "both"
164
+                },
165
+                {
166
+                    jid:"asemoemo#chatdemoui_test2@easemob.com",
167
+                    name:"test2",
168
+                    subscription: "from"
169
+                }
170
+            ]
171
+        */
172
+        for(var i in roster){
173
+            var ros = roster[i];    
174
+            //ros.subscriptio值为both/to为要显示的联系人,此处与APP需保持一致,才能保证两个客户端登录后的好友列表一致
175
+            if(ros.subscription =='both' || ros.subscription=='to'){
176
+                newroster.push(ros);
177
+            }
178
+        }
179
+        if (newroster.length >=0) {
180
+            buildContactDiv("contractlist", newroster);//页面处理
181
+            if (newroster.length > 0) {
182
+                setCurrentContact(newroster[0].name);//页面处理将第一个联系人作为当前聊天div
183
+            }
184
+        }
185
+        //conn.setPresence();
186
+    },    
187
+});
188
+</code></pre>
189
+
190
+### 添加好友{#subscribe}
191
+通过sdk的subscribe和unsubcribe进行添加或者删除好友操作,登录用户通过注册onPresence,监听对方的添加或者删除好友请求,并做相应的处理。
192
+<pre class="hll"><code class="language-javascript">   
193
+//easemobwebim-sdk中收到联系人订阅请求的处理方法,具体的type值所对应的值请参考xmpp协议规范
194
+var handlePresence = function (e){
195
+	//(发送者希望订阅接收者的出席信息),即别人申请加你为好友
196
+	if (e.type == 'subscribe') {
197
+		//若e.status中含有[resp:true],则表示为对方同意好友后反向添加自己为好友的消息,demo中发现此类消息,默认同意操作,完成双方互为好友;如果不含有[resp:true],则表示为正常的对方请求添加自己为好友的申请消息。
198
+		......
199
+	}
200
+	//(发送者允许接收者接收他们的出席信息),即别人同意你加他为好友
201
+	if (e.type == 'subscribed') {
202
+		......
203
+	}
204
+	//(发送者取消订阅另一个实体的出席信息),即删除现有好友
205
+	if (e.type == 'unsubscribe') {
206
+		.......
207
+	}
208
+	//(订阅者的请求被拒绝或以前的订阅被取消),即对方单向的删除了好友
209
+	if (e.type == 'unsubscribed') {
210
+		.......
211
+	}
212
+};
213
+</code></pre>
214
+
215
+#### 申请添加对方为好友{#addFriend}
216
+<pre class="hll"><code class="language-javascript">   
217
+//主动申请添加对方为好友
218
+var startAddFriend = function startAddFriend(){
219
+    //对方用户账号
220
+    var user = $("addfridentId").val();
221
+    //请求添加对方为好友
222
+    conn.subscribe({
223
+		to : user,
224
+		message : "加个好友呗-" + getLoacalTimeString()
225
+	});
226
+    return;
227
+};
228
+var getLoacalTimeString = function getLoacalTimeString() {
229
+		var date = new Date();
230
+		var time = date.getHours() + ":" + date.getMinutes() + ":"
231
+				+ date.getSeconds();
232
+		return time;
233
+	}
234
+</code></pre>
235
+
236
+#### 对方收到请求,同意或者拒绝{#agreed_reject}
237
+
238
+<pre class="hll"><code class="language-javascript">  
239
+//对方收到请求加为好友,接受请求
240
+$('#confirm-block-footer-confirmButton').click(function() {
241
+	//同意好友请求
242
+	agreeAddFriend(e.from);//e.from用户名
243
+	//反向添加对方好友
244
+	conn.subscribe({
245
+		to : e.from,
246
+		message : "[resp:true]"
247
+	});
248
+}
249
+//同意
250
+var agreeAddFriend = function agreeAddFriend(connection,who,jid){
251
+   conn.subscribed({
252
+			to : user,
253
+			message : "[resp:true]"//同意后发送反加对方为好友的消息,反加消息标识[resp:true]
254
+		});
255
+};
256
+
257
+//对方收到请求加为好友,拒绝请求
258
+$('#confirm-block-footer-cancelButton').click(function() {
259
+	rejectAddFriend(e.from);//拒绝加为好友
260
+});
261
+//拒绝
262
+var rejectAddFriend = function(user) {
263
+	conn.unsubscribed({
264
+		to : user,
265
+		message : getLoacalTimeString()
266
+	});
267
+};
268
+</code></pre>
269
+
270
+对于好友的分组,添加好友时在addroster可以指定group属性(默认为:default组),添加好友成功后,好友列表渲染时,根据好友的group属性进行分组渲染,实现类似其他聊天工具的自定义好友分组管理的功能。
271
+
272
+#### 删除好友{#delfriend}
273
+
274
+取消订阅,同时将对方从自己的好友列表上删除掉。
275
+
276
+<pre class="hll"><code class="language-javascript">
277
+var delFriend = function(user) {
278
+	conn.removeRoster({
279
+		to : user,
280
+		groups : [ 'default' ],
281
+		success : function() {
282
+			conn.**unsubscribed**({
283
+				to : user
284
+			});
285
+		}
286
+	});
287
+};
288
+</code></pre>
289
+
290
+### 发送文本(表情)聊天消息{#sendTextMessage}
291
+
292
+<pre class="hll"><code class="language-javascript">
293
+//发送文本消息
294
+conn.sendTextMessage({
295
+    to : to,//用户登录名,sd根据appkey和domain组织jid,如easemob-demo#chatdemoui_**TEST**@easemob.com,中"to:TEST",下同
296
+    msg :'hello world!' //文本消息
297
+});
298
+
299
+//发送表情消息,调用接口同文本消息
300
+conn.sendTextMessage({
301
+    to : to,
302
+    msg :'hello world![(*)][(#)]' //文本消息+表情
303
+});
304
+</code></pre>
305
+
306
+### 发送图片消息{#sendPic}
307
+
308
+发送图片消息sdk自动分两步完成:<br>
309
+1)上传图片文件到服务器,并得到服务返回的图片信息等<br>
310
+2)发送图片消息,消息体包含图片的基本信息、服务器路径、secret等,接收方初始化连接中的onPictureMessage的格式,根据图片消息内容到服务器下载图片,并进行显示
311
+
312
+<pre class="hll"><code class="language-javascript">
313
+function sendPic() {
314
+    //图片接收者,如“test1”
315
+    var to = curChatUserId;
316
+    if (to == null) {
317
+        alert("请选择联系人");
318
+        return;
319
+    }
320
+    //fileInputId:文件选择输入框的Id,sdk自动根据id自动获取文件对象(含图片,或者其他类型文件)
321
+    var fileObj = Easemob.im.Helper.getFileUrl(fileInputId);
322
+    if (fileObj.url == null || fileObj.url == '') {
323
+        alert("请选择发送图片");
324
+        return;
325
+    }
326
+    var filetype = fileObj.filetype;
327
+    var filename = fileObj.filename;
328
+    if (filetype in  {
329
+                    "jpg" : true,
330
+                    "gif" : true,
331
+                    "png" : true,
332
+                    "bmp" : true
333
+                    }) {
334
+        var opt = {
335
+            fileInputId : fileInputId,
336
+            to : to,
337
+            onFileUploadError : function(error) {
338
+                //处理图片上传失败
339
+            },
340
+            onFileUploadComplete : function(data) {
341
+                //处理图片上传成功,如本地消息显示
342
+            }
343
+        };
344
+        conn.sendPicture(opt);
345
+        return;
346
+    }
347
+    alert("不支持此图片类型" + filetype);
348
+};
349
+</code></pre>
350
+
351
+### 发送音频消息{#sendAudio}
352
+
353
+sdk处理同发送图片消息,分两步:
354
+
355
+1. 上传音频文件到服务器,得到音频文件的信息;
356
+2. 发送音频消息给接收方,消息体包含音频的基本信息、下载路径和secret信息等,接收方收到消息后,根据消息体内部的音频下载路径和secret路径,下载音频并进行显示。
357
+
358
+<pre class="hll"><code class="language-javascript">
359
+function sendAudio () {
360
+    var to = curChatUserId;
361
+    if (to == null) {
362
+        alert("请选择联系人");
363
+        return;
364
+    }
365
+    var fileObj = Easemob.im.Helper.getFileUrl(fileInputId);
366
+    if (fileObj.url == null || fileObj.url == '') {
367
+        alert("请选择发送音频");
368
+        return;
369
+    }
370
+    var filetype = fileObj.filetype;
371
+    var filename = fileObj.filename;
372
+    if (filetype in {
373
+                "mp3" : true,
374
+                "wma" : true,
375
+                "wav" : true,
376
+                "avi" : true
377
+                })
378
+    {
379
+        var opt = {
380
+            fileInputId : fileInputId,
381
+            to : to,
382
+            onFileUploadError : function(error) {
383
+                //处理上传音频失败
384
+            },
385
+            onFileUploadComplete : function(data) {
386
+                //处理上传音频成功,如本地消息提示发送成功
387
+            }
388
+        };
389
+        conn.sendAudio(opt);
390
+        return;
391
+    }
392
+    alert("不支持此音频类型" + filetype);
393
+};
394
+</code></pre>
395
+
396
+### 接收消息
397
+
398
+#### 注册接收消息 {#onmessage}
399
+
400
+<pre class="hll"><code class="language-javascript">
401
+conn.init({
402
+	onTextMessage : function(message) {        },//收到文本消息处理动作
403
+    onEmotionMessage : function(message) {        },//收到表情消息处理动作
404
+    onPictureMessage : function(message) {         },//收到图片消息处理动作
405
+    onAudioMessage : function(message) {        }, //收到语音消息处理动作
406
+	...
407
+});
408
+</code></pre>
409
+
410
+#### 处理消息{#options}
411
+
412
+conn.init()中注册不同消息接收handler之后,可自行解析消息体,定位聊天好友,并追加到与其聊天窗口。具体参考webim.easemob.com效果,消息体格式参见前章节:初始化连接。<br>
413
+注:对于图片、语音消息需要先进行下载,然后进行显示或者播放处理。如下(下载图片,音频同):
414
+<pre class="hll"><code class="language-javascript">
415
+var handlePictureMessage = function(message) {
416
+var filename = message.filename;//文件名称,带文件扩展名
417
+var from = message.from;//文件的发送者
418
+var mestype = message.type;//消息发送的类型是群组消息还是个人消息
419
+......
420
+...
421
+var options = message;
422
+// 图片消息下载成功后的处理逻辑
423
+options.onFileDownloadComplete = function(response, xhr) {
424
+	var objectURL = window.URL.createObjectURL(response);
425
+	img = document.createElement("img");
426
+	img.onload = function(e) {
427
+		img.onload = null;
428
+		window.URL.revokeObjectURL(img.src);
429
+	};
430
+	img.onerror = function() {
431
+		img.onerror = null;
432
+		if (typeof FileReader == 'undefined') {
433
+			img.alter = "当前浏览器不支持blob方式";
434
+			return;
435
+		}
436
+		img.onerror = function() {
437
+			img.alter = "当前浏览器不支持blob方式";
438
+		};
439
+		var reader = new FileReader();
440
+		reader.onload = function(event) {
441
+			img.src = this.result;
442
+		};
443
+		reader.readAsDataURL(response);
444
+	}
445
+	img.src = objectURL;
446
+	var pic_real_width = options.width;
447
+	......
448
+	...
449
+};
450
+options.onFileDownloadError = function(e) {
451
+	appendMsg(from, contactDivId, e.msg + ",下载图片" + filename + "失败");
452
+};
453
+Easemob.im.Helper.download(options);
454
+
455
+</code></pre>
456
+
457
+#### 历史消息{#history_message}
458
+
459
+sdk暂不具有缓存历史消息功能,demo中聊天窗口只能显示,当前登录后会话实时在聊天信息,不能查看历史消息,可以对登录后的聊天信息进行清除操作。
460
+
461
+#### 新消息提示{#new_message}
462
+
463
+sdk在收到新消息是会直接转发给登录用户,接收到消息后,demo中会在好友或者群组的后面显示红色消息数,具体样式开发者可自行处理。
464
+
465
+## 群聊{#group_chat}
466
+
467
+### 查询群组成员{#queryOccupants}
468
+
469
+<pre class="hll"><code class="language-javascript">
470
+//根据roomId查询room成员列表
471
+var queryOccupants = function queryOccupants(roomId) {
472
+    var occupants = [];//存放成员容器
473
+    //查询获取room信息
474
+    conn.queryRoomInfo({
475
+        roomId : roomId,
476
+        success : function(occs) {
477
+            if (occs) {
478
+                for ( var i = 0; i < occs.length; i++) {
479
+                    occupants.push(occs[i]);
480
+                }
481
+            }
482
+            //查询获取room成员信息
483
+            conn.queryRoomMember({
484
+                roomId : roomId,
485
+                success : function(members) {
486
+                    if (members) {
487
+                        for ( var i = 0; i < members.length; i++) {
488
+                            occupants.push(members[i]);
489
+                        }
490
+                    }
491
+                }
492
+            });
493
+        }
494
+    });
495
+};
496
+</code></pre>
497
+
498
+### 发送文本(表情)聊天消息{#group_sendTextMessage}
499
+
500
+<pre class="hll"><code class="language-javascript">
501
+//发送文本消息
502
+conn.sendTextMessage({
503
+    to : to,
504
+    type : 'groupchat',
505
+    msg :'hello world!' //文本消息
506
+});
507
+
508
+//发送表情消息,调用接口同文本消息
509
+conn.sendTextMessage({
510
+    to : to,
511
+    type : 'groupchat',
512
+    msg :'hello world![(*)][(#)]' //文本消息+表情
513
+});
514
+</code></pre>
515
+
516
+### 发送图片消息{#group_sendPic}
517
+
518
+发送图片消息sdk自动分两步完成
519
+
520
+1. 上传图片文件
521
+2. 发送图片消息初始化连接中的onPictureMessage的格式
522
+
523
+<pre class="hll"><code class="language-javascript">
524
+//发送图片消息时调用方法
525
+var sendPic = function() {
526
+    var to = curChatUserId;
527
+    if (to == null) {
528
+        return;
529
+    }
530
+    // Easemob.im.Helper.getFileUrl为easemobwebim-sdk获取发送文件对象的方法,fileInputId为 input 标签的id值
531
+    var fileObj = Easemob.im.Helper.getFileUrl(fileInputId);
532
+    if (fileObj.url == null || fileObj.url == '') {
533
+        alert("请选择发送图片");
534
+        return;
535
+    }
536
+    var filetype = fileObj.filetype;
537
+    var filename = fileObj.filename;
538
+    if (filetype in pictype) {
539
+        document.getElementById("fileSend").disabled = true;
540
+        document.getElementById("cancelfileSend").disabled = true;
541
+        var opt = {
542
+            type:'chat',
543
+            fileInputId : fileInputId,
544
+            to : to,
545
+            onFileUploadError : function(error) {
546
+                //处理图片上传失败
547
+            },
548
+            onFileUploadComplete : function(data) {
549
+                //关闭文件选择窗口
550
+                $('#fileModal').modal('hide');
551
+                //本地缩略图
552
+                var file = document.getElementById(fileInputId);
553
+                if (file && file.files) {
554
+                    var objUrl = getObjectURL(file.files[0]);
555
+                    if (objUrl) {
556
+                        var img = document.createElement("img");
557
+                        img.src = objUrl;
558
+                        img.width = maxWidth;
559
+                    }
560
+                }
561
+            
562
+            }
563
+        };
564
+        //判断是否为群组标识
565
+        if (curChatUserId.indexOf(groupFlagMark) >= 0) {
566
+            opt.type = 'groupchat';//群组标识符
567
+            opt.to = curRoomId;
568
+        }
569
+        conn.sendPicture(opt);
570
+        return;
571
+    }
572
+    alert("不支持此图片类型" + filetype);
573
+};
574
+</code></pre>
575
+
576
+### 发送音频消息{#group_sendAudio}
577
+
578
+sdk处理同群发送图片消息,分两步
579
+
580
+1. 上传音频
581
+2. 发送消息
582
+
583
+<pre class="hll"><code class="language-javascript">
584
+//发送音频消息时调用的方法
585
+var sendAudio = function() {
586
+    var to = curChatUserId;
587
+    if (to == null) {
588
+        alert("请选择联系人");
589
+        return;
590
+    }
591
+    //利用easemobwebim-sdk提供的方法来构造一个file对象
592
+    var fileObj = Easemob.im.Helper.getFileUrl(fileInputId);
593
+    if (fileObj.url == null || fileObj.url == '') {
594
+            alert("请选择发送音频");
595
+        return;
596
+    }
597
+    var filetype = fileObj.filetype;
598
+    var filename = fileObj.filename;
599
+    if (filetype in audtype) {
600
+        document.getElementById("fileSend").disabled = true;
601
+        document.getElementById("cancelfileSend").disabled = true;
602
+        var opt = {
603
+            type:"chat",
604
+            fileInputId : fileInputId,
605
+            to : to,//发给谁
606
+            onFileUploadError : function(error) {
607
+                //处理上传音频失败
608
+            },
609
+            onFileUploadComplete : function(data) {
610
+                //处理上传音频成功,如本地消息提示发送成功
611
+            }
612
+        };
613
+        //构造完opt对象后调用easemobwebim-sdk中发送音频的方法
614
+        if (curChatUserId.indexOf(groupFlagMark) >= 0) {
615
+            opt.type = 'groupchat';
616
+            opt.to = curRoomId;
617
+        }
618
+        conn.sendAudio(opt);
619
+        return;
620
+    }
621
+    alert("不支持此音频类型" + filetype);
622
+};
623
+</code></pre>
624
+### 接收及处理消息{#messageType}
625
+群聊接收及处理消息同单聊,消息体与单聊消息根据message的type进行区分,单聊为:“chat”,群聊为:“groupchat”。根据消息的类型进行不同处理即可。
626
+
627
+## 退出{#quit}
628
+
629
+### 关闭连接{#conn_close}
630
+//sdk关闭连接并处理连接状态为CLOSED
631
+<pre class="hll"><code class="language-javascript">
632
+conn.close();
633
+</code></pre>
634
+
635
+## 工具类说明{#sdk_tools}
636
+
637
+### 表情工具类{#emotion}
638
+
639
+<pre class="hll"><code class="language-javascript">
640
+//返回表情JSON object,格式为:
641
+    {
642
+        "[):]" : "data:image/png;base64,iVBORw0K....==",
643
+        "[:D]" : "data:image/png;base64,iVBORw0KGgoAAAANSUh....=="
644
+    }
645
+
646
+var emotion_json = Easemob.im.Helper.EmotionPicData;
647
+</code></pre>
648
+
649
+### Base64工具类{#base64}
650
+
651
+<pre class="hll"><code class="language-javascript">
652
+var base64  = Easemob.im.Helper.Base64;
653
+var srcstr="ssss";
654
+var base64str = base64.encode(srcstr);
655
+var orgstr = base64.decode(srcstr);
656
+</code></pre>
657
+
658
+### 文件上传工具类{#fileupload}
659
+
660
+<pre class="hll"><code class="language-javascript">
661
+//是否能上传file
662
+var canupload = Easemob.im.Helper.isCanUploadFile;
663
+//是否能下载file
664
+var candownload = Easemob.im.Helper.isCanDownLoadFile ;
665
+//是否设置header
666
+var hasheader = Easemob.im.Helper.hasSetRequestHeader;
667
+//是否设置mimetype
668
+var hasmimetype = Easemob.im.Helper.hasOverrideMimeType;
669
+</code></pre>
670
+
671
+### 表情解析工具类{#handleMotion}
672
+
673
+<pre class="hll"><code class="language-javascript">
674
+//返回表情JSON,格式为:
675
+{
676
+    isemotion:true;
677
+    body:[{
678
+        type:txt,
679
+        msg:ssss
680
+    },
681
+    {
682
+        type:emotion,
683
+        msg:imgdata
684
+    }]
685
+}
686
+
687
+var emotionMsg = Easemob.im.Helper.parseTextMessage(message);
688
+</code></pre>
689
+
690
+### 文件上传工具类{#fileupdate}
691
+
692
+<pre class="hll"><code class="language-javascript">
693
+//返回fileinfo对象,格式为:
694
+    {
695
+        url : '',
696
+        filename : '',
697
+        filetype : ''
698
+    }
699
+var fileInfo = Easemob.im.Helper.getFileUrl(fileInputId);
700
+//上传
701
+var options={
702
+    appName = 'chatdemoui',
703
+    orgName = 'easemob-demo',
704
+    accessToken = 'YWMtjPPoovCqEeOQs7myPqqaOwAAAUaqNH0a8rRj4PwJLQju6-S47ZO6wYs3Lwo',
705
+    onFileUploadComplete:function(data){//upload file success },
706
+    onFileUploadError:function(e){//upload file error },
707
+    width:100,//only for pic
708
+    heght:100//only for pic
709
+}
710
+Easemob.im.Helper.upload(options);
711
+//下载
712
+var options = {
713
+    method:'GET',//default GET
714
+    responseType:'blob',//default blob
715
+    mimeType:'text/plain; charset=x-user-defined',//default
716
+    url:'http://s1.easemob.com/weiquan2/a2/chatfiles/0c0f5f3a-e66b-11e3-8863-f1c202c2b3ae',
717
+    secret = 'NSgGYPCxEeOou00jZasg9e-GqKUZGdph96EFxJ4WxW-qkxV4',
718
+    accessToken = 'YWMtjPPoovCqEeOQs7myPqqaOwAAAUaqNH0a8rRj4PwJLQju6-S47ZO6wYs3Lwo',
719
+    onFileUploadComplete:function(data){//upload file success },
720
+    onFileUploadError:function(e){//upload file error },
721
+}
722
+Easemob.im.Helper.download(options);
723
+//文件大小 
724
+var options={
725
+    fileInputId:'uploadfileinput'//文件输入框id
726
+};
727
+var fileSize = getFileSize(options.fileInputId);;
728
+</code></pre>
729
+
730
+### 发送Ajax请求{#ajaxresquest}
731
+
732
+<pre class="hll"><code class="language-javascript">
733
+var options = {
734
+    dataType:'text',//default
735
+    success:function(){//handle request success},
736
+    error :function(){//handle request error},
737
+    type : 'post',//default 'post'
738
+    url : 'http://s1.easemob.com/weiquan2/a2/chatfiles/0c0f5f3a-e66b-11e3-8863-f1c202c2b3ae',
739
+    headers:'',//default {}
740
+    data : '';//default null
741
+};
742
+Easemob.im.Helper.xhr(options);
743
+</code></pre>
744
+
745
+### 登录{#sdk_login}
746
+
747
+<pre class="hll"><code class="language-javascript">
748
+var options = {
749
+    appKey:'easemob-demo#chatdemoui',//default ''
750
+    success:function(data){ //login success },//default emptyFn
751
+    error : cunction(error){ //login error }, //default emptyFn
752
+    user : 'test1', //default ''
753
+    pwd : '123456'  //default ''
754
+};
755
+Easemob.im.Helper.login2UserGrid(options);
756
+</code></pre>
757
+
758
+### 注册{#sdk_regist}
759
+
760
+<pre class="hll"><code class="language-javascript">
761
+vvar options = {
762
+	username : 'zjj8',
763
+	password : '123456',
764
+	appKey : 'easemob-demo#chatdemoui',
765
+	success : function(result) {
766
+		//注册成功
767
+		},
768
+		error : function(e) {
769
+		//注册失败			
770
+		}
771
+	};
772
+Easemob.im.Helper.registerUser(options);
773
+</code></pre>
774
+
775
+### 内置空函数{#null_function}
776
+
777
+当所有需要回调的地方接受到函数时,默认采用此函数
778
+
779
+<pre class="hll"><code class="language-javascript">
780
+var emptyFn = function() {};
781
+</code></pre>

File diff suppressed because it is too large
+ 5234 - 0
WebAPP/libs/easymob-webim-sdk/strophe-custom-2.0.0.js


+ 481 - 0
WebAPP/login.html

@@ -0,0 +1,481 @@
1
+<!DOCTYPE html>
2
+<html class="ui-page-login">
3
+
4
+	<head>
5
+		<meta charset="utf-8">
6
+		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
7
+		<title></title>
8
+		<link href="css/mui.min.css" rel="stylesheet" />
9
+		<link href="css/style.css" rel="stylesheet" />
10
+		<style>
11
+			body{
12
+				background-color:#fff!important ;
13
+			}
14
+			#login-form{
15
+				background-color:#fff!important ;
16
+			}
17
+			.mui-content {
18
+				background: #FFF;
19
+			}
20
+			
21
+			.area {
22
+				margin: 20px auto 0px auto;
23
+			}
24
+			
25
+			.mui-input-group {
26
+				margin-top: 10px;
27
+			}
28
+			
29
+			.mui-input-group:first-child {
30
+				margin-top: 20px;
31
+			}
32
+			
33
+			.mui-input-group label {
34
+				width: 22%;
35
+				text-align: right;
36
+			}
37
+			
38
+			.mui-input-row label~input,
39
+			.mui-input-row label~select,
40
+			.mui-input-row label~textarea {
41
+				width: 78%;
42
+			}
43
+			
44
+			.mui-checkbox input[type=checkbox],
45
+			.mui-radio input[type=radio] {
46
+				top: 6px;
47
+			}
48
+			
49
+			.mui-content-padded {
50
+				margin-top: 40px;
51
+			}
52
+			
53
+			.mui-btn {
54
+				padding: 10px;
55
+			}
56
+			
57
+			.link-area {
58
+				display: block;
59
+				margin-top: 130px;
60
+				text-align: center;
61
+				font-size: 15px;
62
+			}
63
+			
64
+			.spliter {
65
+				width: 25%;
66
+				display: inline-block;
67
+				color: #bbb;
68
+				padding: 0px 8px;
69
+				/* line-height: 20px; */
70
+				vertical-align: middle;
71
+				position: relative;
72
+				left: -10px;
73
+			}
74
+			
75
+			.spliter:after {
76
+				position: absolute;
77
+				right: 0;
78
+				bottom: 0;
79
+				left: 15px;
80
+				height: 1px;
81
+				content: '';
82
+				-webkit-transform: scaleY(.5);
83
+				transform: scaleY(.5);
84
+				background-color: #c8c7cc;
85
+			}
86
+			
87
+			.oauth-area {
88
+				position: absolute;
89
+				bottom: 20px;
90
+				left: 0px;
91
+				text-align: center;
92
+				width: 100%;
93
+				padding: 0px;
94
+				margin: 0px;
95
+			}
96
+			
97
+			.oauth-area .oauth-btn {
98
+				display: inline-block;
99
+				width: 50px;
100
+				height: 50px;
101
+				background-size: 30px 30px;
102
+				background-position: center center;
103
+				background-repeat: no-repeat;
104
+				margin: 0px 20px;
105
+				/*-webkit-filter: grayscale(100%); */
106
+				border: solid 1px #ddd;
107
+				border-radius: 25px;
108
+			}
109
+			
110
+			.oauth-area .oauth-btn:active {
111
+				border: solid 1px #aaa;
112
+			}
113
+			
114
+			.oauth-area .oauth-btn.disabled {
115
+				background-color: #ddd;
116
+			}
117
+			
118
+			#login-form {
119
+				margin-top: 0;
120
+			}
121
+			
122
+			.mui-logo-box {
123
+				text-align: center;
124
+				padding-top: 51px;
125
+			}
126
+			
127
+			.mui-logo-box img {
128
+				width: 180px;
129
+				
130
+			}
131
+			.mui-input-row{
132
+				margin-top: 15px;
133
+			}
134
+			.mui-input-group:after {
135
+				position: absolute;
136
+				right: 0;
137
+				bottom: 0;
138
+				left: 15px;
139
+				height: 1px;
140
+				content: '';
141
+				-webkit-transform: scaleY(.5);
142
+				transform: scaleY(.5);
143
+				/*background-color: #c8c7cc;*/
144
+			}
145
+			input{
146
+				font-size: 16px;
147
+			}
148
+			 .mui-btn-primary{
149
+			 	border: 1px solid #00a1cb;
150
+    background-color: #00a1cb;
151
+			 }
152
+			 
153
+			 .mui-input-group  {
154
+   				 width: 90%;
155
+			 	margin: 0 auto;
156
+			 	margin-bottom: 20px;
157
+			}
158
+			.mui-input-row{
159
+				margin-bottom: 10px;
160
+			}
161
+		</style>
162
+
163
+	</head>
164
+
165
+	<body>
166
+
167
+		<div class="mui-content">
168
+			<form id='login-form' class="mui-input-group">
169
+				<!--logo-->
170
+				<div class="mui-logo-box">
171
+					<div>
172
+						<img src="images/logo1.png" alt="" />
173
+					</div>
174
+				</div>
175
+				<div class="mui-input-row">
176
+					<label><img src="images/peson.png" alt=""  style="width: 20px;"/></label>
177
+					<input id='account' type="text" class="mui-input-clear mui-input" placeholder="请输入账号">
178
+				</div>
179
+				<div class="mui-input-row">
180
+					<label><i class="mui-icon mui-icon-locked"></i></label>
181
+					<input id='password' type="password" class=" mui-input  mui-input-clear" placeholder="请输入密码">
182
+				</div>
183
+
184
+			</form>
185
+			<div class="mui-content-padded">
186
+				<button id='login' class="mui-btn mui-btn-block mui-btn-primary">登录</button>
187
+				<!--<div class="link-area">
188
+					<!--<a id='reg'>注册账号</a> <span class="spliter">|</span>
189
+					<a id='forgetPassword'>忘记密码</a>-->
190
+					<!--<span class="spliter "></span> 还没有账号,
191
+					<a id='reg' style="color: #00a1cb;">注册账号</a>
192
+					<span class="spliter"></span>
193
+				</div>-->
194
+			</div>
195
+			<div class="mui-content-padded oauth-area">
196
+
197
+			</div>
198
+		</div>
199
+		<script src="js/mui.min.js"></script>
200
+		<script src="js/mui.enterfocus.js"></script>
201
+		<script src="js/app.js"></script>
202
+		<script src="js/jquery.min.js"></script>
203
+		<script src="js/jquery.md5.js"></script>
204
+
205
+		<script>
206
+			//									(function($, doc) {
207
+			//										$.init({
208
+			//											statusBarBackground: '#f7f7f7'
209
+			//										});
210
+			//										$.plusReady(function() {
211
+			//											plus.screen.lockOrientation("portrait-primary");
212
+			//											var settings = app.getSettings();
213
+			//											var state = app.getState();
214
+			//											var mainPage = $.preload({
215
+			//												"id": 'main',
216
+			//												"url": 'main.html'
217
+			//											});
218
+			//											var main_loaded_flag = false;
219
+			//											mainPage.addEventListener("loaded",function () {
220
+			//												main_loaded_flag = true;
221
+			//											});
222
+			//											var toMain = function() {
223
+			//												//使用定时器的原因:
224
+			//												//可能执行太快,main页面loaded事件尚未触发就执行自定义事件,此时必然会失败
225
+			//												var id = setInterval(function () {
226
+			//													if(main_loaded_flag){
227
+			//														clearInterval(id);
228
+			//														$.fire(mainPage, 'show', null);
229
+			//														mainPage.show("pop-in");
230
+			//													}
231
+			//												},20);
232
+			//											};
233
+			//											//检查 "登录状态/锁屏状态" 开始
234
+			//											if (settings.autoLogin && state.token && settings.gestures) {
235
+			//												$.openWindow({
236
+			//													url: 'unlock.html',
237
+			//													id: 'unlock',
238
+			//													show: {
239
+			//														aniShow: 'pop-in'
240
+			//													},
241
+			//													waiting: {
242
+			//														autoShow: false
243
+			//													}
244
+			//												});
245
+			//											} else if (settings.autoLogin && state.token) {
246
+			//												toMain();
247
+			//											} else {
248
+			//												app.setState(null);
249
+			//												//第三方登录
250
+			//												var authBtns = ['qihoo', 'weixin', 'sinaweibo', 'qq']; //配置业务支持的第三方登录
251
+			//												var auths = {};
252
+			//												var oauthArea = doc.querySelector('.oauth-area');
253
+			//												plus.oauth.getServices(function(services) {
254
+			//													for (var i in services) {
255
+			//														var service = services[i];
256
+			//														auths[service.id] = service;
257
+			//														if (~authBtns.indexOf(service.id)) {
258
+			//															var isInstalled = app.isInstalled(service.id);
259
+			//															var btn = document.createElement('div');
260
+			//															//如果微信未安装,则为不启用状态
261
+			//															btn.setAttribute('class', 'oauth-btn' + (!isInstalled && service.id === 'weixin' ? (' disabled') : ''));
262
+			//															btn.authId = service.id;
263
+			//															btn.style.backgroundImage = 'url("images/' + service.id + '.png")'
264
+			//															oauthArea.appendChild(btn);
265
+			//														}
266
+			//													}
267
+			//													$(oauthArea).on('tap', '.oauth-btn', function() {
268
+			//														if (this.classList.contains('disabled')) {
269
+			//															plus.nativeUI.toast('您尚未安装微信客户端');
270
+			//															return;
271
+			//														}
272
+			//														var auth = auths[this.authId];
273
+			//														var waiting = plus.nativeUI.showWaiting();
274
+			//														auth.login(function() {
275
+			//															waiting.close();
276
+			//															plus.nativeUI.toast("登录认证成功");
277
+			//															auth.getUserInfo(function() {
278
+			//																plus.nativeUI.toast("获取用户信息成功");
279
+			//																var name = auth.userInfo.nickname || auth.userInfo.name;
280
+			//																app.createState(name, function() {
281
+			//																	toMain();
282
+			//																});
283
+			//															}, function(e) {
284
+			//																plus.nativeUI.toast("获取用户信息失败:" + e.message);
285
+			//															});
286
+			//														}, function(e) {
287
+			//															waiting.close();
288
+			//															plus.nativeUI.toast("登录认证失败:" + e.message);
289
+			//														});
290
+			//													});
291
+			//												}, function(e) {
292
+			//													oauthArea.style.display = 'none';
293
+			//													plus.nativeUI.toast("获取登录认证失败:" + e.message);
294
+			//												});
295
+			//											}
296
+			//											// close splash
297
+			//											setTimeout(function() {
298
+			//												//关闭 splash
299
+			//												plus.navigator.closeSplashscreen();
300
+			//											}, 600);
301
+			//											//检查 "登录状态/锁屏状态" 结束
302
+			//											var loginButton = doc.getElementById('login');
303
+			//											var accountBox = doc.getElementById('account');
304
+			//											var passwordBox = doc.getElementById('password');
305
+			//											var autoLoginButton = doc.getElementById("autoLogin");
306
+			//											var regButton = doc.getElementById('reg');
307
+			//											var forgetButton = doc.getElementById('forgetPassword');
308
+			//											loginButton.addEventListener('tap', function(event) {
309
+			//												var loginInfo = {
310
+			//													account: accountBox.value,
311
+			//													password: passwordBox.value
312
+			//												};
313
+			//												app.login(loginInfo, function(err) {
314
+			//													if (err) {
315
+			//														plus.nativeUI.toast(err);
316
+			//														return;
317
+			//													}
318
+			//													toMain();
319
+			//												});
320
+			//											});
321
+			//											$.enterfocus('#login-form input', function() {
322
+			//												$.trigger(loginButton, 'tap');
323
+			//											});
324
+			//											autoLoginButton.classList[settings.autoLogin ? 'add' : 'remove']('mui-active')
325
+			//											autoLoginButton.addEventListener('toggle', function(event) {
326
+			//												setTimeout(function() {
327
+			//													var isActive = event.detail.isActive;
328
+			//													settings.autoLogin = isActive;
329
+			//													app.setSettings(settings);
330
+			//												}, 50);
331
+			//											}, false);
332
+			//											regButton.addEventListener('tap', function(event) {
333
+			//												$.openWindow({
334
+			//													url: 'reg.html',
335
+			//													id: 'reg',
336
+			//													preload: true,
337
+			//													show: {
338
+			//														aniShow: 'pop-in'
339
+			//													},
340
+			//													styles: {
341
+			//														popGesture: 'hide'
342
+			//													},
343
+			//													waiting: {
344
+			//														autoShow: false
345
+			//													}
346
+			//												});
347
+			//											}, false);
348
+			//											forgetButton.addEventListener('tap', function(event) {
349
+			//												$.openWindow({
350
+			//													url: 'forget_password.html',
351
+			//													id: 'forget_password',
352
+			//													preload: true,
353
+			//													show: {
354
+			//														aniShow: 'pop-in'
355
+			//													},
356
+			//													styles: {
357
+			//														popGesture: 'hide'
358
+			//													},
359
+			//													waiting: {
360
+			//														autoShow: false
361
+			//													}
362
+			//												});
363
+			//											}, false);
364
+			//											//
365
+			//											window.addEventListener('resize', function() {
366
+			//												oauthArea.style.display = document.body.clientHeight > 400 ? 'block' : 'none';
367
+			//											}, false);
368
+			//											//
369
+			//											var backButtonPress = 0;
370
+			//											$.back = function(event) {
371
+			//												backButtonPress++;
372
+			//												if (backButtonPress > 1) {
373
+			//													plus.runtime.quit();
374
+			//												} else {
375
+			//													plus.nativeUI.toast('再按一次退出应用');
376
+			//												}
377
+			//												setTimeout(function() {
378
+			//													backButtonPress = 0;
379
+			//												}, 1000);
380
+			//												return false;
381
+			//											};
382
+			//										});
383
+			//									}(mui, document));
384
+			mui.init();
385
+			mui.plusReady(
386
+				function() {
387
+					document.getElementById("login").addEventListener('tap', function() {
388
+						// 内容就是 return document.getElementById();  
389
+						var username = document.getElementById('account').value;
390
+						var password = document.getElementById('password').value;
391
+						var data = {
392
+							"username": username,
393
+							"password": $.md5(password),
394
+							" extensionphone": 1
395
+						};
396
+						if(!username) {
397
+							plus.nativeUI.toast('输入账号');
398
+						}else if(!password){
399
+							plus.nativeUI.toast('密码不能为空');
400
+						}else {
401
+							// 调用ajax  
402
+							mui.ajax('http://117.158.196.116:4010/Login/login', {
403
+								data: data,
404
+								dataType: 'json', //服务器返回json格式数据
405
+								type: 'post', //HTTP请求类型
406
+								timeout: 10000, //超时时间设置为10秒;
407
+								headers: {
408
+									'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
409
+								},
410
+								success: function(data) {
411
+									
412
+									mui.openWindow({
413
+										"id": 'indexs',
414
+										"url": 'indexs.html',
415
+										show: {
416
+											aniShow: 'pop-in'
417
+										},
418
+										styles: {
419
+											popGesture: 'hide'
420
+										},
421
+										waiting: {
422
+											autoShow: false
423
+										},
424
+										extras: {
425
+											name: data.data.token,
426
+//name:"5646",
427
+
428
+										}
429
+									});
430
+									document.getElementById('account').value="";
431
+									document.getElementById('password').value="";
432
+									//									var mainPage=mui.preload({
433
+									//															"id": 'main',
434
+									//															"url": 'main.html'
435
+									//														});
436
+									//									var main_loaded_flag = false;
437
+									//									mainPage.addEventListener("loaded", function() {
438
+									//										main_loaded_flag = true;
439
+									//									});
440
+									//									var toMain = function() {
441
+									//										//使用定时器的原因:
442
+									//										//可能执行太快,main页面loaded事件尚未触发就执行自定义事件,此时必然会失败
443
+									//										var id = setInterval(function() {
444
+									//											if(main_loaded_flag) {
445
+									//												clearInterval(id);
446
+									//												$.fire(mainPage, 'show', null);
447
+									//												mainPage.show("pop-in");
448
+									//											}
449
+									//										}, 20);
450
+									//									};
451
+
452
+								},
453
+								error: function(xhr, type, errorThrown) {
454
+									//异常处理;
455
+
456
+								}
457
+							});
458
+						}
459
+
460
+					});
461
+				}
462
+			);
463
+
464
+//						function postData(url, data, callback, waitingDialog) {
465
+			//				mui.ajax(url, {
466
+			//					data: 'data=' + JSON.stringify(data),
467
+			//					dataType: 'json',
468
+			//					type: 'post',
469
+			//					contentType: "application/x-www-form-urlencoded; charset=utf-8",
470
+			//					timeout: 60000,
471
+			//					success: callback,
472
+			//					error: function(xhr, type, errorThrown) {
473
+			//						waitingDialog.close();
474
+			//						mui.alert("<网络连接失败,请重新尝试一下>", "错误", "OK", null);
475
+			//					}
476
+			//				});
477
+			//			}
478
+		</script>
479
+	</body>
480
+
481
+</html>

+ 479 - 0
WebAPP/main.html

@@ -0,0 +1,479 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="utf-8">
6
+		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
7
+		<meta name="apple-mobile-web-app-capable" content="yes">
8
+		<meta name="apple-mobile-web-app-status-bar-style" content="black">
9
+		<title>任务列表</title>
10
+		<link href="css/mui.min.css" rel="stylesheet" />
11
+
12
+		<style>
13
+			body {
14
+				background-color: #fafafa;
15
+			}
16
+			
17
+			.mui-content {
18
+				background-color: #fafafa;
19
+			}
20
+			
21
+			ul {
22
+				font-size: 16px;
23
+				color: #8f8f94;
24
+			}
25
+			
26
+			.mui-btn {
27
+				padding: 10px;
28
+			}
29
+			
30
+			.mui-content-padded {
31
+				margin: 0;
32
+			}
33
+			
34
+			.mui-active {
35
+				background: #fff;
36
+			}
37
+			
38
+			.mui-bar-nav {
39
+				background-color: #00a1cb;
40
+			}
41
+			
42
+			.mui-title {
43
+				line-height: 50px;
44
+				color: #fff;
45
+			}
46
+			
47
+			#icon-menu {
48
+				color: #fff;
49
+			}
50
+			
51
+			.size-16 {
52
+				font-size: 16px;
53
+			}
54
+			
55
+			.Dwc {
56
+				margin-bottom: 20px;
57
+			}
58
+			
59
+			.mui-icon {
60
+				font-size: 20px;
61
+			}
62
+			
63
+			.red {
64
+				color: red;
65
+			}
66
+			
67
+			.cheng {
68
+				color: #f88868;
69
+			}
70
+			
71
+			.mui-col-xs-10 {
72
+				padding-left: 15px;
73
+			}
74
+			/*.mui-navigate-right{
75
+				margin-left: 15px!important;
76
+			}*/
77
+			
78
+			.mui-h {
79
+				font-size: 16px;
80
+				color: #000;
81
+			}
82
+			
83
+			.List-box span {
84
+				letter-spacing: 1px;
85
+			}
86
+			
87
+			.mui-table-view-cell.mui-active {
88
+				background-color: #fff;
89
+			}
90
+			
91
+			.mui-table-view li {
92
+				padding-left: 0;
93
+			}
94
+			
95
+			.mui-collapse-content {
96
+				position: relative;
97
+			}
98
+			
99
+			.mui-collapse-content:after {
100
+				position: absolute;
101
+				right: 0;
102
+				bottom: 0;
103
+				left: 15px;
104
+				height: 1px;
105
+				content: '';
106
+				-webkit-transform: scaleY(.5);
107
+				transform: scaleY(.5);
108
+				background-color: #c8c7cc;
109
+			}
110
+			
111
+			.mui-collapse-content:before {
112
+				position: absolute;
113
+				right: 0;
114
+				bottom: 0;
115
+				left: 15px;
116
+				height: 1px;
117
+				content: '';
118
+				-webkit-transform: scaleY(.5);
119
+				transform: scaleY(.5);
120
+				background-color: #c8c7cc;
121
+			}
122
+			
123
+			.mui-mix-left {
124
+				padding-left: 20px;
125
+				margin-left: 10px;
126
+			}
127
+			
128
+			.mui-segmented-control .mui-control-item.mui-active {
129
+				border-color: #00a1cb;
130
+				border: 1px solid #00a1cb;
131
+				color: #fff;
132
+				background-color: #00a1cb;
133
+			}
134
+			
135
+			.mui-segmented-control {
136
+				border: 1px solid #00a1cb;
137
+			}
138
+			
139
+			.mui-action-back {
140
+				color: #fff;
141
+			}
142
+			
143
+			.Phone img {
144
+				width: 13px;
145
+				height: 13px;
146
+				border-radius: 50%;
147
+				/*		 vertical-align: text-bottom;*/
148
+				margin-right: 3px;
149
+				vertical-align: initial;
150
+			}
151
+			
152
+			.mui-h6 {
153
+				font-size: 12px;
154
+			}
155
+			
156
+			.mui-span-box {
157
+				margin-left: 25px;
158
+			}
159
+			
160
+			.dwc {
161
+				color: #34ad37;
162
+			}
163
+			
164
+			.mui-control-item {
165
+				line-height: 30px!important;
166
+			}
167
+		</style>
168
+	</head>
169
+
170
+	<body>
171
+		<!--<header class="mui-bar mui-bar-nav" style="padding-right: 15px;height: 50px;color: #fff;">
172
+			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
173
+			<h1 class="mui-title">任务列表</h1>
174
+		</header>-->
175
+		<div class="mui-content">
176
+			<div class="mui-content-padded">
177
+				<div style="padding: 10px 10px;margin: 10px;">
178
+					<div id="segmentedControl" class="mui-segmented-control">
179
+						<a class="mui-control-item mui-active" href="#item1">我负责的</a>
180
+					</div>
181
+				</div>
182
+				<div class="Dwc">
183
+					<ul class="mui-table-view pullrefresh">
184
+						<li class="mui-table-view-cell mui-collapse mui-active Dwc_box">
185
+							<a class="mui-navigate-right" href="#">
186
+								<div class="mui-mix-left">
187
+									<span class="mui-h">待指派</span><span class="mui-h5 Dwc_num"></span></div>
188
+							</a>
189
+							<div class="mui-collapse-content DWC" style="border-top: 1px solid #ccc;">
190
+								<div class="mui-table ">
191
+									<div class="mui-table-cell mui-col-xs-10 List-box">
192
+										<h5 class="mui-ellipsis mui-h">
193
+											<span class=" mui-icon ">
194
+												<i class="mui-icon  Phone">
195
+													<img src="images/start.png" alt="" />
196
+												</i>
197
+											</span>开发电销版呼叫中心</h5>
198
+										<h4 class="mui-span-box"><span class="mui-h6">
199
+											<i class="mui-icon  Phone">
200
+												<img src="images/qq.png" alt="" />
201
+											</i>朱慧娟</span> 
202
+											<span class="mui-h6 cheng">
203
+												<i class="mui-icon Phone ">
204
+													<img src="images/time.png" alt="" />
205
+												</i>
206
+												4月12日
207
+											</span>
208
+												<span class="mui-h6"> 
209
+													<i class="mui-icon mui-icon-compose"></i>投诉建议
210
+												</span>
211
+										</h4>
212
+									</div>
213
+									<div class="mui-table-cell mui-col-xs-2 mui-text-right" style="top: 20px;">
214
+										<span class="mui-badge mui-badge-danger">45</span>
215
+									</div>
216
+								</div>
217
+							</div>
218
+							<div class="mui-collapse-content">
219
+								<div class="mui-table ">
220
+									<div class="mui-table-cell mui-col-xs-10 List-box">
221
+										<h5 class="mui-ellipsis mui-h">
222
+											<span class=" mui-icon ">
223
+												<i class="mui-icon  Phone">
224
+													<img src="images/start1.png" alt="" />
225
+												</i>
226
+											</span>开发电销版呼叫中心</h5>
227
+										<h4 class="mui-span-box"><span class="mui-h6"><i class="mui-icon  Phone"><img src="images/qq.png" alt="" /></i>朱慧娟</span> <span class="mui-h6 cheng"><i class="mui-icon mui-icon-compose"></i>4月12日</span><span class="mui-h6"> <i class="mui-icon mui-icon-compose"></i>投诉建议</span></h4>
228
+									</div>
229
+									<div class="mui-table-cell mui-col-xs-2 mui-text-right" style="top: 20px;">
230
+										<span class="mui-badge mui-badge-danger">45</span>
231
+									</div>
232
+								</div>
233
+							</div>
234
+						</li>
235
+					</ul>
236
+				</div>
237
+				<div class="Dwc">
238
+					<ul class="mui-table-view">
239
+						<li class="mui-table-view-cell mui-collapse">
240
+							<a class="mui-navigate-right" href="#">
241
+								<div class="mui-mix-left">
242
+									<span class="mui-h">待完成</span><span class="mui-h5">(2)</span></div>
243
+							</a>
244
+							<div class="mui-collapse-content" style="border-top: 1px solid #ccc;">
245
+								<div class="mui-table ">
246
+									<div class="mui-table-cell mui-col-xs-10 List-box">
247
+										<h5 class="mui-ellipsis mui-h">
248
+											<span class=" mui-icon ">
249
+												<i class="mui-icon  Phone">
250
+													<img src="images/start1.png" alt="" />
251
+												</i>
252
+											</span>开发电销版呼叫中心</h5>
253
+										<h4 class="mui-span-box">
254
+											<span class="mui-h6">
255
+												<i class="mui-icon  Phone">
256
+													<img src="images/qq.png" alt="" />
257
+												</i>朱慧娟
258
+											</span>
259
+											<span class="mui-h6 ">
260
+												<i class="mui-icon mui-icon-compose"></i>
261
+												已持续<strong class="dwc">15</strong>小时<strong class="dwc">15</strong>分<strong class="dwc">15</strong>秒
262
+											</span>
263
+											<span class="mui-h6"> <i class="mui-icon mui-icon-compose"></i>投诉建议</span>
264
+										</h4>
265
+									</div>
266
+								</div>
267
+							</div>
268
+						</li>
269
+					</ul>
270
+				</div>
271
+				<div class="Dwc" id="Rush">
272
+					<ul class="mui-table-view">
273
+						<li class="mui-table-view-cell mui-collapse ">
274
+							<a class="mui-navigate-right" href="#">
275
+								<div class="mui-mix-left">
276
+									<span class="mui-h">已完成</span><span class="mui-h5">(2)</span></div>
277
+							</a>
278
+							<div class="mui-collapse-content" style="border-top: 1px solid #ccc;">
279
+								<div class="mui-table ">
280
+									<div class="mui-table-cell mui-col-xs-10 List-box">
281
+										<h5 class="mui-ellipsis mui-h">
282
+											<span class=" mui-icon ">
283
+												<i class="mui-icon  Phone">
284
+													<img src="images/start1.png" alt="" />
285
+												</i>
286
+											</span>开发电销版呼叫中心</h5>
287
+										<h4 class="mui-span-box">
288
+											<span class="mui-h6">
289
+												<i class="mui-icon  Phone">
290
+													<img src="images/qq.png" alt="" />
291
+												</i>朱慧娟
292
+											</span>
293
+											<span class="mui-h6 ">
294
+												<i class="mui-icon mui-icon-compose"></i>
295
+												已持续<strong class="dwc">15</strong>小时<strong class="dwc">15</strong>分<strong class="dwc">15</strong>秒
296
+											</span>
297
+											<span class="mui-h6"> <i class="mui-icon mui-icon-compose"></i>投诉建议</span>
298
+										</h4>
299
+									</div>
300
+
301
+								</div>
302
+
303
+							</div>
304
+							<div class="mui-collapse-content">
305
+								<div class="mui-table ">
306
+									<div class="mui-table-cell mui-col-xs-10 List-box">
307
+										<h5 class="mui-ellipsis mui-h">
308
+											<span class=" mui-icon ">
309
+												<i class="mui-icon  Phone">
310
+													<img src="images/start1.png" alt="" />
311
+												</i>
312
+											</span>开发电销版呼叫中心</h5>
313
+										<h4 class="mui-span-box">
314
+											<span class="mui-h6">
315
+												<i class="mui-icon  Phone">
316
+													<img src="images/qq.png" alt="" />
317
+												</i>朱慧娟
318
+											</span>
319
+											<span class="mui-h6 ">
320
+												<i class="mui-icon mui-icon-compose"></i>
321
+												已持续<strong class="dwc">15</strong>小时<strong class="dwc">15</strong>分<strong class="dwc">15</strong>秒
322
+											</span>
323
+											<span class="mui-h6"> <i class="mui-icon mui-icon-compose"></i>投诉建议</span>
324
+										</h4>
325
+									</div>
326
+
327
+								</div>
328
+
329
+							</div>
330
+
331
+						</li>
332
+					</ul>
333
+				</div>
334
+			</div>
335
+			<!--<nav class="mui-bar mui-bar-tab">
336
+				<a id="defaultTab" class="mui-tab-item mui-active" href="main.html">
337
+					<span class="mui-icon mui-icon-home"></span>
338
+					<span class="mui-tab-label">我的任务</span>
339
+				</a>
340
+				<a id="DT" class="mui-tab-item" href="pullrefresh_main.html">
341
+					<span class="mui-icon mui-icon-email"><span class="mui-badge">9</span></span>
342
+					<span class="mui-tab-label">动态</span>
343
+				</a>
344
+				<a  id="TX" class="mui-tab-item" href="tx.html">
345
+					<span class="mui-icon mui-icon-contact"></span>
346
+					<span class="mui-tab-label">通讯录</span>
347
+				</a>
348
+				<a id="setting" class="mui-tab-item" href="setting.html">
349
+					<span class="mui-icon mui-icon-person"></span>
350
+					<span class="mui-tab-label">我的</span>
351
+				</a>
352
+			</nav>-->
353
+		</div>
354
+		<script src="js/mui.min.js"></script>
355
+		<script src="js/app.js"></script>
356
+		<script>	
357
+			mui.plusReady(function() {
358
+				var wv = plus.webview.currentWebview();
359
+				var vText = wv.name; //这样就能接收到上个页面传过来的值了
360
+					plus.nativeUI.toast(vText);
361
+				//获取工单
362
+				mui.ajax('http://192.168.4.18:4010/WorkOrder/GetZXDealList', {
363
+					data:{
364
+						tab:0,
365
+						token:vText,
366
+						extensionphone: 1
367
+					},
368
+					dataType: 'json', //服务器返回json格式数据
369
+					type: 'get', //HTTP请求类型
370
+					timeout: 10000, //超时时间设置为10秒;
371
+					headers: {
372
+						'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
373
+					},
374
+					success: function(data) {
375
+						for (var i = 0;i<data.rows.length;i++) {
376
+							plus.nativeUI.toast(data.rows);
377
+						var table = document.body.querySelector('.Dwc_box');
378
+						var div = document.createElement('div');
379
+						div.className = 'mui-collapse-content';
380
+						div.innerHTML = 
381
+						'<img class="mui-media-object mui-pull-left" src="images/shuijiao.jpg">'+
382
+						'<div class="mui-media-body">'+
383
+							'<span class="title_color">蓝胖子22'+(i + 1)+'</span> 处理了工单  '+
384
+							'<span class="mui-h5 mui-text-right fr "></span>'+
385
+							'<h5 class="">'+
386
+		                    	'标准版呼叫中心标准版呼叫中心标准版呼叫中心标准版呼叫中心标准版呼叫中心标准版呼叫中心'+
387
+		                    '</h5>'+
388
+							'<p class="mui-ellipsis"><span class="mui-h5 mui-text-right fr ">我是个图标</span></p>'+
389
+						'</div>';							
390
+						table.appendChild(div);
391
+					}
392
+					},
393
+					error: function(xhr, type, errorThrown) {
394
+						//异常处理;
395
+
396
+					}
397
+				});
398
+				mui(".mui-table-view").on('tap', '.mui-table ', function() {
399
+					//					var id = this.getAttribute("id");
400
+					//					mui.fire(detail, 'getDetail', {
401
+					//						id: id
402
+					//					});
403
+					//打开新闻详情
404
+					mui.openWindow({
405
+						id: 'WorkDetails',
406
+						url: 'WorkDetails.html',
407
+						show: {
408
+							aniShow: 'pop-in'
409
+						},
410
+						styles: {
411
+							popGesture: 'hide'
412
+						},
413
+						waiting: {
414
+							autoShow: false
415
+						},
416
+					});
417
+
418
+				});
419
+			
420
+			
421
+			    //设置
422
+//				var settingButton = document.getElementById('setting');
423
+//				settingButton.addEventListener('tap', function(event) {
424
+//					mui.openWindow({
425
+//						id: 'setting',
426
+//						url: 'setting.html',
427
+//						show: {
428
+//							aniShow: 'pop-in'
429
+//						},
430
+//						styles: {
431
+//							popGesture: 'hide'
432
+//						},
433
+//						waiting: {
434
+//							autoShow: false
435
+//						}
436
+//					});
437
+//				});
438
+//				mui("")
439
+
440
+				//动态
441
+//				var settingButton = document.getElementById('DT');
442
+//				settingButton.addEventListener('tap', function(event) {
443
+//					mui.openWindow({
444
+//						id: 'pullrefresh_main',
445
+//						url: 'pullrefresh_main.html',
446
+//						show: {
447
+//							aniShow: 'pop-in'
448
+//						},
449
+//						styles: {
450
+//							popGesture: 'hide'
451
+//						},
452
+//						waiting: {
453
+//							autoShow: false
454
+//						}
455
+//					});
456
+//				});
457
+				//通讯录
458
+//				var settingButton = document.getElementById('TX');
459
+//				settingButton.addEventListener('tap', function(event) {
460
+//					mui.openWindow({
461
+//						id: 'tx',
462
+//						url: 'tx.html',
463
+//						show: {
464
+//							aniShow: 'pop-in'
465
+//						},
466
+//						styles: {
467
+//							popGesture: 'hide'
468
+//						},
469
+//						waiting: {
470
+//							autoShow: false
471
+//						}
472
+//					});
473
+//				});
474
+
475
+			})
476
+		</script>
477
+	</body>
478
+
479
+</html>

+ 135 - 0
WebAPP/pullrefresh_main.html

@@ -0,0 +1,135 @@
1
+<!DOCTYPE html>
2
+<html>
3
+	<head>
4
+		<meta charset="utf-8">
5
+		<title>Hello MUI</title>
6
+		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
7
+		<meta name="apple-mobile-web-app-capable" content="yes">
8
+		<meta name="apple-mobile-web-app-status-bar-style" content="black">
9
+		<link rel="stylesheet" href="css/mui.min.css">
10
+		<style>
11
+			html,
12
+			body {
13
+				background-color: #efeff4;
14
+			}
15
+				.mui-table-view-chevron .mui-table-view-cell{
16
+				padding-right: 15px;
17
+			}
18
+			.title_color{
19
+				color: #00a1cb;
20
+			}
21
+			.mui-table-cell h4{
22
+				font-weight: normal;
23
+			}
24
+			.size-16{
25
+				font-size: 16px;
26
+			}
27
+			.fr{
28
+				float: right;
29
+				
30
+			}
31
+			h5{
32
+				line-height: 20px;
33
+			}
34
+			.mui-table-view .mui-media-object{
35
+				border-radius: 50%;
36
+			}
37
+		</style>
38
+	</head>
39
+
40
+	<body>
41
+		<div id="pullrefresh" class="mui-content mui-scroll-wrapper">
42
+			<div class="mui-scroll">
43
+				<ul class="mui-table-view mui-table-view-chevron">
44
+					
45
+				</ul>
46
+			</div>
47
+		</div>
48
+		<script src="js/mui.min.js"></script>
49
+		<script>
50
+			mui.init({
51
+				swipeBack: false,
52
+				pullRefresh: {
53
+					container: '#pullrefresh',
54
+//					down: {
55
+//						callback: pulldownRefresh
56
+//					},
57
+					up: {
58
+						contentrefresh: '正在加载...',
59
+						callback: pullupRefresh
60
+					}
61
+				}
62
+			});
63
+			/**
64
+			 * 下拉刷新具体业务实现
65
+			 */
66
+			function pulldownRefresh() {
67
+				setTimeout(function() {
68
+					var table = document.body.querySelector('.mui-table-view');
69
+					var cells = document.body.querySelectorAll('.mui-table-view-cell');
70
+					for (var i = cells.length, len = i + 3; i < len; i++) {
71
+						var li = document.createElement('li');
72
+						li.className = 'mui-table-view-cell';
73
+						li.innerHTML = 
74
+						'<img class="mui-media-object mui-pull-left" src="images/shuijiao.jpg">'+
75
+						'<div class="mui-media-body">'+
76
+							'<span class="title_color">蓝胖子'+(i + 1)+'</span> 处理了工单  '+
77
+							'<span class="mui-h5 mui-text-right fr "></span>'+
78
+							'<h5 class="">'+
79
+		                    	'标准版呼叫中心标准版呼叫中心标准版呼叫中心标准版呼叫中心标准版呼叫中心标准版呼叫中心'+
80
+		                    '</h5>'+
81
+							'<p class="mui-ellipsis"><span class="mui-h5 mui-text-right fr ">我是个图标</span></p>'+
82
+						'</div>';
83
+						//下拉刷新,新纪录插到最前面;
84
+						table.insertBefore(li, table.firstChild);
85
+					}
86
+					mui('#pullrefresh').pullRefresh().endPulldownToRefresh(); //refresh completed
87
+				}, 1000);
88
+			}
89
+			var count = 0;
90
+			/**
91
+			 * 上拉加载具体业务实现
92
+			 */
93
+			function pullupRefresh() {
94
+				setTimeout(function() {
95
+					mui('#pullrefresh').pullRefresh().endPullupToRefresh((++count > 2)); //参数为true代表没有更多数据了。
96
+					var table = document.body.querySelector('.mui-table-view');
97
+					var cells = document.body.querySelectorAll('.mui-table-view-cell');
98
+					for (var i = cells.length, len = i + 20; i < len; i++) {
99
+						var li = document.createElement('li');
100
+						li.className = 'mui-table-view-cell';
101
+						li.innerHTML = 
102
+						'<img class="mui-media-object mui-pull-left" src="images/shuijiao.jpg">'+
103
+						'<div class="mui-media-body">'+
104
+							'<span class="title_color">蓝胖子'+(i + 1)+'</span> 处理了工单  '+
105
+							'<span class="mui-h5 mui-text-right fr "></span>'+
106
+							'<h5 class="">'+
107
+		                    	'标准版呼叫中心标准版呼叫中心标准版呼叫中心标准版呼叫中心标准版呼叫中心标准版呼叫中心'+
108
+		                    '</h5>'+
109
+							'<p class="mui-ellipsis"><span class="mui-h5 mui-text-right fr ">我是个图标</span></p>'+
110
+						'</div>';
111
+						table.appendChild(li);
112
+					}
113
+				}, 1000);
114
+			}
115
+		
116
+		
117
+			if (mui.os.plus) {
118
+				mui.plusReady(function() {
119
+					setTimeout(function() {
120
+						mui('#pullrefresh').pullRefresh().pullupLoading();
121
+					}, 1000);
122
+
123
+				});
124
+			} else {
125
+				mui.ready(function() {
126
+					mui('#pullrefresh').pullRefresh().pullupLoading();
127
+				});
128
+			}
129
+		
130
+		
131
+		</script>
132
+		
133
+	</body>
134
+
135
+</html>

+ 100 - 0
WebAPP/pullrefresh_sub.html

@@ -0,0 +1,100 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="utf-8">
6
+		<title>Hello MUI</title>
7
+		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
8
+		<meta name="apple-mobile-web-app-capable" content="yes">
9
+		<meta name="apple-mobile-web-app-status-bar-style" content="black">
10
+		<link rel="stylesheet" href="css/mui.min.css">
11
+		<style type="text/css">
12
+			.mui-table-view-chevron .mui-table-view-cell{
13
+				padding-right: 15px;
14
+			}
15
+			.title_color{
16
+				color: #00a1cb;
17
+			}
18
+			.mui-table-cell h4{
19
+				font-weight: normal;
20
+			}
21
+			.size-16{
22
+				font-size: 16px;
23
+			}
24
+			.fr{
25
+				float: right;
26
+				
27
+			}
28
+			h5{
29
+				line-height: 20px;
30
+			}
31
+			.mui-table-view .mui-media-object{
32
+				border-radius: 50%;
33
+			}
34
+		</style>
35
+	</head>
36
+
37
+	<body>
38
+		<!--下拉刷新容器-->
39
+		<div id="pullrefresh" class="mui-content mui-scroll-wrapper">
40
+			<div class="mui-scroll">
41
+				<!--数据列表-->
42
+				<ul class="mui-table-view mui-table-view-chevron">
43
+					</ul>
44
+			</div>
45
+		</div> 
46
+		<script src="js/mui.min.js"></script>
47
+		<script>
48
+			mui.init({
49
+				pullRefresh: {
50
+					container: '#pullrefresh',
51
+				up: {
52
+						callback: pullupRefresh
53
+					}
54
+				}
55
+			});
56
+		
57
+			var count = 0;
58
+			/**
59
+//			 * 上拉加载具体业务实现
60
+//			 */
61
+			function pullupRefresh() {
62
+				setTimeout(function() {
63
+					mui('#pullrefresh').pullRefresh().endPullupToRefresh((++count > 2)); //参数为true代表没有更多数据了。
64
+					var table = document.body.querySelector('.mui-table-view');
65
+					var cells = document.body.querySelectorAll('.mui-table-view-cell');
66
+					for (var i = cells.length, len = i + 20; i < len; i++) {
67
+						var li = document.createElement('li');
68
+						li.className = 'mui-table-view-cell mui-media';
69
+						li.innerHTML = 
70
+	
71
+						'<img class="mui-media-object mui-pull-left" src="images/shuijiao.jpg">'+
72
+						'<div class="mui-media-body">'+
73
+							'<span class="title_color">蓝胖子'+(i + 1)+'</span> 处理了工单  '+
74
+							'<span class="mui-h5 mui-text-right fr "></span>'+
75
+							'<h5 class="">'+
76
+		                    	'标准版呼叫中心标准版呼叫中心标准版呼叫中心标准版呼叫中心标准版呼叫中心标准版呼叫中心'+
77
+		                    '</h5>'+
78
+							'<p class="mui-ellipsis"><span class="mui-h5 mui-text-right fr ">我是个图标</span></p>'+
79
+						'</div>'
80
+;
81
+						table.appendChild(li);
82
+					}
83
+				}, 1500);
84
+			}
85
+			if (mui.os.plus) {
86
+				mui.plusReady(function() {
87
+					setTimeout(function() {
88
+						mui('#pullrefresh').pullRefresh().pullupLoading();
89
+					}, 1000);
90
+
91
+				});
92
+			} else {
93
+				mui.ready(function() {
94
+					mui('#pullrefresh').pullRefresh().pullupLoading();
95
+				});
96
+			}
97
+		</script>
98
+	</body>
99
+
100
+</html>

+ 122 - 0
WebAPP/reg.html

@@ -0,0 +1,122 @@
1
+<!DOCTYPE html>
2
+<html class="ui-page-login">
3
+
4
+	<head>
5
+		<meta charset="utf-8">
6
+		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
7
+		<title></title>
8
+		<link href="css/mui.min.css" rel="stylesheet" />
9
+		<link href="css/style.css" rel="stylesheet" />
10
+		<style>
11
+			.area {
12
+				margin: 20px auto 0px auto;
13
+			}
14
+			.mui-input-group:first-child {
15
+				margin-top: 20px;
16
+			}
17
+			.mui-input-group label {
18
+				width: 22%;
19
+			}
20
+			.mui-input-row label~input,
21
+			.mui-input-row label~select,
22
+			.mui-input-row label~textarea {
23
+				width: 78%;
24
+			}
25
+			.mui-checkbox input[type=checkbox],
26
+			.mui-radio input[type=radio] {
27
+				top: 6px;
28
+			}
29
+			.mui-content-padded {
30
+				margin-top: 25px;
31
+			}
32
+			.mui-btn {
33
+				padding: 10px;
34
+			}
35
+			
36
+		</style>
37
+	</head>
38
+
39
+	<body>
40
+		<header class="mui-bar mui-bar-nav">
41
+			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
42
+			<h1 class="mui-title">注册</h1>
43
+		</header>
44
+		<div class="mui-content">
45
+			<form class="mui-input-group">
46
+				<div class="mui-input-row">
47
+					<label>账号</label>
48
+					<input id='account' type="text" class="mui-input-clear mui-input" placeholder="请输入账号">
49
+				</div>
50
+				<div class="mui-input-row">
51
+					<label>密码</label>
52
+					<input id='password' type="password" class="mui-input-clear mui-input" placeholder="请输入密码">
53
+				</div>
54
+				<div class="mui-input-row">
55
+					<label>确认</label>
56
+					<input id='password_confirm' type="password" class="mui-input-clear mui-input" placeholder="请确认密码">
57
+				</div>
58
+				<div class="mui-input-row">
59
+					<label>邮箱</label>
60
+					<input id='email' type="email" class="mui-input-clear mui-input" placeholder="请输入邮箱">
61
+				</div>
62
+			</form>
63
+			<div class="mui-content-padded">
64
+				<button id='reg' class="mui-btn mui-btn-block mui-btn-primary">注册</button>
65
+			</div>
66
+			<div class="mui-content-padded">
67
+				<p>注册真实可用,注册成功后的用户可用于登录,但是示例程序并未和服务端交互,用户相关数据仅存储于本地。</p>
68
+			</div>
69
+		</div>
70
+		<script src="js/mui.min.js"></script>
71
+		<script src="js/app.js"></script>
72
+		<script>
73
+			(function($, doc) {
74
+				$.init();
75
+				$.plusReady(function() {
76
+					var settings = app.getSettings();
77
+					var regButton = doc.getElementById('reg');
78
+					var accountBox = doc.getElementById('account');
79
+					var passwordBox = doc.getElementById('password');
80
+					var passwordConfirmBox = doc.getElementById('password_confirm');
81
+					var emailBox = doc.getElementById('email');
82
+					regButton.addEventListener('tap', function(event) {
83
+						var regInfo = {
84
+							account: accountBox.value,
85
+							password: passwordBox.value,
86
+							email: emailBox.value
87
+						};
88
+						var passwordConfirm = passwordConfirmBox.value;
89
+						if (passwordConfirm != regInfo.password) {
90
+							plus.nativeUI.toast('密码两次输入不一致');
91
+							return;
92
+						}
93
+						app.reg(regInfo, function(err) {
94
+							if (err) {
95
+								plus.nativeUI.toast(err);
96
+								return;
97
+							}
98
+							plus.nativeUI.toast('注册成功');
99
+							/*
100
+							 * 注意:
101
+							 * 1、因本示例应用启动页就是登录页面,因此注册成功后,直接显示登录页即可;
102
+							 * 2、如果真实案例中,启动页不是登录页,则需修改,使用mui.openWindow打开真实的登录页面
103
+							 */
104
+							plus.webview.getLaunchWebview().show("pop-in",200,function () {
105
+								plus.webview.currentWebview().close("none");
106
+							});
107
+							//若启动页不是登录页,则需通过如下方式打开登录页
108
+//							$.openWindow({
109
+//								url: 'login.html',
110
+//								id: 'login',
111
+//								show: {
112
+//									aniShow: 'pop-in'
113
+//								}
114
+//							});
115
+						});
116
+					});
117
+				});
118
+			}(mui, document));
119
+		</script>
120
+	</body>
121
+
122
+</html>

+ 277 - 0
WebAPP/setting.html

@@ -0,0 +1,277 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="utf-8">
6
+		<title>Hello MUI</title>
7
+		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
8
+		<meta name="apple-mobile-web-app-capable" content="yes">
9
+		<meta name="apple-mobile-web-app-status-bar-style" content="black">
10
+		<link rel="stylesheet" href="./css/mui.min.css">
11
+		<style>
12
+			html,
13
+			body {
14
+				background-color: #efeff4;
15
+			}
16
+			.mui-views,
17
+			.mui-view,
18
+			.mui-pages,
19
+			.mui-page,
20
+			.mui-page-content {
21
+				position: absolute;
22
+				left: 0;
23
+				right: 0;
24
+				top: 0;
25
+				bottom: 0;
26
+				width: 100%;
27
+				height: 100%;
28
+				background-color: #efeff4;
29
+			}
30
+			.mui-pages {
31
+				top: 46px;
32
+				height: auto;
33
+			}
34
+			.mui-scroll-wrapper,
35
+			.mui-scroll {
36
+				background-color: #efeff4;
37
+			}
38
+			.mui-page.mui-transitioning {
39
+				-webkit-transition: -webkit-transform 200ms ease;
40
+				transition: transform 200ms ease;
41
+			}
42
+			.mui-page-left {
43
+				-webkit-transform: translate3d(0, 0, 0);
44
+				transform: translate3d(0, 0, 0);
45
+			}
46
+			.mui-ios .mui-page-left {
47
+				-webkit-transform: translate3d(-20%, 0, 0);
48
+				transform: translate3d(-20%, 0, 0);
49
+			}
50
+			.mui-navbar {
51
+				position: fixed;
52
+				right: 0;
53
+				left: 0;
54
+				z-index: 10;
55
+				height: 44px;
56
+				background-color: #00a1cb;
57
+				color: #fff;
58
+				
59
+			}
60
+			.mui-navbar .mui-bar {
61
+				position: absolute;
62
+				background: transparent;
63
+				text-align: center;
64
+			}
65
+			.mui-android .mui-navbar-inner.mui-navbar-left {
66
+				opacity: 0;
67
+			}
68
+			.mui-ios .mui-navbar-left .mui-left,
69
+			.mui-ios .mui-navbar-left .mui-center,
70
+			.mui-ios .mui-navbar-left .mui-right {
71
+				opacity: 0;
72
+			}
73
+			.mui-navbar .mui-btn-nav {
74
+				-webkit-transition: none;
75
+				transition: none;
76
+				-webkit-transition-duration: .0s;
77
+				transition-duration: .0s;
78
+			}
79
+			.mui-navbar .mui-bar .mui-title {
80
+				display: inline-block;
81
+				position: static;
82
+				width: auto;
83
+			}
84
+			.mui-page-shadow {
85
+				position: absolute;
86
+				right: 100%;
87
+				top: 0;
88
+				width: 16px;
89
+				height: 100%;
90
+				z-index: -1;
91
+				content: '';
92
+			}
93
+			.mui-page-shadow {
94
+				background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, .01) 50%, rgba(0, 0, 0, .2) 100%);
95
+				background: linear-gradient(to right, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, .01) 50%, rgba(0, 0, 0, .2) 100%);
96
+			}
97
+			.mui-navbar-inner.mui-transitioning,
98
+			.mui-navbar-inner .mui-transitioning {
99
+				-webkit-transition: opacity 200ms ease, -webkit-transform 200ms ease;
100
+				transition: opacity 200ms ease, transform 200ms ease;
101
+			}
102
+			.mui-page {
103
+				display: none;
104
+			}
105
+			.mui-pages .mui-page {
106
+				display: block;
107
+			}
108
+			.mui-page .mui-table-view:first-child {
109
+				margin-top: 15px;
110
+			}
111
+			.mui-page .mui-table-view:last-child {
112
+				margin-bottom: 30px;
113
+			}
114
+			.mui-table-view {
115
+				margin-top: 20px;
116
+			}
117
+			.mui-table-view:after {
118
+				height: 0;
119
+			}
120
+			.mui-table-view span.mui-pull-right {
121
+				color: #999;
122
+			}
123
+			.mui-table-view-divider {
124
+				background-color: #efeff4;
125
+				font-size: 14px;
126
+			}
127
+			.mui-table-view-divider:before,
128
+			.mui-table-view-divider:after {
129
+				height: 0;
130
+			}
131
+			.mui-content-padded {
132
+				margin: 10px 0px;
133
+			}
134
+			.mui-locker {
135
+				margin: 35px auto;
136
+				display: none;
137
+			}
138
+			.mui-title{
139
+				color: #fff;
140
+			}
141
+			.mui-icon-left-nav{
142
+				color: #fff;
143
+			}
144
+		</style>
145
+		<!--<link rel="stylesheet" type="text/css" href="./css/feedback-page.css" />-->
146
+	</head>
147
+
148
+	<body>
149
+		<!--页面主结构开始-->
150
+		<!--<div id="app" class="mui-views">
151
+			<div class="mui-view">
152
+				<div class="mui-navbar">
153
+				</div>
154
+				<div class="mui-pages">
155
+				</div>
156
+			</div>
157
+		</div>-->
158
+		<!--页面主结构结束-->
159
+		<!--单页面开始-->
160
+		<!--<div id="setting" class="mui-page">-->
161
+			<!--页面标题栏开始-->
162
+			<!--<div class="mui-navbar-inner mui-bar mui-bar-nav">-->
163
+				<!--<button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left">
164
+					<span class="mui-icon mui-icon-left-nav"></span>
165
+				</button>-->
166
+				<!--<h1 class="mui-center mui-title">设置</h1>-->
167
+			<!--</div>-->
168
+			<!--页面标题栏结束
169
+			<!--页面主内容区开始-->
170
+			<div class="mui-page-content">
171
+				<div class="mui-scroll-wrapper">
172
+					<div class="mui-scroll">
173
+						<ul class="mui-table-view mui-table-view-chevron">
174
+							<li class="mui-table-view-cell">
175
+								<a id="rate" class="mui-navigate-right">评分鼓励</a>
176
+							</li>
177
+							<li class="mui-table-view-cell">
178
+								<a id="share" class="mui-navigate-right">分享推荐</a>
179
+							</li>
180
+							<li class="mui-table-view-cell">
181
+								<a id="tel" class="mui-navigate-right">客服电话</a>
182
+							</li>
183
+							<li class="mui-table-view-cell">
184
+								<a id="feedback-btn" href="#feedback" class="mui-navigate-right">问题反馈</a>
185
+							</li>
186
+						</ul>
187
+						<ul class="mui-table-view mui-table-view-chevron">
188
+							<li class="mui-table-view-cell">
189
+								<a href="#lock" class="mui-navigate-right">设置锁屏图案</a>
190
+							</li>
191
+						</ul>
192
+						<ul class="mui-table-view">
193
+							<li class="mui-table-view-cell" style="text-align: center;">
194
+								<a id='exit'>退出</a>
195
+							</li>
196
+						</ul>
197
+					</div>
198
+				</div>
199
+			</div>
200
+			<!--页面主内容区结束-->
201
+		</div>
202
+		
203
+	</body>
204
+	<script src="./js/mui.min.js "></script>
205
+	<script src="./js/mui.view.js "></script>
206
+	<script src='./libs/easymob-webim-sdk/jquery-1.11.1.js'></script>
207
+	<script src='./libs/easymob-webim-sdk/strophe-custom-2.0.0.js'></script>
208
+	<script src='./libs/easymob-webim-sdk/json2.js'></script>
209
+	<script src="./libs/easymob-webim-sdk/easemob.im-1.0.5.js"></script>
210
+	<script src='./js/feedback.js'></script>
211
+	<!--<script src="./js/feedback-page.js"></script>-->
212
+	<script src="./js/mui.locker.js"></script>
213
+	<script src="./js/app.js"></script>
214
+	<script>
215
+		mui.init();
216
+		 //初始化单页的区域滚动
217
+		mui('.mui-scroll-wrapper').scroll();
218
+		//客服电话
219
+		document.getElementById("tel").addEventListener('tap', function() {
220
+			plus.device.dial("18539292205");
221
+		});
222
+		 //退出操作******************
223
+		document.getElementById('exit').addEventListener('tap', function() {
224
+			if (mui.os.ios) {
225
+				app.setState({});
226
+				mui.openWindow({
227
+					url: 'login.html',
228
+					id: 'login',
229
+					show: {
230
+						aniShow: 'pop-in'
231
+					},
232
+					waiting: {
233
+						autoShow: false
234
+					}
235
+				});
236
+				return;
237
+			}
238
+			var btnArray = [{
239
+				title: "注销当前账号"
240
+			}, {
241
+				title: "直接关闭应用"
242
+			}];
243
+			plus.nativeUI.actionSheet({
244
+				cancel: "取消",
245
+				buttons: btnArray
246
+			}, function(event) {
247
+				var index = event.index;
248
+				switch (index) {
249
+					case 1:
250
+						//注销账号
251
+						app.setState({});
252
+						/*
253
+						 * 注意:
254
+						 * 1、因本示例应用启动页就是登录页面,因此注册成功后,直接显示登录页即可;
255
+						 * 2、如果真实案例中,启动页不是登录页,则需修改,使用mui.openWindow打开真实的登录页面
256
+						 */
257
+						plus.webview.getLaunchWebview().show("pop-in");
258
+						//若启动页不是登录页,则需通过如下方式打开登录页
259
+//						mui.openWindow({
260
+//							url: 'login.html',
261
+//							id: 'login',
262
+//							show: {
263
+//								aniShow: 'pop-in'
264
+//							}
265
+//						});
266
+						break;
267
+					case 2:
268
+						plus.runtime.quit();
269
+						break;
270
+				}
271
+			});
272
+		}, false);
273
+		 //************************
274
+	
275
+	</script>
276
+
277
+</html>

+ 264 - 0
WebAPP/tx.html

@@ -0,0 +1,264 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="utf-8">
6
+		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
7
+		<meta name="apple-mobile-web-app-capable" content="yes">
8
+		<meta name="apple-mobile-web-app-status-bar-style" content="black">
9
+		<title>通讯录</title>
10
+		<link href="css/mui.min.css" rel="stylesheet" />
11
+		<link href="css/mui.indexedlist.css" rel="stylesheet" />
12
+		<style>
13
+			html,
14
+			body {
15
+				height: 100%;
16
+				overflow: hidden;
17
+			}
18
+			.mui-bar {
19
+				-webkit-box-shadow: none;
20
+				box-shadow: none;
21
+			}
22
+		</style>
23
+	</head>
24
+
25
+	<body>
26
+		<div class="mui-content">
27
+			<div id='list' class="mui-indexed-list">
28
+				<div class="mui-indexed-list-search mui-input-row mui-search">
29
+					<input type="search" class="mui-input-clear mui-indexed-list-search-input" placeholder="搜索机场">
30
+				</div>
31
+				<div class="mui-indexed-list-bar">
32
+					<a>A</a>
33
+					<a>B</a>
34
+					<a>C</a>
35
+					<a>D</a>
36
+					<a>E</a>
37
+					<a>F</a>
38
+					<a>G</a>
39
+					<a>H</a>
40
+					<a>I</a>
41
+					<a>J</a>
42
+					<a>K</a>
43
+					<a>L</a>
44
+					<a>M</a>
45
+					<a>N</a>
46
+					<a>O</a>
47
+					<a>P</a>
48
+					<a>Q</a>
49
+					<a>R</a>
50
+					<a>S</a>
51
+					<a>T</a>
52
+					<a>U</a>
53
+					<a>V</a>
54
+					<a>W</a>
55
+					<a>X</a>
56
+					<a>Y</a>
57
+					<a>Z</a>
58
+				</div>
59
+				<div class="mui-indexed-list-alert"></div>
60
+				<div class="mui-indexed-list-inner">
61
+					<div class="mui-indexed-list-empty-alert">没有数据</div>
62
+					<ul class="mui-table-view">
63
+						<li data-group="A" class="mui-table-view-divider mui-indexed-list-group">A</li>
64
+						<li data-value="AKU" data-tags="AKeSu" class="mui-table-view-cell mui-indexed-list-item">阿克苏机场</li>
65
+						<li data-value="BPL" data-tags="ALaShanKou" class="mui-table-view-cell mui-indexed-list-item">阿拉山口机场</li>
66
+						<li data-value="AAT" data-tags="ALeTai" class="mui-table-view-cell mui-indexed-list-item">阿勒泰机场</li>
67
+						<li data-value="NGQ" data-tags="ALiKunSha" class="mui-table-view-cell mui-indexed-list-item">阿里昆莎机场</li>
68
+						<li data-value="AQG" data-tags="AnQingTianZhuShan" class="mui-table-view-cell mui-indexed-list-item">安庆天柱山机场</li>
69
+						<li data-value="MFM" data-tags="AoMenGuoJi" class="mui-table-view-cell mui-indexed-list-item">澳门国际机场</li>
70
+						<li data-group="B" class="mui-table-view-divider mui-indexed-list-group">B</li>
71
+						<li data-value="BSD" data-tags="BaoShan" class="mui-table-view-cell mui-indexed-list-item">保山机场</li>
72
+						<li data-value="BAV" data-tags="BaoTou" class="mui-table-view-cell mui-indexed-list-item">包头机场</li>
73
+						<li data-value="BHY" data-tags="BeiHaiFuCheng" class="mui-table-view-cell mui-indexed-list-item">北海福成机场</li>
74
+						<li data-value="NAY" data-tags="BeiJingNanYuan" class="mui-table-view-cell mui-indexed-list-item">北京南苑机场</li>
75
+						<li data-value="PEK" data-tags="BeiJingShouDuGuoJi" class="mui-table-view-cell mui-indexed-list-item">北京首都国际机场</li>
76
+						<li data-group="C" class="mui-table-view-divider mui-indexed-list-group">C</li>
77
+						<li data-value="NBS" data-tags="ChangBaiShan" class="mui-table-view-cell mui-indexed-list-item">长白山机场</li>
78
+						<li data-value="CGQ" data-tags="ChangChunLongJiaGuoJi" class="mui-table-view-cell mui-indexed-list-item">长春龙嘉国际机场</li>
79
+						<li data-value="CGD" data-tags="ChangDeTaoHuaYuan" class="mui-table-view-cell mui-indexed-list-item">常德桃花源机场</li>
80
+						<li data-value="BPX" data-tags="ChangDuBangDa" class="mui-table-view-cell mui-indexed-list-item">昌都邦达机场</li>
81
+						<li data-value="CSX" data-tags="ChangShaHuangHuaGuoJi" class="mui-table-view-cell mui-indexed-list-item">长沙黄花国际机场</li>
82
+						<li data-value="CIH" data-tags="ChangZhiWangCun" class="mui-table-view-cell mui-indexed-list-item">长治王村机场</li>
83
+						<li data-value="CZX" data-tags="ChangZhouBenNiu" class="mui-table-view-cell mui-indexed-list-item">常州奔牛机场</li>
84
+						<li data-value="CTU" data-tags="ChengDuShuangLiuGuoJi" class="mui-table-view-cell mui-indexed-list-item">成都双流国际机场</li>
85
+						<li data-value="CIF" data-tags="ChiFeng" class="mui-table-view-cell mui-indexed-list-item">赤峰机场</li>
86
+						<li data-group="D" class="mui-table-view-divider mui-indexed-list-group">D</li>
87
+						<li data-value="DLU" data-tags="DaLi" class="mui-table-view-cell mui-indexed-list-item">大理机场</li>
88
+						<li data-value="DLC" data-tags="DaLianZhouShuiZiGuoJi" class="mui-table-view-cell mui-indexed-list-item">大连周水子国际机场</li>
89
+						<li data-value="DQA" data-tags="DaQingSaErTu" class="mui-table-view-cell mui-indexed-list-item">大庆萨尔图机场</li>
90
+						<li data-value="DAT" data-tags="DaTongDongWangZhuang" class="mui-table-view-cell mui-indexed-list-item">大同东王庄机场</li>
91
+						<li data-value="DAX" data-tags="DaZhouHeShi" class="mui-table-view-cell mui-indexed-list-item">达州河市机场</li>
92
+						<li data-value="DDG" data-tags="DanDongLangTou" class="mui-table-view-cell mui-indexed-list-item">丹东浪头机场</li>
93
+						<li data-value="LUM" data-tags="DeHongMangShi" class="mui-table-view-cell mui-indexed-list-item">德宏芒市机场</li>
94
+						<li data-value="DIG" data-tags="DiQingXiangGeLiLa" class="mui-table-view-cell mui-indexed-list-item">迪庆香格里拉机场</li>
95
+						<li data-value="DOY" data-tags="DongYing" class="mui-table-view-cell mui-indexed-list-item">东营机场</li>
96
+						<li data-value="DNH" data-tags="DunHuang" class="mui-table-view-cell mui-indexed-list-item">敦煌机场</li>
97
+						<li data-group="E" class="mui-table-view-divider mui-indexed-list-group">E</li>
98
+						<li data-value="DSN" data-tags="EErDuoSi" class="mui-table-view-cell mui-indexed-list-item">鄂尔多斯机场</li>
99
+						<li data-value="ENH" data-tags="EnShiXuJiaPing" class="mui-table-view-cell mui-indexed-list-item">恩施许家坪机场</li>
100
+						<li data-value="ERL" data-tags="ErLianHaoTeSaiWuSuGuoJi" class="mui-table-view-cell mui-indexed-list-item">二连浩特赛乌苏国际机场</li>
101
+						<li data-group="F" class="mui-table-view-divider mui-indexed-list-group">F</li>
102
+						<li data-value="FUG" data-tags="FuYangXiGuan" class="mui-table-view-cell mui-indexed-list-item">阜阳西关机场</li>
103
+						<li data-value="FOC" data-tags="FuZhouChangLeGuoJi" class="mui-table-view-cell mui-indexed-list-item">福州长乐国际机场</li>
104
+						<li data-group="G" class="mui-table-view-divider mui-indexed-list-group">G</li>
105
+						<li data-value="KOW" data-tags="GanZhouHuangJin" class="mui-table-view-cell mui-indexed-list-item">赣州黄金机场</li>
106
+						<li data-value="GOQ" data-tags="GeErMu" class="mui-table-view-cell mui-indexed-list-item">格尔木机场</li>
107
+						<li data-value="GYU" data-tags="GuYuanLiuPanShan" class="mui-table-view-cell mui-indexed-list-item">固原六盘山机场</li>
108
+						<li data-value="GYS" data-tags="GuangYuanPanLong" class="mui-table-view-cell mui-indexed-list-item">广元盘龙机场</li>
109
+						<li data-value="CAN" data-tags="GuangZhouBaiYunGuoJi" class="mui-table-view-cell mui-indexed-list-item">广州白云国际机场</li>
110
+						<li data-value="KWL" data-tags="GuiLinLiangJiangGuoJi" class="mui-table-view-cell mui-indexed-list-item">桂林两江国际机场</li>
111
+						<li data-value="KWE" data-tags="GuiYangLongDongBaoGuoJi" class="mui-table-view-cell mui-indexed-list-item">贵阳龙洞堡国际机场</li>
112
+						<li data-group="H" class="mui-table-view-divider mui-indexed-list-group">H</li>
113
+						<li data-value="HRB" data-tags="HaErBinTaiPingGuoJi" class="mui-table-view-cell mui-indexed-list-item">哈尔滨太平国际机场</li>
114
+						<li data-value="HMI" data-tags="HaMi" class="mui-table-view-cell mui-indexed-list-item">哈密机场</li>
115
+						<li data-value="HAK" data-tags="HaiKouMeiLanGuoJi" class="mui-table-view-cell mui-indexed-list-item">海口美兰国际机场</li>
116
+						<li data-value="HLD" data-tags="HaiLaErDongShanGuoJi" class="mui-table-view-cell mui-indexed-list-item">海拉尔东山国际机场</li>
117
+						<li data-value="HDG" data-tags="HanDan" class="mui-table-view-cell mui-indexed-list-item">邯郸机场</li>
118
+						<li data-value="HZG" data-tags="HanZhong" class="mui-table-view-cell mui-indexed-list-item">汉中机场</li>
119
+						<li data-value="HGH" data-tags="HangZhouXiaoShanGuoJi" class="mui-table-view-cell mui-indexed-list-item">杭州萧山国际机场</li>
120
+						<li data-value="HFE" data-tags="HeFeiLuoGangGuoJi" class="mui-table-view-cell mui-indexed-list-item">合肥骆岗国际机场</li>
121
+						<li data-value="HTN" data-tags="HeTian" class="mui-table-view-cell mui-indexed-list-item">和田机场</li>
122
+						<li data-value="HEK" data-tags="HeiHe" class="mui-table-view-cell mui-indexed-list-item">黑河机场</li>
123
+						<li data-value="HET" data-tags="HuHeHaoTeBaiTaGuoJi" class="mui-table-view-cell mui-indexed-list-item">呼和浩特白塔国际机场</li>
124
+						<li data-value="HIA" data-tags="HuaiAnLianShui" class="mui-table-view-cell mui-indexed-list-item">淮安涟水机场</li>
125
+						<li data-value="TXN" data-tags="HuangShanTunXiGuoJi" class="mui-table-view-cell mui-indexed-list-item">黄山屯溪国际机场</li>
126
+						<li data-group="J" class="mui-table-view-divider mui-indexed-list-group">J</li>
127
+						<li data-value="TNA" data-tags="JiNanYaoQiangGuoJi" class="mui-table-view-cell mui-indexed-list-item">济南遥墙国际机场</li>
128
+						<li data-value="JNG" data-tags="JiNingQuFu" class="mui-table-view-cell mui-indexed-list-item">济宁曲阜机场</li>
129
+						<li data-value="JXA" data-tags="JiXiXingKaiHu" class="mui-table-view-cell mui-indexed-list-item">鸡西兴凯湖机场</li>
130
+						<li data-value="JMU" data-tags="JiaMuSiDongJiao" class="mui-table-view-cell mui-indexed-list-item">佳木斯东郊机场</li>
131
+						<li data-value="JGN" data-tags="JiaYuGuan" class="mui-table-view-cell mui-indexed-list-item">嘉峪关机场</li>
132
+						<li data-value="JNZ" data-tags="JinZhouXiaoLingZi" class="mui-table-view-cell mui-indexed-list-item">锦州小岭子机场</li>
133
+						<li data-value="JDZ" data-tags="JingDeZhen" class="mui-table-view-cell mui-indexed-list-item">景德镇机场</li>
134
+						<li data-value="JGS" data-tags="JingGangShan" class="mui-table-view-cell mui-indexed-list-item">井冈山机场</li>
135
+						<li data-value="JIU" data-tags="JiuJiangLuShan" class="mui-table-view-cell mui-indexed-list-item">九江庐山机场</li>
136
+						<li data-value="JZH" data-tags="JiuZhaiHuangLong" class="mui-table-view-cell mui-indexed-list-item">九寨黄龙机场</li>
137
+						<li data-group="K" class="mui-table-view-divider mui-indexed-list-group">K</li>
138
+						<li data-value="KHG" data-tags="KaShi" class="mui-table-view-cell mui-indexed-list-item">喀什机场</li>
139
+						<li data-value="KRY" data-tags="KeLaMaYi" class="mui-table-view-cell mui-indexed-list-item">克拉玛依机场</li>
140
+						<li data-value="KCA" data-tags="KuCheGuiZi" class="mui-table-view-cell mui-indexed-list-item">库车龟兹机场</li>
141
+						<li data-value="KRL" data-tags="KuErLe" class="mui-table-view-cell mui-indexed-list-item">库尔勒机场</li>
142
+						<li data-value="KMG" data-tags="KunMingWuJiaBaGuoJi" class="mui-table-view-cell mui-indexed-list-item">昆明巫家坝国际机场</li>
143
+						<li data-group="L" class="mui-table-view-divider mui-indexed-list-group">L</li>
144
+						<li data-value="LXA" data-tags="LaSaGongGa" class="mui-table-view-cell mui-indexed-list-item">拉萨贡嘎机场</li>
145
+						<li data-value="LHW" data-tags="LanZhouZhongChuan" class="mui-table-view-cell mui-indexed-list-item">兰州中川机场</li>
146
+						<li data-value="LJG" data-tags="LiJiangSanYi" class="mui-table-view-cell mui-indexed-list-item">丽江三义机场</li>
147
+						<li data-value="HZH" data-tags="LiPing" class="mui-table-view-cell mui-indexed-list-item">黎平机场</li>
148
+						<li data-value="LYG" data-tags="LianYunGangBaiTaBu" class="mui-table-view-cell mui-indexed-list-item">连云港白塔埠机场</li>
149
+						<li data-value="LNJ" data-tags="LinCang" class="mui-table-view-cell mui-indexed-list-item">临沧机场</li>
150
+						<li data-value="LYI" data-tags="LinYi" class="mui-table-view-cell mui-indexed-list-item">临沂机场</li>
151
+						<li data-value="LZY" data-tags="LinZhiMiLin" class="mui-table-view-cell mui-indexed-list-item">林芝米林机场</li>
152
+						<li data-value="LZH" data-tags="LiuZhouBaiLian" class="mui-table-view-cell mui-indexed-list-item">柳州白莲机场</li>
153
+						<li data-value="LCX" data-tags="LongYanGuanZhiShan" class="mui-table-view-cell mui-indexed-list-item">龙岩冠豸山机场</li>
154
+						<li data-value="LZO" data-tags="LuZhouLanTian" class="mui-table-view-cell mui-indexed-list-item">泸州蓝田机场</li>
155
+						<li data-value="LYA" data-tags="LuoYangBeiJiao" class="mui-table-view-cell mui-indexed-list-item">洛阳北郊机场</li>
156
+						<li data-group="M" class="mui-table-view-divider mui-indexed-list-group">M</li>
157
+						<li data-value="NZH" data-tags="ManZhouLiXiJiao" class="mui-table-view-cell mui-indexed-list-item">满洲里西郊机场</li>
158
+						<li data-value="MIG" data-tags="MianYangNanJiao" class="mui-table-view-cell mui-indexed-list-item">绵阳南郊机场</li>
159
+						<li data-value="OHE" data-tags="MoHeGuLian" class="mui-table-view-cell mui-indexed-list-item">漠河古莲机场</li>
160
+						<li data-value="MDG" data-tags="MuDanJiangHaiLang" class="mui-table-view-cell mui-indexed-list-item">牡丹江海浪机场</li>
161
+						<li data-group="N" class="mui-table-view-divider mui-indexed-list-group">N</li>
162
+						<li data-value="KHN" data-tags="NanChangChangBeiGuoJi" class="mui-table-view-cell mui-indexed-list-item">南昌昌北国际机场</li>
163
+						<li data-value="NAO" data-tags="NanChongGaoPing" class="mui-table-view-cell mui-indexed-list-item">南充高坪机场</li>
164
+						<li data-value="NKG" data-tags="NanJingLuKouGuoJi" class="mui-table-view-cell mui-indexed-list-item">南京禄口国际机场</li>
165
+						<li data-value="NNG" data-tags="NanNingWuXu" class="mui-table-view-cell mui-indexed-list-item">南宁吴圩机场</li>
166
+						<li data-value="NTG" data-tags="NanTongXingDong" class="mui-table-view-cell mui-indexed-list-item">南通兴东机场</li>
167
+						<li data-value="NNY" data-tags="NanYangJiangYing" class="mui-table-view-cell mui-indexed-list-item">南阳姜营机场</li>
168
+						<li data-value="NGB" data-tags="NingBoLiSheGuoJi" class="mui-table-view-cell mui-indexed-list-item">宁波栎社国际机场</li>
169
+						<li data-group="P" class="mui-table-view-divider mui-indexed-list-group">P</li>
170
+						<li data-value="SYM" data-tags="PuErSiMao" class="mui-table-view-cell mui-indexed-list-item">普洱思茅机场</li>
171
+						<li data-group="Q" class="mui-table-view-divider mui-indexed-list-group">Q</li>
172
+						<li data-value="NDG" data-tags="QiQiHaErSanJiaZi" class="mui-table-view-cell mui-indexed-list-item">齐齐哈尔三家子机场</li>
173
+						<li data-value="SHP" data-tags="QinHuangDaoShanHaiGuan" class="mui-table-view-cell mui-indexed-list-item">秦皇岛山海关机场</li>
174
+						<li data-value="TAO" data-tags="QingDaoLiuTingGuoJi" class="mui-table-view-cell mui-indexed-list-item">青岛流亭国际机场</li>
175
+						<li data-value="JUZ" data-tags="QuZhou" class="mui-table-view-cell mui-indexed-list-item">衢州机场</li>
176
+						<li data-value="JJN" data-tags="QuanZhouJinJiang" class="mui-table-view-cell mui-indexed-list-item">泉州晋江机场</li>
177
+						<li data-group="R" class="mui-table-view-divider mui-indexed-list-group">R</li>
178
+						<li data-value="RKZ" data-tags="RiKaZeHePing" class="mui-table-view-cell mui-indexed-list-item">日喀则和平机场</li>
179
+						<li data-group="S" class="mui-table-view-divider mui-indexed-list-group">S</li>
180
+						<li data-value="SYX" data-tags="SanYaFengHuangGuoJi" class="mui-table-view-cell mui-indexed-list-item">三亚凤凰国际机场</li>
181
+						<li data-value="SWA" data-tags="ShanTouWaiSha" class="mui-table-view-cell mui-indexed-list-item">汕头外砂机场</li>
182
+						<li data-value="SHA" data-tags="ShangHaiHongQiaoGuoJi" class="mui-table-view-cell mui-indexed-list-item">上海虹桥国际机场</li>
183
+						<li data-value="PVG" data-tags="ShangHaiPuDongGuoJi" class="mui-table-view-cell mui-indexed-list-item">上海浦东国际机场</li>
184
+						<li data-value="SZX" data-tags="ShenChouBaoAnGuoJi" class="mui-table-view-cell mui-indexed-list-item">深圳宝安国际机场</li>
185
+						<li data-value="SHE" data-tags="ShenYangTaoXianGuoJi" class="mui-table-view-cell mui-indexed-list-item">沈阳桃仙国际机场</li>
186
+						<li data-value="SJW" data-tags="ShiJiaZhuangZhengDingGuoJi" class="mui-table-view-cell mui-indexed-list-item">石家庄正定国际机场</li>
187
+						<li data-value="WUX" data-tags="SuNanShuoFangGuoJi" class="mui-table-view-cell mui-indexed-list-item">苏南硕放国际机场</li>
188
+						<li data-group="T" class="mui-table-view-divider mui-indexed-list-group">T</li>
189
+						<li data-value="TCG" data-tags="TaCheng" class="mui-table-view-cell mui-indexed-list-item">塔城机场</li>
190
+						<li data-value="TYN" data-tags="TaiYuanWuSuGuoJi" class="mui-table-view-cell mui-indexed-list-item">太原武宿国际机场</li>
191
+						<li data-value="HYN" data-tags="TaiZhouLuQiao-HuangYanJiChang" class="mui-table-view-cell mui-indexed-list-item">台州路桥机场 (黄岩机场)</li>
192
+						<li data-value="TVS" data-tags="TangShanSanNvHe" class="mui-table-view-cell mui-indexed-list-item">唐山三女河机场</li>
193
+						<li data-value="TCZ" data-tags="TengChongTuoFeng" class="mui-table-view-cell mui-indexed-list-item">腾冲驼峰机场</li>
194
+						<li data-value="TSN" data-tags="TianJinBinHaiGuoJi" class="mui-table-view-cell mui-indexed-list-item">天津滨海国际机场</li>
195
+						<li data-value="TGO" data-tags="TongLiao" class="mui-table-view-cell mui-indexed-list-item">通辽机场</li>
196
+						<li data-value="TEN" data-tags="TongRenFengHuang" class="mui-table-view-cell mui-indexed-list-item">铜仁凤凰机场</li>
197
+						<li data-group="W" class="mui-table-view-divider mui-indexed-list-group">W</li>
198
+						<li data-value="WXN" data-tags="WanZhouWuQiao" class="mui-table-view-cell mui-indexed-list-item">万州五桥机场</li>
199
+						<li data-value="WEF" data-tags="WeiFang" class="mui-table-view-cell mui-indexed-list-item">潍坊机场</li>
200
+						<li data-value="WEH" data-tags="WeiHaiDaShuiBo" class="mui-table-view-cell mui-indexed-list-item">威海大水泊机场</li>
201
+						<li data-value="WNH" data-tags="WenShanPuZheHei" class="mui-table-view-cell mui-indexed-list-item">文山普者黑机场</li>
202
+						<li data-value="WNZ" data-tags="WenZhouYongQiangGuoJi" class="mui-table-view-cell mui-indexed-list-item">温州永强国际机场</li>
203
+						<li data-value="WUA" data-tags="WuHai" class="mui-table-view-cell mui-indexed-list-item">乌海机场</li>
204
+						<li data-value="WUH" data-tags="WuHanTianHeGuoJi" class="mui-table-view-cell mui-indexed-list-item">武汉天河国际机场</li>
205
+						<li data-value="HLH" data-tags="WuLanHaoTe" class="mui-table-view-cell mui-indexed-list-item">乌兰浩特机场</li>
206
+						<li data-value="URC" data-tags="WuLuMuQiDiWoBaoGuoJi" class="mui-table-view-cell mui-indexed-list-item">乌鲁木齐地窝堡国际机场</li>
207
+						<li data-value="WUS" data-tags="WuYiShan" class="mui-table-view-cell mui-indexed-list-item">武夷山机场</li>
208
+						<li data-value="WUZ" data-tags="WuZhouChangZhouDao" class="mui-table-view-cell mui-indexed-list-item">梧州长洲岛机场</li>
209
+						<li data-group="X" class="mui-table-view-divider mui-indexed-list-group">X</li>
210
+						<li data-value="XIY" data-tags="XiAnXianYangGuoJi" class="mui-table-view-cell mui-indexed-list-item">西安咸阳国际机场</li>
211
+						<li data-value="XIC" data-tags="XiChangQingShan" class="mui-table-view-cell mui-indexed-list-item">西昌青山机场</li>
212
+						<li data-value="XIL" data-tags="XiLinHaoTe" class="mui-table-view-cell mui-indexed-list-item">锡林浩特机场</li>
213
+						<li data-value="XNN" data-tags="XiNingCaoJiaBao" class="mui-table-view-cell mui-indexed-list-item">西宁曹家堡机场</li>
214
+						<li data-value="JHG" data-tags="XiShuangBanNaGaSa" class="mui-table-view-cell mui-indexed-list-item">西双版纳嘎洒机场</li>
215
+						<li data-value="XMN" data-tags="XiaMenGaoQiGuoJi" class="mui-table-view-cell mui-indexed-list-item">厦门高崎国际机场</li>
216
+						<li data-value="HKG" data-tags="XiangGangGuoJi" class="mui-table-view-cell mui-indexed-list-item">香港国际机场</li>
217
+						<li data-value="XFN" data-tags="XiangYangLiuJi" class="mui-table-view-cell mui-indexed-list-item">襄阳刘集机场</li>
218
+						<li data-value="ACX" data-tags="XingYi" class="mui-table-view-cell mui-indexed-list-item">兴义机场</li>
219
+						<li data-value="XUZ" data-tags="XuZhouGuanYin" class="mui-table-view-cell mui-indexed-list-item">徐州观音机场</li>
220
+						<li data-group="Y" class="mui-table-view-divider mui-indexed-list-group">Y</li>
221
+						<li data-value="ENY" data-tags="YanAnErShiLiBao" class="mui-table-view-cell mui-indexed-list-item">延安二十里堡机场</li>
222
+						<li data-value="YNZ" data-tags="YanCheng" class="mui-table-view-cell mui-indexed-list-item">盐城机场</li>
223
+						<li data-value="YNJ" data-tags="YanJiChaoYangChuan" class="mui-table-view-cell mui-indexed-list-item">延吉朝阳川机场</li>
224
+						<li data-value="YNT" data-tags="YanTaiLaiShanGuoJi" class="mui-table-view-cell mui-indexed-list-item">烟台莱山国际机场</li>
225
+						<li data-value="YBP" data-tags="YiBinCaiBa" class="mui-table-view-cell mui-indexed-list-item">宜宾菜坝机场</li>
226
+						<li data-value="YIH" data-tags="YiChangSanXia" class="mui-table-view-cell mui-indexed-list-item">宜昌三峡机场</li>
227
+						<li data-value="LDS" data-tags="YiChunLinDu" class="mui-table-view-cell mui-indexed-list-item">伊春林都机场</li>
228
+						<li data-value="YIN" data-tags="YiNing" class="mui-table-view-cell mui-indexed-list-item">伊宁机场</li>
229
+						<li data-value="YIW" data-tags="YiWu" class="mui-table-view-cell mui-indexed-list-item">义乌机场</li>
230
+						<li data-value="INC" data-tags="YinChuanHeDong" class="mui-table-view-cell mui-indexed-list-item">银川河东机场</li>
231
+						<li data-value="LLF" data-tags="YongZhouLingLing" class="mui-table-view-cell mui-indexed-list-item">永州零陵机场</li>
232
+						<li data-value="UYN" data-tags="YuLinYuYang" class="mui-table-view-cell mui-indexed-list-item">榆林榆阳机场</li>
233
+						<li data-value="YUS" data-tags="YuShuBaTang" class="mui-table-view-cell mui-indexed-list-item">玉树巴塘机场</li>
234
+						<li data-value="YCU" data-tags="YunChengZhangXiao" class="mui-table-view-cell mui-indexed-list-item">运城张孝机场</li>
235
+						<li data-group="Z" class="mui-table-view-divider mui-indexed-list-group">Z</li>
236
+						<li data-value="ZHA" data-tags="ZhanJiang" class="mui-table-view-cell mui-indexed-list-item">湛江机场</li>
237
+						<li data-value="ZAT" data-tags="ZhaoTong" class="mui-table-view-cell mui-indexed-list-item">昭通机场</li>
238
+						<li data-value="CGO" data-tags="ZhengZhouXinZhengGuoJi" class="mui-table-view-cell mui-indexed-list-item">郑州新郑国际机场</li>
239
+						<li data-value="HJJ" data-tags="ZhiJiang" class="mui-table-view-cell mui-indexed-list-item">芷江机场</li>
240
+						<li data-value="CKG" data-tags="ZhongQingJiangBeiGuoJi" class="mui-table-view-cell mui-indexed-list-item">重庆江北国际机场</li>
241
+						<li data-value="ZHY" data-tags="ZhongWeiXiangShan" class="mui-table-view-cell mui-indexed-list-item">中卫香山机场</li>
242
+						<li data-value="HSN" data-tags="ZhouShanZhuJiaJian" class="mui-table-view-cell mui-indexed-list-item">舟山朱家尖机场</li>
243
+						<li data-value="ZUH" data-tags="ZhuHaiSanZao" class="mui-table-view-cell mui-indexed-list-item">珠海三灶机场</li>						
244
+					</ul>
245
+				</div>
246
+			</div>
247
+		</div>
248
+		<script src="js/mui.min.js"></script>
249
+		<script src="js/mui.indexedlist.js"></script>
250
+		<script type="text/javascript" charset="utf-8">
251
+			mui.init();
252
+			mui.ready(function() {
253
+//				var header = document.querySelector('header.mui-bar');
254
+				var list = document.getElementById('list');
255
+				//calc hieght
256
+//				list.style.height = (document.body.offsetHeight - header.offsetHeight) + 'px';
257
+				list.style.height = (document.body.offsetHeight) + 'px';
258
+				//create
259
+				window.indexedList = new mui.IndexedList(list);
260
+			});
261
+		</script>
262
+	</body>
263
+
264
+</html>

+ 121 - 0
WebAPP/unlock.html

@@ -0,0 +1,121 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="utf-8">
6
+		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
7
+		<title></title>
8
+		<link href="css/mui.min.css" rel="stylesheet" />
9
+		<style>
10
+			html,
11
+			body {
12
+				background-color: #efeff4;
13
+				overflow: hidden;
14
+			}
15
+			.mui-locker {
16
+				margin: 35px auto;
17
+			}
18
+			#forget {
19
+				display: block;
20
+				margin-top: 10px;
21
+				text-align: center;
22
+			}
23
+		</style>
24
+	</head>
25
+
26
+	<body>
27
+		<header class="mui-bar mui-bar-nav">
28
+			<h1 class="mui-title">解锁</h1>
29
+		</header>
30
+		<div class="mui-content">
31
+			<div class="mui-content-padded" style="margin: 10px 0px;">
32
+				<div class="mui-locker" data-locker-options='{"ringColor":"rgba(221,221,221,1)","fillColor":"#ffffff","pointColor":"rgba(0,136,204,1)","lineColor":"rgba(0,136,204,1)"}' data-locker-width='320' data-locker-height='320'>
33
+				</div>
34
+			</div>
35
+			<a id='forget'>忘记手势密码?</a>
36
+		</div>
37
+		<script src="js/mui.min.js"></script>
38
+		<script src="js/mui.locker.js"></script>
39
+		<script src="js/app.js"></script>
40
+
41
+		<script>
42
+			(function($, doc) {
43
+				$.init();
44
+				$.plusReady(function() {
45
+					var mainPage = $.preload({
46
+						"id": 'main',
47
+						"url": 'main.html'
48
+					});
49
+					var toMain = function() {
50
+						$.fire(mainPage, 'show', null);
51
+						setTimeout(function() {
52
+							$.openWindow({
53
+								id: 'main',
54
+								show: {
55
+									aniShow: 'pop-in'
56
+								},
57
+								waiting: {
58
+									autoShow: false
59
+								}
60
+							});
61
+						}, 0);
62
+					};
63
+					var settings = app.getSettings();
64
+					var forgetButton = doc.getElementById("forget");
65
+					var locker = doc.querySelector('.mui-locker');
66
+					var clearStateAndToLogin = function() {
67
+						settings.gestures = '';
68
+						settings.autoLogin = false;
69
+						app.setSettings(settings);
70
+						var state = app.getState();
71
+						state.token = '';
72
+						app.setState(state);
73
+						$.openWindow({
74
+							url: 'login.html',
75
+							id: 'login',
76
+							show: {
77
+								aniShow: 'pop-in'
78
+							},
79
+							waiting: {
80
+								autoShow: false
81
+							}
82
+						});
83
+					};
84
+					forgetButton.addEventListener('tap', function(event) {
85
+						clearStateAndToLogin();
86
+					});
87
+					var tryNumber = 5;
88
+					locker.addEventListener('done', function(event) {
89
+						var rs = event.detail;
90
+						if (settings.gestures == rs.points.join('')) {
91
+							toMain()
92
+							rs.sender.clear();
93
+						} else {
94
+							tryNumber--;
95
+							rs.sender.clear();
96
+							if (tryNumber > 0) {
97
+								plus.nativeUI.toast('解锁手势错误,还能尝试 ' + tryNumber + ' 次。');
98
+							} else {
99
+								clearStateAndToLogin();
100
+							}
101
+						}
102
+					}, false);
103
+					var backButtonPress = 0;
104
+					$.back = function(event) {
105
+						backButtonPress++;
106
+						if (backButtonPress > 1) {
107
+							plus.runtime.quit();
108
+						} else {
109
+							plus.nativeUI.toast('再按一次退出应用');
110
+						}
111
+						setTimeout(function() {
112
+							backButtonPress = 0;
113
+						}, 1000);
114
+						return false;
115
+					};
116
+				});
117
+			}(mui, document));
118
+		</script>
119
+	</body>
120
+
121
+</html>

+ 124 - 0
WebAPP/unpackage/.confirmed_dependencies

@@ -0,0 +1,124 @@
1
+{
2
+	"login.html": {
3
+		"resources": [
4
+			"js/app.js",
5
+			"js/mui.min.js",
6
+			"css/mui.min.css",
7
+			"css/style.css",
8
+			"js/mui.enterfocus.js",
9
+			"images/sinaweibo.png",
10
+			"images/weixin.png",
11
+			"images/qq.png",
12
+			"fonts/mui.ttf",
13
+			"js/jquery.md5.js",
14
+			"js/jquery.min.js",
15
+			"images/logo(1).png",
16
+			"images/password.png",
17
+			"images/peson.png",
18
+			"images/logo1.png"
19
+		],
20
+		"refer": [
21
+			"main.html",
22
+			"reg.html",
23
+			"unlock.html",
24
+			"index.html"
25
+		]
26
+	},
27
+	"main.html": {
28
+		"refer": [
29
+			"setting.html",
30
+			"WorkDetails.html",
31
+			"pullrefresh_main.html",
32
+			"tx.html"
33
+		],
34
+		"resources": [
35
+			"js/mui.min.js",
36
+			"css/mui.min.css",
37
+			"js/app.js",
38
+			"fonts/mui.ttf",
39
+			"images/qq.png",
40
+			"images/222_03.png",
41
+			"images/start.png",
42
+			"images/start1.png",
43
+			"images/time.png",
44
+			"pullrefresh_main.html"
45
+		]
46
+	},
47
+	"setting.html": {
48
+		"resources": [
49
+			"libs/easymob-webim-sdk/easemob.im-1.0.5.js",
50
+			"fonts/mui.ttf",
51
+			"libs/easymob-webim-sdk/json2.js",
52
+			"libs/easymob-webim-sdk/jquery-1.11.1.js",
53
+			"js/mui.locker.js",
54
+			"js/feedback.js",
55
+			"css/feedback-page.css",
56
+			"js/feedback-page.js",
57
+			"libs/easymob-webim-sdk/strophe-custom-2.0.0.js",
58
+			"js/mui.view.js",
59
+			"js/app.js",
60
+			"js/mui.min.js",
61
+			"css/mui.min.css",
62
+			"images/iconfont-tianjia.png"
63
+		]
64
+	},
65
+	"unlock.html": {
66
+		"resources": [
67
+			"js/mui.locker.js",
68
+			"js/app.js",
69
+			"css/mui.min.css"
70
+		],
71
+		"refer": [
72
+			"login.html"
73
+		]
74
+	},
75
+	"WorkDetails.html": {
76
+		"resources": [
77
+			"js/mui.min.js",
78
+			"fonts/mui.ttf",
79
+			"css/mui.min.css",
80
+			"images/start.png"
81
+		]
82
+	},
83
+	"pullrefresh_main.html": {
84
+		"resources": [
85
+			"pullrefresh_sub.html",
86
+			"js/mui.min.js",
87
+			"css/mui.min.css",
88
+			"fonts/mui.ttf",
89
+			"images/shuijiao.jpg"
90
+		],
91
+		"refer": [
92
+			"pullrefresh_sub.html"
93
+		]
94
+	},
95
+	"pullrefresh_sub.html": {
96
+		"resources": [
97
+			"js/mui.min.js",
98
+			"fonts/mui.ttf",
99
+			"css/mui.min.css",
100
+			"images/qq.png",
101
+			"images/shuijiao.jpg"
102
+		]
103
+	},
104
+	"index.html": {
105
+		"resources": [
106
+			"main.html"
107
+		],
108
+		"refer": [
109
+			"tx.html",
110
+			"main.html",
111
+			"pullrefresh_main.html",
112
+			"setting.html"
113
+		]
114
+	},
115
+	"tx.html": {
116
+		"resources": [
117
+			"css/mui.indexedlist.css",
118
+			"js/mui.indexedlist.js",
119
+			"js/mui.min.js",
120
+			"fonts/mui.ttf",
121
+			"css/mui.min.css"
122
+		]
123
+	}
124
+}

+ 1 - 0
WebAPP/unpackage/.dependencies

@@ -0,0 +1 @@
1
+null

BIN
WebAPP/unpackage/res/icons/100x100.png


BIN
WebAPP/unpackage/res/icons/114x114.png


BIN
WebAPP/unpackage/res/icons/120x120.png


BIN
WebAPP/unpackage/res/icons/144x144.png


BIN
WebAPP/unpackage/res/icons/152x152.png


BIN
WebAPP/unpackage/res/icons/180x180.png


BIN
WebAPP/unpackage/res/icons/192x192.png


BIN
WebAPP/unpackage/res/icons/256x256.png


BIN
WebAPP/unpackage/res/icons/29x29.png


BIN
WebAPP/unpackage/res/icons/40x40.png


BIN
WebAPP/unpackage/res/icons/48x48.png


BIN
WebAPP/unpackage/res/icons/50x50.png


BIN
WebAPP/unpackage/res/icons/57x57.png


BIN
WebAPP/unpackage/res/icons/58x58.png


BIN
WebAPP/unpackage/res/icons/72x72.png


BIN
WebAPP/unpackage/res/icons/76x76.png


BIN
WebAPP/unpackage/res/icons/80x80.png


BIN
WebAPP/unpackage/res/icons/87x87.png


BIN
WebAPP/unpackage/res/icons/96x96.png


+ 317 - 0
WebChart/Script/Class/DateHelper.js

@@ -0,0 +1,317 @@
1
+//---------------------------------------------------  
2
+// 判断闰年  
3
+//---------------------------------------------------  
4
+Date.prototype.isLeapYear = function()   
5
+{   
6
+    return (0==this.getYear()%4&&((this.getYear()%100!=0)||(this.getYear()%400==0)));   
7
+}   
8
+  
9
+//---------------------------------------------------  
10
+// 日期格式化  
11
+// 格式 YYYY/yyyy/YY/yy 表示年份  
12
+// MM/M 月份  
13
+// W/w 星期  
14
+// dd/DD/d/D 日期  
15
+// hh/HH/h/H 时间  
16
+// mm/m 分钟  
17
+// ss/SS/s/S 秒  
18
+//---------------------------------------------------  
19
+Date.prototype.Format = function (formatStr)   
20
+{   
21
+    var str = formatStr;   
22
+    var Week = ['日','一','二','三','四','五','六'];  
23
+  
24
+    str=str.replace(/yyyy|YYYY/,this.getFullYear());   
25
+    str=str.replace(/yy|YY/,(this.getYear() % 100)>9?(this.getYear() % 100).toString():'0' + (this.getYear() % 100));   
26
+  
27
+    str=str.replace(/MM/,this.getMonth()>9?this.getMonth().toString():'0' + this.getMonth());   
28
+    str=str.replace(/M/g,this.getMonth());   
29
+  
30
+    str=str.replace(/w|W/g,Week[this.getDay()]);   
31
+  
32
+    str=str.replace(/dd|DD/,this.getDate()>9?this.getDate().toString():'0' + this.getDate());   
33
+    str=str.replace(/d|D/g,this.getDate());   
34
+  
35
+    str=str.replace(/hh|HH/,this.getHours()>9?this.getHours().toString():'0' + this.getHours());   
36
+    str=str.replace(/h|H/g,this.getHours());   
37
+    str=str.replace(/mm/,this.getMinutes()>9?this.getMinutes().toString():'0' + this.getMinutes());   
38
+    str=str.replace(/m/g,this.getMinutes());   
39
+  
40
+    str=str.replace(/ss|SS/,this.getSeconds()>9?this.getSeconds().toString():'0' + this.getSeconds());   
41
+    str=str.replace(/s|S/g,this.getSeconds());   
42
+  
43
+    return str;   
44
+}   
45
+  
46
+//+---------------------------------------------------  
47
+//| 求两个时间的天数差 日期格式为 YYYY-MM-dd   
48
+//+---------------------------------------------------  
49
+function daysBetween(DateOne,DateTwo)  
50
+{   
51
+    var OneMonth = DateOne.substring(5,DateOne.lastIndexOf ('-'));  
52
+    var OneDay = DateOne.substring(DateOne.length,DateOne.lastIndexOf ('-')+1);  
53
+    var OneYear = DateOne.substring(0,DateOne.indexOf ('-'));  
54
+  
55
+    var TwoMonth = DateTwo.substring(5,DateTwo.lastIndexOf ('-'));  
56
+    var TwoDay = DateTwo.substring(DateTwo.length,DateTwo.lastIndexOf ('-')+1);  
57
+    var TwoYear = DateTwo.substring(0,DateTwo.indexOf ('-'));  
58
+  
59
+    var cha=((Date.parse(OneMonth+'/'+OneDay+'/'+OneYear)- Date.parse(TwoMonth+'/'+TwoDay+'/'+TwoYear))/86400000);   
60
+    return Math.abs(cha);  
61
+}  
62
+  
63
+  
64
+//+---------------------------------------------------  
65
+//| 日期计算  
66
+//+---------------------------------------------------  
67
+Date.prototype.DateAdd = function(strInterval, Number) {   
68
+    var dtTmp = this;  
69
+    switch (strInterval) {   
70
+        case 's' :return new Date(Date.parse(dtTmp) + (1000 * Number));  
71
+        case 'n' :return new Date(Date.parse(dtTmp) + (60000 * Number));  
72
+        case 'h' :return new Date(Date.parse(dtTmp) + (3600000 * Number));  
73
+        case 'd' :return new Date(Date.parse(dtTmp) + (86400000 * Number));  
74
+        case 'w' :return new Date(Date.parse(dtTmp) + ((86400000 * 7) * Number));  
75
+        case 'q' :return new Date(dtTmp.getFullYear(), (dtTmp.getMonth()) + Number*3, dtTmp.getDate(), dtTmp.getHours(), dtTmp.getMinutes(), dtTmp.getSeconds());  
76
+        case 'm' :return new Date(dtTmp.getFullYear(), (dtTmp.getMonth()) + Number, dtTmp.getDate(), dtTmp.getHours(), dtTmp.getMinutes(), dtTmp.getSeconds());  
77
+        case 'y' :return new Date((dtTmp.getFullYear() + Number), dtTmp.getMonth(), dtTmp.getDate(), dtTmp.getHours(), dtTmp.getMinutes(), dtTmp.getSeconds());  
78
+    }  
79
+}  
80
+  
81
+//+---------------------------------------------------  
82
+//| 比较日期差 dtEnd 格式为日期型或者有效日期格式字符串  
83
+//| 计算两日期相差的日期年月日等
84
+//| 使用方法:new Date("2013-12-20 00:00:00").dateDiff("d",new Date("2013-12-20 00:00:00"))
85
+//+---------------------------------------------------  
86
+Date.prototype.DateDiff = function(strInterval, dtEnd) {   
87
+    var dtStart = this;  
88
+    if (typeof dtEnd == 'string' )//如果是字符串转换为日期型  
89
+    {   
90
+        dtEnd = StringToDate(dtEnd);  
91
+    }  
92
+    switch (strInterval) {   
93
+        case 's' :return parseInt((dtEnd - dtStart) / 1000);  
94
+        case 'n' :return parseInt((dtEnd - dtStart) / 60000);  
95
+        case 'h' :return parseInt((dtEnd - dtStart) / 3600000);  
96
+        case 'd' :return parseInt((dtEnd - dtStart) / 86400000);  
97
+        case 'w' :return parseInt((dtEnd - dtStart) / (86400000 * 7));  
98
+        case 'm' :return (dtEnd.getMonth()+1)+((dtEnd.getFullYear()-dtStart.getFullYear())*12) - (dtStart.getMonth()+1);  
99
+        case 'y' :return dtEnd.getFullYear() - dtStart.getFullYear();  
100
+    }  
101
+}  
102
+  
103
+//+---------------------------------------------------  
104
+//| 日期输出字符串,重载了系统的toString方法  
105
+//+---------------------------------------------------  
106
+Date.prototype.toString = function(showWeek)  
107
+{   
108
+    var myDate= this;  
109
+    var str = myDate.toLocaleDateString();  
110
+    if (showWeek)  
111
+    {   
112
+        var Week = ['日','一','二','三','四','五','六'];  
113
+        str += ' 星期' + Week[myDate.getDay()];  
114
+    }  
115
+    return str;  
116
+}   
117
+  
118
+//+---------------------------------------------------  
119
+//| 日期时间检查  
120
+//| 格式为:YYYY-MM-DD HH:MM:SS  
121
+//+---------------------------------------------------  
122
+function CheckDateTime(str)  
123
+{   
124
+    var reg = /^(\d+)-(\d{ 1,2 })-(\d{ 1,2 }) (\d{ 1,2 }):(\d{ 1,2 }):(\d{ 1,2 })$/;   
125
+    var r = str.match(reg);   
126
+    if(r==null)return false;   
127
+    r[2]=r[2]-1;   
128
+    var d= new Date(r[1],r[2],r[3],r[4],r[5],r[6]);   
129
+    if(d.getFullYear()!=r[1])return false;   
130
+    if(d.getMonth()!=r[2])return false;   
131
+    if(d.getDate()!=r[3])return false;   
132
+    if(d.getHours()!=r[4])return false;   
133
+    if(d.getMinutes()!=r[5])return false;   
134
+    if(d.getSeconds()!=r[6])return false;   
135
+    return true;   
136
+}   
137
+  
138
+//+---------------------------------------------------  
139
+//| 把日期分割成数组  
140
+//+---------------------------------------------------  
141
+Date.prototype.toArray = function()  
142
+{   
143
+    var myDate = this;  
144
+    var myArray = Array();  
145
+    myArray[0] = myDate.getFullYear();  
146
+    myArray[1] = myDate.getMonth();  
147
+    myArray[2] = myDate.getDate();  
148
+    myArray[3] = myDate.getHours();  
149
+    myArray[4] = myDate.getMinutes();  
150
+    myArray[5] = myDate.getSeconds();  
151
+    return myArray;  
152
+}  
153
+  
154
+//+---------------------------------------------------  
155
+//| 取得日期数据信息  
156
+//| 参数 interval 表示数据类型  
157
+//| y 年 m月 d日 w星期 ww周 h时 n分 s秒  
158
+//+---------------------------------------------------  
159
+Date.prototype.DatePart = function(interval)  
160
+{   
161
+    var myDate = this;  
162
+    var partStr='';  
163
+    var Week = ['日','一','二','三','四','五','六'];  
164
+    switch (interval)  
165
+    {   
166
+        case 'y' :partStr = myDate.getFullYear();break;  
167
+        case 'm' :partStr = myDate.getMonth()+1;break;  
168
+        case 'd' :partStr = myDate.getDate();break;  
169
+        case 'w' :partStr = Week[myDate.getDay()];break;  
170
+        case 'ww' :partStr = myDate.WeekNumOfYear();break;  
171
+        case 'h' :partStr = myDate.getHours();break;  
172
+        case 'n' :partStr = myDate.getMinutes();break;  
173
+        case 's' :partStr = myDate.getSeconds();break;  
174
+    }  
175
+    return partStr;  
176
+}  
177
+  
178
+//+---------------------------------------------------  
179
+//| 取得当前日期所在月的最大天数  
180
+//+---------------------------------------------------  
181
+Date.prototype.MaxDayOfDate = function()  
182
+{   
183
+    var myDate = this;  
184
+    var ary = myDate.toArray();  
185
+    var date1 = (new Date(ary[0],ary[1],1));
186
+    var date2 = (new Date(ary[0], ary[1] + 1, 1));
187
+    var result = date1.DateDiff("d",date2);  
188
+    return result;  
189
+}  
190
+  
191
+//+---------------------------------------------------  
192
+//| 字符串转成日期类型   
193
+//| 格式 MM/dd/YYYY MM-dd-YYYY YYYY/MM/dd YYYY-MM-dd  
194
+//+---------------------------------------------------  
195
+function StringToDate(DateStr)  
196
+{   
197
+  
198
+    var converted = Date.parse(DateStr);  
199
+    var myDate = new Date(converted);  
200
+    if (isNaN(myDate))  
201
+    {   
202
+        //var delimCahar = DateStr.indexOf('/')!=-1?'/':'-';  
203
+        var arys= DateStr.split('-');  
204
+        myDate = new Date(arys[0],--arys[1],arys[2]);  
205
+    }  
206
+    return myDate;  
207
+}  
208
+
209
+ 
210
+
211
+//若要显示:当前日期加时间(如:2009-06-12 12:00)
212
+
213
+function CurentTime()
214
+    { 
215
+        var now = new Date();
216
+       
217
+        var year = now.getFullYear();       //年
218
+        var month = now.getMonth() + 1;     //月
219
+        var day = now.getDate();            //日
220
+       
221
+        var hh = now.getHours();            //时
222
+        var mm = now.getMinutes();          //分
223
+       
224
+        var clock = year + "-";
225
+       
226
+        if(month < 10)
227
+            clock += "0";
228
+       
229
+        clock += month + "-";
230
+       
231
+        if(day < 10)
232
+            clock += "0";
233
+           
234
+        clock += day + " ";
235
+       
236
+        if(hh < 10)
237
+            clock += "0";
238
+           
239
+        clock += hh + ":";
240
+        if (mm < 10) clock += '0'; 
241
+        clock += mm; 
242
+        return(clock);
243
+    }
244
+
245
+
246
+    function CurentDate() {
247
+        var now = new Date();
248
+
249
+        var year = now.getFullYear();       //年
250
+        var month = now.getMonth() + 1;     //月
251
+        var day = now.getDate();            //日
252
+
253
+        var clock = year + "-";
254
+
255
+        if (month < 10)
256
+            clock += "0";
257
+
258
+        clock += month + "-";
259
+
260
+        if (day < 10)
261
+            clock += "0";
262
+
263
+        clock += day;
264
+        return (clock);
265
+    }
266
+
267
+    function MonthFirstDate() {
268
+        var now = new Date();
269
+
270
+        var year = now.getFullYear();       //年
271
+        var month = now.getMonth() + 1;     //月
272
+        var day = "1";            //日
273
+
274
+        var clock = year + "-";
275
+
276
+        if (month < 10)
277
+            clock += "0";
278
+
279
+        clock += month + "-";
280
+
281
+        if (day < 10)
282
+            clock += "0";
283
+
284
+        clock += day;
285
+        return (clock);
286
+    }
287
+
288
+    function GetDatePart(nS) {
289
+        var now = new Date(nS);
290
+
291
+        var year = now.getFullYear();       //年
292
+        var month = now.getMonth() + 1;     //月
293
+        var day = now.getDate();            //日
294
+
295
+        var clock = year + "-";
296
+
297
+        if (month < 10)
298
+            clock += "0";
299
+
300
+        clock += month + "-";
301
+
302
+        if (day < 10)
303
+            clock += "0";
304
+
305
+        clock += day;
306
+        return (clock);
307
+    }
308
+
309
+    function getLocalTime(nS) {
310
+        var S = parseInt(nS).toString();
311
+
312
+        if (S.length==13) {
313
+            return new Date(parseInt(nS)).toLocaleString().replace(/年|月/g, "-").replace(/日/g, " ").replace(/上午/g, "").replace(/下午/g, "");
314
+        } else {
315
+            return new Date(parseInt(nS) * 1000).toLocaleString().replace(/年|月/g, "-").replace(/日/g, " ").replace(/上午/g, "").replace(/下午/g, "");
316
+        }
317
+    }   

+ 13 - 0
WebChart/Script/Common/huayi.config.js

@@ -0,0 +1,13 @@
1
+if (huayi == undefined) {
2
+    var huayi = {};
3
+}
4
+huayi.config = {
5
+    callcenter_url: "http://192.168.4.18:4030/",//生产环境
6
+
7
+//  socket_ip: "192.168.5.8",//ip
8
+    socket_ip: "192.168.4.3",//ip
9
+    socket_port: "8081",//端口
10
+    menuworktime: 30000,//菜单工单数量刷新间隔
11
+    indextime: 60000//首页报表刷新间隔
12
+
13
+};

+ 13 - 0
WebChart/Script/Common/huayi.cookies.js

@@ -0,0 +1,13 @@
1
+if (huayi == undefined) {
2
+    var huayi = {};
3
+}
4
+huayi.coookies = function() {
5
+    this.uid = helper.cookies.get("uid") != "" ? helper.cookies.get("uid") : "";
6
+    this.passtoken = helper.cookies.get("passtoken") != "" ? helper.cookies.get("passtoken") : "";
7
+    this.imgurl = helper.cookies.get("imgurl") != "" ? helper.cookies.get("imgurl") : "0";
8
+    this.avatarurl = helper.cookies.get("image_avatar_url") != "" ? helper.cookies.get("image_avatar_url") : "http://img.800100.com/PerRes/Common/user/avatar/";
9
+    this.siteurl = helper.cookies.get("image_site_url") != "" ? helper.cookies.get("image_site_url") : "http://img.800100.com/PerRes/Common/";
10
+    this.liang = helper.cookies.get("liang") != "" ? helper.cookies.get("liang") : "";
11
+    this.userlevel = helper.cookies.get("userlevel") != "" ? helper.cookies.get("userlevel") : "";
12
+    this.agent = helper.cookies.get("agent") != "" ? helper.cookies.get("agent") : "";
13
+};

+ 594 - 0
WebChart/Script/Common/huayi.http.js

@@ -0,0 +1,594 @@
1
+var helper = {};
2
+
3
+helper.http = {
4
+    newXMLHttp: function () {
5
+        var XMLHttp = null;
6
+        if (window.XMLHttpRequest) {
7
+            XMLHttp = new XMLHttpRequest();
8
+        }
9
+        if (XMLHttp == null && window.ActiveXObject) {
10
+            var clsids = ["MSXML2.XMLHttp.7.0", "MSXML2.XMLHttp.6.0", "MSXML2.XMLHttp.5.0", "MSXML2.XMLHttp.4.0", "MSXML2.XMLHttp.3.0", "MSXML2.XMLHttp.2.0", "MSXML2.XMLHttp.1.0", "MSXML2.XMLHttp", "Microsoft.XMLHttp"];
11
+            for (var i = 0; i < clsids.length && XMLHttp == null; i++) {
12
+                try {
13
+                    XMLHttp = new ActiveXObject(clsids[i]);
14
+                } catch (e) {
15
+                }
16
+            }
17
+        }
18
+        return XMLHttp;
19
+    },
20
+    get: function (URL, func) {
21
+        try {
22
+            var XMLHttp = this.newXMLHttp();
23
+            if (typeof (func) != "function") {
24
+                XMLHttp.open("GET", URL, false);
25
+                XMLHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8");
26
+                XMLHttp.send(null);
27
+            
28
+                var result = XMLHttp.status;
29
+                var responseText = XMLHttp.responseText;
30
+
31
+                if (result == 200) {
32
+                    return responseText;
33
+                } else {
34
+                    return result;
35
+                }
36
+            } else {
37
+                XMLHttp.onreadystatechange = function () {
38
+                    if (XMLHttp.readyState == 4) {
39
+                        if (XMLHttp.status == 200) {
40
+                            var responseText = XMLHttp.responseText;
41
+                            func(responseText);
42
+                        } else {
43
+                            func(false);
44
+                        }
45
+                    }
46
+                };
47
+                XMLHttp.open("GET", URL, true);
48
+                XMLHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8");
49
+                XMLHttp.send(null);
50
+            }
51
+        } catch (e) {
52
+        }
53
+    },
54
+    post: function (URL, data, func) {
55
+        try {
56
+            var XMLHttp = this.newXMLHttp();
57
+            if (typeof (func) != "function") {
58
+                XMLHttp.open("POST", URL, false);
59
+                XMLHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
60
+                XMLHttp.send(data);
61
+
62
+                var result = XMLHttp.status;
63
+                var responseText = XMLHttp.responseText;
64
+
65
+                if (result == 200) {
66
+                    return responseText;
67
+                } else {
68
+                    return false;
69
+                }
70
+            } else {
71
+                XMLHttp.onreadystatechange = function () {
72
+                    if (XMLHttp.readyState == 4) {
73
+                        if (XMLHttp.status == 200) {
74
+                            var responseText = XMLHttp.responseText;
75
+                            func(responseText);
76
+                        } else {
77
+                            func(false);
78
+                        }
79
+                    }
80
+                };
81
+
82
+                XMLHttp.open("POST", URL, true);
83
+                XMLHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8");
84
+                XMLHttp.send(data);
85
+            }
86
+        } catch (e) {
87
+        }
88
+    }
89
+};
90
+
91
+helper.cookies = {
92
+    del: function (name) {
93
+        var exp = new Date();
94
+        exp.setTime(exp.getTime() - 1);
95
+        var cval = helper.cookies.get(name);
96
+        if (cval != null)
97
+            document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString();
98
+    },
99
+    set: function (name, value, remember) {
100
+        if (remember == true) {
101
+            var Days = 30;
102
+            var exp = new Date();
103
+            exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
104
+            document.cookie = name + "=" + escape(value) + ";path=/;expires=" + exp.toGMTString();
105
+        }
106
+        else {
107
+            document.cookie = name + "=" + escape(value) + ";path=/";
108
+        }
109
+    },
110
+    setday: function (name, value, remember) {
111
+        var Days = remember;
112
+        var exp = new Date();
113
+        exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
114
+        document.cookie = name + "=" + escape(value) + ";path=/;expires=" + exp.toGMTString();
115
+
116
+    },
117
+    setdomain: function (name, value, remember) {
118
+        var domain = window.location.host.split(".");
119
+        if (remember == true) {
120
+            var Days = 30;
121
+            var exp = new Date();
122
+            exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
123
+            document.cookie = name + "=" + escape(value) + ";path=/;expires=" + exp.toGMTString() + ";domain=." + domain[domain.length - 2] + "." + domain[domain.length - 1];
124
+        }
125
+        else {
126
+            document.cookie = name + "=" + escape(value) + ";path=/" + ";domain=." + domain[1] + "." + domain[2];
127
+        }
128
+    },
129
+    get: function (name) {
130
+        var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
131
+
132
+        if (arr = document.cookie.match(reg)) {
133
+            return unescape(arr[2]);
134
+        } else {
135
+            return '';
136
+        }
137
+    }
138
+};
139
+
140
+/*
141
+获取URL中指定的参数
142
+例如:
143
+URL:test.com/test.aspx?test=t
144
+var t=helper.request.queryString("test");
145
+得到t
146
+*/
147
+helper.request = {
148
+    queryString:
149
+	        function (item) {
150
+	            locationSearch = "";
151
+	            var tmpLocationArr = location.href.split("?");
152
+	            if (tmpLocationArr.length > 1) locationSearch = "?" + tmpLocationArr[1];
153
+	            var svalue = locationSearch.match(new RegExp("[\?\&]" + item + "=([^\&]*)(\&?)", "i"));
154
+	            var Qvalue = svalue ? svalue[1] : svalue;
155
+	            if (Qvalue == null) {
156
+	                return "";
157
+	            } else {
158
+	                return Qvalue.trim();
159
+	            }
160
+	        },
161
+    queryurl:
162
+	        function (url, item) {
163
+	            locationSearch = "";
164
+	            var tmpLocationArr = url.split("?");
165
+	            if (tmpLocationArr.length > 1) locationSearch = "?" + tmpLocationArr[1];
166
+	            var svalue = locationSearch.match(new RegExp("[\?\&]" + item + "=([^\&]*)(\&?)", "i"));
167
+	            var Qvalue = svalue ? svalue[1] : svalue;
168
+	            if (Qvalue == null) {
169
+	                return "";
170
+	            } else {
171
+	                return Qvalue.trim();
172
+	            }
173
+	        }
174
+};
175
+
176
+
177
+helper.pager = {
178
+
179
+    //分页
180
+    PageList1: function (strFunName) {
181
+        /***总页数***/
182
+        var intPageCount = parseInt((parseInt(intRecordCount) + parseInt(intPageSize) - 1) / parseInt(intPageSize));
183
+        if (intPageCount <= 1) {
184
+            return "";
185
+        }
186
+
187
+        /***页码距***/
188
+        var intPageCurrent = 10;
189
+
190
+        /***起始页码***/
191
+        var intStartPage = (parseInt((parseInt(intPageIndex) + intPageCurrent - 1) / intPageCurrent) - 1) * intPageCurrent + 1;
192
+
193
+        /***结束页码***/
194
+        var intEndPage = intStartPage + intPageCurrent - 1;
195
+        if (intPageIndex % intPageCurrent == 0) {
196
+            intStartPage++;
197
+            intEndPage++;
198
+        }
199
+
200
+        if (intPageIndex % intPageCurrent - 1 == 0 && intPageIndex != 1) {
201
+            intStartPage--;
202
+            intEndPage--;
203
+        }
204
+
205
+        if (intEndPage >= intPageCount) {
206
+            intEndPage = intPageCount;
207
+        }
208
+
209
+        /***上一页,下一页***/
210
+        var intUpPage = parseInt(intPageIndex) - 1;
211
+        var intDownPage = parseInt(intPageIndex) + 1;
212
+        var strUpPage = "<a href=\"#\" onclick=\"" + strFunName + "(" + intUpPage + ")\" >上一页</a>";
213
+        var strDownPage = "<a href=\"#\" onclick=\"" + strFunName + "(" + intDownPage + ")\">下一页</a>";
214
+        if (intUpPage < 1) {
215
+            //intUpPage = 1;
216
+            strUpPage = "";
217
+        }
218
+        if (intPageIndex >= intPageCount) {
219
+            //intDownPage = intPageCount;
220
+            strDownPage = "";
221
+        }
222
+
223
+        /***生成页码列表***/
224
+        var strPageList = strUpPage;
225
+
226
+        for (var i = intStartPage; i <= intEndPage; i++) {
227
+            if (intPageIndex == i) {
228
+                /***当前页码***/
229
+                strPageList += "<a style=\"background-image:url(../images/bg/menublue22.jpg); background-position:bottom; background-repeat:repeat-x; padding:1px 6px;border-radius: 4px 4px 4px 4px; margin-right:3px; border:1px solid #aeb2b1;\" >" + i + "</a>";
230
+            }
231
+            else {
232
+                strPageList += "<a href=\"#\" onclick=\"" + strFunName + "(" + i + ");\">" + i + "</a>";
233
+            }
234
+        }
235
+        strPageList += strDownPage;
236
+
237
+        //直接跳转
238
+        strPageList += "总页数:" + intPageCount + "&nbsp;&nbsp;/&nbsp;&nbsp;";
239
+        strPageList += "<input type=\"text\" onkeyup=\"this.value=this.value.replace(/\\D/g,'')\" id=\"tb_index\" />";
240
+        strPageList += "&nbsp;&nbsp;<a style=\"cursor:pointer;\" onclick=\"javascript:helper.pager.checkPageValue()\">跳转</a>";
241
+        return strPageList;
242
+
243
+    },
244
+    checkPageValue: function () {
245
+        var intPageIndexNext = document.getElementById('tb_index').value;
246
+        if (parseInt(intPageIndexNext) == 0) {
247
+            document.getElementById('tb_index').value = "1";
248
+            $.jBox.alert('输入页面不能为0', '提示');
249
+            return;
250
+        }
251
+        if (intPageIndexNext == "") {
252
+            document.getElementById('tb_index').value = "1";
253
+            $.jBox.alert('输入页面不能为空', '提示');
254
+            return;
255
+        }
256
+        if (intPageIndexNext.length != 0) {
257
+            var intPageCount = parseInt((parseInt(intRecordCount) + parseInt(intPageSize) - 1) / parseInt(intPageSize));
258
+            if (intPageIndexNext <= intPageCount) {
259
+                intPageIndex = intPageIndexNext;
260
+                loadlist();
261
+            }
262
+            else {
263
+                document.getElementById('tb_index').value = intPageCount;
264
+                $.jBox.alert('输入页面不能大于总页数', '提示');
265
+            }
266
+        }
267
+        else {
268
+            document.getElementById('tb_index').value = "1";
269
+        }
270
+    },
271
+    loadJS: function (url) {
272
+        var domScript = document.createElement('script');
273
+        domScript.type = "text/javascript";
274
+        domScript.src = url;
275
+        domScript.onload = domScript.onreadystatechange = function () {
276
+            if (!this.readyState || 'loaded' === this.readyState || 'complete' === this.readyState) {
277
+                this.onload = this.onreadystatechange = null;
278
+                this.parentNode.removeChild(this);
279
+            }
280
+        };
281
+        document.getElementsByTagName('head')[0].appendChild(domScript);
282
+    }
283
+};
284
+
285
+helper.masklayer = {
286
+    layer: null,
287
+    showcount: 0,
288
+    show: function () {
289
+        this.layer = document.getElementById("masklayer");
290
+        if (!this.layer) {
291
+            this.layer = document.createElement("div");
292
+            this.layer.id = "masklayer";
293
+            this.layer.className = "masklayer";
294
+            /*this.layer.style.position = "absolute";
295
+            this.layer.style.top = "0";
296
+            this.layer.style.left = "0";
297
+            this.layer.style.zIndex = 1000;
298
+            var width = Math.max(
299
+            Math.max(document.body.clientWidth, document.documentElement.clientWidth),
300
+            Math.max(document.body.scrollWidth, document.documentElement.scrollWidth)
301
+            );
302
+            var height = Math.max(
303
+            Math.max(document.body.clientHeight, document.documentElement.clientHeight),
304
+            Math.max(document.body.scrollHeight, document.documentElement.scrollHeight)
305
+            );
306
+            this.layer.style.width = width + "px";
307
+            this.layer.style.height = height + "px";*/
308
+            this.layer.innerHTML = "<iframe src='/blank.html' style='width:100%;height:100%;background-color:#fff;"
309
+                + "filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity: 0;opacity: 0;"
310
+                + "position:absolute;z-index:999;top:0;left:0;' frameborder='0'></iframe>"
311
+                + "<div style='width:100%;height:100%;position:absolute;top:0;left:0;z-index:1000;background:#000;"
312
+                + "filter:alpha(opacity=20);-moz-opacity:0.2;-khtml-opacity: 0.2;opacity: 0.2;'></div>";
313
+            document.body.appendChild(this.layer);
314
+        }
315
+        this.showcount++;
316
+    },
317
+    hide: function () {
318
+        if (--this.showcount == 0) {
319
+            if (this.layer && this.layer.parentNode) {
320
+                this.layer.parentNode.removeChild(this.layer);
321
+            }
322
+        }
323
+    },
324
+    moveToCenter: function (e, x, y) {
325
+        if (e.style.display == "none") e.style.display = "";
326
+        var scrollTop = Math.max(document.documentElement.scrollTop, document.body.scrollTop);
327
+        var scrollLeft = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft);
328
+        if (x > 0) { x += scrollLeft; } else x = parseInt((document.documentElement.clientWidth - e.clientWidth) / 2) + scrollLeft;
329
+        if (y > 0) { y += scrollTop; } else y = parseInt((document.documentElement.clientHeight - e.clientHeight) / 2) + scrollTop;
330
+        x = x < 0 ? 0 : x;
331
+        y = y < 50 ? 50 : y;
332
+        e.style.left = x + "px";
333
+        e.style.top = y + "px";
334
+    }
335
+};
336
+
337
+helper.filter = {
338
+    Transcoding: function (content) {
339
+        content = content.replace(/∞L/g, "<");
340
+        content = content.replace(/∞R/g, ">");
341
+        content = content.replace(/∞∴/g, "'");
342
+        content = content.replace(/∞≡/g, "#");
343
+        content = content.replace(/∞※/g, "\"");
344
+        return content;
345
+    }
346
+};
347
+function str2asc(strstr) {
348
+    return ("0" + strstr.charCodeAt(0).toString(16)).slice(-2);
349
+}
350
+helper.url = {
351
+    getpara: function (name) {
352
+        var val;
353
+        paras = window.location.search;
354
+        paras = paras.substr(1);
355
+        paraarray = paras.split("&");
356
+        for (i = 0; i < paraarray.length; i++) {
357
+            temp = paraarray[i].split("=");
358
+            if (temp[0] == name) {
359
+                val = temp[1];
360
+                break;
361
+            }
362
+        }
363
+        if (val == null || val == "") {
364
+            return "";
365
+        } else {
366
+            return val;
367
+        }
368
+    }
369
+};
370
+helper.sys = {
371
+    getElementsByClassName: function (pnode, className) {
372
+        var nodes = pnode.getElementsByTagName('*');
373
+        var elements = new Array();
374
+        for (var i = 0; i < nodes.length; i++) {
375
+            if (nodes[i].className == className) {
376
+                elements[elements.length] = nodes[i];
377
+            }
378
+        }
379
+        return elements;
380
+    },
381
+    removeElement: function (element) {
382
+        if (element && element.parentNode) {
383
+
384
+            element.parentNode.removeChild(element);
385
+            return true;
386
+        }
387
+        else {
388
+            return false;
389
+        }
390
+    }
391
+    ,
392
+    Return: function (url) {
393
+        top.location.href=url;
394
+    }
395
+};
396
+
397
+
398
+helper.DateFormat = {
399
+    d2s:
400
+        function (postdate) {
401
+            var second = 1000;
402
+            var minutes = second * 60;
403
+            var hours = minutes * 60;
404
+            var days = hours * 24;
405
+            var months = days * 30;
406
+            var twomonths = days * 365;
407
+            var myDate = new Date(Date.parse(postdate));
408
+            if (isNaN(myDate)) {
409
+                myDate = new Date(postdate.replace(/-/g, "/"));
410
+            }
411
+            var nowtime = new Date();
412
+            var longtime = nowtime.getTime() - myDate.getTime();
413
+            var showtime = 0;
414
+            if (longtime > months * 2) {
415
+                return postdate;
416
+            }
417
+            else if (longtime > months) {
418
+                return "1个月前";
419
+            }
420
+            else if (longtime > days * 7) {
421
+                return ("1周前");
422
+            }
423
+            else if (longtime > days) {
424
+                return (Math.floor(longtime / days) + "天前");
425
+            }
426
+            else if (longtime > hours) {
427
+                return (Math.floor(longtime / hours) + "小时前");
428
+            }
429
+            else if (longtime > minutes) {
430
+                return (Math.floor(longtime / minutes) + "分钟前");
431
+            }
432
+            else if (longtime > second) {
433
+                return (Math.floor(longtime / second) + "秒前");
434
+            } else {
435
+                return ("刚刚");
436
+            }
437
+        },
438
+    getPreMonth:
439
+    /**
440
+    * 获取上一个月
441
+    *
442
+    * @date 格式为yyyy-mm-dd的日期,如:2014-01-25
443
+    */
444
+        function (date) {
445
+            var arr = date.split('-');
446
+            var year = arr[0]; //获取当前日期的年份
447
+            var month = arr[1]; //获取当前日期的月份
448
+            var day = arr[2]; //获取当前日期的日
449
+            var days = new Date(year, month, 0);
450
+            days = days.getDate(); //获取当前日期中月的天数
451
+            var year2 = year;
452
+            var month2 = parseInt(month) - 1;
453
+            if (month2 == 0) {
454
+                year2 = parseInt(year2) - 1;
455
+                month2 = 12;
456
+            }
457
+            var day2 = day;
458
+            var days2 = new Date(year2, month2, 0);
459
+            days2 = days2.getDate();
460
+            if (day2 > days2) {
461
+                day2 = days2;
462
+            }
463
+            if (month2 < 10) {
464
+                month2 = '0' + month2;
465
+            }
466
+            var t2 = year2 + '-' + month2 + '-' + day2;
467
+            return t2;
468
+        },
469
+    getNextMonth:
470
+    /**
471
+    * 获取下一个月
472
+    *
473
+    * @date 格式为yyyy-mm-dd的日期,如:2014-01-25
474
+    */
475
+        function (date) {
476
+            var arr = date.split('-');
477
+            var year = arr[0]; //获取当前日期的年份
478
+            var month = arr[1]; //获取当前日期的月份
479
+            var day = arr[2]; //获取当前日期的日
480
+            var days = new Date(year, month, 0);
481
+            days = days.getDate(); //获取当前日期中的月的天数
482
+            var year2 = year;
483
+            var month2 = parseInt(month) + 1;
484
+            if (month2 == 13) {
485
+                year2 = parseInt(year2) + 1;
486
+                month2 = 1;
487
+            }
488
+            var day2 = day;
489
+            var days2 = new Date(year2, month2, 0);
490
+            days2 = days2.getDate();
491
+            if (day2 > days2) {
492
+                day2 = days2;
493
+            }
494
+            if (month2 < 10) {
495
+                month2 = '0' + month2;
496
+            }
497
+
498
+            var t2 = year2 + '-' + month2 + '-' + day2;
499
+            return t2;
500
+        },
501
+    getNowDate: function () {
502
+        var NowDate;
503
+        var myDate = new Date();
504
+        myDate.getYear();       //获取当前年份(2位)    
505
+        var YY = myDate.getFullYear();   //获取完整的年份(4位,1970-????)    
506
+        var MM = myDate.getMonth() + 1;       //获取当前月份(0-11,0代表1月)    
507
+        var DD = myDate.getDate();       //获取当前日(1-31)    
508
+        myDate.getDay();         //获取当前星期X(0-6,0代表星期天)    
509
+        myDate.getTime();       //获取当前时间(从1970.1.1开始的毫秒数)    
510
+        myDate.getHours();       //获取当前小时数(0-23)    
511
+        myDate.getMinutes();     //获取当前分钟数(0-59)    
512
+        myDate.getSeconds();     //获取当前秒数(0-59)    
513
+        myDate.getMilliseconds();   //获取当前毫秒数(0-999)    
514
+        myDate.toLocaleDateString();     //获取当前日期    
515
+        var mytime = myDate.toLocaleTimeString();     //获取当前时间    
516
+        myDate.toLocaleString();       //获取日期与时间    
517
+        NowDate = YY + "-" + MM + "-" + DD;
518
+
519
+        return NowDate;
520
+    }
521
+    ,
522
+    getFirstDayInCurrentMonth: function () {
523
+        var NowDate;
524
+        var myDate = new Date();
525
+        myDate.getYear();       //获取当前年份(2位)    
526
+        var YY = myDate.getFullYear();   //获取完整的年份(4位,1970-????)    
527
+        var MM = myDate.getMonth() + 1;       //获取当前月份(0-11,0代表1月)    
528
+        var DD = myDate.getDate();       //获取当前日(1-31)    
529
+        NowDate = YY + "-" + MM + "-1";
530
+
531
+        return NowDate;
532
+    }
533
+};
534
+helper.string = {
535
+    stringbuilder: function () {
536
+        this.arr = new Array();
537
+        this.append = function (str) {
538
+            this.arr.push(str);
539
+        };
540
+        this.tostring = function () {
541
+            return this.arr.join('');
542
+        };
543
+    }
544
+};
545
+helper.init = {
546
+    setajax: function (isload) { /// 配置AJAX
547
+        $(document).on("ajaxStart", function () {
548
+            if (isload) {
549
+                //加载框显示
550
+            }
551
+        }).on("ajaxSuccess", function (e, jqXHR, s, data) {
552
+            try {
553
+                if (s.type == "POST") {
554
+                    if (typeof (data)!='object') {
555
+                        data = $.parseJSON(data);
556
+                    }
557
+                }
558
+                if (s.type == "GET") {
559
+                    data = data
560
+                }
561
+                if (data.state.toLowerCase() == "notoken") {
562
+                    top.window.location.href = "./login.html";
563
+                    return;
564
+                }
565
+                if (data.state.toLowerCase() == "unauthorized") {
566
+                    layer.confirm(data.message, {
567
+                        btn: ['确定'] //按钮
568
+                    });
569
+                }
570
+                if (data.state.toLowerCase() == "error") {
571
+                    layer.confirm(data.message, {
572
+                        btn: ['确定'] //按钮
573
+                    });
574
+                }
575
+            } catch (e) {
576
+                if (isload) {
577
+                    //加载框消失
578
+                }
579
+            }
580
+        }).on("ajaxStop", function () {
581
+            if (isload) {
582
+                //加载框消失
583
+            }
584
+        })
585
+    },
586
+    setdh:function(){
587
+    	$("#ReIndex").click(function(){
588
+    		top.location.href="index.html";
589
+    	})
590
+    }
591
+}
592
+
593
+helper.init.setajax();
594
+helper.init.setdh();

+ 49 - 0
WebChart/Script/Common/huayi.load.js

@@ -0,0 +1,49 @@
1
+var huayi = {};
2
+
3
+//huayi.local ={
4
+//    curWwwPath: window.document.location.href,
5
+//    pathName : window.document.location.pathname, 
6
+//    hostPath: window.document.location.href.substring(0, window.document.location.href.indexOf(window.document.location.pathname)) + window.document.location.pathname.substring(0, window.document.location.pathname.substr(1).indexOf('/') + 1)
7
+//};
8
+
9
+
10
+function GetPath() {
11
+    var curWwwPath = window.document.location.href;
12
+    //为了便于前端测试,便宜行事的解决方案
13
+    if (curWwwPath.indexOf("127.0.0.1")>0) {
14
+        var pathName = window.document.location.pathname;
15
+        var pos = curWwwPath.indexOf(pathName);
16
+        var localhostPaht = curWwwPath.substring(0, pos);
17
+        var projectName = pathName.substring(0, pathName.substr(1).indexOf('/') + 1);
18
+        var realPath = localhostPaht + projectName;
19
+        return realPath;
20
+    }
21
+    else {
22
+        return '';
23
+    }
24
+}
25
+
26
+
27
+var hostPath = GetPath();
28
+
29
+
30
+
31
+document.write(" <link href=\"" + hostPath + "/css/bootstrap.min.css\" rel=\"stylesheet\" type=\"text/css\" />");
32
+document.write(" <link href=\"" + hostPath + "/css/index.css\" rel=\"stylesheet\" type=\"text/css\" />");
33
+//document.write(" <link href=\"" + hostPath + "/css/bootstrap.min14ed.css?v=3.3.6\" rel=\"stylesheet\" type=\"text/css\" />");
34
+//document.write(" <link href=\"" + hostPath + "/css/boot/bootstrap-table.css\" rel=\"stylesheet\" type=\"text/css\" />");
35
+//document.write(" <link href=\"" + hostPath + "/css/font-awesome.min93e3.css?v=4.4.0\" rel=\"stylesheet\" type=\"text/css\" />");
36
+//document.write(" <link href=\"" + hostPath + "/css/animate.min.css\" rel=\"stylesheet\" type=\"text/css\" />");
37
+//document.write(" <link href=\"" + hostPath + "/css/style.min862f.css?v=4.1.0\" rel=\"stylesheet\" type=\"text/css\" />");
38
+//
39
+document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/jquery.min.js?v=2.1.4\"></script>");
40
+document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/jquery.cookie.js\"></script>");
41
+document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/echarts.min.js\"></script>");
42
+//document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/highcharts.js\"></script>");
43
+document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/gray.js\"></script>");
44
+document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/radialIndicator.js\"></script>");
45
+//document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/bootstrap.min.js?v=3.3.6\"></script>");
46
+//document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/bootstrap-table.js\"></script>");
47
+//document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/bootstrap-table-zh-CN.js\"></script>");
48
+document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/layer/layer.js\"></script>");
49
+document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/Script/Common/huayi.http.js\"></script>");

+ 7 - 0
WebChart/Script/test.js

@@ -0,0 +1,7 @@
1
+function Login() {
2
+
3
+    //var ss = helper.http.get("http://localhost:61861/interface/GetData.asmx/GetData?P=CeShi/CS&r=1111" + Math.random());
4
+    var ss = helper.http.get("http://localhost:801/Home/ss");
5
+        alert(ss);
6
+
7
+}

File diff suppressed because it is too large
+ 6 - 0
WebChart/css/bootstrap.min.css


+ 700 - 0
WebChart/css/index.css

@@ -0,0 +1,700 @@
1
+body {
2
+	margin: 0;
3
+	padding: 0;
4
+	font-size: 16px;
5
+	background-color: #030303;
6
+	-webkit-text-size-adjust: none;
7
+	overflow-x: hidden;
8
+}
9
+
10
+ul,li {
11
+	margin: 0;
12
+	padding: 0;
13
+}
14
+
15
+li {
16
+	list-style-type: none;
17
+}
18
+
19
+img {
20
+	border: 0;
21
+}
22
+p{
23
+	margin: 0;
24
+	padding: 0;
25
+}
26
+/*.clearfix {
27
+	zoom: 1;
28
+	overflow: hidden;
29
+}*/
30
+
31
+.clearfix:after {
32
+	content: " ";
33
+	display: block;
34
+	clear: both;
35
+	height: 0;
36
+}
37
+
38
+a {
39
+	text-decoration: none;
40
+}
41
+/*[ui-view]{
42
+	background:#030303 ;
43
+}*/
44
+
45
+ .navcon{
46
+ 	width: 100%;
47
+ 	background:#030303 ;
48
+ 	border-bottom: 1px solid #fff;
49
+ 	margin-bottom: 40px;
50
+ }
51
+ .navbox{
52
+ 	width: 95%;
53
+ 	height: 60px;
54
+ 	color: #000;
55
+ }
56
+ .logo{
57
+		display: inline-block;
58
+		height: 100%;
59
+		vertical-align: middle;
60
+    }
61
+  .navbox p{
62
+  	float: left;
63
+  	height: 100%;
64
+  	text-align: center;
65
+  	font-size: 25px;
66
+  	padding: 0 20px;
67
+    background: #fff;
68
+    position: relative;
69
+  }
70
+   .navbox p:after{
71
+    display: block;
72
+    content: "";
73
+    position: absolute;
74
+    right: -40px;
75
+    top: 0;
76
+    height: 0;
77
+    width: 0;
78
+    border-left: 40px solid #fff;
79
+    border-top: 60px solid transparent;
80
+   }
81
+ 
82
+  .navbox .navl{
83
+  	height: 100%;
84
+  	width: 60%;
85
+  	float: right;
86
+  }
87
+ .navbox .navl li{
88
+ 	float: left;
89
+ 	height: 100%;
90
+ 	margin-left: 10px;
91
+ 
92
+ }
93
+  .navbox .navl li a{
94
+  	display: block;
95
+  	height: 100%;
96
+ 	line-height: 60px;
97
+ 	text-align: center;
98
+ 	padding: 0px 15px;
99
+ 	color: #fff;
100
+  }
101
+.navbox .navl li a.active{
102
+ 	color: #e40309;
103
+ }
104
+ 
105
+ /*来源渠道开始*/
106
+
107
+ .qunzhong{
108
+    width: 100%;
109
+    background: #030303;
110
+    margin: 0 auto;
111
+    padding-bottom: 40px;
112
+ 	
113
+ }
114
+ .huanxing{
115
+ 	float: right;
116
+ 	width: 40%;
117
+ 	color: #fff;
118
+ 	text-align: center;
119
+ }
120
+  .huanxing ul li{
121
+  	float: left;
122
+  	width: 25%;
123
+  	margin-top: 10px;
124
+  	font-size: 14px;
125
+  	
126
+  }
127
+  .huanxing ul li div{
128
+  	width: 6em;
129
+    height: 6em;
130
+    margin: 0 auto;
131
+    /*background: url(../img/circle_03.png) no-repeat;
132
+    background-size: contain;*/
133
+   border: 10px solid #ff585b;
134
+    -moz-border-radius: 50%; /* Firefox */
135
+  -webkit-border-radius: 50%; /* Safari 和 Chrome */
136
+   border-radius: 50%;/* Opera 10.5+, 以及使用了IE-CSS3的IE浏览器 */
137
+    color: #fff;
138
+    text-align: center;
139
+    line-height: 6em;
140
+   
141
+  }
142
+    .slqd{
143
+    	float: left;
144
+    	width: 100%;
145
+    }
146
+   .slqd .txbox>li{
147
+ 	float: left;
148
+ 	width: 10%;
149
+ 	color: #fff;
150
+ 	text-align: center;
151
+ 	    font-size: 14px;
152
+ }
153
+/*来源渠道结束*/
154
+/*接单部门处理情况开始*/
155
+.jiedan-left{
156
+	float: left;
157
+	width: 60%;
158
+	
159
+}
160
+.jiedan-right{
161
+	float: right;
162
+	width: 40%;
163
+	
164
+}
165
+.biao-title{
166
+	text-align: center;
167
+	color: #fff;
168
+	font-size: 18px;
169
+	margin: 10px 0;
170
+	font-weight: bold;
171
+}
172
+.bumen ul.txbox li{
173
+	width: 20%;
174
+	float: left;
175
+	text-align: center;
176
+	color: #fff;
177
+	font-size: 14px;
178
+	overflow-x: hidden;
179
+    white-space: nowrap;
180
+    text-overflow: ellipsis;
181
+}
182
+/*接单部门处理情况结束*/
183
+/*投诉举报开始*/
184
+.tousujb{
185
+	width: 95%;
186
+	margin: 35px auto 0 auto;
187
+	margin-top: 35px;
188
+}
189
+
190
+.tousujb>div>div{
191
+	float: left;
192
+}
193
+.tousujb>div>div ul{
194
+	margin-top: 30px;
195
+}
196
+.tsjb-top .tsjb-tl{
197
+	width: 35%;
198
+}
199
+.tsjb-top .tsjb-tr{
200
+	width: 65%;
201
+}
202
+.tsjb-bot .tsjb-bl{
203
+	/*margin: 0 5%;*/
204
+	margin-top: 30px;
205
+}
206
+.tsjb-bot>div{
207
+	width: 50%;
208
+	margin-top: 20px;
209
+	box-sizing: border-box;
210
+    /*margin-left: 3%;*/
211
+	
212
+}
213
+.tsjb-bm ul li>div,.tsjb-br ul li>div{
214
+	float: left;
215
+	color: #fff;
216
+	font-size: 14px;
217
+}
218
+.tsjb-bm ul li>div.tsgjz-left,.tsjb-br ul li>div.tsgjz-left{
219
+	width: 70%;
220
+}
221
+.tsjb-bm ul li>div.tsgjz-right,.tsjb-br ul li>div.tsgjz-right{
222
+	float: right;
223
+}
224
+.tsjb-bm ul li .progress,.tsjb-br ul li .progress{
225
+	background-color: #1d1c1c;
226
+}
227
+.progress-bar-zise {
228
+    background-color: #c278a9;
229
+}
230
+.progress-bar-cheng {
231
+    background-color: #fc9765;
232
+}
233
+.progress-bar-fen {
234
+    background-color: #ffe6de;
235
+}
236
+.progress-bar-dousha {
237
+    background-color: #ef9c94;
238
+}
239
+.progress-bar-qing {
240
+    background-color: #deffde;
241
+}
242
+.progress-bar-bohe {
243
+    background-color: #87ebf1;
244
+}
245
+.success{
246
+	color: #5cb85c;
247
+}
248
+.warning {
249
+   color: #f0ad4e;
250
+}
251
+.danger {
252
+    color: #d9534f;
253
+}
254
+.info {
255
+    color: #5bc0de;
256
+}
257
+.zise {
258
+   color: #c278a9;
259
+}
260
+.cheng {
261
+   color: #fc9765;
262
+}
263
+.fen {
264
+   color: #ffe6de;
265
+}
266
+.dousha {
267
+ 	color: #ef9c94;
268
+}
269
+.qing {
270
+    color: #deffde;
271
+}
272
+.bohe {
273
+    color: #87ebf1;
274
+}
275
+
276
+/*投诉举报结束*/
277
+/*话务数量情况开始*/
278
+.z_num {
279
+		color: #FFFFFF;
280
+		font-size: 16px;
281
+		text-align: center;
282
+		display: block;
283
+		margin-top: 8px;
284
+	}
285
+	
286
+	.phone_num {
287
+		overflow: hidden;
288
+		margin-top: 10px;
289
+	}
290
+	
291
+	.phone_li {
292
+		color: #fff;
293
+	}
294
+	
295
+	.phone_li li {
296
+		width: 50%;
297
+		float: left;
298
+		text-align: center;
299
+		font-size: 14px;
300
+	}
301
+
302
+	.Map_picter {
303
+		width: 100%;
304
+	}
305
+	
306
+	.fl {
307
+		float: left;
308
+	}
309
+	
310
+	.Map_dq ul li {
311
+		float: left;
312
+		color: #FFFDEF;
313
+		width: 20%;
314
+		text-align: center;
315
+		margin-bottom: 10px;
316
+	}
317
+	
318
+	.size-14 {
319
+		font-size: 14px;
320
+	}
321
+	
322
+	.tb {
323
+		display: inline-block;
324
+		width: 10px;
325
+		height: 10px;
326
+		background-color: #FFFDEF;
327
+		vertical-align: baseline;
328
+	}
329
+	
330
+	.xe-z {
331
+		display: inline-block;
332
+		width: 10px;
333
+		height: 10px;
334
+		background-color: #fecb00;
335
+	}
336
+	
337
+	.xe-l {
338
+		display: inline-block;
339
+		width: 10px;
340
+		height: 10px;
341
+		background-color: #4ef41b;
342
+	}
343
+	
344
+	.xe-a {
345
+		display: inline-block;
346
+		width: 10px;
347
+		height: 10px;
348
+		background-color: #ecaaf1;
349
+	}
350
+	
351
+	.xe-t {
352
+		display: inline-block;
353
+		width: 10px;
354
+		height: 10px;
355
+		background-color: #043288;
356
+	}
357
+	
358
+	.xe-x {
359
+		display: inline-block;
360
+		width: 10px;
361
+		height: 10px;
362
+		background-color: #ed15fa;
363
+	}
364
+	
365
+	.xe-y {
366
+		display: inline-block;
367
+		width: 10px;
368
+		height: 10px;
369
+		background-color: #2bf9e8;
370
+	}
371
+	
372
+	.xe-g {
373
+		display: inline-block;
374
+		width: 10px;
375
+		height: 10px;
376
+		background-color: #d8b839;
377
+	}
378
+	
379
+	.xe-w {
380
+		display: inline-block;
381
+		width: 10px;
382
+		height: 10px;
383
+		background-color: #2b6df1;
384
+	}
385
+	
386
+	.xe-b {
387
+		display: inline-block;
388
+		width: 10px;
389
+		height: 10px;
390
+		background-color: #fc1807;
391
+	}
392
+	
393
+	.xe-1 {
394
+		display: inline-block;
395
+		width: 10px;
396
+		height: 10px;
397
+		background-color: #23b166;
398
+	}
399
+	
400
+	.xe-2 {
401
+		display: inline-block;
402
+		width: 10px;
403
+		height: 10px;
404
+		background-color: #fbfafa;
405
+	}
406
+	
407
+	.xe-3 {
408
+		display: inline-block;
409
+		width: 10px;
410
+		height: 10px;
411
+		background-color: #f27bbf;
412
+	}
413
+	
414
+	.xe-4 {
415
+		display: inline-block;
416
+		width: 10px;
417
+		height: 10px;
418
+		background-color: #fb028f;
419
+	}
420
+	
421
+/*话务数量情况结束*/
422
+/*中心大数据开始*/
423
+			.containers{
424
+				    width: 1300px;
425
+    				margin: 0 auto;
426
+			}
427
+			.z_num {
428
+				color: #FFFFFF;
429
+				font-size: 16px;
430
+				text-align: center;
431
+				display: block;
432
+				margin-top: 8px;
433
+			}
434
+			
435
+			.phone_num {
436
+				overflow: hidden;
437
+				margin-top: 10px;
438
+			}
439
+			.phone_li li span {
440
+				display: block;
441
+				text-align: center;
442
+			}
443
+			
444
+			.map_titles {
445
+				color: #E0E0E3;
446
+				font-size: 16px;
447
+				text-align: center;
448
+				display: block;
449
+				margin-top: 8px;
450
+			}
451
+			
452
+			.main1 {
453
+				width: 40%;
454
+				float: left;
455
+			}
456
+			
457
+
458
+			.sl_title {
459
+				font-size: 16px;
460
+				text-align:center;
461
+				color: #fff;
462
+			}
463
+			
464
+			.slqm ul {
465
+				margin-top: 10px;
466
+			}
467
+			
468
+			.slqm ul li {
469
+				list-style: none;
470
+				font-size: 14px;
471
+				text-align: center;
472
+				/*margin-bottom: 15px;*/
473
+			}
474
+			
475
+			.slqm ul li span {
476
+				text-align: center;
477
+				display: inline-block;
478
+				width: 8%;
479
+			}
480
+			
481
+			.sl_b {
482
+				color: #F0F4F7;
483
+			}
484
+			
485
+			.sl_red {
486
+				color: red;
487
+			}
488
+			
489
+			.sl_blue {
490
+				color: #73a2fa;
491
+			}
492
+			
493
+			.size-20 {
494
+				font-size: 20px;
495
+			}
496
+			
497
+			.max-width {
498
+				width: 40%!important;
499
+				text-align: left!important;
500
+			}
501
+			
502
+			.tspm ul {
503
+				margin-top: 25px;
504
+			}
505
+			
506
+			.tspm ul li span {
507
+				text-align: left;
508
+				display: inline-block;
509
+				width: 10%;
510
+			}
511
+			
512
+			.tspm ul li {
513
+				font-size: 14px;
514
+				text-align: center;
515
+			}
516
+			.slqm_content ul li .progress {
517
+				background-color:#1d1c1c;
518
+				margin-bottom: 40px;
519
+   				margin-top: 5px;
520
+			
521
+			}
522
+			.conb>div{
523
+				float: left;
524
+				width: 50%;
525
+			}
526
+			.gd-tbox{
527
+				width: 100%;
528
+				margin: 0px 0 25px 0;
529
+			}
530
+			.gd-tbox li{
531
+				float: left;
532
+				width: 33.3%;
533
+				text-align: center;
534
+				color: #fff;
535
+				height: 45px;
536
+   				line-height: 45px;
537
+			}
538
+			.gd-tbox li span{
539
+				color: red;
540
+			}
541
+			.gd-tbox li.gd-tit{
542
+				background: #c23531;
543
+				color: #fff;
544
+				
545
+			}
546
+			.mb>div{
547
+				float: left;
548
+			}
549
+			
550
+			.gdmap .gdmap-l{
551
+				/*width: 15%;*/
552
+			}
553
+			.gdmap .gdmap-l ul{
554
+				width: 100%;
555
+				color: #73a2fa;
556
+				font-size: 14px;
557
+			}
558
+			.gdmap .gdmap-l ul li{
559
+				width: 50%;
560
+				float: left;
561
+				padding: 6px 0;
562
+			    border-top: 1px solid #1e2b3a;
563
+			    box-sizing: border-box;
564
+			    padding-left: 10px;
565
+			}
566
+			.gdmap .gdmap-l ul li span{
567
+				color: #fff;
568
+				font-size: 18px;
569
+			}
570
+			.gdmap .gdmap-m{
571
+				/*width: 60%;*/
572
+				width: 476px;
573
+			    height: 369px;
574
+			    margin: 0 auto;
575
+			}
576
+			.gdmap .gdmap-m img{
577
+				display: block;
578
+				width: 100%;
579
+			}
580
+			.gdmap .gdmap-r{
581
+				/*width: 20%;*/
582
+				color: #fff;
583
+				font-size: 14px;
584
+			}
585
+			.gdmap .gdmap-r ul li{
586
+				float: left;
587
+				float: left;
588
+    width: 25%;
589
+    /*margin-top: 15px;*/
590
+    padding: 8px 0;
591
+			    border-top: 1px solid #1e2b3a;
592
+			    cursor: pointer;
593
+			}
594
+			.gdmap .gdmap-r ul li i{
595
+				margin-right: 5px;
596
+				border-radius: 50%;
597
+			}
598
+			.xian ul li i{
599
+				    display: inline-block;
600
+				    width: 10px;
601
+				    height: 10px;
602
+			}
603
+			.yuc{
604
+				 background-color: #f34763;
605
+			}
606
+			.mq{
607
+				 background-color: #0343c3;
608
+			}
609
+			.sx{
610
+				 background-color: #fa9533;
611
+			}
612
+			.nl{
613
+				 background-color: #ecaaf1;
614
+			}
615
+			.lyq{
616
+				 background-color: #60de83;
617
+			}
618
+			.syq{
619
+				 background-color: #2bf9e8;
620
+			}
621
+			.zc{
622
+				 background-color: #f761b7;
623
+			}
624
+			.xy{
625
+				 background-color: #fecb00;
626
+			}
627
+			.yongc{
628
+				 background-color: #49a4fe;
629
+			}
630
+			
631
+			
632
+/*中心大数据结束*/
633
+/*服务知识开始*/
634
+	.slqd_title {
635
+				font-size: 16px;
636
+				color: #fff;
637
+				text-align:center;
638
+				    font-weight: bold;
639
+			}
640
+			.xs {
641
+				font-size: 16px;
642
+				line-height: 20px;
643
+				display: block;
644
+			}			
645
+			.pr_bai {
646
+				color: #FFF;
647
+				margin-bottom: 8px;
648
+			}
649
+			
650
+			.bm {
651
+				width: 35%;
652
+				display: block;
653
+				float: left;
654
+				height: 40px;
655
+				float: right;
656
+				line-height: 15px;
657
+			}
658
+			
659
+			.bm span {
660
+				font-size: 14px;
661
+				text-align: center;
662
+				display: block;
663
+			}
664
+			
665
+			.slqd_content {
666
+				overflow: hidden;
667
+			}			
668
+			.slqd_content {
669
+				margin-top: 30px;
670
+			}			
671
+				
672
+			.info {
673
+				color: #23c6c8;
674
+			}
675
+			
676
+			.success {
677
+				color: #1c84c6;
678
+			}
679
+			
680
+			.danger {
681
+				color: #ed5565;
682
+			}
683
+			
684
+			.warning {
685
+				color: #f8ac59;
686
+			}
687
+			.slqd_content ul{
688
+				padding-left: 0;
689
+				margin-right: 40px;
690
+			}
691
+			.slqd_content ul li {
692
+				margin-bottom: 25px;
693
+			}
694
+			.slqd_content ul li .progress {
695
+				width: 60%;
696
+				height: 20px;
697
+				float: left;
698
+				background-color: #1d1c1c;
699
+			}
700
+/*服务知识结束*/

+ 128 - 0
WebChart/fuWuZhiShi.html

@@ -0,0 +1,128 @@
1
+<!DOCTYPE html>
2
+<html>
3
+<head lang="en">
4
+    <meta charset="UTF-8">
5
+    <title></title>
6
+     <script src="Script/Common/huayi.load.js"></script>
7
+    <script src="Script/Common/huayi.config.js"></script>
8
+    <link rel="stylesheet" href="css/bootstrap.min.css" />
9
+    <link rel="stylesheet" href="css/index.css"/>
10
+</head>
11
+<body>
12
+<div class="navcon ">
13
+	<div class="navbox clearfix">
14
+	<p><img src="img/sqLogo.png" class="logo" alt="" />商丘12345数据展示</p>
15
+    <ul class="navl clearfix">
16
+        <li><a href="index.html">来源渠道情况</a></li>
17
+        <li><a href="jieDanBuMen.html">接单部门情况</a></li>
18
+        <li><a href="touSuJuBao.html">投诉举报情况</a></li>
19
+        <li><a href="huaWuLiang.html">话务数量情况</a></li>
20
+        <li><a href="zhongXinDaShuJu.html">中心大数据</a></li>
21
+        <li><a class="active" href="fuWuZhiShi.html">服务知识</a></li>
22
+    </ul>
23
+   </div>
24
+</div>
25
+	<div class="containers">
26
+		<div style="width: 33.33%;" class="fdcl fl">
27
+			<div id="fdcl" style="height: 600px;"></div>
28
+		</div>
29
+		<div style="width: 33.33%;" class="slqd fl" id="slqd">
30
+			<div class="slqd_title">群众咨询知识库情况统计</div>
31
+			<div class="slqd_content">
32
+				<ul>
33
+					<li class="clearfix">
34
+						<div class="progress">
35
+							<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 90%;">
36
+								<span class="xs">90%</span>
37
+							</div>
38
+						</div>
39
+						<div class="bm">
40
+							<span class="pr_bai">护照办理</span>
41
+							<span class="info">(1001)</span>
42
+						</div>
43
+					</li>
44
+					<li class="clearfix">
45
+						<div class="progress">
46
+							<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 90%;">
47
+								<span class="xs">90%</span>
48
+							</div>
49
+						</div>
50
+						<div class="bm">
51
+							<span class="pr_bai">机动车注册登记</span>
52
+							<span class="warning">(1001)</span>
53
+						</div>
54
+					</li>
55
+					<li class="clearfix">
56
+						<div class="progress">
57
+							<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 70%;">
58
+								<span class="xs">70%</span>
59
+							</div>
60
+						</div>
61
+						<div class="bm">
62
+							<span class="pr_bai">不动产登记</span>
63
+							<span class="danger">(1001)</span>
64
+						</div>
65
+					</li>
66
+					<li class="clearfix">
67
+						<div class="progress">
68
+							<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 40%;">
69
+								<span class="xs">40%</span>
70
+							</div>
71
+						</div>
72
+						<div class="bm">
73
+							<span class="pr_bai">生育津贴</span>
74
+							<span class="success">(1001)</span>
75
+						</div>
76
+					</li>
77
+					<li class="clearfix">
78
+						<div class="progress">
79
+							<div class="progress-bar  progress-bar-zise" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;">
80
+								<span class="xs">60%</span>
81
+							</div>
82
+						</div>
83
+						<div class="bm">
84
+							<span class="pr_bai">社保政策社保政策</span>
85
+							<span class="zise">(1001)</span>
86
+						</div>
87
+					</li>
88
+					<li class="clearfix">
89
+						<div class="progress">
90
+							<div class="progress-bar progress-bar-cheng" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 20%;">
91
+								<span class="xs">20%</span>
92
+							</div>
93
+						</div>
94
+						<div class="bm">
95
+							<span class="pr_bai">落户政策</span>
96
+							<span class="cheng">(1001)</span>
97
+						</div>
98
+					</li>
99
+					<li class="clearfix">
100
+						<div class="progress">
101
+							<div class="progress-bar progress-bar-fen" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 20%;">
102
+								<span class="xs">20%</span>
103
+							</div>
104
+						</div>
105
+						<div class="bm">
106
+							<span class="pr_bai">驾照更换</span>
107
+							<span class="fen">(1001)</span>
108
+						</div>
109
+					</li>
110
+
111
+				</ul>
112
+			</div>
113
+		</div>
114
+		<div class="zs fl" style="width: 33.33%;">
115
+			<div id="zs" style="height: 600px;"></div>
116
+		</div>
117
+	</div>
118
+</body>
119
+<script src="js/jquery.min.js"></script>
120
+<script src="js/echarts.min.js"></script>
121
+<!--<script src="js/highcharts.js"></script>-->
122
+<script src="js/gray.js"></script>
123
+<script src="js/radialIndicator.js"></script>
124
+<script src="js/fuwuzhishi.js"></script>
125
+</html>
126
+
127
+
128
+

+ 136 - 0
WebChart/huaWuLiang.html

@@ -0,0 +1,136 @@
1
+<!DOCTYPE html>
2
+<html>
3
+<head lang="en">
4
+    <meta charset="UTF-8">
5
+    <title></title>
6
+     <script src="Script/Common/huayi.load.js"></script>
7
+    <script src="Script/Common/huayi.config.js"></script>
8
+    <link rel="stylesheet" href="css/bootstrap.min.css" />
9
+    <link rel="stylesheet" href="css/index.css"/>
10
+</head>
11
+<body>
12
+<div class="navcon ">
13
+	<div class="navbox clearfix">
14
+	<p><img src="img/sqLogo.png" class="logo" alt="" />商丘12345数据展示</p>
15
+    <ul class="navl clearfix">
16
+        <li><a href="index.html">来源渠道情况</a></li>
17
+        <li><a href="jieDanBuMen.html">接单部门情况</a></li>
18
+        <li><a href="touSuJuBao.html">投诉举报情况</a></li>
19
+        <li><a class="active" href="huaWuLiang.html">话务数量情况</a></li>
20
+        <li><a href="zhongXinDaShuJu.html">中心大数据</a></li>
21
+        <!--<li><a href="fuWuZhiShi.html">服务知识</a></li>-->
22
+    </ul>
23
+   </div>
24
+</div>
25
+
26
+<div class="huawu container-fluid">
27
+	<div class="row clearfix">
28
+		<div class="col-md-6">
29
+			<div class="biao-title">话务量实时数据统计</div>
30
+			<div id="main1" style="width: 100%;height: 400px;"></div>
31
+		</div>
32
+		<div class="col-md-6" >
33
+				<div class="biao-title"  style="width: 100%;">当日话务量总体统计</div>
34
+					<div id="phone_num" style="width: 100%;height: 400px;"></div>
35
+			<!--<div class="Map">
36
+				<div class="biao-title">
37
+								 管辖区域来话量统计
38
+								 </div>
39
+				<div class="Map_content">
40
+					<div class="">
41
+						<img class="Map_picter" src="img/123.png" alt="" />
42
+					</div>
43
+					<div class="Map_dq">
44
+						<ul class="">
45
+							<li>
46
+								<b class="xe-z"></b>
47
+								<span class="size-14">周至县</span>
48
+								<span>80%</span>
49
+							</li>
50
+							<li>
51
+								<b class="xe-l"></b>
52
+								<span class="size-14">户县</span>
53
+								<span>80%</span>
54
+							</li>
55
+							<li>
56
+								<b class="xe-a"></b>
57
+								<span class="size-14">长安区</span>
58
+								<span>80%</span>
59
+							</li>
60
+							<li>
61
+								<b class="xe-t"></b>
62
+								<span class="size-14">蓝田县</span>
63
+								<span>80%</span>
64
+							</li>
65
+							<li>
66
+								<b class="xe-y"></b>
67
+								<span class="size-14">阎良区</span>
68
+								<span>80%</span>
69
+							</li>
70
+							<li>
71
+								<b class="xe-g"></b>
72
+								<span class="size-14">高陵县</span>
73
+								<span>80%</span>
74
+							</li>
75
+							<li>
76
+								<b class="xe-w"></b>
77
+								<span class="size-14">未央区</span>
78
+								<span>80%</span>
79
+							</li>
80
+							<li>
81
+								<b class="xe-b"></b>
82
+								<span class="size-14">灞桥区</span>
83
+								<span>80%</span>
84
+							</li>
85
+							<li>
86
+								<b class="xe-1"></b>
87
+								<span class="size-14">周至县</span>
88
+								<span>80%</span>
89
+							</li>
90
+							<li>
91
+								<b class="xe-2"></b>
92
+								<span class="size-14">周至县</span>
93
+								<span>80%</span>
94
+							</li>
95
+							<li>
96
+								<b class="xe-3"></b>
97
+								<span class="size-14">周至县</span>
98
+								<span>80%</span>
99
+							</li>
100
+							<li>
101
+								<b class="xe-4"></b>
102
+								<span class="size-14">周至县</span>
103
+								<span>80%</span>
104
+							</li>
105
+						</ul>
106
+					</div>
107
+				</div>
108
+			</div>-->
109
+		</div>
110
+	</div>
111
+	<div class="row2 clearfix row">
112
+		<div class="col-md-6">
113
+		<div class="biao-title"  style="width: 100%;">坐席闲忙比例</div>
114
+			<div id="main" style="width: 100%; height: 400px;"></div>
115
+		</div>
116
+		<div class='hwzt col-md-6'>
117
+				<!--<span class="z_num">话务量总体统计</span>-->
118
+				<!--<div class="biao-title"  style="width: 100%;">话务量总体统计</div>
119
+					<div id="phone_num" style="width: 100%;height: 400px;"></div>-->
120
+		</div>
121
+	
122
+	</div>
123
+</div>
124
+
125
+
126
+</body>
127
+<script src="js/jquery.min.js"></script>
128
+<script src="js/echarts.min.js"></script>
129
+<script src="js/highcharts.js"></script>
130
+<script src="js/gray.js"></script>
131
+<script src="js/radialIndicator.js"></script>
132
+<script src="js/coment.js"></script>
133
+<script src="js/huawu.js"></script>
134
+</html>
135
+
136
+

BIN
WebChart/img/123.png


BIN
WebChart/img/32.ico


BIN
WebChart/img/circle_03.png


BIN
WebChart/img/midmap_03.png


BIN
WebChart/img/sqLogo.png


+ 45 - 0
WebChart/index.html

@@ -0,0 +1,45 @@
1
+<!DOCTYPE html>
2
+<html>
3
+<head lang="en">
4
+    <meta charset="UTF-8">
5
+    <title></title>
6
+     <script src="Script/Common/huayi.load.js"></script>
7
+    <script src="Script/Common/huayi.config.js"></script>
8
+    <link rel="stylesheet" href="css/bootstrap.min.css" />
9
+    <link rel="stylesheet" href="css/index.css"/>
10
+</head>
11
+<body>
12
+<div class="navcon ">
13
+	<div class="navbox clearfix">
14
+	<p><img src="img/sqLogo.png" class="logo" alt="" />商丘12345数据展示</p>
15
+    <ul class="navl clearfix">
16
+        <li><a class="active" href="">来源渠道情况</a></li>
17
+        <li><a href="jieDanBuMen.html">接单部门情况</a></li>
18
+        <li><a href="touSuJuBao.html">投诉举报情况</a></li>
19
+        <li><a href="huaWuLiang.html">话务数量情况</a></li>
20
+        <li><a href="zhongXinDaShuJu.html">中心大数据</a></li>
21
+        <!--<li><a href="fuWuZhiShi.html">服务知识</a></li>-->
22
+    </ul>
23
+   </div>
24
+</div>
25
+<div class="qunzhong clearfix container-fluid">
26
+	<div class="col-md-6" >
27
+		<div class="biao-title">受理渠道24小时实时统计</div>
28
+		<div id="container1" style="width: 100%; height:500px;float: left;"></div>
29
+	</div>
30
+	
31
+	<div class="huanxing col-md-6">
32
+		<div class="biao-title">受理渠道24小时实时统计</div>
33
+		<div id="qd_box" style="width: 100%;height: 500px;"></div>
34
+	</div>
35
+	
36
+</div>
37
+<script src="js/jquery.min.js"></script>
38
+<script src="js/echarts.min.js"></script>
39
+<script src="js/highcharts.js"></script>
40
+<script src="js/gray.js"></script>
41
+<script src="js/radialIndicator.js"></script>
42
+<script src="js/coment.js"></script>
43
+<script src="js/laiyuanqudao.js"></script>
44
+</body>
45
+</html>

+ 69 - 0
WebChart/jieDanBuMen.html

@@ -0,0 +1,69 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head lang="en">
5
+		<meta charset="UTF-8">
6
+		<title></title>
7
+		<script src="Script/Common/huayi.load.js"></script>
8
+		<script src="Script/Common/huayi.config.js"></script>
9
+		<link rel="stylesheet" href="css/bootstrap.min.css" />
10
+		<link rel="stylesheet" href="css/index.css" />
11
+	</head>
12
+
13
+	<body>
14
+		<div class="navcon ">
15
+			<div class="navbox clearfix">
16
+				<p><img src="img/sqLogo.png" class="logo" alt="" />商丘12345数据展示</p>
17
+				<ul class="navl clearfix">
18
+					<li>
19
+						<a href="index.html">来源渠道情况</a>
20
+					</li>
21
+					<li>
22
+						<a class="active" href="jieDanBuMen.html">接单部门情况</a>
23
+					</li>
24
+					<li>
25
+						<a href="touSuJuBao.html">投诉举报情况</a>
26
+					</li>
27
+					<li>
28
+						<a href="huaWuLiang.html">话务数量情况</a>
29
+					</li>
30
+					<li>
31
+						<a href="zhongXinDaShuJu.html">中心大数据</a>
32
+					</li>
33
+					<!--<li>
34
+						<a href="fuWuZhiShi.html">服务知识</a>
35
+					</li>-->
36
+				</ul>
37
+			</div>
38
+		</div>
39
+
40
+		<div class="jiedan container-fluid clearfix">
41
+			<!--<div class="clearfix">-->
42
+				<div class="jiedan-left col-md-6">
43
+					<div class="biao-title">工单状态</div>
44
+					<div id="jiedan1" style="width: 100%; height: 500px;"></div>
45
+
46
+				</div>
47
+				<div class="jiedan-right col-md-6">
48
+					<div class="biao-title">工单处理时间分布情况</div>
49
+					<div id="timefb" style="width: 100%; height: 500px;"></div>
50
+				</div>
51
+			<!--</div>-->
52
+			<!--<div class="biao-title">各部门受理工单情况</div>
53
+			<div class="bumen" id="bumen" style="width: 100%; height: 500px;">
54
+				<!--<ul class="txbox clearfix">
55
+
56
+				</ul>
57
+			</div>-->
58
+		</div>
59
+
60
+	</body>
61
+	<script src="js/jquery.min.js"></script>
62
+	<script src="js/echarts.min.js"></script>
63
+	<script src="js/highcharts.js"></script>
64
+	<script src="js/gray.js"></script>
65
+	<script src="js/radialIndicator.js"></script>
66
+	<script src="js/coment.js"></script>
67
+	<script src="js/jiedanbumen.js"></script>
68
+
69
+</html>

+ 10 - 0
WebChart/js/coment.js

@@ -0,0 +1,10 @@
1
+function getColor(){
2
+			    var colorElements = "0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t";  
3
+			    var colorArray = colorElements.split(",");  
4
+			    var color ="#";  
5
+			    for(var i =0;i<6;i++){  
6
+			        color+=colorArray[Math.floor(Math.random()*16)];  
7
+			    }  
8
+			    return color;  
9
+			}
10
+//var token=$.cookie("token");

File diff suppressed because it is too large
+ 37 - 0
WebChart/js/echarts.min.js


+ 153 - 0
WebChart/js/fuwuzhishi.js

@@ -0,0 +1,153 @@
1
+		var myChart = echarts.init(document.getElementById('fdcl'));
2
+		option = {
3
+			title: {
4
+				text: '工单处理时间统计和分布',
5
+				x: 'center',
6
+				textStyle: {
7
+					color: '#fff',
8
+					fontSize: 18
9
+				}
10
+			},
11
+			tooltip: {
12
+				trigger: 'item',
13
+				formatter: "{a} <br/>{b} : {c} ({d}%)"
14
+			},
15
+			legend: {
16
+				orient: 'vertical',
17
+				left: 'left',
18
+				top: 50,
19
+				inactiveColor: '#fff',
20
+				textStyle: {
21
+					color: '#fff',
22
+					//						fontSize: 16
23
+				},
24
+				data: ['知识库总数量', '通话总数量', '缺失总数量']
25
+			},
26
+
27
+			calculable: true,
28
+			series: [{
29
+				name: '占比',
30
+				type: 'pie',
31
+				selectedOffset: 5,
32
+				radius: [50, 150],
33
+				center: ['45%', '60%'],
34
+				roseType: 'radius',
35
+				label: {
36
+					normal: {
37
+						show: false
38
+					},
39
+					emphasis: {
40
+						show: true
41
+					}
42
+				},
43
+				lableLine: {
44
+					normal: {
45
+						show: false
46
+					},
47
+					emphasis: {
48
+						show: true
49
+					}
50
+				},
51
+				data: [{
52
+					value: 10,
53
+					name: '知识库总数量'
54
+				}, {
55
+					value: 5,
56
+					name: '通话总数量'
57
+				}, {
58
+					value: 15,
59
+					name: '缺失总数量'
60
+				}, ]
61
+			}],
62
+			color: ['#eed147', '#acc977', '#ba466b'],
63
+		};
64
+		myChart.setOption(option);
65
+		console.log(window.onresize);
66
+		window.onresize = function() {
67
+			myChart.resize();
68
+			myChart.setOption(option);
69
+		};
70
+		//图2
71
+		var myChart1 = echarts.init(document.getElementById('zs'));
72
+		option = {
73
+			title: {
74
+				text: '工单处理时间统计和分布',
75
+				x: 'center',
76
+				textStyle: {
77
+					color: '#fff',
78
+					fontSize: 18
79
+				}
80
+			},
81
+			tooltip: {
82
+				trigger: 'axis',
83
+				axisPointer: {
84
+					type: 'shadow',
85
+					label: {
86
+						show: true,
87
+						backgroundColor: '#333'
88
+					}
89
+				}
90
+			},
91
+			legend: {
92
+				top: 30,
93
+				data: ['咨询量', '缺失量'],
94
+				textStyle: {
95
+					color: '#ccc'
96
+				}
97
+			},
98
+			xAxis: {
99
+				data: ['市林业局', '市国土局', '市环保局', '市法制办', '市地震局', '市科技局', '市民政局', '市审计局', '市地煤炭局', '市地煤炭局'],
100
+				axisLine: {
101
+					lineStyle: {
102
+						color: '#ccc'
103
+				
104
+					}
105
+				},
106
+				//文字旋转角度
107
+				axisLabel: {
108
+					interval: 0,
109
+					rotate: 40,
110
+					textStyle: {
111
+						color: '#fff',
112
+						fontSize: 12
113
+					}
114
+				}
115
+			},
116
+			yAxis: {
117
+				splitLine: { show: false },
118
+				axisLine: {
119
+					lineStyle: {
120
+						color: '#ccc'
121
+					}
122
+				}
123
+			},
124
+			series: [{
125
+				name: '咨询量',
126
+				type: 'line',
127
+				smooth: true,
128
+				showAllSymbol: true,
129
+				symbol: 'emptyCircle',
130
+				symbolSize: 15,
131
+				data: [10, 15, 40, 44, 30, 50, 80, 62, 55, 32]
132
+			}, {
133
+				name: '缺失量',
134
+				type: 'bar',
135
+				barWidth: 10,
136
+				itemStyle: {
137
+					normal: {
138
+						barBorderRadius: 5,
139
+						color: new echarts.graphic.LinearGradient(
140
+							0, 0, 0, 1, [
141
+								{ offset: 0, color: '#14c8d4' },
142
+								{ offset: 1, color: '#43eec6' }
143
+							]
144
+						)
145
+					}
146
+				},
147
+				data: [20, 33, 80, 14, 60, 42, 99, 22, 36, 19]
148
+			}]
149
+		};
150
+
151
+		myChart1.setOption(option);
152
+		window.onresize = myChart1.resize;
153
+

+ 326 - 0
WebChart/js/gray.js

@@ -0,0 +1,326 @@
1
+/**
2
+ * @license Highcharts JS v5.0.10 (2017-03-31)
3
+ *
4
+ * (c) 2009-2017 Torstein Honsi
5
+ *
6
+ * License: www.highcharts.com/license
7
+ */
8
+'use strict';
9
+(function(factory) {
10
+    if (typeof module === 'object' && module.exports) {
11
+        module.exports = factory;
12
+    } else {
13
+        factory(Highcharts);
14
+    }
15
+}(function(Highcharts) {
16
+    (function(Highcharts) {
17
+        /**
18
+         * (c) 2010-2017 Torstein Honsi
19
+         *
20
+         * License: www.highcharts.com/license
21
+         * 
22
+         * Gray theme for Highcharts JS
23
+         * @author Torstein Honsi
24
+         */
25
+
26
+        Highcharts.theme = {
27
+            colors: ['#DDDF0D', '#7798BF', '#55BF3B', '#DF5353', '#aaeeee', '#ff0066', '#eeaaee',
28
+                '#55BF3B', '#DF5353', '#7798BF', '#aaeeee'
29
+            ],
30
+            chart: {
31
+                backgroundColor: {
32
+                    linearGradient: {
33
+                        x1: 0,
34
+                        y1: 0,
35
+                        x2: 0,
36
+                        y2: 1
37
+                    },
38
+                    stops: [
39
+                        [0, 'rgb(96, 96, 96)'],
40
+                        [1, 'rgb(16, 16, 16)']
41
+                    ]
42
+                },
43
+                borderWidth: 0,
44
+                borderRadius: 0,
45
+                plotBackgroundColor: null,
46
+                plotShadow: false,
47
+                plotBorderWidth: 0
48
+            },
49
+            title: {
50
+                style: {
51
+                    color: '#FFF',
52
+                    font: '16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
53
+                }
54
+            },
55
+            subtitle: {
56
+                style: {
57
+                    color: '#DDD',
58
+                    font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
59
+                }
60
+            },
61
+            xAxis: {
62
+                gridLineWidth: 0,
63
+                lineColor: '#999',
64
+                tickColor: '#999',
65
+                labels: {
66
+                    style: {
67
+                        color: '#999',
68
+                        fontWeight: 'bold'
69
+                    }
70
+                },
71
+                title: {
72
+                    style: {
73
+                        color: '#AAA',
74
+                        font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
75
+                    }
76
+                }
77
+            },
78
+            yAxis: {
79
+                alternateGridColor: null,
80
+                minorTickInterval: null,
81
+                gridLineColor: 'rgba(255, 255, 255, .1)',
82
+                minorGridLineColor: 'rgba(255,255,255,0.07)',
83
+                lineWidth: 0,
84
+                tickWidth: 0,
85
+                labels: {
86
+                    style: {
87
+                        color: '#999',
88
+                        fontWeight: 'bold'
89
+                    }
90
+                },
91
+                title: {
92
+                    style: {
93
+                        color: '#AAA',
94
+                        font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
95
+                    }
96
+                }
97
+            },
98
+            legend: {
99
+                itemStyle: {
100
+                    color: '#CCC'
101
+                },
102
+                itemHoverStyle: {
103
+                    color: '#FFF'
104
+                },
105
+                itemHiddenStyle: {
106
+                    color: '#333'
107
+                }
108
+            },
109
+            labels: {
110
+                style: {
111
+                    color: '#CCC'
112
+                }
113
+            },
114
+            tooltip: {
115
+                backgroundColor: {
116
+                    linearGradient: {
117
+                        x1: 0,
118
+                        y1: 0,
119
+                        x2: 0,
120
+                        y2: 1
121
+                    },
122
+                    stops: [
123
+                        [0, 'rgba(96, 96, 96, .8)'],
124
+                        [1, 'rgba(16, 16, 16, .8)']
125
+                    ]
126
+                },
127
+                borderWidth: 0,
128
+                style: {
129
+                    color: '#FFF'
130
+                }
131
+            },
132
+
133
+
134
+            plotOptions: {
135
+                series: {
136
+                    nullColor: '#444444'
137
+                },
138
+                line: {
139
+                    dataLabels: {
140
+                        color: '#CCC'
141
+                    },
142
+                    marker: {
143
+                        lineColor: '#333'
144
+                    }
145
+                },
146
+                spline: {
147
+                    marker: {
148
+                        lineColor: '#333'
149
+                    }
150
+                },
151
+                scatter: {
152
+                    marker: {
153
+                        lineColor: '#333'
154
+                    }
155
+                },
156
+                candlestick: {
157
+                    lineColor: 'white'
158
+                }
159
+            },
160
+
161
+            toolbar: {
162
+                itemStyle: {
163
+                    color: '#CCC'
164
+                }
165
+            },
166
+
167
+            navigation: {
168
+                buttonOptions: {
169
+                    symbolStroke: '#DDDDDD',
170
+                    hoverSymbolStroke: '#FFFFFF',
171
+                    theme: {
172
+                        fill: {
173
+                            linearGradient: {
174
+                                x1: 0,
175
+                                y1: 0,
176
+                                x2: 0,
177
+                                y2: 1
178
+                            },
179
+                            stops: [
180
+                                [0.4, '#606060'],
181
+                                [0.6, '#333333']
182
+                            ]
183
+                        },
184
+                        stroke: '#000000'
185
+                    }
186
+                }
187
+            },
188
+
189
+            // scroll charts
190
+            rangeSelector: {
191
+                buttonTheme: {
192
+                    fill: {
193
+                        linearGradient: {
194
+                            x1: 0,
195
+                            y1: 0,
196
+                            x2: 0,
197
+                            y2: 1
198
+                        },
199
+                        stops: [
200
+                            [0.4, '#888'],
201
+                            [0.6, '#555']
202
+                        ]
203
+                    },
204
+                    stroke: '#000000',
205
+                    style: {
206
+                        color: '#CCC',
207
+                        fontWeight: 'bold'
208
+                    },
209
+                    states: {
210
+                        hover: {
211
+                            fill: {
212
+                                linearGradient: {
213
+                                    x1: 0,
214
+                                    y1: 0,
215
+                                    x2: 0,
216
+                                    y2: 1
217
+                                },
218
+                                stops: [
219
+                                    [0.4, '#BBB'],
220
+                                    [0.6, '#888']
221
+                                ]
222
+                            },
223
+                            stroke: '#000000',
224
+                            style: {
225
+                                color: 'white'
226
+                            }
227
+                        },
228
+                        select: {
229
+                            fill: {
230
+                                linearGradient: {
231
+                                    x1: 0,
232
+                                    y1: 0,
233
+                                    x2: 0,
234
+                                    y2: 1
235
+                                },
236
+                                stops: [
237
+                                    [0.1, '#000'],
238
+                                    [0.3, '#333']
239
+                                ]
240
+                            },
241
+                            stroke: '#000000',
242
+                            style: {
243
+                                color: 'yellow'
244
+                            }
245
+                        }
246
+                    }
247
+                },
248
+                inputStyle: {
249
+                    backgroundColor: '#333',
250
+                    color: 'silver'
251
+                },
252
+                labelStyle: {
253
+                    color: 'silver'
254
+                }
255
+            },
256
+
257
+            navigator: {
258
+                handles: {
259
+                    backgroundColor: '#666',
260
+                    borderColor: '#AAA'
261
+                },
262
+                outlineColor: '#CCC',
263
+                maskFill: 'rgba(16, 16, 16, 0.5)',
264
+                series: {
265
+                    color: '#7798BF',
266
+                    lineColor: '#A6C7ED'
267
+                }
268
+            },
269
+
270
+            scrollbar: {
271
+                barBackgroundColor: {
272
+                    linearGradient: {
273
+                        x1: 0,
274
+                        y1: 0,
275
+                        x2: 0,
276
+                        y2: 1
277
+                    },
278
+                    stops: [
279
+                        [0.4, '#888'],
280
+                        [0.6, '#555']
281
+                    ]
282
+                },
283
+                barBorderColor: '#CCC',
284
+                buttonArrowColor: '#CCC',
285
+                buttonBackgroundColor: {
286
+                    linearGradient: {
287
+                        x1: 0,
288
+                        y1: 0,
289
+                        x2: 0,
290
+                        y2: 1
291
+                    },
292
+                    stops: [
293
+                        [0.4, '#888'],
294
+                        [0.6, '#555']
295
+                    ]
296
+                },
297
+                buttonBorderColor: '#CCC',
298
+                rifleColor: '#FFF',
299
+                trackBackgroundColor: {
300
+                    linearGradient: {
301
+                        x1: 0,
302
+                        y1: 0,
303
+                        x2: 0,
304
+                        y2: 1
305
+                    },
306
+                    stops: [
307
+                        [0, '#000'],
308
+                        [1, '#333']
309
+                    ]
310
+                },
311
+                trackBorderColor: '#666'
312
+            },
313
+
314
+            // special colors for some of the demo examples
315
+            legendBackgroundColor: 'rgba(48, 48, 48, 0.8)',
316
+            background2: 'rgb(70, 70, 70)',
317
+            dataLabelsColor: '#444',
318
+            textColor: '#E0E0E0',
319
+            maskColor: 'rgba(255,255,255,0.3)'
320
+        };
321
+
322
+        // Apply the theme
323
+        Highcharts.setOptions(Highcharts.theme);
324
+
325
+    }(Highcharts));
326
+}));

File diff suppressed because it is too large
+ 402 - 0
WebChart/js/highcharts.js


+ 260 - 0
WebChart/js/huawu.js

@@ -0,0 +1,260 @@
1
+//part 1
2
+var main1 = echarts.init(document.getElementById('main1'));
3
+main1.setOption({
4
+	tooltip: {
5
+		trigger: 'axis',
6
+		axisPointer: {
7
+			type: 'cross',
8
+			label: {
9
+				show: true,
10
+				backgroundColor: '#333'
11
+			}
12
+		}
13
+	},
14
+	legend: {
15
+		data: ["来电数量", "接通数量", "留言数量", "放弃数量", "骚扰数量"],
16
+		textStyle: {
17
+			color: '#fff'
18
+		}
19
+	},
20
+	xAxis: {
21
+		name: '时',
22
+		data: [],
23
+		axisLine: {
24
+			lineStyle: {
25
+				color: '#ccc'
26
+			}
27
+		}
28
+	},
29
+	yAxis: {
30
+		name: '数量',
31
+		splitLine: {
32
+			show: false
33
+		},
34
+		axisLine: {
35
+			lineStyle: {
36
+				color: '#ccc'
37
+			}
38
+		}
39
+	},
40
+	series: []
41
+});
42
+
43
+//pasrt 3
44
+var main = echarts.init(document.getElementById('main'));
45
+main.setOption({
46
+
47
+	tooltip: {
48
+		trigger: 'axis',
49
+		axisPointer: {
50
+			type: 'cross',
51
+			label: {
52
+				show: true,
53
+				backgroundColor: '#333'
54
+			}
55
+		},
56
+		formatter: function(datas) {
57
+			var res = datas[0].name + '<br/>',
58
+				val;
59
+			for(var i = 0, length = datas.length; i < length; i++) {
60
+				val = (datas[i].value) + '%';
61
+				res += datas[i].seriesName + ':' + val + '<br/>';
62
+			}
63
+			return res;
64
+		}
65
+	},
66
+	legend: {
67
+		data: ["空闲", "通话", "置忙"],
68
+		textStyle: {
69
+			color: '#fff'
70
+		}
71
+	},
72
+	xAxis: {
73
+		name: '时',
74
+		data: [],
75
+		axisLine: {
76
+			lineStyle: {
77
+				color: '#ccc'
78
+			}
79
+		}
80
+	},
81
+	yAxis: {
82
+		name: '数量',
83
+		splitLine: {
84
+			show: false
85
+		},
86
+		axisLine: {
87
+			lineStyle: {
88
+				color: '#ccc'
89
+			}
90
+		}
91
+	},
92
+	series: []
93
+});
94
+
95
+//part 2
96
+var phone_num = echarts.init(document.getElementById('phone_num'));
97
+phone_num.setOption({
98
+	title: {
99
+//		text: '投诉/举报汇总',
100
+		x: 'center',
101
+		textStyle: {
102
+			color: '#fff',
103
+			fontSize: 16
104
+		},
105
+	},
106
+	tooltip: {
107
+		trigger: 'axis',
108
+		axisPointer: { // 坐标轴指示器,坐标轴触发有效
109
+			type: 'line' // 默认为直线,可选为:'line' | 'shadow'
110
+		}
111
+	},
112
+	toolbox: {
113
+		show: true,
114
+	},
115
+	calculable: true,
116
+	xAxis: [{
117
+		type: 'category',
118
+//		name: '月份',
119
+		splitLine: {
120
+			show: false
121
+		}, //去除网格线
122
+		data: ["话务量(通)", "来电(通)", "接通量(通)", "平均通话时长(秒)"],
123
+//		axisTick: {
124
+//			alignWithLabel: true
125
+//		},
126
+		axisLine: {show: false,
127
+			lineStyle: {
128
+				color: '#fff'
129
+			}
130
+		},
131
+//		axisLine: {},
132
+		axisTick: {
133
+			show: false
134
+			}
135
+		
136
+	}],
137
+	yAxis: [{
138
+		show:false
139
+	}],
140
+	series: [{
141
+			name: '数量',
142
+			type: 'bar',
143
+			barWidth: '30%', //图形宽度
144
+			data: [],
145
+			itemStyle: {
146
+				normal: {
147
+					label: {
148
+						show: true,
149
+						textStyle: {
150
+							color: '#fff' //顶部数据颜色
151
+						}
152
+					}
153
+				}
154
+			},
155
+			label: {
156
+				normal: {
157
+					show: true,
158
+					position: 'top' //顶部数据显示位置
159
+				}
160
+
161
+			}
162
+		}
163
+
164
+	]
165
+//  color: ['#ff9800','#61a0a8','#1ab394']
166
+});
167
+Ajax();
168
+
169
+function Ajax() {
170
+	var index = layer.load(1, {
171
+		shade: [0.5, '#030303'] //0.1透明度的白色背景
172
+	});
173
+	$.ajax({
174
+		type: "get",
175
+		url: huayi.config.callcenter_url + "Info/GetTelInfo",
176
+		async: true,
177
+		dataType: 'json',
178
+		//				data:{
179
+		//					token:token
180
+		//				},
181
+		success: function(result) {
182
+			if(result.state.toLowerCase() == 'success') {
183
+				layer.close(index);
184
+				var part1 = result.data.a;
185
+
186
+				main1.setOption({
187
+					xAxis: {
188
+						data: part1.hours
189
+					},
190
+					series: [{
191
+						name: "来电数量",
192
+						type: "line",
193
+						smooth: true,
194
+						showAllSymbol: true,
195
+						symbol: "emptyCircle",
196
+						symbolSize: 10,
197
+						data: part1.rcounts
198
+					}, {
199
+						name: "接通数量",
200
+						type: "line",
201
+						smooth: true,
202
+						showAllSymbol: true,
203
+						symbol: "emptyCircle",
204
+						symbolSize: 10,
205
+						data: part1.ccounts
206
+					}, {
207
+						name: "留言数量",
208
+						type: "line",
209
+						smooth: true,
210
+						showAllSymbol: true,
211
+						symbol: "emptyCircle",
212
+						symbolSize: 10,
213
+						data: part1.lcounts
214
+					}, {
215
+						name: "骚扰数量",
216
+						type: "line",
217
+						smooth: true,
218
+						showAllSymbol: true,
219
+						symbol: "emptyCircle",
220
+						symbolSize: 10,
221
+						data: part1.scounts
222
+					}]
223
+
224
+				})
225
+				//part 3
226
+				var part3 = result.data.b;
227
+				main.setOption({
228
+					xAxis: {
229
+						data: part3.hours
230
+					},
231
+					series: [{
232
+						name: "空闲",
233
+						type: "bar",
234
+						data: part3.kxpercents
235
+					}, {
236
+						name: "通话",
237
+						type: "bar",
238
+						data: part3.thpercents
239
+					}, {
240
+						name: "置忙",
241
+						type: "bar",
242
+						data: part3.zmpercents
243
+					}]
244
+
245
+				})
246
+				//part4
247
+				var part4 = result.data.c;
248
+				phone_num.setOption({
249
+					series: [{
250
+						data: [part4.hwcon, part4.lhcon, part4.jtcon, part4.pjthtimes]
251
+//						data: [20, 100, 5, 80]
252
+					}]
253
+
254
+				})
255
+
256
+			}
257
+		}
258
+	});
259
+}
260
+setInterval(Ajax, huayi.config.indextime); //Ajax调用函数

+ 219 - 0
WebChart/js/jiedanbumen.js

@@ -0,0 +1,219 @@
1
+		//=================echarts====================
2
+		// 基于准备好的dom,初始化echarts实例
3
+		var jiedan = echarts.init(document.getElementById('jiedan1'));
4
+		jiedan.setOption({
5
+			tooltip: {
6
+				trigger: 'axis',
7
+				axisPointer: {
8
+					type: 'cross',
9
+					label: {
10
+						show: true,
11
+						backgroundColor: '#333'
12
+					}
13
+				}
14
+			},
15
+			legend: {
16
+				data: [],
17
+				textStyle: {
18
+					color: '#ccc'
19
+				},
20
+				bottom: 'bottom',
21
+			},
22
+			xAxis: {
23
+				name: '月份',
24
+				data: [],
25
+				axisLine: {
26
+					lineStyle: {
27
+						color: '#ccc'
28
+					}
29
+				}
30
+			},
31
+			yAxis: {
32
+				name: '数量',
33
+				//				min: 0,
34
+				//				max: 400,
35
+				//				interval: 50,
36
+				splitLine: {
37
+					show: false
38
+				},
39
+				axisLine: {
40
+					lineStyle: {
41
+						color: '#ccc'
42
+					}
43
+				}
44
+			},
45
+			series: []
46
+		});
47
+		var part2 = echarts.init(document.getElementById('timefb'));
48
+		part2.setOption({
49
+			tooltip: {
50
+				trigger: 'axis',
51
+				axisPointer: {
52
+					type: 'shadow',
53
+					label: {
54
+						show: true,
55
+						backgroundColor: '#333'
56
+					}
57
+				},
58
+				formatter: function(datas) {
59
+					var res = datas[0].name + '<br/>',
60
+						val;
61
+					for(var i = 0, length = datas.length; i < length; i++) {
62
+						val = (datas[i].value);
63
+						res += datas[i].seriesName + ':' + val + '<br/>';
64
+					}
65
+					return res;
66
+				}
67
+			},
68
+			legend: {
69
+				//		top: 30,
70
+				//		orient: 'vertical',
71
+				bottom: 'bottom',
72
+				data: ['受理工单数', '处理工单数'],
73
+				textStyle: {
74
+					color: '#fff'
75
+				}
76
+			},
77
+			xAxis: {
78
+				name: '时',
79
+				data: [],
80
+				axisLine: {
81
+					lineStyle: {
82
+						color: '#ccc'
83
+					}
84
+				},
85
+
86
+			},
87
+			yAxis: {
88
+				name: '数量',
89
+				splitLine: {
90
+					show: false
91
+				},
92
+				axisLine: {
93
+					lineStyle: {
94
+						color: '#ccc'
95
+					}
96
+				}
97
+			},
98
+			series: [{
99
+				name: '受理工单数',
100
+				type: 'bar',
101
+				barWidth: '20%',
102
+				itemStyle: {
103
+					normal: {
104
+						color: new echarts.graphic.LinearGradient(
105
+							0, 0, 0, 1, [{
106
+									offset: 0,
107
+									color: '#83bff6'
108
+								},
109
+								{
110
+									offset: 0.5,
111
+									color: '#188df0'
112
+								},
113
+								{
114
+									offset: 1,
115
+									color: '#188df0'
116
+								}
117
+							]
118
+						)
119
+					}
120
+				},
121
+				label: {
122
+					normal: {
123
+						show: true,
124
+						position: 'top', //顶部数据显示位置
125
+						formatter: '{c}' // 这里是数据展示的时候显示的数据
126
+					}
127
+				},
128
+				data: []
129
+			}, {
130
+				name: '处理工单数',
131
+				type: 'bar',
132
+				barWidth: '20%',
133
+				itemStyle: {
134
+					normal: {
135
+						color: new echarts.graphic.LinearGradient(
136
+							0, 0, 0, 1, [{
137
+									offset: 0,
138
+									color: '#14c8d4'
139
+								},
140
+								{
141
+									offset: 1,
142
+									color: '#43eec6'
143
+								}
144
+							]
145
+						)
146
+					}
147
+				},
148
+				label: {
149
+					normal: {
150
+						show: true,
151
+						position: 'top', //顶部数据显示位置
152
+						formatter: '{c}' // 这里是数据展示的时候显示的数据
153
+					}
154
+				},
155
+				data: []
156
+			}]
157
+
158
+		});
159
+
160
+		Ajax();
161
+
162
+		function Ajax() {
163
+			var index = layer.load(1, {
164
+				shade: [0.5, '#030303'] //0.1透明度的白色背景
165
+			});
166
+			$('.txbox').html('');
167
+			$.ajax({
168
+				type: "get",
169
+				url: huayi.config.callcenter_url + "Info/GetDeptInfo",
170
+				async: true,
171
+				dataType: 'json',
172
+				success: function(result) {
173
+					if(result.state.toLowerCase() == 'success') {
174
+						layer.close(index);
175
+						var jieDans = result.data.a;
176
+						var counts = jieDans.counts;
177
+						var sers = [];
178
+						$(counts).each(function(i, n) {
179
+							console.log(n[i]);
180
+							var obj = {};
181
+							obj.name = jieDans.cols[i];
182
+							//						obj.type = "bar";
183
+							obj.type = "line";
184
+							obj.smooth = true;
185
+							obj.showAllSymbol = true;
186
+							obj.symbol = "emptyCircle";
187
+							obj.symbolSize = 10;
188
+							obj.data = n;
189
+							sers.push(obj)
190
+						});
191
+						jiedan.setOption({
192
+							xAxis: {
193
+								data: jieDans.months
194
+							},
195
+							legend: {
196
+								data: jieDans.cols
197
+							},
198
+							series: sers
199
+						});
200
+
201
+						var orderDealTime = result.data.b;
202
+						
203
+						part2.setOption({
204
+								xAxis: {
205
+									data:orderDealTime.hours
206
+								},
207
+								series: [{
208
+									data: orderDealTime.acounts
209
+								},{
210
+									data:orderDealTime.fcounts
211
+								}]
212
+							});
213
+						
214
+					}
215
+				}
216
+			});
217
+
218
+		}
219
+		setInterval(Ajax, huayi.config.indextime); //Ajax调用函数

+ 117 - 0
WebChart/js/jquery.cookie.js

@@ -0,0 +1,117 @@
1
+/*!
2
+ * jQuery Cookie Plugin v1.4.1
3
+ * https://github.com/carhartl/jquery-cookie
4
+ *
5
+ * Copyright 2013 Klaus Hartl
6
+ * Released under the MIT license
7
+ */
8
+(function (factory) {
9
+	if (typeof define === 'function' && define.amd) {
10
+		// AMD
11
+		define(['jquery'], factory);
12
+	} else if (typeof exports === 'object') {
13
+		// CommonJS
14
+		factory(require('jquery'));
15
+	} else {
16
+		// Browser globals
17
+		factory(jQuery);
18
+	}
19
+}(function ($) {
20
+
21
+	var pluses = /\+/g;
22
+
23
+	function encode(s) {
24
+		return config.raw ? s : encodeURIComponent(s);
25
+	}
26
+
27
+	function decode(s) {
28
+		return config.raw ? s : decodeURIComponent(s);
29
+	}
30
+
31
+	function stringifyCookieValue(value) {
32
+		return encode(config.json ? JSON.stringify(value) : String(value));
33
+	}
34
+
35
+	function parseCookieValue(s) {
36
+		if (s.indexOf('"') === 0) {
37
+			// This is a quoted cookie as according to RFC2068, unescape...
38
+			s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
39
+		}
40
+
41
+		try {
42
+			// Replace server-side written pluses with spaces.
43
+			// If we can't decode the cookie, ignore it, it's unusable.
44
+			// If we can't parse the cookie, ignore it, it's unusable.
45
+			s = decodeURIComponent(s.replace(pluses, ' '));
46
+			return config.json ? JSON.parse(s) : s;
47
+		} catch(e) {}
48
+	}
49
+
50
+	function read(s, converter) {
51
+		var value = config.raw ? s : parseCookieValue(s);
52
+		return $.isFunction(converter) ? converter(value) : value;
53
+	}
54
+
55
+	var config = $.cookie = function (key, value, options) {
56
+
57
+		// Write
58
+
59
+		if (value !== undefined && !$.isFunction(value)) {
60
+			options = $.extend({}, config.defaults, options);
61
+
62
+			if (typeof options.expires === 'number') {
63
+				var days = options.expires, t = options.expires = new Date();
64
+				t.setTime(+t + days * 864e+5);
65
+			}
66
+
67
+			return (document.cookie = [
68
+				encode(key), '=', stringifyCookieValue(value),
69
+				options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
70
+				options.path    ? '; path=' + options.path : '',
71
+				options.domain  ? '; domain=' + options.domain : '',
72
+				options.secure  ? '; secure' : ''
73
+			].join(''));
74
+		}
75
+
76
+		// Read
77
+
78
+		var result = key ? undefined : {};
79
+
80
+		// To prevent the for loop in the first place assign an empty array
81
+		// in case there are no cookies at all. Also prevents odd result when
82
+		// calling $.cookie().
83
+		var cookies = document.cookie ? document.cookie.split('; ') : [];
84
+
85
+		for (var i = 0, l = cookies.length; i < l; i++) {
86
+			var parts = cookies[i].split('=');
87
+			var name = decode(parts.shift());
88
+			var cookie = parts.join('=');
89
+
90
+			if (key && key === name) {
91
+				// If second argument (value) is a function it's a converter...
92
+				result = read(cookie, value);
93
+				break;
94
+			}
95
+
96
+			// Prevent storing a cookie that we couldn't decode.
97
+			if (!key && (cookie = read(cookie)) !== undefined) {
98
+				result[name] = cookie;
99
+			}
100
+		}
101
+
102
+		return result;
103
+	};
104
+
105
+	config.defaults = {};
106
+
107
+	$.removeCookie = function (key, options) {
108
+		if ($.cookie(key) === undefined) {
109
+			return false;
110
+		}
111
+
112
+		// Must not alter options, thus extending a fresh object...
113
+		$.cookie(key, '', $.extend({}, options, { expires: -1 }));
114
+		return !$.cookie(key);
115
+	};
116
+
117
+}));

File diff suppressed because it is too large
+ 4 - 0
WebChart/js/jquery.min.js


+ 236 - 0
WebChart/js/laiyuanqudao.js

@@ -0,0 +1,236 @@
1
+		//part1
2
+		var container1 = echarts.init(document.getElementById('container1'));
3
+		container1.setOption({
4
+
5
+		tooltip: {
6
+			trigger: 'axis',
7
+			axisPointer: {
8
+				type: false,
9
+				label: {
10
+					show: true,
11
+					backgroundColor: '#333'
12
+				}
13
+			},
14
+//			formatter: function(datas) 
15
+//	              {
16
+//	              var res = datas[0].name + '<br/>', val;
17
+//	                  for(var i = 0, length = datas.length; i < length; i++) {
18
+//	                        val = (datas[i].value) + '%';
19
+//	                        res += datas[i].seriesName + ':' + val + '<br/>';
20
+//	                    }
21
+//	                    return res;
22
+//	               }
23
+		},
24
+		legend: {
25
+			top: 30,
26
+			data: [],
27
+			textStyle: {
28
+				color: '#fff'
29
+			}
30
+		},
31
+		xAxis: {
32
+//			name: '时',
33
+			data: [],
34
+			axisLine: {
35
+				lineStyle: {
36
+					color: '#ccc'
37
+				}
38
+			},
39
+	
40
+		},
41
+		yAxis: {
42
+			name: '数量',
43
+			splitLine: {
44
+				show: false
45
+			},
46
+			axisLine: {
47
+				lineStyle: {
48
+					color: '#ccc'
49
+				}
50
+			}
51
+		},
52
+		series: [{
53
+			name: '数量',
54
+			type: 'bar',
55
+			barWidth: 18,
56
+			itemStyle: {
57
+				normal: {
58
+					color: new echarts.graphic.LinearGradient(
59
+						0, 0, 0, 1, [{
60
+								offset: 0,
61
+								color: '#14c8d4'
62
+							},
63
+							{
64
+								offset: 1,
65
+								color: '#43eec6'
66
+							}
67
+						]
68
+					)
69
+				}
70
+			},
71
+			label: {
72
+				normal: {
73
+					show: true,
74
+					position: 'top', //顶部数据显示位置
75
+					formatter: '{c}' // 这里是数据展示的时候显示的数据
76
+				}
77
+			},
78
+		data: []
79
+	}]
80
+
81
+		});
82
+
83
+		//受理渠道24小时统计 part2
84
+		var qd_box = echarts.init(document.getElementById('qd_box'));
85
+		qd_box.setOption({
86
+
87
+		tooltip: {
88
+			trigger: 'axis',
89
+			axisPointer: {
90
+				type: false,
91
+				label: {
92
+					show: true,
93
+					backgroundColor: '#333'
94
+				}
95
+			},
96
+//			formatter: function(datas) 
97
+//	              {
98
+//	              var res = datas[0].name + '<br/>', val;
99
+//	                  for(var i = 0, length = datas.length; i < length; i++) {
100
+//	                        val = (datas[i].value) + '%';
101
+//	                        res += datas[i].seriesName + ':' + val + '<br/>';
102
+//	                    }
103
+//	                    return res;
104
+//	               }
105
+		},
106
+		legend: {
107
+			top: 30,
108
+			data: [],
109
+			textStyle: {
110
+				color: '#fff'
111
+			}
112
+		},
113
+		xAxis: {
114
+//			name: '时',
115
+			data: [],
116
+			axisLine: {
117
+				lineStyle: {
118
+					color: '#ccc'
119
+				}
120
+			},
121
+	
122
+		},
123
+		yAxis: {
124
+			name: '比率',
125
+			splitLine: {
126
+				show: false
127
+			},
128
+			axisLine: {
129
+				lineStyle: {
130
+					color: '#ccc'
131
+				}
132
+			}
133
+		},
134
+		series: [{
135
+			name: '渠道占比',
136
+			type: 'bar',
137
+			barWidth: 18,
138
+			itemStyle: {
139
+				normal: {
140
+					color: new echarts.graphic.LinearGradient(
141
+						0, 0, 0, 1, [{
142
+								offset: 0,
143
+								color: '#14c8d4'
144
+							},
145
+							{
146
+								offset: 1,
147
+								color: '#43eec6'
148
+							}
149
+						]
150
+					)
151
+				}
152
+			},
153
+			label: {
154
+				normal: {
155
+					show: true,
156
+					position: 'top', //顶部数据显示位置
157
+					formatter: '{c}%' // 这里是数据展示的时候显示的数据
158
+				}
159
+			},
160
+		data: []
161
+	}]
162
+
163
+		});
164
+
165
+		Ajax();
166
+
167
+		function Ajax() {
168
+			var index = layer.load(1, {
169
+				shade: [0.5, '#030303'] //0.1透明度的白色背景
170
+			});
171
+			$(".txbox").html('');
172
+			$.ajax({
173
+				type: "get",
174
+				url: huayi.config.callcenter_url + "Info/GetSourceInfo",
175
+				dataType: 'json',
176
+				async: true,
177
+				data: {
178
+					//				token:token
179
+				},
180
+				success: function(result) {
181
+					if(result.state.toLowerCase() == 'success') {
182
+						layer.close(index);
183
+						var qdc_counts = result.data.b;
184
+						var qdc_legend = [];
185
+						var qdc_ser_data = [];
186
+						$(qdc_counts).each(function(i, n) {
187
+							qdc_ser_data.push(n.Count)
188
+							qdc_legend.push(n.Source);
189
+						})
190
+  						container1.setOption({
191
+							legend: {
192
+								data: qdc_legend
193
+							},
194
+							
195
+							xAxis:{
196
+								data:qdc_legend
197
+							},
198
+							series: {
199
+								data:qdc_ser_data
200
+							}
201
+						});
202
+
203
+						var shouLiQuDao = result.data.a;
204
+						var qd_legend = [];
205
+						var ser_data = [];
206
+						var qd_label = {
207
+							normal: {
208
+								show: true,
209
+								position: 'inside',
210
+								formatter: '{c}%'
211
+							}
212
+						};
213
+						$(shouLiQuDao).each(function(i, n) {
214
+							ser_data.push(n.percent)
215
+							qd_legend.push(n.source);
216
+						})
217
+						qd_box.setOption({
218
+							legend: {
219
+								data: qd_legend
220
+							},
221
+							
222
+							xAxis:{
223
+								data:qd_legend
224
+							},
225
+							series: {
226
+								data:ser_data
227
+							}
228
+							
229
+						});
230
+
231
+					}
232
+				}
233
+			});
234
+		}
235
+
236
+		setInterval(Ajax, huayi.config.indextime); //Ajax调用函数

File diff suppressed because it is too large
+ 2 - 0
WebChart/js/layer/layer.js


File diff suppressed because it is too large
+ 2 - 0
WebChart/js/layer/mobile/layer.js


File diff suppressed because it is too large
+ 1 - 0
WebChart/js/layer/mobile/need/layer.css


BIN
WebChart/js/layer/skin/default/icon-ext.png


BIN
WebChart/js/layer/skin/default/icon.png


+ 0 - 0
WebChart/js/layer/skin/default/layer.css


Some files were not shown because too many files changed in this diff