luyanan 7 年 前
コミット
93f3f951bf
共有14 個のファイルを変更した856 個の追加193 個の削除を含む
  1. 32 32
      app/html/consultlistNew.html
  2. 69 0
      app/html/jubao.html
  3. 41 0
      app/html/jubao1.html
  4. 2 2
      app/html/reg.html
  5. 322 96
      app/html/weChat.html
  6. 46 1
      app/index.html
  7. 150 26
      app/js/consultlistNew.js
  8. 67 0
      app/js/jubao.js
  9. 40 0
      app/js/jubao1.js
  10. 4 1
      app/js/needSearch.js
  11. 14 0
      app/js/needShow.js
  12. 22 8
      app/js/register.js
  13. 25 17
      app/js/resourceShow.js
  14. 22 10
      app/js/userInforShow.js

+ 32 - 32
app/html/consultlistNew.html

15
		  	<div class="mui-scroll">
15
		  	<div class="mui-scroll">
16
		  		<div class="infocon madiaBlock">
16
		  		<div class="infocon madiaBlock">
17
				    <ul class="mui-table-view consultList" id="consultList">
17
				    <ul class="mui-table-view consultList" id="consultList">
18
				    	<li class="mui-table-view-cell" id='hh'>
19
							<div class="madiaHead useHead" style="background-image:url(../images/default-photo.jpg)"></div>
20
							<div class="madiaInfo">
21
								<div class="h1Font mui-ellipsis">
22
									<span>用户姓名</span>
23
									<span class="authicon authicon-pro"></span>
24
									<span class="thistime">8月17日 18:00</span>
25
								</div>
26
								<div class="h3Font mui-ellipsis">这里显示对话的最后一条消息,天个人似乎突然今天个人似乎突然今天跟i</div>
27
							</div>
28
						</li>
29
						<li class="mui-table-view-cell">
30
							<div class="madiaHead useHead" style="background-image:url(../images/default-photo.jpg)"></div>
31
							<div class="madiaInfo">
32
								<div class="h1Font mui-ellipsis">
33
									<span>用户姓名</span>
34
									<span class="authicon authicon-pro"></span>
35
									<span class="thistime">8月17日 18:00</span>
36
								</div>
37
								<div class="h3Font mui-ellipsis">富贵花开就看看和个人似乎突然</div>
38
							</div>
39
						</li>
40
						<li class="mui-table-view-cell">
41
							<div class="madiaHead useHead" style="background-image:url(../images/default-photo.jpg)"></div>
42
							<div class="madiaInfo">
43
								<div class="h1Font mui-ellipsis">
44
									<span>用户姓名</span>
45
									<span class="authicon authicon-pro"></span>
46
									<span class="thistime">8月17日 18:00</span>
47
								</div>
48
								<div class="h3Font mui-ellipsis"></div>
49
							</div>
18
				    	<!--<li class="mui-table-view-cell" id='hh'>
19
							<div class="madiaHead useHead" style="background-image:url(../images/default-photo.jpg)"></div>
20
							<div class="madiaInfo">
21
								<div class="h1Font mui-ellipsis">
22
									<span>用户姓名</span>
23
									<span class="authicon authicon-pro"></span>
24
									<span class="thistime">8月17日 18:00</span>
25
								</div>
26
								<div class="h3Font mui-ellipsis">这里显示对话的最后一条消息,天个人似乎突然今天个人似乎突然今天跟i</div>
27
							</div>
50
						</li>
28
						</li>
29
						<li class="mui-table-view-cell">
30
							<div class="madiaHead useHead" style="background-image:url(../images/default-photo.jpg)"></div>
31
							<div class="madiaInfo">
32
								<div class="h1Font mui-ellipsis">
33
									<span>用户姓名</span>
34
									<span class="authicon authicon-pro"></span>
35
									<span class="thistime">8月17日 18:00</span>
36
								</div>
37
								<div class="h3Font mui-ellipsis">富贵花开就看看和个人似乎突然</div>
38
							</div>
39
						</li>
40
						<li class="mui-table-view-cell">
41
							<div class="madiaHead useHead" style="background-image:url(../images/default-photo.jpg)"></div>
42
							<div class="madiaInfo">
43
								<div class="h1Font mui-ellipsis">
44
									<span>用户姓名</span>
45
									<span class="authicon authicon-pro"></span>
46
									<span class="thistime">8月17日 18:00</span>
47
								</div>
48
								<div class="h3Font mui-ellipsis"></div>
49
							</div>
50
						</li>-->
51
				    </ul>
51
				    </ul>
52
				</div>
52
				</div>
53
			</div>
53
			</div>

+ 69 - 0
app/html/jubao.html

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,minimum-scale=1,maximum-scale=1,user-scalable=no" />
8
		<link href="../css/mui.min.css" rel="stylesheet" />
9
		<link href="../css/iconfont.css" rel="stylesheet" />
10
		<link href="../css/app.css" rel="stylesheet" />
11
		<style type="text/css">
12
			#table {
13
				background: #ffffff;
14
			}
15
			/*#table li .proinfor{background:#FFFFFF;}*/
16
			
17
			#table li:first-child {
18
				margin-top: 0;
19
			}
20
			
21
			#table li.mui-table-view-cell:after {
22
				position: absolute;
23
				bottom: 0;
24
				right: 0;
25
				left: 64px;
26
				height: 1px;
27
				content: '';
28
				background-color: #c8c7cc;
29
			}
30
			
31
			#table li.mui-table-view-cell:last-child:after {
32
				background: none;
33
			}
34
			#breif {
35
				margin-top:20px;
36
				background: white;
37
			}
38
		</style>
39
	</head>
40

41
	<body>
42
		<header class="mui-bar mui-bar-nav toptitbox">
43
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left topback"></a>
44
			<h1 class="mui-title toptit">更多选项</h1>
45
		</header>
46
		<div class="mui-content researchAreaBox mui-scroll-wrapper searchTab" id="pullrefresh">
47
			<div class="mui-scroll">
48
				<ul class="mui-table-view protable" id="table">
49
					<li class="mui-table-view-cell" id="lis">
50
				<div class="flexCenter OflexCenter mui-clearfix">
51
					<div class="madiaHead useHead" id="img"></div>
52
					<div class="madiaInfo">
53
						<p><span class="h1Font" id="name"></span><em class="authicon " title="科袖认证专家" id="authicon"></em></p>
54
						<p class="mui-ellipsis-2 h2Font" id="title"></p>
55
					</div>
56
				</div>
57
			</li>
58
				</ul>
59
				<div class="infocontit infocontitM OnetitM mui-navigate-right mui-clearfix" id="breif">举报</div>
60
			</div>
61
		</div>
62
		<script src="../js/public/mui.min.js"></script>
63
		<script src="../js/public/base.js"></script>
64
		<script type="text/javascript" src='../js/jubao.js'></script>
65
			
66
		
67
	</body>
68

69
</html>

+ 41 - 0
app/html/jubao1.html

1
<!DOCTYPE html>
2
<html>
3
	<head>
4
		<meta charset="UTF-8">
5
		<title>意见反馈</title>
6
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
7
		<link href="../css/mui.min.css" rel="stylesheet" />
8
		<link href="../css/app.css" rel="stylesheet" />
9
		<style type="text/css">
10
			html,body{height: 100%;margin:0;padding:0px;overflow: hidden;}
11
			.mui-content{height:100%;overflow: auto;}
12
			
13
		</style>
14
	</head>
15
	<body>
16
		<header class="mui-bar mui-bar-nav toptitbox">
17
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left topback"></a>
18
		    <h1 class="mui-title toptit">举报</h1>
19
		</header>
20
		<div class="mui-content">
21
			<div class="row mui-input-row textBox">
22
				<textarea id='question' class="mui-input-clear conTextare" placeholder="请具体说明举报对方的原因,以便我们为您快速解决" maxlength="500" ></textarea>
23
				
24
			</div>
25
			<div class="mui-content-padded frmboxNew">
26
				<button type="submit" class="mui-btn mui-btn-block frmbtn frmactive tijiao" id="logun" disabled="">提交</button>
27
			</div>
28
			
29
		</div>
30
		
31
		<script src="../js/public/mui.min.js"></script>
32
		<script src="../js/public/base.js"></script>
33
		
34
		<script type="text/javascript"> 
35
			//处理iOS下弹出软键盘后头部会随页面的滚动条消失问题
36
		    iosheader();
37
		</script>
38
		<script type="text/javascript" src="../js/jubao1.js"></script>
39
		
40
	</body>
41
</html>

+ 2 - 2
app/html/reg.html

25
		        </div>
25
		        </div>
26
		        <div class="mui-row mui-input-row frm-input">
26
		        <div class="mui-row mui-input-row frm-input">
27
		        	<div class="mui-col-xs-8">
27
		        	<div class="mui-col-xs-8">
28
		        		<input type="tel" class="frmtype" placeholder="请输入图形验证码" id="imgCode">
28
		        		<input type="text" class="frmtype" placeholder="请输入图形验证码" id="imgCode">
29
		        	</div>
29
		        	</div>
30
					<div class="mui-col-xs-4">
30
					<div class="mui-col-xs-4">
31
						<img src="http://www.ekexiu.com/ajax/PictureVC" alt="" id="changImage" width="100%" height="48"/>
31
						<img src="http://www.ekexiu.com/ajax/PictureVC" alt="" id="changImage" width="100%" height="48"/>
37
		        	</div>
37
		        	</div>
38
					<div class="mui-col-xs-4">
38
					<div class="mui-col-xs-4">
39
						<input type="button" class="frmtype getCode" value="获取验证码" id="obtain-code" disabled="">
39
						<input type="button" class="frmtype getCode" value="获取验证码" id="obtain-code" disabled="">
40
						<input type="button" class="frmtype getCode" value="" style="display: none;" id="getcodeoff">
40
						<input type="button" class="frmtype getCode" value="" style="display: none;" id="getcodeoff"disabled="disabled">
41
					</div>
41
					</div>
42
				</div>
42
				</div>
43
				<div class="mui-input-row frm-input">
43
				<div class="mui-input-row frm-input">

+ 322 - 96
app/html/weChat.html

18
				-webkit-touch-callout: none;
18
				-webkit-touch-callout: none;
19
				-webkit-user-select: none;
19
				-webkit-user-select: none;
20
			}
20
			}
21
			
21
			footer {
22
			footer {
22
				position: fixed;
23
				position: fixed;
23
				width: 100%;
24
				width: 100%;
30
				padding: 0px 50px 0px 10px;
31
				padding: 0px 50px 0px 10px;
31
				background-color: #fafafa;
32
				background-color: #fafafa;
32
			}
33
			}
34
			
33
			.footer-left {
35
			.footer-left {
34
				position: absolute;
36
				position: absolute;
35
				width: 50px;
37
				width: 50px;
40
				vertical-align: middle;
42
				vertical-align: middle;
41
				line-height: 100%;
43
				line-height: 100%;
42
				padding: 12px 4px;
44
				padding: 12px 4px;
43
				display:none;
45
				display: none;
44
			}
46
			}
47
			
45
			.footer-right {
48
			.footer-right {
46
				position: absolute;
49
				position: absolute;
47
				width: 50px;
50
				width: 50px;
54
				padding: 12px 5px;
57
				padding: 12px 5px;
55
				display: inline-block;
58
				display: inline-block;
56
			}
59
			}
60
			
57
			.footer-center {
61
			.footer-center {
58
				height: 100%;
62
				height: 100%;
59
				padding: 5px 0px;
63
				padding: 5px 0px;
60
			}
64
			}
65
			
61
			.footer-center [class*=input] {
66
			.footer-center [class*=input] {
62
				width: 100%;
67
				width: 100%;
63
				height: 100%;
68
				height: 100%;
64
				border-radius: 5px;
69
				border-radius: 5px;
65
			}
70
			}
71
			
66
			.footer-center .input-text {
72
			.footer-center .input-text {
67
				background: #fff;
73
				background: #fff;
68
				border: solid 1px #ddd;
74
				border: solid 1px #ddd;
72
				font-family: verdana !important;
78
				font-family: verdana !important;
73
				overflow: hidden;
79
				overflow: hidden;
74
			}
80
			}
81
			
75
			.footer-center .input-sound {
82
			.footer-center .input-sound {
76
				background-color: #eee;
83
				background-color: #eee;
77
			}
84
			}
85
			
78
			.mui-content {
86
			.mui-content {
79
				height: 100%;
87
				height: 100%;
80
				padding: 44px 0px 50px 0px;
88
				padding: 44px 0px 50px 0px;
81
				overflow: auto;
89
				overflow: auto;
82
				background-color: #eaeaea;
90
				background-color: #eaeaea;
83
			}
91
			}
92
			
84
			#msg-list {
93
			#msg-list {
85
				height: 100%;
94
				height: 100%;
86
				overflow: auto;
95
				overflow: auto;
87
				-webkit-overflow-scrolling: touch;
96
				-webkit-overflow-scrolling: touch;
88
			}
97
			}
98
			
89
			.msg-item {
99
			.msg-item {
90
				padding: 8px;
100
				padding: 8px;
91
				clear: both;
101
				clear: both;
92
			}
102
			}
103
			
93
			.msg-item .mui-item-clear {
104
			.msg-item .mui-item-clear {
94
				clear: both;
105
				clear: both;
95
			}
106
			}
107
			
96
			.msg-item .msg-user {
108
			.msg-item .msg-user {
97
				width: 38px;
109
				width: 38px;
98
				height: 38px;
110
				height: 38px;
99
				border: solid 1px #d3d3d3;
111
				/*border: solid 1px #d3d3d3;*/
100
				display: inline-block;
112
				display: inline-block;
101
				background: #fff;
113
				/*background: #fff;*/
102
				border-radius: 3px;
114
				border-radius: 3px;
103
				vertical-align: top;
115
				vertical-align: top;
104
				text-align: center;
116
				text-align: center;
107
				color: #ddd;
119
				color: #ddd;
108
			}
120
			}
109
			
121
			
110
			.msg-item .msg-user-img{
122
			.msg-item .msg-user-img {
111
				width: 38px;
123
				width: 38px;
112
				height: 38px;
124
				height: 38px;
113
				display: inline-block;
125
				display: inline-block;
133
				min-width: 35px;
145
				min-width: 35px;
134
				float: left;
146
				float: left;
135
			}
147
			}
148
			
136
			.msg-item .msg-content .msg-content-inner {
149
			.msg-item .msg-content .msg-content-inner {
137
				overflow-x: hidden;
150
				overflow-x: hidden;
138
			}
151
			}
152
			
139
			.msg-item .msg-content .msg-content-arrow {
153
			.msg-item .msg-content .msg-content-arrow {
140
				position: absolute;
154
				position: absolute;
141
				border: solid 1px #d3d3d3;
155
				border: solid 1px #d3d3d3;
149
				-webkit-transform: rotateZ(45deg);
163
				-webkit-transform: rotateZ(45deg);
150
				transform: rotateZ(45deg);
164
				transform: rotateZ(45deg);
151
			}
165
			}
166
			
152
			.msg-item-self .msg-user,
167
			.msg-item-self .msg-user,
153
			.msg-item-self .msg-content {
168
			.msg-item-self .msg-content {
154
				float: right;
169
				float: right;
155
			}
170
			}
171
			
156
			.msg-item-self .msg-content .msg-content-arrow {
172
			.msg-item-self .msg-content .msg-content-arrow {
157
				left: auto;
173
				left: auto;
158
				right: -5px;
174
				right: -5px;
159
				-webkit-transform: rotateZ(225deg);
175
				-webkit-transform: rotateZ(225deg);
160
				transform: rotateZ(225deg);
176
				transform: rotateZ(225deg);
161
			}
177
			}
178
			
162
			.msg-item-self .msg-content,
179
			.msg-item-self .msg-content,
163
			.msg-item-self .msg-content .msg-content-arrow {
180
			.msg-item-self .msg-content .msg-content-arrow {
164
				background-color: #4CD964;
181
				background-color: #4CD964;
165
				color: #fff;
182
				color: #fff;
166
				border-color: #2AC845;
183
				border-color: #2AC845;
167
			}
184
			}
185
			
168
			footer .mui-icon {
186
			footer .mui-icon {
169
				color: #000;
187
				color: #000;
170
			}
188
			}
189
			
171
			footer .mui-icon:active {
190
			footer .mui-icon:active {
172
				color: #007AFF !important;
191
				color: #007AFF !important;
173
			}
192
			}
193
			
174
			footer .mui-icon-paperplane:before {
194
			footer .mui-icon-paperplane:before {
175
				content: "发送";
195
				content: "发送";
176
				color:lightgray;
196
				color: lightgray;
177
			}
197
			}
198
			
178
			footer .mui-icon-paperplane.addColor:before {
199
			footer .mui-icon-paperplane.addColor:before {
179
				content: "发送";
200
				content: "发送";
180
				color:#ff9900;
201
				color: #ff9900;
181
			}
202
			}
203
			
182
			footer .mui-icon-paperplane {
204
			footer .mui-icon-paperplane {
183
				/*-webkit-transform: rotateZ(45deg);
205
				/*-webkit-transform: rotateZ(45deg);
184
				transform: rotateZ(45deg);*/
206
				transform: rotateZ(45deg);*/
185
				
186
				font-size: 16px;
207
				font-size: 16px;
187
				word-break: keep-all;
208
				word-break: keep-all;
188
				line-height: 100%;
209
				line-height: 100%;
189
				padding-top: 6px;
210
				padding-top: 6px;
190
				color: rgba(0, 135, 250, 1);
211
				color: rgba(0, 135, 250, 1);
191
			}
212
			}
213
			
192
			#msg-sound {
214
			#msg-sound {
193
				-webkit-user-select: none !important;
215
				-webkit-user-select: none !important;
194
				user-select: none !important;
216
				user-select: none !important;
195
			}
217
			}
218
			
196
			.rprogress {
219
			.rprogress {
197
				position: absolute;
220
				position: absolute;
198
				left: 50%;
221
				left: 50%;
210
				display: none;
233
				display: none;
211
				-webkit-transition: .15s;
234
				-webkit-transition: .15s;
212
			}
235
			}
236
			
213
			.rschedule {
237
			.rschedule {
214
				background-color: rgba(0, 0, 0, 0);
238
				background-color: rgba(0, 0, 0, 0);
215
				border: 5px solid rgba(0, 183, 229, 0.9);
239
				border: 5px solid rgba(0, 183, 229, 0.9);
228
				-webkit-animation: spin 1s infinite linear;
252
				-webkit-animation: spin 1s infinite linear;
229
				animation: spin 1s infinite linear;
253
				animation: spin 1s infinite linear;
230
			}
254
			}
231
			.r-sigh{
255
			
256
			.r-sigh {
232
				display: none;
257
				display: none;
233
				border-radius: 50px;
258
				border-radius: 50px;
234
				box-shadow: 0 0 15px #2187e7;
259
				box-shadow: 0 0 15px #2187e7;
245
				font-weight: bold;
270
				font-weight: bold;
246
				color: #2187e7;
271
				color: #2187e7;
247
			}
272
			}
248
			.rprogress-sigh{
273
			
274
			.rprogress-sigh {
249
				background-image: none !important;
275
				background-image: none !important;
250
			}
276
			}
251
			.rprogress-sigh .rschedule{
277
			
278
			.rprogress-sigh .rschedule {
252
				display: none !important;
279
				display: none !important;
253
			}
280
			}
254
			.rprogress-sigh .r-sigh{
281
			
282
			.rprogress-sigh .r-sigh {
255
				display: block !important;
283
				display: block !important;
256
			}
284
			}
285
			
257
			.rsalert {
286
			.rsalert {
258
				font-size: 12px;
287
				font-size: 12px;
259
				color: #bbb;
288
				color: #bbb;
266
				left: 0px;
295
				left: 0px;
267
				bottom: 0px;
296
				bottom: 0px;
268
			}
297
			}
298
			
269
			@-webkit-keyframes spin {
299
			@-webkit-keyframes spin {
270
				0% {
300
				0% {
271
					-webkit-transform: rotate(0deg);
301
					-webkit-transform: rotate(0deg);
274
					-webkit-transform: rotate(360deg);
304
					-webkit-transform: rotate(360deg);
275
				}
305
				}
276
			}
306
			}
307
			
277
			@keyframes spin {
308
			@keyframes spin {
278
				0% {
309
				0% {
279
					transform: rotate(0deg);
310
					transform: rotate(0deg);
282
					transform: rotate(360deg);
313
					transform: rotate(360deg);
283
				}
314
				}
284
			}
315
			}
316
			
285
			#h {
317
			#h {
286
				background: #fff;
318
				background: #fff;
287
				border: solid 1px #ddd;
319
				border: solid 1px #ddd;
296
				word-break: break-all;
328
				word-break: break-all;
297
				word-wrap: break-word;
329
				word-wrap: break-word;
298
			}
330
			}
331
			
299
			.cancel {
332
			.cancel {
300
				background-color: darkred;
333
				background-color: darkred;
301
			}
334
			}
304

337

305
	<body contextmenu="return false;">
338
	<body contextmenu="return false;">
306
		<header class="mui-bar mui-bar-nav toptitbox" style="z-index: 999;">
339
		<header class="mui-bar mui-bar-nav toptitbox" style="z-index: 999;">
307
 			<span class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left topback" id="backBtn">
308
 				<a href="consultlist.html"></a>
340
			<span class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left topback" id="backBtn">
309
 			</span>
341
 			</span>
310
 			<h1 class="mui-title toptit" id="chatName">
311
 				
342
			<h1 class="mui-title toptit" id="chatName">
312
 			</h1>
343
 			</h1>
313
 			<!--<span class="mui-icon mui-icon-contact mui-pull-right personhead"></span>-->
314
 		</header>
344
 			<a class="mui-icon iconfont icon-moreandroid mui-pull-right button topmore" id="BtnMore">...</a>
345
			<!--<span class="mui-icon mui-icon-contact mui-pull-right personhead"></span>-->
346
		</header>
315
		<pre id='h'></pre>
347
		<pre id='h'></pre>
316
		<script id='msg-template' type="text/template">
348
		<script id='msg-template' type="text/template">
317
			<% for(var i in record){ var item=record[i]; %>
349
			<% for(var i in record){ var item=record[i]; %>
318
				<div class="msg-item <%= (item.sender=='self'?' msg-item-self':'') %>" msg-type='<%=(item.type)%>' msg-content='<%=(item.content)%>'>
319
					<div style="text-align:center;margin-bottom:5px;"><span style="font-size:12px;border-radius: 5px;background:#d4d4d4;color:white;padding:2px 7px;">5月8号 18:00</span></div>
320
					<% if(item.sender=='self' ) { %>
321
						<img class="msg-user-img msg-user" src="../images/logo.png" alt="" style="border-radius:50%;"/>
322
						<!--<i class="msg-user mui-icon mui-icon-person" style="border-radius:50%;" id="hu"></i>-->
323
					<% } else { %>
324
						<img class="msg-user-img" src="../images/logo.png" alt="" style="border-radius:50%;"/>
325
					<% } %>
326
					<div class="msg-content">
327
						<div class="msg-content-inner">
328
							<% if(item.type=='text' ) { %>
329
								<%=( item.content|| '&nbsp;&nbsp;') %>
330
							<% } else if(item.type=='image' ) { %>
331
								<img class="msg-content-image" src="<%=(item.content)%>" style="max-width: 100px;" />
332
							<% } else if(item.type=='sound' ) { %>
333
								<span class="mui-icon mui-icon-mic" style="font-size: 18px;font-weight: bold;"></span>
334
								<span class="play-state">点击播放</span>
335
							<% } %>
336
						</div>
337
						<div class="msg-content-arrow"></div>
350
			<div class="msg-item <%= (item.sender=='self'?' msg-item-self':'') %>" msg-type='<%=(item.type)%>' msg-content='<%=(item.content)%>'>
351

352
				<% if(item.timeGe ) { %>
353
				<div class="otime" style="text-align:center;margin-bottom:5px;" data-time="<%=(item.timeStr)%>"><span style="font-size:12px;border-radius: 5px;background:#d4d4d4;color:white;padding:2px 7px;"><%=( item.timeGe) %></span></div>
354
				<% } else { %>
355
				<div class="otime" style="text-align:center;margin-bottom:5px;display: none;" data-time="<%=(item.timeStr)%>"><span style="font-size:12px;border-radius: 5px;background:#d4d4d4;color:white;padding:2px 7px;"><%=( item.timeGe) %></span></div>
356
				<% } %>
357
				<% if(item.sender=='self' ) { %>
358
				<img class="msg-user-img msg-user" src="<%=(item.url)%>" alt="" style="border-radius:50%;" />
359
				<!--<i class="msg-user mui-icon mui-icon-person" style="border-radius:50%;" id="hu"></i>-->
360
				<% } else { %>
361
				<img class="msg-user-img" src="<%=(item.url)%>" alt="" style="border-radius:50%;" />
362
				<% } %>
363
				<div class="msg-content">
364
					<div class="msg-content-inner">
365
						<% if(item.type=='text' ) { %>
366
						<%=( item.content|| '&nbsp;&nbsp;') %>
367
						<% } else if(item.type=='image' ) { %>
368
						<img class="msg-content-image" src="<%=(item.content)%>" style="max-width: 100px;" />
369
						<% } else if(item.type=='sound' ) { %>
370
						<span class="mui-icon mui-icon-mic" style="font-size: 18px;font-weight: bold;"></span>
371
						<span class="play-state">点击播放</span>
372
						<% } %>
338
					</div>
373
					</div>
339
					<div class="mui-item-clear"></div>
374
					<div class="msg-content-arrow"></div>
340
				</div>
375
				</div>
376
				<div class="mui-item-clear"></div>
377
			</div>
341
			<% } %>
378
			<% } %>
342
		</script>
379
		</script>
343
		<div class="mui-content">
380
		<div class="mui-content">
361
			<div class="r-sigh">!</div>
398
			<div class="r-sigh">!</div>
362
			<div id="audio_tips" class="rsalert">手指上滑,取消发送</div>
399
			<div id="audio_tips" class="rsalert">手指上滑,取消发送</div>
363
		</div>
400
		</div>
364
		<script src="../js/mui.min.js"></script>
365
		<script src="../js/mui.imageViewer.js"></script>
366
		<script>
367
			console.log(document.getElementById("hu"));
368
		</script>
369
		<script src="../js/arttmpl.js"></script>
401
		<script src="../js/public/mui.min.js"></script>
402
		<script src="../js/public/mui.imageViewer.js"></script>
403
		<script src="../js/public/arttmpl.js"></script>
404
		<script src="../js/public/base.js"></script>
370
		<script type="text/javascript" charset="utf-8">
405
		<script type="text/javascript" charset="utf-8">
371
			(function($, doc) {
406
			(function($, doc) {
372
				var MIN_SOUND_TIME = 800;
407
				var MIN_SOUND_TIME = 800;
387
					plus.webview.currentWebview().setStyle({
422
					plus.webview.currentWebview().setStyle({
388
						softinputMode: "adjustResize"
423
						softinputMode: "adjustResize"
389
					});
424
					});
390
					
425
					var professorId = plus.webview.currentWebview().professorId;
426
					document.getElementById("BtnMore").addEventListener("tap",function(){
427
						mui.openWindow({
428
				url: '../html/jubao.html',
429
				id: 'jubao.html',
430
				show: {
431
					autoShow: true,
432
					aniShow: "slide-in-right",
433
				},
434
				extras: {
435
					professorId: professorId
436
				}
437
			})
438
					})
439
					var userid = plus.storage.getItem('userid');
440
					var url1 = baseUrl + '/images/head/' + professorId + '_l.jpg';
441
					var url2 = baseUrl + '/images/head/' + userid + '_l.jpg';
391
					var showKeyboard = function() {
442
					var showKeyboard = function() {
392
						if ($.os.ios) {
443
						if($.os.ios) {
393
							var webView = plus.webview.currentWebview().nativeInstanceObject();
444
							var webView = plus.webview.currentWebview().nativeInstanceObject();
394
							webView.plusCallMethod({
445
							webView.plusCallMethod({
395
								"setKeyboardDisplayRequiresUserAction": false
446
								"setKeyboardDisplayRequiresUserAction": false
405
							//alert("ll");
456
							//alert("ll");
406
						}
457
						}
407
					};
458
					};
408
					var record = [{
409
						sender: 'zs',
410
						type: 'text',
411
						content: 'Hi,我是 MUI 小管家!'
412
					}];//消息数组
459
					document.getElementById("backBtn").addEventListener("tap",function(){
460
						var web3 = plus.webview.getWebviewById("consultlistNew.html");
461
												mui.fire(web3, "newId");
462
												var web4=plus.webview.getLaunchWebview();
463
							mui.fire(web4, "newId", {
464
								rd: 3
465
							});
466
					})
467
					
468
					var record = []; //消息数组
469
					messageList();
470
					pe()
471

472
					function pe() {
473
						mui.ajax(baseUrl + '/ajax/professor/baseInfo/' + professorId, {
474
							"type": "get",
475
							"async": true,
476
							"success": function(data) {
477
								if(data.success && data.data) {
478
									document.getElementById("chatName").innerHTML = data.data.name;
479
								}
480
							},
481
							"error": function() {
482
								plus.nativeUI.toast("服务器链接超时", toastStyle);
483
							}
484
						});
485
					}
486

487
					function messageList() {
488
						$.ajax(baseUrl + '/ajax/webMsg/cnt/load', {
489
							data: {
490
								sender: professorId,
491
								reciver: userid,
492
								both: true
493
							},
494
							dataType: 'json', //服务器返回json格式数据
495
							type: 'GET', //HTTP请求类型
496
							timeout: 10000, //超时时间设置为10秒;
497
							traditional: true, //传数组必须加这个
498
							success: function(data) {
499
								//plus.nativeUI.closeWaiting();
500
								//plus.webview.currentWebview().show();
501
								if(data.success) {
502

503
									var $data = data.data;
504
									if($data.length) {
505
										for(var i = 0; i < $data.length; i++) {
506
											var time1;
507
											if(i != 0) {
508
												time1 = compareTime($data[i - 1].sendTime, $data[i].sendTime)
509
											} else {
510
												time1 = anTime($data[i].sendTime)
511
											}
512
											if(professorId == $data[i].sender) {
513
												record.push({
514
													sender: 'zs',
515
													type: 'text',
516
													content: $data[i].cnt,
517
													url: url1,
518
													timeStr: $data[i].sendTime,
519
													timeGe: time1
520
												})
521
											} else {
522
												record.push({
523
													sender: 'self',
524
													type: 'text',
525
													content: $data[i].cnt,
526
													url: url2,
527
													timeStr: $data[i].sendTime,
528
													timeGe: time1
529
												})
530
											}
531
										}
532
										bindMsgList();
533
									} else {
534

535
									}
536

537
								}
538
							},
539
							error: function(x) {
540
								plus.nativeUI.toast("服务器链接超时", toastStyle);
541
							}
542
						});
543
					}
413
					var ui = {
544
					var ui = {
414
						body: doc.querySelector('body'),
545
						body: doc.querySelector('body'),
415
						footer: doc.querySelector('footer'),
546
						footer: doc.querySelector('footer'),
416
						footerRight: doc.querySelector('.footer-right'),
547
						footerRight: doc.querySelector('.footer-right'),
417
						footerLeft: doc.querySelector('.footer-left'),
548
						footerLeft: doc.querySelector('.footer-left'),
418
						btnMsgType: doc.querySelector('#msg-type'),//
549
						btnMsgType: doc.querySelector('#msg-type'), //
419
						boxMsgText: doc.querySelector('#msg-text'),
550
						boxMsgText: doc.querySelector('#msg-text'),
420
						boxMsgSound: doc.querySelector('#msg-sound'),
551
						boxMsgSound: doc.querySelector('#msg-sound'),
421
						btnMsgImage: doc.querySelector('#msg-image'),
552
						btnMsgImage: doc.querySelector('#msg-image'),
427
					ui.h.style.width = ui.boxMsgText.offsetWidth + 'px';
558
					ui.h.style.width = ui.boxMsgText.offsetWidth + 'px';
428
					//alert(ui.boxMsgText.offsetWidth );
559
					//alert(ui.boxMsgText.offsetWidth );
429
					var footerPadding = ui.footer.offsetHeight - ui.boxMsgText.offsetHeight;
560
					var footerPadding = ui.footer.offsetHeight - ui.boxMsgText.offsetHeight;
561
					//ui.footer.style.height = (ui.h.offsetHeight + footerPadding) + 'px';
562
					//					ui.content.style.paddingBottom = ui.footer.style.height;
430
					var msgItemTap = function(msgItem, event) {
563
					var msgItemTap = function(msgItem, event) {
431
						var msgType = msgItem.getAttribute('msg-type');
564
						var msgType = msgItem.getAttribute('msg-type');
432
						var msgContent = msgItem.getAttribute('msg-content')
565
						var msgContent = msgItem.getAttribute('msg-content')
433
						if (msgType == 'sound') {
566
						if(msgType == 'sound') {
434
							player = plus.audio.createPlayer(msgContent);
567
							player = plus.audio.createPlayer(msgContent);
435
							var playState = msgItem.querySelector('.play-state');
568
							var playState = msgItem.querySelector('.play-state');
436
							playState.innerText = '正在播放...';
569
							playState.innerText = '正在播放...';
463
						imageViewer.findAllImage();
596
						imageViewer.findAllImage();
464
						ui.areaMsgList.scrollTop = ui.areaMsgList.scrollHeight + ui.areaMsgList.offsetHeight;
597
						ui.areaMsgList.scrollTop = ui.areaMsgList.scrollHeight + ui.areaMsgList.offsetHeight;
465
					};
598
					};
466
					bindMsgList();
599

467
					window.addEventListener('resize', function() {
600
					window.addEventListener('resize', function() {
468
						ui.areaMsgList.scrollTop = ui.areaMsgList.scrollHeight + ui.areaMsgList.offsetHeight;
601
						ui.areaMsgList.scrollTop = ui.areaMsgList.scrollHeight + ui.areaMsgList.offsetHeight;
469
					}, false);
602
					}, false);
470
					var send = function(msg) {
603
					var send = function(msg) {
471
						record.push(msg);
604
						record.push(msg);
472
						bindMsgList();
605
						bindMsgList();
473
						toRobot(msg.content);
606
						//toRobot(msg.content);
474
					};
607
					};
608
					window.addEventListener("newId", function(event) {
609
						var oTime = document.querySelectorAll(".otime");
610
						var time1;
611
						if(oTime.length) {
612
							time1 = compareTime(oTime[oTime.length - 1].getAttribute("data-time"), event.detail.sendTime)
613
						} else {
614
							time1 = anTime(event.detail.sendTime)
615
						}
616
						record.push({
617
							sender: 'zs',
618
							type: 'text',
619
							content: event.detail.rd,
620
							url: url1,
621
							timeStr: event.detail.sendTime,
622
							timeGe: time1
623
						})
624
						bindMsgList();
625
					})
475
					var toRobot = function(info) {
626
					var toRobot = function(info) {
476
						var apiUrl = 'http://www.tuling123.com/openapi/api';
627
						var apiUrl = 'http://www.tuling123.com/openapi/api';
477
						$.getJSON(apiUrl, {
628
						$.getJSON(apiUrl, {
490
					};
641
					};
491

642

492
					function msgTextFocus() {
643
					function msgTextFocus() {
644
						ui.boxMsgText.focus();
645
						setTimeout(function() {
493
							ui.boxMsgText.focus();
646
							ui.boxMsgText.focus();
494
							setTimeout(function() {
495
								ui.boxMsgText.focus();
496
							}, 150);
497
						}
498
						//解决长按“发送”按钮,导致键盘关闭的问题;
647
						}, 150);
648
					}
649
					//解决长按“发送”按钮,导致键盘关闭的问题;
499
					ui.footerRight.addEventListener('touchstart', function(event) {
650
					ui.footerRight.addEventListener('touchstart', function(event) {
500
						if (ui.btnMsgType.classList.contains('mui-icon-paperplane')) {
651
						if(ui.btnMsgType.classList.contains('mui-icon-paperplane')) {
501
							msgTextFocus();
652
							msgTextFocus();
502
							event.preventDefault();
653
							event.preventDefault();
503
						}
654
						}
504
					});
655
					});
505
					//解决长按“发送”按钮,导致键盘关闭的问题;
656
					//解决长按“发送”按钮,导致键盘关闭的问题;
506
					ui.footerRight.addEventListener('touchmove', function(event) {
657
					ui.footerRight.addEventListener('touchmove', function(event) {
507
						if (ui.btnMsgType.classList.contains('mui-icon-paperplane')) {
658
						if(ui.btnMsgType.classList.contains('mui-icon-paperplane')) {
508
							msgTextFocus();
659
							msgTextFocus();
509
							event.preventDefault();
660
							event.preventDefault();
510
						}
661
						}
522
					//						}
673
					//						}
523
					//					});
674
					//					});
524
					ui.footerRight.addEventListener('release', function(event) {
675
					ui.footerRight.addEventListener('release', function(event) {
525
						if (ui.btnMsgType.classList.contains('mui-icon-paperplane')) {
676
						if(ui.btnMsgType.classList.contains('mui-icon-paperplane')) {
526
							if(!ui.btnMsgType.classList.contains('addColor')) {
677
							if(!ui.btnMsgType.classList.contains('addColor')) {
527
								return;
678
								return;
528
							}
679
							}
680
							ui.btnMsgType.classList['remove']('addColor');
681
							//return;
529
							//showKeyboard();
682
							//showKeyboard();
530
							ui.boxMsgText.focus();
683
							ui.boxMsgText.focus();
531
							setTimeout(function() {
684
							setTimeout(function() {
532
								ui.boxMsgText.focus();
685
								ui.boxMsgText.focus();
533
							}, 150);
686
							}, 150);
687
							//return;
534
							//							event.detail.gesture.preventDefault();
688
							//							event.detail.gesture.preventDefault();
535
							send({
536
								sender: 'self',
537
								type: 'text',
538
								content: ui.boxMsgText.value.replace(new RegExp('\n', 'gm'), '<br/>')
689
							$.ajax(baseUrl + '/ajax/webMsg', {
690
								data: {
691
									sender: userid,
692
									reciver: professorId,
693
									cnt: ui.boxMsgText.value.replace(new RegExp('\n', 'gm'), '<br/>')
694
								},
695
								dataType: 'json', //服务器返回json格式数据
696
								type: 'POST', //HTTP请求类型
697
								timeout: 10000, //超时时间设置为10秒;
698
								traditional: true, //传数组必须加这个
699
								success: function(data) {
700
									if(data.success) {
701
										var oTime = document.querySelectorAll(".otime");
702
										var time1;
703
										if(oTime.length) {
704
											time1 = compareTime(oTime[oTime.length - 1].getAttribute("data-time"), data.data)
705
										} else {
706
											time1 = anTime(data.data)
707
										}
708
										send({
709
											sender: 'self',
710
											type: 'text',
711
											content: ui.boxMsgText.value.replace(new RegExp('\n', 'gm'), '<br/>'),
712
											url: url2,
713
											timeStr: data.data,
714
											timeGe: time1
715
										})
716
										ui.boxMsgText.value = '';
717
										$.trigger(ui.boxMsgText, 'input', null);
718
									}
719
								},
720
								error: function(x) {
721
									plus.nativeUI.toast("服务器链接超时", toastStyle);
722
								}
539
							});
723
							});
540
							ui.boxMsgText.value = '';
541
							$.trigger(ui.boxMsgText, 'input', null);
542
						} else if (ui.btnMsgType.classList.contains('mui-icon-mic')) {
724

725
						} else if(ui.btnMsgType.classList.contains('mui-icon-mic')) {
543
							ui.btnMsgType.classList.add('mui-icon-compose');
726
							ui.btnMsgType.classList.add('mui-icon-compose');
544
							ui.btnMsgType.classList.remove('mui-icon-mic');
727
							ui.btnMsgType.classList.remove('mui-icon-mic');
545
							ui.boxMsgText.style.display = 'none';
728
							ui.boxMsgText.style.display = 'none';
546
							ui.boxMsgSound.style.display = 'block';
729
							ui.boxMsgSound.style.display = 'block';
547
							ui.boxMsgText.blur();
730
							ui.boxMsgText.blur();
548
							document.body.focus();
731
							document.body.focus();
549
						} else if (ui.btnMsgType.classList.contains('mui-icon-compose')) {
732
						} else if(ui.btnMsgType.classList.contains('mui-icon-compose')) {
550
							ui.btnMsgType.classList.add('mui-icon-mic');
733
							ui.btnMsgType.classList.add('mui-icon-mic');
551
							ui.btnMsgType.classList.remove('mui-icon-compose');
734
							ui.btnMsgType.classList.remove('mui-icon-compose');
552
							ui.boxMsgSound.style.display = 'none';
735
							ui.boxMsgSound.style.display = 'none';
571
							buttons: btnArray
754
							buttons: btnArray
572
						}, function(e) {
755
						}, function(e) {
573
							var index = e.index;
756
							var index = e.index;
574
							switch (index) {
757
							switch(index) {
575
								case 0:
758
								case 0:
576
									break;
759
									break;
577
								case 1:
760
								case 1:
595
									break;
778
									break;
596
							}
779
							}
597
						});
780
						});
598
					}, false); 
599
					var setSoundAlertVisable=function(show){
600
						if(show){
781
					}, false);
782
					var setSoundAlertVisable = function(show) {
783
						if(show) {
601
							ui.boxSoundAlert.style.display = 'block';
784
							ui.boxSoundAlert.style.display = 'block';
602
							ui.boxSoundAlert.style.opacity = 1;
785
							ui.boxSoundAlert.style.opacity = 1;
603
						}else{
786
						} else {
604
							ui.boxSoundAlert.style.opacity = 0;
787
							ui.boxSoundAlert.style.opacity = 0;
605
							//fadeOut 完成再真正隐藏
788
							//fadeOut 完成再真正隐藏
606
							setTimeout(function(){
789
							setTimeout(function() {
607
								ui.boxSoundAlert.style.display = 'none';
790
								ui.boxSoundAlert.style.display = 'none';
608
							},200);
791
							}, 200);
609
						}
792
						}
610
					};
793
					};
611
					var recordCancel = false;
794
					var recordCancel = false;
616
					var stopTimer = null;
799
					var stopTimer = null;
617
					ui.boxMsgSound.addEventListener('hold', function(event) {
800
					ui.boxMsgSound.addEventListener('hold', function(event) {
618
						recordCancel = false;
801
						recordCancel = false;
619
						if(stopTimer)clearTimeout(stopTimer);
802
						if(stopTimer) clearTimeout(stopTimer);
620
						audio_tips.innerHTML = "手指上划,取消发送";
803
						audio_tips.innerHTML = "手指上划,取消发送";
621
						ui.boxSoundAlert.classList.remove('rprogress-sigh');
804
						ui.boxSoundAlert.classList.remove('rprogress-sigh');
622
						setSoundAlertVisable(true);
805
						setSoundAlertVisable(true);
623
						recorder = plus.audio.getRecorder();
806
						recorder = plus.audio.getRecorder();
624
						if (recorder == null) {
807
						if(recorder == null) {
625
							plus.nativeUI.toast("不能获取录音对象");
808
							plus.nativeUI.toast("不能获取录音对象");
626
							return;
809
							return;
627
						}
810
						}
629
						recorder.record({
812
						recorder.record({
630
							filename: "_doc/audio/"
813
							filename: "_doc/audio/"
631
						}, function(path) {
814
						}, function(path) {
632
							if (recordCancel) return;
815
							if(recordCancel) return;
633
							send({
816
							send({
634
								sender: 'self',
817
								sender: 'self',
635
								type: 'sound',
818
								type: 'sound',
641
					}, false);
824
					}, false);
642
					ui.body.addEventListener('drag', function(event) {
825
					ui.body.addEventListener('drag', function(event) {
643
						//console.log('drag');
826
						//console.log('drag');
644
						if (Math.abs(event.detail.deltaY) > 50) {
645
							if (!recordCancel) {
827
						if(Math.abs(event.detail.deltaY) > 50) {
828
							if(!recordCancel) {
646
								recordCancel = true;
829
								recordCancel = true;
647
								if (!audio_tips.classList.contains("cancel")) {
830
								if(!audio_tips.classList.contains("cancel")) {
648
									audio_tips.classList.add("cancel");
831
									audio_tips.classList.add("cancel");
649
								}
832
								}
650
								audio_tips.innerHTML = "松开手指,取消发送";
833
								audio_tips.innerHTML = "松开手指,取消发送";
651
							}
834
							}
652
						} else {
835
						} else {
653
							if (recordCancel) {
836
							if(recordCancel) {
654
								recordCancel = false;
837
								recordCancel = false;
655
								if (audio_tips.classList.contains("cancel")) {
838
								if(audio_tips.classList.contains("cancel")) {
656
									audio_tips.classList.remove("cancel");
839
									audio_tips.classList.remove("cancel");
657
								}
840
								}
658
								audio_tips.innerHTML = "手指上划,取消发送";
841
								audio_tips.innerHTML = "手指上划,取消发送";
661
					}, false);
844
					}, false);
662
					ui.boxMsgSound.addEventListener('release', function(event) {
845
					ui.boxMsgSound.addEventListener('release', function(event) {
663
						//console.log('release');
846
						//console.log('release');
664
						if (audio_tips.classList.contains("cancel")) {
847
						if(audio_tips.classList.contains("cancel")) {
665
							audio_tips.classList.remove("cancel");
848
							audio_tips.classList.remove("cancel");
666
							audio_tips.innerHTML = "手指上划,取消发送";
849
							audio_tips.innerHTML = "手指上划,取消发送";
667
						}
850
						}
668
						//
851
						//
669
						stopTimestamp = (new Date()).getTime();
852
						stopTimestamp = (new Date()).getTime();
670
						if (stopTimestamp - startTimestamp < MIN_SOUND_TIME) {
853
						if(stopTimestamp - startTimestamp < MIN_SOUND_TIME) {
671
							audio_tips.innerHTML = "录音时间太短";
854
							audio_tips.innerHTML = "录音时间太短";
672
							ui.boxSoundAlert.classList.add('rprogress-sigh');
855
							ui.boxSoundAlert.classList.add('rprogress-sigh');
673
							recordCancel = true;
856
							recordCancel = true;
674
							stopTimer=setTimeout(function(){
857
							stopTimer = setTimeout(function() {
675
								setSoundAlertVisable(false);
858
								setSoundAlertVisable(false);
676
							},800);
677
						}else{
859
							}, 800);
860
						} else {
678
							setSoundAlertVisable(false);
861
							setSoundAlertVisable(false);
679
						}
862
						}
680
						recorder.stop();
863
						recorder.stop();
691
						ui.content.style.paddingBottom = ui.footer.style.height;
874
						ui.content.style.paddingBottom = ui.footer.style.height;
692
					});
875
					});
693
					var focus = false;
876
					var focus = false;
877
					var flag = 1;
694
					ui.boxMsgText.addEventListener('tap', function(event) {
878
					ui.boxMsgText.addEventListener('tap', function(event) {
879
						if(flag) {
880
							ui.footer.style.height = (ui.h.offsetHeight + footerPadding + 15) + 'px';
881
							ui.content.style.paddingBottom = ui.footer.style.height;
882
							flag = 0;
883
						}
884

695
						ui.boxMsgText.focus();
885
						ui.boxMsgText.focus();
696
						setTimeout(function() {
886
						setTimeout(function() {
697
							ui.boxMsgText.focus();
887
							ui.boxMsgText.focus();
698
						}, 0);
888
						}, 0);
699
						focus = true;
889
						focus = true;
700
						setTimeout(function () {
890
						setTimeout(function() {
701
							focus = false;
891
							focus = false;
702
						},1000);
892
						}, 1000);
703
						event.detail.gesture.preventDefault();
893
						event.detail.gesture.preventDefault();
704
					}, false);
894
					}, false);
705
					//点击消息列表,关闭键盘
895
					//点击消息列表,关闭键盘
706
					ui.areaMsgList.addEventListener('click',function (event) {
707
						if(!focus){
896
					ui.areaMsgList.addEventListener('click', function(event) {
897
						if(!focus) {
708
							ui.boxMsgText.blur();
898
							ui.boxMsgText.blur();
709
						}
899
						}
710
					})
900
					})
711
					
901
					/*超过时间10min*/
902
					function timeC(startTime) {
903
						var startdate = new Date();
904
						startdate.setFullYear(parseInt(startTime.substring(0, 4)));
905
						startdate.setMonth(parseInt(startTime.substring(4, 6)) - 1);
906
						startdate.setDate(parseInt(startTime.substring(6, 8)));
907
						startdate.setHours(parseInt(startTime.substring(8, 10)));
908
						startdate.setMinutes(parseInt(startTime.substring(10, 12)));
909
						startdate.setSeconds(parseInt(startTime.substring(12, 14)));
910
						startdate.setMilliseconds(parseInt(startTime.substring(14, 17)));
911
						return startdate.getTime();
912
					}
913

914
					function compareTime(startTime, secondTime) {
915
						var date3 = timeC(secondTime) - timeC(startTime); //时间差的毫秒数
916
						if(date3 >= 600000) {
917
							if(new Date().getFullYear() == secondTime.substring(0, 4)) {
918

919
								return secondTime.substring(4, 6).replace(/\b(0+)/gi, "") + "月" + secondTime.substring(6, 8).replace(/\b(0+)/gi, "") + "日 " + secondTime.substring(8, 10) + ":" + secondTime.substring(10, 12);
920
							} else {
921

922
								return secondTime.substring(0, 4) + "年" + secondTime.substring(4, 6).replace(/\b(0+)/gi, "") + "月" + secondTime.substring(6, 8).replace(/\b(0+)/gi, "") + "日 " + secondTime.substring(8, 10) + ":" + secondTime.substring(10, 12);
923
							}
924
						} else {
925
							return '';
926
						}
927
					}
928

929
					function anTime(secondTime) {
930
						if(new Date().getFullYear() == secondTime.substring(0, 4)) {
931

932
							return secondTime.substring(4, 6).replace(/\b(0+)/gi, "") + "月" + secondTime.substring(6, 8).replace(/\b(0+)/gi, "") + "日 " + secondTime.substring(8, 10) + ":" + secondTime.substring(10, 12);
933
						} else {
934

935
							return secondTime.substring(0, 4) + "年" + secondTime.substring(4, 6).replace(/\b(0+)/gi, "") + "月" + secondTime.substring(6, 8).replace(/\b(0+)/gi, "") + "日 " + secondTime.substring(8, 10) + ":" + secondTime.substring(10, 12);
936
						}
937
					}
712
				});
938
				});
713
			}(mui, document));
939
			}(mui, document));
714
		</script>
940
		</script>

+ 46 - 1
app/index.html

21
	         <span class="mui-tab-label">发现</span>
21
	         <span class="mui-tab-label">发现</span>
22
	    </a>
22
	    </a>
23
	    <a class="mui-tab-item" href="html/consult_home.html" dataid="2">
23
	    <a class="mui-tab-item" href="html/consult_home.html" dataid="2">
24
	        <span class="mui-icon iconfontnew icon-messagenew"><span class="mui-badge">56</span></span>
24
	        <span class="mui-icon iconfontnew icon-messagenew" id="meLI"><span class="mui-badge" id="meLInum"></span></span>
25
	         <span class="mui-tab-label">消息</span>
25
	         <span class="mui-tab-label">消息</span>
26
	    </a>
26
	    </a>
27
	    <a class="mui-tab-item" id="isLogin" href="html/myaccount.html" dataid="3">
27
	    <a class="mui-tab-item" id="isLogin" href="html/myaccount.html" dataid="3">
53
				mui.extend(aniShow, temp);
53
				mui.extend(aniShow, temp);
54
			}
54
			}
55
			self.append(sub);
55
			self.append(sub);
56
		}
57
		window.addEventListener("newId", function(event) {
58
			if(event.detail.rd==1) {
59
				document.getElementById("meLInum").style.display="block"
60
				document.getElementById("meLInum").innerHTML=Number(document.getElementById("meLInum").innerHTML)+1;
61
			}else if(event.detail.rd==2) {
62
				var numtt=Number(document.getElementById("meLInum").innerHTML)-Number(event.detailct)
63
				if(numtt>0) {
64
					document.getElementById("meLInum").style.display="block";
65
					ocument.getElementById("meLInum").innerHTML=numtt;
66
				}else{
67
					document.getElementById("meLInum").style.display="none";
68
					ocument.getElementById("meLInum").innerHTML=0;
69
				}
70
			}else{
71
				totalNum();
72
			}
73
			
74
			
75
		})
76
		totalNum()
77
		function totalNum() {
78
			mui.ajax(baseUrl + '/ajax/webMsg/unReadedCount', {
79
						"data":{id:plus.storage.getItem('userid')},
80
						"type": "get",
81
						"async": true,
82
						"context": this,
83
						"success": function(data) {
84
							console.log(123);
85
							console.log(JSON.stringify(data))
86
							if(data.success) {
87
								if(data.data) {
88
									document.getElementById("meLInum").style.display="block"
89
									document.getElementById("meLInum").innerHTML=data.data;
90
								}else{
91
									document.getElementById("meLInum").style.display="none";
92
									document.getElementById("meLInum").innerHTML=0;
93
								}
94
								
95
							}
96
						},
97
						"error": function() {
98
							plus.nativeUI.toast("服务器链接超时", toastStyle);
99
						}
100
					});
56
		}
101
		}
57
	});
102
	});
58
	//当前激活选项
103
	//当前激活选项

+ 150 - 26
app/js/consultlistNew.js

3
		var userid = plus.storage.getItem('userid');
3
		var userid = plus.storage.getItem('userid');
4
		var content1 = document.getElementById('logined');
4
		var content1 = document.getElementById('logined');
5
		var content2 = document.getElementById('unlogin');
5
		var content2 = document.getElementById('unlogin');
6
		//console.log(document.getElementById("meLI").innerHTML)
6
		if(userid == null || userid == 'null') {
7
		if(userid == null || userid == 'null') {
7
			content1.style.display = 'none';
8
			content1.style.display = 'none';
8
		} else {
9
		} else {
49
		});
50
		});
50
		var ws = new WebSocket("ws://192.168.3.233:8081/portal/websocket/msg?id=" + userid + "&pm=app");
51
		var ws = new WebSocket("ws://192.168.3.233:8081/portal/websocket/msg?id=" + userid + "&pm=app");
51
		ws.onopen = function() {
52
		ws.onopen = function() {
52
			console.log(userid);
53
			
53
		};
54
		};
55
		window.addEventListener("newId", function(event) {
56
			messageList();
57
		})
54
58
55
		function messageList() {
59
		function messageList() {
56
			mui.ajax(baseUrl + '/ajax/webMsg/idx/qm', {
60
			mui.ajax(baseUrl + '/ajax/webMsg/idx/qm', {
57
				data: {
61
				data: {
58
					"id": userid
62
					"id": userid
59
				}, 
63
				},
60
				dataType: 'json', //服务器返回json格式数据
64
				dataType: 'json', //服务器返回json格式数据
61
				type: 'GET', //HTTP请求类型
65
				type: 'GET', //HTTP请求类型
62
				timeout: 10000, //超时时间设置为10秒;
66
				timeout: 10000, //超时时间设置为10秒;
63
				traditional: true, //传数组必须加这个
67
				traditional: true, //传数组必须加这个
64
				success: function(data) {
68
				success: function(data) {
65
					console.log(JSON.stringify(data))
69
					
66
					if(data.success) {
70
					if(data.success) {
71
						$("#consultList").html("");
67
						var $data = data.data;
72
						var $data = data.data;
68
						for(var i = 0; i < $data.length; i++) {
73
						for(var i = 0; i < $data.length; i++) {
69
							var str = '<li class="mui-table-view-cell" data-id="'+$data[i].id+'">' +
70
								'<div class="madiaHead useHead" style="background-image:url(../images/default-photo.jpg)"><span class="mui-icon  icon-messagenew"><span class="mui-badge">56</span></span></div>' +
74
							if($data[i].num == 0) {
75
								var ostyle = "none";
76
							} else {
77
								var ostyle = "block";
78
							}
79
							var str = '<li class="mui-table-view-cell" data-id="' + $data[i].id + '" data-time="' + $data[i].timeStr + '">' +
80
								'<div class="mui-slider-handle"><div class="madiaHead useHead" style="background-image:url(../images/default-photo.jpg)"><span class="mui-icon  icon-messagenew" style="display:' + ostyle + '"><span class="mui-badge">' + $data[i].num + '</span></span></div>' +
71
								'<div class="madiaInfo">' +
81
								'<div class="madiaInfo">' +
72
								'<div class="h1Font mui-ellipsis">' +
82
								'<div class="h1Font mui-ellipsis">' +
73
								'<span class="userName"></span>' +
83
								'<span class="userName"></span>' +
75
								'<span class="thistime">' + commenTime($data[i].timeStr) + '</span>' +
85
								'<span class="thistime">' + commenTime($data[i].timeStr) + '</span>' +
76
								'</div>' +
86
								'</div>' +
77
								'<div class="h3Font mui-ellipsis">' + $data[i].cnt + '</div>' +
87
								'<div class="h3Font mui-ellipsis">' + $data[i].cnt + '</div>' +
78
								'</div>' +
88
								'</div></div><div class="mui-slider-right mui-disabled"><a class="mui-btn mui-btn-red">删除</a></div>' +
79
								'</li>'
89
								'</li>'
80
								var $info=$(str)
81
								$("#consultList").append($info);
82
								userInformation($data[i].id, $info)
90
							var $info = $(str)
91
							$("#consultList").append($info);
92
							userInformation($data[i].id, $info)
83
						}
93
						}
84
					}
94
					}
85
				},
95
				},
88
				}
98
				}
89
			});
99
			});
90
		}
100
		}
101
		var btnArray = ['确认', '取消'];
102
		mui('#consultList').on('tap', '.mui-btn', function(event) {
103
			var elem = this;
104
			var li = elem.parentNode.parentNode;
105
			mui.confirm('确认删除该会话?', btnArray, function(e) {
106
				if(e.index == 1) {
107
					mui.ajax(baseUrl + '/ajax/webMsg/disable/show', {
108
						"type": "post",
109
						"async": true,
110
						"data": {
111
							owner:userid,
112
							actor:li.getAttribute("data-id")
113
						},
114
						"context": this,
115
						"success": function(data) {
116
							if(data.success) {
117
								li.parentNode.removeChild(li);
118
							}
119
						},
120
						"error": function() {
121
							plus.nativeUI.toast("服务器链接超时", toastStyle);
122
						}
123
					});
124
125
				} else {
126
					setTimeout(function() {
127
						mui.swipeoutClose(li);
128
					}, 0);
129
				}
130
			});
131
		});
91
		/*用户信息*/
132
		/*用户信息*/
92
		function userInformation(id, $itemlist) {
133
		function userInformation(id, $itemlist) {
93
			mui.ajax(baseUrl + '/ajax/professor/baseInfo/' + id, {
134
			mui.ajax(baseUrl + '/ajax/professor/baseInfo/' + id, {
94
				"type": "get",
135
				"type": "get",
95
				"async": true,
136
				"async": true,
96
				"success": function(data) {
137
				"success": function(data) {
97
					console.log(JSON.stringify(data))
138
					
98
					if(data.success && data.data) {
139
					if(data.success && data.data) {
99
						$itemlist.find(".userName").text(data.data.name);
140
						$itemlist.find(".userName").text(data.data.name);
100
						if(data.data.hasHeadImage == 1) {
141
						if(data.data.hasHeadImage == 1) {
112
		ws.onmessage = function(a) {
153
		ws.onmessage = function(a) {
113
			var fol = true;
154
			var fol = true;
114
			var $info = JSON.parse(a.data);
155
			var $info = JSON.parse(a.data);
115
			console.log(1111);
116
			var li=$("#consultList").find("li");
117
			$.each(li,function() {
118
				var $id=$(this).attr("data-id");
119
				if($info.sender==$id) {
120
					$(this).find(".icon-messagenew").show().end().find('.thistime').text(commenTime($info.sendTime)).end().find(".h3Font").text($info.cnt);
121
					if($(this).index()!=0) {
156
			
157
			var li = $("#consultList").find("li");
158
			var cf = 1;
159
			$.each(li, function() {
160
				var $id = $(this).attr("data-id");
161
				if($info.sender == $id) {
162
					cf = 0;
163
					if($(this).index() != 0) {
122
						$(this).remove().clone().prependTo($('#consultList'));
164
						$(this).remove().clone().prependTo($('#consultList'));
123
					}
165
					}
166
167
					var web = plus.webview.getWebviewById("weChat.html");
168
169
					if(web) {
170
						if(web.professorId == $info.sender) {
171
							$(this).find('.thistime').text(commenTime($info.sendTime)).end().find(".h3Font").text($info.cnt);
172
							readed.call($(this), $id, $info.sendTime);
173
							mui.fire(web, "newId", {
174
								rd: $info.cnt,
175
								sendTime: $info.sendTime
176
							});
177
						} else {
178
							$(this).find(".icon-messagenew").show().end().find('.mui-badge').text(Number($(this).find(".mui-badge").text()) + 1).end().find('.thistime').text(commenTime($info.sendTime)).end().find(".h3Font").text($info.cnt);
179
							var web3=plus.webview.getLaunchWebview();
180
							mui.fire(web3, "newId", {
181
								rd: 1
182
							});
183
						}
184
					} else {
185
						$(this).find(".icon-messagenew").show().end().find('.mui-badge').text(Number($(this).find(".mui-badge").text()) + 1).end().find('.thistime').text(commenTime($info.sendTime)).end().find(".h3Font").text($info.cnt);
186
						var web3=plus.webview.getLaunchWebview();
187
							mui.fire(web3, "newId", {
188
								rd: 1
189
							});
190
					}
191
124
				}
192
				}
125
			})
193
			})
126
			console.log(1212)
127
			return;
128
			var web = plus.webview.getWebviewById("1.html");
129
			mui.fire(web, "newId", {
130
				rd: $info.cnt
131
			});
194
195
			if(cf) {
196
197
				var str1 = '<li class="mui-table-view-cell" data-id="' + $info.sender + '" data-time="' + $info.sendTime + '">' +
198
					'<div class="mui-slider-handle"><div class="madiaHead useHead" style="background-image:url(../images/default-photo.jpg)"><span class="mui-icon  icon-messagenew"><span class="mui-badge">1</span></span></div>' +
199
					'<div class="madiaInfo">' +
200
					'<div class="h1Font mui-ellipsis">' +
201
					'<span class="userName"></span>' +
202
					'<span class="authicon "></span>' +
203
					'<span class="thistime">' + commenTime($info.sendTime) + '</span>' +
204
					'</div>' +
205
					'<div class="h3Font mui-ellipsis">' + $info.cnt + '</div>' +
206
					'</div></div><div class="mui-slider-right mui-disabled"><a class="mui-btn mui-btn-red">删除</a></div>' +
207
					'</li>'
208
				var $info1 = $(str1)
209
				$("#consultList").prepend($info1);
210
				var web1 = plus.webview.getWebviewById("weChat.html");
211
				if(web1.professorId == $info.sender) {
212
					mui.fire(web1, "newId", {
213
						rd: $info.cnt,
214
						sendTime: $info.sendTime
215
					});
216
					readed.call($info1, $info.sender, $info.sendTime);
217
				}
218
				userInformation($info.sender, $info1)
219
220
			}
132
		}
221
		}
133
		ws.onclose = function() {
222
		ws.onclose = function() {
134
223
135
		}
224
		}
136
		document.querySelector("#hh").addEventListener("tap", function() {
137
			alert(1234)
225
		mui("#consultList").on("tap", "li", function() {
226
			var opId = this.getAttribute("data-id");
227
			var oTimeStr = this.getAttribute("data-time") //
228
			if($(this).find(".icon-messagenew").css("display") == "block") {
229
				
230
				var web3=plus.webview.getLaunchWebview();
231
							mui.fire(web3, "newId", {
232
								rd: 2,
233
								ct:$(this).find(".mui-badge").text()
234
							});
235
				readed.call($(this), opId, oTimeStr);
236
			}
138
			mui.openWindow({
237
			mui.openWindow({
139
				url: '../html/weChat.html',
238
				url: '../html/weChat.html',
140
				id: 'weChat.html',
239
				id: 'weChat.html',
141
				show: {
240
				show: {
142
					autoShow: true,
241
					autoShow: true,
143
					aniShow: "slide-in-right",
242
					aniShow: "slide-in-right",
243
				},
244
				extras: {
245
					professorId: opId
144
				}
246
				}
145
			});
247
			})
146
		})
248
		})
249
		//消息制为已读
250
		function readed(pId, timeStr) {
251
			//alert(1)
252
			mui.ajax(baseUrl + '/ajax/webMsg/readed', {
253
				"type": "post",
254
				"async": true,
255
				"data": {
256
					sender: pId,
257
					reciver: userid,
258
					time: timeStr
259
				},
260
				"context": this,
261
				"success": function(data) {
262
					if(data.success) {
263
						this.find(".icon-messagenew").hide().end().find(".mui-badge").text(0);
264
					}
265
				},
266
				"error": function() {
267
					plus.nativeUI.toast("服务器链接超时", toastStyle);
268
				}
269
			});
270
		}
147
	})
271
	})
148
})
272
})

+ 67 - 0
app/js/jubao.js

1
mui.ready(function() {
2
	mui.plusReady(function() {
3
		var professorId = plus.webview.currentWebview().professorId;
4
		userFun();
5
		function userFun() {
6
		
7
			mui.ajax(baseUrl + '/ajax/professor/baseInfo/' + professorId, {
8
				"type": "get",
9
				"async": true,
10
				"success": function(data) {
11
					if(data.success && data.data) {
12
						document.getElementById("name").innerHTML = data.data.name;
13
						if(data.data.hasHeadImage == 1) {
14
							document.getElementById("img").style.backgroundImage = "url(" + baseUrl + "/images/head/" + data.data.id + "_m.jpg)";
15
						}
16
						var userType = autho(data.data.authType, data.data.orgAuth, data.data.authStatus);
17
						document.getElementById("authicon").classList.add(userType.sty);
18
						var te = ''
19
						if(data.data.title) {
20
							if(data.data.orgName) {
21
								te = data.data.title + "," + data.data.orgName
22
							} else {
23
								te = data.data.title
24
							}
25
						} else {
26
							if(data.data.office) {
27
								if(data.data.orgName) {
28
									te = data.data.office + "," + data.data.orgName
29
								} else {
30
									te = data.data.office
31
								}
32
							} else {
33
								if(data.data.orgName) {
34
									te = data.data.orgName
35
								}
36
							}
37
						}
38
						document.getElementById("title").innerHTML=te;
39
					}
40
				},
41
				"error": function() {
42
					plus.nativeUI.toast("服务器链接超时", toastStyle);
43
				}
44
			});
45
		}
46
		mui('#table').on('tap', 'li', function() {
47
	
48
	plus.nativeUI.showWaiting(); //显示原生等待框
49
	webviewShow = plus.webview.create("../html/userInforShow.html", 'userInforShow.html', {}, {
50
		proid: professorId
51
	}); 
52
})
53
		document.getElementById("breif").addEventListener("tap",function(){
54
			mui.openWindow({
55
				url: '../html/jubao1.html',
56
				id: 'jubao1.html',
57
				show: {
58
					autoShow: true,
59
					aniShow: "slide-in-right",
60
				},
61
				extras: {
62
					professorId: professorId
63
				}
64
			})
65
		})
66
	})
67
})

+ 40 - 0
app/js/jubao1.js

1
mui.ready(function() {
2
	mui.plusReady(function() {
3
		var professorId = plus.webview.currentWebview().professorId;
4
		var userid = plus.storage.getItem('userid');
5
		document.getElementById("question").addEventListener("input",function(){
6
			if(this.value=="") {
7
				document.getElementById("logun").setAttribute("disabled", "true");
8
			}else{
9
				document.getElementById("logun").removeAttribute("disabled");
10
			}
11
		})
12
		document.getElementById("logun").addEventListener("tap",function(){
13
			userFun()
14
		})
15
		function userFun() {
16
		
17
			mui.ajax(baseUrl + '/ajax/feedback/error/professor', {
18
				"data":{
19
					id: professorId,
20
					cnt:document.getElementById("question").value,
21
					user:userid
22
				},
23
				"type": "post",
24
				"async": true,
25
				"success": function(data) {
26
					console.log(JSON.stringify(data))
27
					if(data.success ) {
28
						document.getElementById("question").value="";
29
						document.getElementById("logun").setAttribute("disabled", "true");
30
						plus.nativeUI.toast("已发送", toastStyle);
31
					}
32
				},
33
				"error": function() {
34
					plus.nativeUI.toast("服务器链接超时", toastStyle);
35
				}
36
			});
37
		}
38
		
39
	})
40
})

+ 4 - 1
app/js/needSearch.js

30
mui.plusReady(function() {
30
mui.plusReady(function() {
31
	mui("#demandList").on("tap", "li", function() {
31
	mui("#demandList").on("tap", "li", function() {
32
		var oDemandId = this.getAttribute("data-id");
32
		var oDemandId = this.getAttribute("data-id");
33
		var poD=this.getAttribute("data-creator");
33
		plus.nativeUI.showWaiting();
34
		plus.nativeUI.showWaiting();
34
		plus.webview.create("../html/needShow.html", 'needShow.html', {}, {
35
		plus.webview.create("../html/needShow.html", 'needShow.html', {}, {
35
			demanid: oDemandId
36
			demanid: oDemandId,
37
			professorId:poD
36
		});
38
		});
37
	})
39
	})
38
})
40
})
69
							var liStr=document.createElement("li");
71
							var liStr=document.createElement("li");
70
							liStr.className="mui-table-view-cell";
72
							liStr.className="mui-table-view-cell";
71
							liStr.setAttribute( "data-id",$info[i].id);
73
							liStr.setAttribute( "data-id",$info[i].id);
74
							liStr.setAttribute( "data-creator",$info[i].creator);
72
							document.getElementById("demandList").appendChild(liStr);
75
							document.getElementById("demandList").appendChild(liStr);
73
							demandHtml($info[i],liStr);
76
							demandHtml($info[i],liStr);
74
						}
77
						}

+ 14 - 0
app/js/needShow.js

4
		var userid = plus.storage.getItem('userid');
4
		var userid = plus.storage.getItem('userid');
5
		var ws = plus.webview.currentWebview();
5
		var ws = plus.webview.currentWebview();
6
		var demandId = ws.demanid;
6
		var demandId = ws.demanid;
7
		var professorId=ws.professorId;
7
		var mySelf=document.getElementsByClassName("mySelf")[0];
8
		var mySelf=document.getElementsByClassName("mySelf")[0];
8
		var mySelf2=document.getElementsByClassName("mySelf2")[0];
9
		var mySelf2=document.getElementsByClassName("mySelf2")[0];
9
		var notSelf=document.getElementsByClassName("notSelf")[0];
10
		var notSelf=document.getElementsByClassName("notSelf")[0];
317
		//点击回复按钮调用函数
318
		//点击回复按钮调用函数
318
		function replayGo(){
319
		function replayGo(){
319
			if(userid && userid != null && userid != "null") {
320
			if(userid && userid != null && userid != "null") {
321
				mui.openWindow({
322
								url: '../html/weChat.html',
323
								id: 'weChat.html',
324
								show: {
325
									autoShow: true,
326
									aniShow: "slide-in-right",
327
								},
328
								extras: {
329
									professorId: professorId,
330
									flag:1
331
								}
332
							})
333
				return;
320
				mui.ajax(baseUrl+"/ajax/consult/byDemand",{
334
				mui.ajax(baseUrl+"/ajax/consult/byDemand",{
321
					"type": "GET",
335
					"type": "GET",
322
					"async": false,
336
					"async": false,

+ 22 - 8
app/js/register.js

27
			}
27
			}
28
		});
28
		});
29
		
29
		
30
		phoneName.addEventListener('keyup', function() {
30
		phoneName.addEventListener('input', function() {
31
			if(phoneName.value==""){
31
			if(phoneName.value==""){
32
				obtainCode.disabled = "disabled";
32
				obtainCode.disabled = "disabled";
33
			}else{
33
			}else{
70
				plus.nativeUI.toast("密码由6-24个字符组成,区分大小写", toastStyle);
70
				plus.nativeUI.toast("密码由6-24个字符组成,区分大小写", toastStyle);
71
				return;
71
				return;
72
			}
72
			}
73
//			isReg(1);
74
			isReg();
73
			isReg(1);
74
			//completeReg()
75
		})
75
		})
76
		
76
		
77
		/*用户协议*/
77
		/*用户协议*/
85
			});
85
			});
86
		});
86
		});
87
		
87
		
88
		changImage.addEventListener("tap",function(){
88
		changImage.addEventListener("tap",function(){ 
89
			this.setAttribute("src","http://www.ekexiu.com/ajax/PictureVC?"+new Date().getTime());
89
			this.setAttribute("src","http://www.ekexiu.com/ajax/PictureVC?"+new Date().getTime());
90
		})
90
		})
91
		/*校验手机号*/
91
		/*校验手机号*/
92
		function phoneVal() {
92
		function phoneVal() {
93
			if(imgCode.value=="") {
94
				plus.nativeUI.toast("请输入图形验证码", toastStyle);
95
				return;
96
			}
93
			var hunPhone = /^1[3|4|5|7|8]\d{9}$/;
97
			var hunPhone = /^1[3|4|5|7|8]\d{9}$/;
94
			if(hunPhone.test(phoneName.value)){
98
			if(hunPhone.test(phoneName.value)){
95
				isReg();
99
				isReg();
107
				type: 'GET', //http请求类型
111
				type: 'GET', //http请求类型
108
				timeout: 10000, //超时设置
112
				timeout: 10000, //超时设置
109
				success: function(data) {
113
				success: function(data) {
114
					console.log(JSON.stringify(data))
110
					if(data.data == false) {
115
					if(data.data == false) {
111
						plus.nativeUI.toast("该账号已存在,请直接登录", toastStyle);
116
						plus.nativeUI.toast("该账号已存在,请直接登录", toastStyle);
112
						return;
117
						return;
113
					} else {
118
					} else {
114
						if(oArg==1){
119
						if(oArg==1){
115
							codeVal();
120
							completeReg()
121
							//sendAuthentication(1)
116
						}else{	
122
						}else{	
117
							phoneCode = true;
123
							phoneCode = true;
118
							if(phoneCode){
124
							if(phoneCode){
127
				}
133
				}
128
			});
134
			});
129
		}
135
		}
130

136
		
131
		/*手机发送验证码*/ 
137
		/*手机发送验证码*/ 
132
		function sendAuthentication() {
138
		function sendAuthentication() {
133
			console.log(phoneName.value)
139
			console.log(phoneName.value)
134
			console.log(imgCode.value)
140
			console.log(imgCode.value)
141
			var cookieValue=plus.navigator.getCookie("http://www.ekexiu.com/ajax/PictureVC");
142
			console.log(cookieValue)
143
			//plus.navigator.setCookie( baseUrl + '/ajax/regmobilephone', cookieValue )
135
			mui.ajax(baseUrl + '/ajax/regmobilephone', {
144
			mui.ajax(baseUrl + '/ajax/regmobilephone', {
145
				header:{
146
					"Cookie":cookieValue
147
				},
136
				data: {
148
				data: {
137
					mobilePhone: phoneName.value,
149
					mobilePhone: phoneName.value,
138
					vcode: imgCode.value
150
					vcode: imgCode.value
139
				},
151
				},
140
				dataType: 'json', //数据格式类型
152
				dataType: 'json', //数据格式类型
141
				type: 'GET', //http请求类型
153
				type: 'GET', //http请求类型
142
				async: false,
154
				async: true,
143
				timeout: 10000, //超时设置
155
				timeout: 10000, //超时设置
144
				success: function(data) {
156
				success: function(data) {
145
					console.log(JSON.stringify(data))
157
					console.log(JSON.stringify(data))
146
					if(data.success) {
158
					if(data.success) {
147
						state = data.data;
159
						state = data.data;
148
						doClick();
160
							doClick();
161
						
149
					}else{
162
					}else{
150
						if(data.code==20001) {
163
						if(data.code==20001) {
151
							plus.nativeUI.toast("请输入正确的图形验证码", toastStyle);
164
							plus.nativeUI.toast("请输入正确的图形验证码", toastStyle);
177
					obtainCode.style.display = "block";
190
					obtainCode.style.display = "block";
178
					getCodeOff.style.display = "none";
191
					getCodeOff.style.display = "none";
179
					obtainCode.value = "获取验证码";
192
					obtainCode.value = "获取验证码";
193
					changImage.setAttribute("src","http://www.ekexiu.com/ajax/PictureVC?"+new Date().getTime());
180
				}
194
				}
181
			}, 1000);
195
			}, 1000);
182
		}
196
		}

+ 25 - 17
app/js/resourceShow.js

451
			var consulttitle = oresourceName.innerHTML;
451
			var consulttitle = oresourceName.innerHTML;
452
			var nwaiting = plus.nativeUI.showWaiting(); //显示原生等待框
452
			var nwaiting = plus.nativeUI.showWaiting(); //显示原生等待框
453
			if(reType=="1"){
453
			if(reType=="1"){
454
				webviewShow = plus.webview.create("../html/consultapply.html", 'consultapply.html', {}, {
455
					'proId': professorId,
456
					'flag': flag,
457
					'consulttitle': consulttitle
458
				});
459
				webviewShow.addEventListener("loaded", function() {
460

461
				}, false);
454
				mui.openWindow({
455
				url: '../html/weChat.html',
456
				id: 'weChat.html',
457
				show: {
458
					autoShow: true,
459
					aniShow: "slide-in-right",
460
				},
461
				extras: {
462
					professorId: professorId,
463
					flag:1
464
				}
465
			})
466
				
462
			}else{
467
			}else{
463
				mui.ajax(baseUrl + '/ajax/resource/qaLinkman', {
468
				mui.ajax(baseUrl + '/ajax/resource/qaLinkman', {
464
					data: {
469
					data: {
470
						if(data.success){
475
						if(data.success){
471
							console.log(JSON.stringify(data))
476
							console.log(JSON.stringify(data))
472
							var linkProfirstId = data.data[0].professorId;
477
							var linkProfirstId = data.data[0].professorId;
473
							var nwaiting = plus.nativeUI.showWaiting(); //显示原生等待框
474
							webviewShow = plus.webview.create("../html/consultapply.html", 'consultapply.html', {}, {
475
								'proId': linkProfirstId,
476
								'flag': flag,
477
								'consulttitle': consulttitle
478
							});
479
							webviewShow.addEventListener("loaded", function() {
480
	
481
							}, false);
478
							mui.openWindow({
479
								url: '../html/weChat.html',
480
								id: 'weChat.html',
481
								show: {
482
									autoShow: true,
483
									aniShow: "slide-in-right",
484
								},
485
								extras: {
486
									professorId: linkProfirstId,
487
									flag:1
488
								}
489
							})
482
						}
490
						}
483
					},
491
					},
484
					error: function() {
492
					error: function() {

+ 22 - 10
app/js/userInforShow.js

790

790

791
		if(userid && userid != null && userid != 'null' && userid != undefined && userid != 'undefined') {
791
		if(userid && userid != null && userid != 'null' && userid != undefined && userid != 'undefined') {
792

792

793
			var flag = 'professor';
794
			var nwaiting = plus.nativeUI.showWaiting(); //显示原生等待框
795
			webviewShow = plus.webview.create("../html/consultapply.html", 'consultapply.html', {}, {
796
				'proId': proId,
797
				'flag': flag
798
			});
799

800
			webviewShow.addEventListener("loaded", function() {
801

802
			}, false);
793
//			var flag = 'professor';
794
//			var nwaiting = plus.nativeUI.showWaiting(); //显示原生等待框
795
//			webviewShow = plus.webview.create("../html/consultapply.html", 'consultapply.html', {}, {
796
//				'proId': proId,
797
//				'flag': flag
798
//			});
799
//
800
//			webviewShow.addEventListener("loaded", function() {
801
//
802
//			}, false);
803
			mui.openWindow({
804
				url: '../html/weChat.html',
805
				id: 'weChat.html',
806
				show: {
807
					autoShow: true,
808
					aniShow: "slide-in-right",
809
				},
810
				extras: {
811
					professorId: proId,
812
					flag:1
813
				}
814
			})
803

815

804
		} else {
816
		} else {
805
			mui.openWindow({
817
			mui.openWindow({