瀏覽代碼

1.评价详情页数据
2.咨询聊天,对话框样式,发送样式完善
3.咨询申请,点击完成咨询次数,跳转合作历史评价
4.咨询申请中,专家信息逗号bug修改

dell 8 年之前
父節點
當前提交
5aea58765b
共有 9 個文件被更改,包括 399 次插入384 次删除
  1. 99 103
      app/html/chat-assess-detail.html
  2. 112 112
      app/html/chat-assess.html
  3. 18 47
      app/html/chats.html
  4. 1 1
      app/html/consultapply.html
  5. 20 19
      app/html/consultlist.html
  6. 66 11
      app/js/chat-assess-detail.js
  7. 40 65
      app/js/chats.js
  8. 9 14
      app/js/consult.js
  9. 34 12
      app/js/consultapply.js

+ 99 - 103
app/html/chat-assess-detail.html

@ -1,103 +1,99 @@
1
<!doctype html>
2
<html lang="en" class="feedback">
3
	<head>
4
		<meta charset="UTF-8" />
5
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
6
		<title></title>
7
		<link rel="stylesheet" type="text/css" href="../css/mui.min.css" />
8
		<link href="../css/iconfont.css" rel="stylesheet" />
9
		<link rel="stylesheet" type="text/css" href="../css/app.css" />
10
		<style>
11
			#textbox {
12
				position: relative; 
13
			}
14
			.text_count {
15
				position: absolute;
16
				right: 0;
17
				bottom: 0;
18
				font-size: 12px;
19
			}
20
			
21
			
22
		</style>
23
	</head>
24

25
	<body>
26
	    <header class="mui-bar mui-bar-nav toptitbox">
27
	    	<!--mui-action-back-->
28
			<span class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left topback"></span>
29
			<h1 class="mui-title toptit">评价</h1>
30
		</header>
31
		<div class="mui-content">
32
			<div class="assessbox">
33
				<div class="mui-content-padded ">
34
					
35
					<div class="icons mui-inline levelbox" style="margin-left: 6px;" id="starContainer">
36
						<span data-index="1" class="mui-icon iconfont icon-favor"></span>
37
						<span data-index="2" class="mui-icon iconfont icon-favor"></span>
38
						<span data-index="3" class="mui-icon iconfont icon-favor"></span>
39
						<span data-index="4" class="mui-icon iconfont icon-favor"></span>
40
						<span data-index="5" class="mui-icon iconfont icon-favor"></span>
41
					</div>
42
				</div>
43
				<div class="mui-content-padded">
44
					<div id='assesscon'></div>
45
				</div>
46
				
47
				
48
			</div>
49
		</div>
50
		<script src="../js/public/mui.min.js"></script>
51
		<script src="../js/public/base.js"></script>
52
 		<script src="../js/chat-assess-detail.js"></script>
53
		<script type="text/javascript">
54
			/*mui.init();
55
			mui('.mui-scroll-wrapper').scroll();
56
			(function() {
57
				var index = 1;
58
				var size = null;
59
				var imageIndexIdNum = 0;
60
				var starIndex = 0;
61
				var feedback = {
62
					question: document.getElementById('question'), 
63
					submitBtn: document.getElementById('submit')
64
				};
65
				
66
				feedback.clearForm = function() {
67
					feedback.question.value = '';
68
			
69
					index = 0;
70
					size = 0;
71
					imageIndexIdNum = 0;
72
					starIndex = 0;
73
					//清除所有星标
74
					mui('.icons span').each(function (index,element) {
75
						if (element.classList.contains('icon-favorfill')) {
76
							element.classList.add('icon-favor')
77
				  			element.classList.remove('icon-favorfill')
78
						}
79
					})
80
				};
81
				//应用评分
82
				 mui('.icons').on('tap','span',function(){
83
				  	var index = parseInt(this.getAttribute("data-index"));
84
				  	var parent = this.parentNode;
85
				  	var children = parent.children;
86
				  	if(this.classList.contains("icon-favor")){
87
				  		for(var i=0;i<index;i++){
88
			  				children[i].classList.remove('icon-favor');
89
			  				children[i].classList.add('icon-favorfill');
90
				  		}
91
				  	}else{
92
				  		for (var i = index; i < 5; i++) {
93
				  			children[i].classList.add('icon-favor')
94
				  			children[i].classList.remove('icon-favorfill')
95
				  		}
96
				  	}
97
				  	starIndex = index;
98
			  });
99
			 })();*/
100
		</script>
101
	</body>
102

103
</html>
1
<!doctype html>
2
<html lang="en" class="feedback">
3
	<head>
4
		<meta charset="UTF-8" />
5
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
6
		<title></title>
7
		<link rel="stylesheet" type="text/css" href="../css/mui.min.css" />
8
		<link href="../css/iconfont.css" rel="stylesheet" />
9
		<link rel="stylesheet" type="text/css" href="../css/app.css" />
10
		<style>
11
			#textbox {
12
				position: relative; 
13
			}
14
			.text_count {
15
				position: absolute;
16
				right: 0;
17
				bottom: 0;
18
				font-size: 12px;
19
			}
20
			
21
			
22
		</style>
23
	</head>
24
25
	<body>
26
	    <header class="mui-bar mui-bar-nav toptitbox">
27
	    	<!--mui-action-back-->
28
			<span class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left topback"></span>
29
			<h1 class="mui-title toptit">评价</h1>
30
		</header>
31
		<div class="mui-content">
32
			<div class="assessbox">
33
				<div class="mui-content-padded ">
34
					
35
					<div class="icons mui-inline levelbox" id="starContainer">
36
						<span data-index="1" class="mui-icon iconfont icon-favor"></span>
37
						<span data-index="2" class="mui-icon iconfont icon-favor"></span>
38
						<span data-index="3" class="mui-icon iconfont icon-favor"></span>
39
						<span data-index="4" class="mui-icon iconfont icon-favor"></span>
40
						<span data-index="5" class="mui-icon iconfont icon-favor"></span>
41
					</div>
42
					<div id='assesscon'></div>
43
				</div>
44
			</div>
45
		</div>
46
		<script src="../js/public/mui.min.js"></script>
47
		<script src="../js/public/base.js"></script>
48
 		<script src="../js/chat-assess-detail.js"></script>
49
		<script type="text/javascript">
50
			/*mui.init();
51
			mui('.mui-scroll-wrapper').scroll();
52
			(function() {
53
				var index = 1;
54
				var size = null;
55
				var imageIndexIdNum = 0;
56
				var starIndex = 0;
57
				var feedback = {
58
					question: document.getElementById('question'), 
59
					submitBtn: document.getElementById('submit')
60
				};
61
				
62
				feedback.clearForm = function() {
63
					feedback.question.value = '';
64
			
65
					index = 0;
66
					size = 0;
67
					imageIndexIdNum = 0;
68
					starIndex = 0;
69
					//清除所有星标
70
					mui('.icons span').each(function (index,element) {
71
						if (element.classList.contains('icon-favorfill')) {
72
							element.classList.add('icon-favor')
73
				  			element.classList.remove('icon-favorfill')
74
						}
75
					})
76
				};
77
				//应用评分
78
				 mui('.icons').on('tap','span',function(){
79
				  	var index = parseInt(this.getAttribute("data-index"));
80
				  	var parent = this.parentNode;
81
				  	var children = parent.children;
82
				  	if(this.classList.contains("icon-favor")){
83
				  		for(var i=0;i<index;i++){
84
			  				children[i].classList.remove('icon-favor');
85
			  				children[i].classList.add('icon-favorfill');
86
				  		}
87
				  	}else{
88
				  		for (var i = index; i < 5; i++) {
89
				  			children[i].classList.add('icon-favor')
90
				  			children[i].classList.remove('icon-favorfill')
91
				  		}
92
				  	}
93
				  	starIndex = index;
94
			  });
95
			 })();*/
96
		</script>
97
	</body>
98
99
</html>

+ 112 - 112
app/html/chat-assess.html

@ -1,113 +1,113 @@
1
<!doctype html>
2
<html lang="en" class="feedback">
3
	<head>
4
		<meta charset="UTF-8" />
5
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
6
		<title></title>
7
		<link rel="stylesheet" type="text/css" href="../css/mui.min.css" />
8
		<link href="../css/iconfont.css" rel="stylesheet" />
9
		<link rel="stylesheet" type="text/css" href="../css/app.css" />
10
		<style>
11
			#textbox {
12
				position: relative; 
13
			}
14
			.text_count {
15
				position: absolute;
16
				right: 0;
17
				bottom: 0;
18
				font-size: 12px;
19
			}
20
			
21
			
22
		</style>
23
	</head>
24

25
	<body>
26
	    <header class="mui-bar mui-bar-nav toptitbox">
27
	    	<!--mui-action-back-->
28
			<span class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left topback"></span>
29
			<h1 class="mui-title toptit">评价</h1>
30
			<span id="submit" class="mui-pull-right topsave">发送</span>
31
		</header>
32
	
33
		<div class="mui-content">
34
			<div class="assessbox">
35
				<div class="mui-content-padded ">
36
					<div class="mui-inline">整体评价</div>
37
					<div class="icons mui-inline levelbox" style="margin-left: 6px;" id="starContainer">
38
						<span data-index="1" class="mui-icon iconfont icon-favor"></span>
39
						<span data-index="2" class="mui-icon iconfont icon-favor"></span>
40
						<span data-index="3" class="mui-icon iconfont icon-favor"></span>
41
						<span data-index="4" class="mui-icon iconfont icon-favor"></span>
42
						<span data-index="5" class="mui-icon iconfont icon-favor"></span>
43
					</div>
44
				</div>
45
				<div class="mui-content-padded">
46
					<div class="mui-inline">评价留言</div>
47
				</div>
48
				<div class="row mui-input-row" id="textbox">
49
					<div id='question' class="mui-input-clear question textareabox" contenteditable="true">
50
						
51
					</div>
52
					<div class="text_count"><span><span id="text-count">0</span>/300字</span></div>
53
					<input type="text" value="0" style="display: none;" id="inp"/>
54
				</div>
55
				
56
			</div>
57
		</div>
58
		<script src="../js/public/mui.min.js"></script>
59
		<script src="../js/public/base.js"></script>
60
 		<script src="../js/chat-assess.js"></script>
61
		<script type="text/javascript">
62
			mui.init();
63
			mui('.mui-scroll-wrapper').scroll();
64
			(function() {
65
				var index = 1;
66
				var size = null;
67
				var imageIndexIdNum = 0;
68
				var starIndex = 0;
69
				var feedback = {
70
					question: document.getElementById('question'), 
71
					submitBtn: document.getElementById('submit')
72
				};
73
				/**
74
				 *提交成功之后,恢复表单项 
75
				 */
76
				feedback.clearForm = function() {
77
					feedback.question.value = '';
78
			
79
					index = 0;
80
					size = 0;
81
					imageIndexIdNum = 0;
82
					starIndex = 0;
83
					//清除所有星标
84
					mui('.icons span').each(function (index,element) {
85
						if (element.classList.contains('icon-favorfill')) {
86
							element.classList.add('icon-favor')
87
				  			element.classList.remove('icon-favorfill')
88
						}
89
					})
90
				};
91
				//应用评分
92
				 mui('.icons').on('tap','span',function(){
93
				  	var index = parseInt(this.getAttribute("data-index"));
94
				  	var parent = this.parentNode;
95
				  	var children = parent.children;
96
				  	if(this.classList.contains("icon-favor")){
97
				  		for(var i=0;i<index;i++){
98
			  				children[i].classList.remove('icon-favor');
99
			  				children[i].classList.add('icon-favorfill');
100
				  		}
101
				  	}else{
102
				  		for (var i = index; i < 5; i++) {
103
				  			children[i].classList.add('icon-favor')
104
				  			children[i].classList.remove('icon-favorfill')
105
				  		}
106
				  	}
107
				  	starIndex = index;
108
			  });
109
			 })();
110
		</script>
111
	</body>
112

1
<!doctype html>
2
<html lang="en" class="feedback">
3
	<head>
4
		<meta charset="UTF-8" />
5
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
6
		<title></title>
7
		<link rel="stylesheet" type="text/css" href="../css/mui.min.css" />
8
		<link href="../css/iconfont.css" rel="stylesheet" />
9
		<link rel="stylesheet" type="text/css" href="../css/app.css" />
10
		<style>
11
			#textbox {
12
				position: relative; 
13
			}
14
			.text_count {
15
				position: absolute;
16
				right: 0;
17
				bottom: 0;
18
				font-size: 12px;
19
			}
20
			
21
			
22
		</style>
23
	</head>
24
25
	<body>
26
	    <header class="mui-bar mui-bar-nav toptitbox">
27
	    	<!--mui-action-back-->
28
			<span class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left topback"></span>
29
			<h1 class="mui-title toptit">评价</h1>
30
			<span id="submit" class="mui-pull-right topsave">发送</span>
31
		</header>
32
	
33
		<div class="mui-content">
34
			<div class="assessbox">
35
				<div class="mui-content-padded ">
36
					<div class="mui-inline">整体评价</div>
37
					<div class="icons mui-inline levelbox" style="margin-left: 6px;" id="starContainer">
38
						<span data-index="1" class="mui-icon iconfont icon-favor"></span>
39
						<span data-index="2" class="mui-icon iconfont icon-favor"></span>
40
						<span data-index="3" class="mui-icon iconfont icon-favor"></span>
41
						<span data-index="4" class="mui-icon iconfont icon-favor"></span>
42
						<span data-index="5" class="mui-icon iconfont icon-favor"></span>
43
					</div>
44
				</div>
45
				<div class="mui-content-padded">
46
					<div class="mui-inline">评价留言</div>
47
				</div>
48
				<div class="row mui-input-row" id="textbox">
49
					<div id='question' class="mui-input-clear question textareabox" contenteditable="true">
50
						
51
					</div>
52
					<div class="text_count"><span><span id="text-count">0</span>/300字</span></div>
53
					<input type="text" value="0" style="display: none;" id="inp"/>
54
				</div>
55
				
56
			</div>
57
		</div>
58
		<script src="../js/public/mui.min.js"></script>
59
		<script src="../js/public/base.js"></script>
60
 		<script src="../js/chat-assess.js"></script>
61
		<script type="text/javascript">
62
			mui.init();
63
			mui('.mui-scroll-wrapper').scroll();
64
			(function() {
65
				var index = 1;
66
				var size = null;
67
				var imageIndexIdNum = 0;
68
				var starIndex = 0;
69
				var feedback = {
70
					question: document.getElementById('question'), 
71
					submitBtn: document.getElementById('submit')
72
				};
73
				/**
74
				 *提交成功之后,恢复表单项 
75
				 */
76
				feedback.clearForm = function() {
77
					feedback.question.value = '';
78
			
79
					index = 0;
80
					size = 0;
81
					imageIndexIdNum = 0;
82
					starIndex = 0;
83
					//清除所有星标
84
					mui('.icons span').each(function (index,element) {
85
						if (element.classList.contains('icon-favorfill')) {
86
							element.classList.add('icon-favor')
87
				  			element.classList.remove('icon-favorfill')
88
						}
89
					})
90
				};
91
				//应用评分
92
				 mui('.icons').on('tap','span',function(){
93
				  	var index = parseInt(this.getAttribute("data-index"));
94
				  	var parent = this.parentNode;
95
				  	var children = parent.children;
96
				  	if(this.classList.contains("icon-favor")){
97
				  		for(var i=0;i<index;i++){
98
			  				children[i].classList.remove('icon-favor');
99
			  				children[i].classList.add('icon-favorfill');
100
				  		}
101
				  	}else{
102
				  		for (var i = index; i < 5; i++) {
103
				  			children[i].classList.add('icon-favor')
104
				  			children[i].classList.remove('icon-favorfill')
105
				  		}
106
				  	}
107
				  	starIndex = index;
108
			  });
109
			 })();
110
		</script>
111
	</body>
112
113 113
</html>

+ 18 - 47
app/html/chats.html

@ -81,7 +81,7 @@
81 81
 				background-color: #eaeaea;
82 82
 			}
83 83
 			#msg-list {
84
 				height: 100%;
84
 				height: 83%;
85 85
 				overflow: auto;
86 86
 				-webkit-overflow-scrolling: touch;
87 87
 			}
@ -302,6 +302,7 @@
302 302
 			}
303 303
 			#lookConBtn {
304 304
 				text-align: center;
305
 				font-size: 12px;
305 306
 			}
306 307
 			
307 308
 			/*#middlePopover {
@ -351,9 +352,9 @@
351 352
 					<!--对话内容渲染-->
352 353
 					<% if(item.sender=='self' ) { %>
353 354
 						<!--<i class="msg-user mui-icon mui-icon-person"></i>-->
354
 						<img class="msg-user msg-user-img" src="../images/dialogue.png" alt="" />
355
 						<img class="msg-user msg-user-img" src="" alt="" id="selfImg"/>
355 356
 					<% } else { %>
356
 						<img class="msg-user msg-user-img" src="../images/logo.png" alt="" />
357
 						<img class="msg-user msg-user-img" src="" alt="" id="thatImg"/>
357 358
 					<% } %>
358 359
 					<div class="msg-content">
359 360
 						<div class="msg-content-inner">
@ -374,30 +375,6 @@
374 375
 		</script>
375 376
 		<div class="mui-content">
376 377
 			<div class="displayNone" id="status"></div>
377
 			<!--评价内容-->
378
 			<!--<div id="middlePopover" class="mui-popover">
379
				<div class="mui-popover-arrow" id="arrow"></div>
380
				<div class="mui-scroll-wrapper">
381
					<div class="mui-scroll">
382
						<ul class="mui-table-view showCon" >
383
							<div class="assessAtarStyle">
384
								<div class="levelbox" id="showStar">
385
						        	<span class="mui-icon iconfont icon-favor"></span>
386
					        		<span class="mui-icon iconfont icon-favor"></span>
387
					        		<span class="mui-icon iconfont icon-favor"></span>
388
					        		<span class="mui-icon iconfont icon-favor"></span>
389
					        		<span class="mui-icon iconfont icon-favor"></span>
390
					        	</div>
391
					       </div>
392
					       <div id="assessText"></div>
393
						</ul>
394
					</div>
395
				</div>
396
	
397
			</div>--><!--评价内容-->
398
 			
399
 			
400
 			
401 378
 			<div class="operatebox">
402 379
 				<div class="themespan mui-pull-left">
403 380
 					<span class="" id="consultTitle">
@ -415,18 +392,16 @@
415 392
				</div>
416 393
				<!--我的需求,已评价-->
417 394
				<div class="operatebtnbox mui-pull-right operated displayNone" id="assessed">
418
					<a href="#middlePopover">
419
						<div class="evabox" id="assessed_center">
420
							<span>已评价</span>
421
							<div class="levelbox" id="my_starContainer">
422
					        	<span class="mui-icon iconfont icon-favor"></span> <!--无色星星icon-favor  黄色星icon-favorfill-->
423
				        		<span class="mui-icon iconfont icon-favor"></span>
424
				        		<span class="mui-icon iconfont icon-favor"></span>
425
				        		<span class="mui-icon iconfont icon-favor"></span>
426
				        		<span class="mui-icon iconfont icon-favor"></span>
427
				        	</div>
428
						</div>
429
					</a>
395
					<div class="evabox" id="myNeeAss">
396
						<span>已评价</span>
397
						<div class="levelbox" id="my_starContainer">
398
				        	<span class="mui-icon iconfont icon-favor"></span> <!--无色星星icon-favor  黄色星icon-favorfill-->
399
			        		<span class="mui-icon iconfont icon-favor"></span>
400
			        		<span class="mui-icon iconfont icon-favor"></span>
401
			        		<span class="mui-icon iconfont icon-favor"></span>
402
			        		<span class="mui-icon iconfont icon-favor"></span>
403
			        	</div>
404
					</div>
430 405
				</div>
431 406
				
432 407
				<!--收到咨询,对方未评价-->
@ -439,8 +414,7 @@
439 414
				</div>
440 415
				<!--收到咨询,对方已评价-->
441 416
				<div class="operatebtnbox mui-pull-right operated displayNone" id="that_assessed" style="cursor: pointer;">
442
					<a href="#middlePopover">
443
						<div class="evabox" >
417
						<div class="evabox" id="getConAss">
444 418
							<span>对方已评价</span>
445 419
							<div class="levelbox" id="consult_starContainer">
446 420
					        	<span class="mui-icon iconfont icon-favor"></span> <!--无色星星icon-favor  黄色星icon-favorfill-->
@ -450,9 +424,6 @@
450 424
				        		<span class="mui-icon iconfont icon-favor"></span>
451 425
				        	</div>
452 426
						</div>
453
					</a>
454
					
455
					
456 427
				</div>
457 428
 				
458 429
 			</div>
@ -479,15 +450,15 @@
479 450
 		</div>
480 451
 		
481 452
 		<footer class="" id="chatFooter">
482
 			<div class="footer-left">
453
 			<!--<div class="footer-left">
483 454
 				<i id='msg-image' class="mui-icon mui-icon-camera" style="font-size: 28px;"></i>
484
 			</div>
455
 			</div>-->
485 456
 			<div class="footer-center">
486 457
 				<textarea id='msg-text' type="text" class='input-text'></textarea>
487 458
 				<button id='msg-sound' type="button" class='input-sound' style="display: none;">按住说话</button>
488 459
 			</div>
489 460
 			<label for="" class="footer-right">
490
 				<i id='msg-type' class="mui-icon mui-icon-mic"></i>
461
 				<i id='msg-type' class="mui-icon mui-icon-paperplane"></i>
491 462
 			</label>
492 463
 		</footer>
493 464
 		<div id='sound-alert' class="rprogress">

+ 1 - 1
app/html/consultapply.html

@ -34,7 +34,7 @@
34 34
			        </div>
35 35
		       </div>
36 36
		        <div class="mui-clearfix peolevelbox">
37
		        	<div class="mui-pull-left peocountbox">
37
		        	<div class="mui-pull-left peocountbox" id="finished">
38 38
		        		<div class="peocount mui-clearfix">
39 39
		        			<em class="mui-icon iconfont icon-community actionicon dialogicon mui-pull-left "></em>
40 40
		        			<span class="mui-pull-left">已完成咨询<em id='consultcount'></em>人次</span>

+ 20 - 19
app/html/consultlist.html

@ -24,8 +24,18 @@
24 24
	<header class="mui-bar mui-bar-nav toptitbox">
25 25
	    <h1 class="mui-title toptit">咨询</h1>
26 26
	</header>
27
	<div class="displayNone">
28
		<!--咨询/需求-->
29
    	<input type="text" id="needval" value="0" />
30
    	<!--咨询类型-->
31
    	<input type="text" id="typeval" value="0" />
32
    	<!--咨询状态-->
33
    	<input type="text" id="stateval" value="0"/>
34
    	<!--时间排序-->
35
    	<input type="text" id="sortval" value="0" />
36
	</div>
27 37
    <!-- 主页面内容容器 -->
28
    <div class="mui-content" style="overflow-y: hidden;">
38
    <div class="mui-content">
29 39
    	<!-- 主界面具体展示内容 -->
30 40
    	<div class="filterbox2" style="top:45px ;left: 0;">
31 41
			<ul class="filterblock2">
@ -43,24 +53,8 @@
43 53
				</li>
44 54
			</ul>
45 55
		</div>
46
        <div class="displayNone">
47
    		<!--咨询/需求-->
48
        	<input type="text" id="needval" value="0" />
49
        	<!--咨询类型-->
50
        	<input type="text" id="typeval" value="0" />
51
        	<!--咨询状态-->
52
        	<input type="text" id="stateval" value="0"/>
53
        	<!--时间排序-->
54
        	<input type="text" id="sortval" value="0" />
55
    	</div>
56
      
57
        <div id="pullrefresh" class="mui-card-content"  style="margin-top:20px; ">
58
	        <ul class="mui-table-view protable" >
59
	           
60
	        </ul>
61
        </div>
62
        
63
		<div id="middlePopover1" class="mui-popover popoverbox mui-popover1" style="height: 110px;">
56
       	
57
       	<div id="middlePopover1" class="mui-popover popoverbox mui-popover1" style="height: 110px;">
64 58
			<div class="mui-popover-arrow"></div>
65 59
			<div class="mui-scroll-wrapper">
66 60
				<div class="mui-scroll">
@ -110,6 +104,13 @@
110 104
				</div>
111 105
			</div>
112 106
		</div>
107
       	
108
       	<div id="zixunpullrefresh" class="mui-card-content"  style="margin-top:20px; ">
109
	        <ul class="mui-table-view protable" id="table">
110
	           
111
	        </ul>
112
        </div>
113
        
113 114
		
114 115
    </div>
115 116
	

+ 66 - 11
app/js/chat-assess-detail.js

@ -1,12 +1,67 @@
1
mui.ready(function(){
2
	var ostarContainer =document.getElementById("starContainer");//星星容器
3
	var oassesscon =document.getElementById("assesscon");//评价内容
4
	
5
	mui.plusReady(function(){
6
		var self = plus.webview.currentWebview();
7
		var consultId = self.consultId;
8
		console.log(consultId);
9
		
10
	});
11
	
1
mui.ready(function(){
2
	var ostarContainer =document.getElementById("starContainer");//星星容器
3
	var oassesscon =document.getElementById("assesscon");//评价内容
4
	
5
	function getAssDetail(manFlag,consultId) {
6
		if(manFlag == 'myNeed'){
7
			console.log('我的');
8
			mui.ajax(baseUrl+'/ajax/consult/qacon',{
9
				data:{"consultId":consultId,"readStatus":"1"},
10
				dataType:'json',
11
				type:'get',
12
				timeout:10000,
13
				success:function(data){
14
						var myData = data.data;
15
						//评价星级
16
						var starCount = myData["assessStar"];
17
						var starlist = ostarContainer.children;
18
						for(var i = 0; i < starCount; i++) {
19
							starlist[i].classList.remove('icon-favor');
20
			  				starlist[i].classList.add('icon-favorfill');
21
						};
22
						oassesscon.innerHTML =  myData["assessContant"];
23
					
24
				},
25
				error:function(xhr,type,errorThrown){
26
					plus.nativeUI.toast("服务器链接超时", toastStyle);
27
				}
28
			});
29
		} else if(manFlag == 'consult'){
30
			console.log('收到咨询');
31
			mui.ajax(baseUrl+'/ajax/consult/qapro',{
32
				data:{"consultId":consultId,"readStatus":"1"},
33
				dataType:'json',
34
				type:'get',
35
				timeout:10000,
36
				success:function(data){
37
						var myData = data.data;
38
						//评价星级
39
						var starCount = myData["assessStar"];
40
						var starlist = ostarContainer.children;
41
						for(var i = 0; i < starCount; i++) {
42
							starlist[i].classList.remove('icon-favor');
43
			  				starlist[i].classList.add('icon-favorfill');
44
						};
45
						oassesscon.innerHTML =  myData["assessContant"];
46
					
47
				},
48
				error:function(xhr,type,errorThrown){
49
					plus.nativeUI.toast("服务器链接超时", toastStyle);
50
				}
51
			});
52
		}
53
	}
54
	
55
	
56
	
57
	mui.plusReady(function(){
58
		var self = plus.webview.currentWebview();
59
		var consultId = self.consultId;
60
		var manFlag = self.manFlag;
61
		console.log(consultId);
62
		console.log(manFlag);
63
		//填充评价详情
64
		getAssDetail(manFlag,consultId);
65
	});
66
	
12 67
})

+ 40 - 65
app/js/chats.js

@ -18,12 +18,11 @@ mui.ready(function() {
18 18
	var othat_assessed = document.getElementById("that_assessed");//收到咨询,对方已评价
19 19
	var ozixunstarContainer = document.getElementById("consult_starContainer");//收到咨询星级容器
20 20
	
21
	var omiddlePopover = document.getElementById("middlePopover");//评价内容容器;
22
	var oassessText = document.getElementById("assessText");//评价内容
21
	var omyNeeAss = document.getElementById("myNeeAss");//我的需求已评价,点击跳转评价详情
22
	var ogetConAss = document.getElementById("getConAss");//收到咨询对方已评价,点击跳转评价详情
23 23
	
24
	var oshowAssess = document.getElementById("showAssess");//显示评价
25
	var oshowStar = document.getElementById("showStar");//显示星级
26
	var oshowAssessText = document.getElementById("showAssessText");//显示评价内容
24
	var oselfImg = document.getElementById("selfImg")//自己的头像
25
	var othatImg = document.getElementById("thatImg");//对方头像
27 26
	
28 27
	var omsg_list = document.getElementById("msg-list");
29 28
	var omsg_text = document.getElementById("msg-text");
@ -62,15 +61,12 @@ mui.ready(function() {
62 61
					//我的需求进行中
63 62
					if(myData["consultStatus"] == 0){
64 63
						oconfirm.classList.remove('displayNone');//我的需求,进行中
65
//						ochatFooter.classList.remove('displayNone');
66 64
						ostatus.setAttribute('status','consultStatus='+myData["consultStatus"]);					
67 65
						clickConfirm(consultId);
68
						
69 66
70 67
					}else {
71 68
						ochatFooter.style.display = 'none';//对话底部隐藏
72 69
						if(myData["assessStatus"] == 0){
73
							
74 70
							oassessBtn.classList.remove('displayNone');//我的需求,未评价
75 71
							ostatus.setAttribute('status','');
76 72
							clickweiassess(consultId);
@ -81,22 +77,15 @@ mui.ready(function() {
81 77
							
82 78
							//评价星级
83 79
							var starCount = myData["assessStar"];
84
							console.log("我的需求已评价,星级:"+starCount);
85 80
							var starlist = omy_starContainer.children;
86 81
							for(var i = 0; i < starCount; i++) {
87 82
								starlist[i].classList.remove('icon-favor');
88 83
				  				starlist[i].classList.add('icon-favorfill');
89 84
							};
90
							/*===========评价内容没做=========*/
91
							
92
//							oassessText.innerHTML = myData["assessContant"];//评价内容
93 85
							
94
							oassessed.addEventListener('tap',function() {
95
//								showAssessText(omy_starContainerconsultId,manFlag);
96
								clickGodetail(omy_starContainer,consultId)
86
							omyNeeAss.addEventListener('tap',function() {
87
								clickGodetail(omy_starContainer,consultId,manFlag)
97 88
							});
98
							
99
							
100 89
						}
101 90
					} 
102 91
					console.log("关闭等待狂")
@ -129,22 +118,18 @@ mui.ready(function() {
129 118
						if(myData["assessStatus"] == 0){//收到咨询未评价
130 119
							othat_weiassess.classList.remove('displayNone');
131 120
						}else{//收到咨询已评价(评价星级和评价内容)
132
							
133 121
							othat_assessed.classList.remove('displayNone');
134
//							oassessText.innerHTML = myData["assessContant"];//评价内容
135 122
							//评价星级
136 123
							var starCount = myData["assessStar"];
137
							console.log("收到咨询对方已评价,星级:"+starCount);
138 124
							var starlist = ozixunstarContainer.children;
139 125
							for(var i = 0; i < starCount; i++) {
140 126
								starlist[i].classList.remove('icon-favor');
141 127
				  				starlist[i].classList.add('icon-favorfill');
142 128
							}
143 129
							
144
							
145
							othat_assessed.addEventListener('tap',function() {
146
								clickGodetail(ozixunstarContainer,consultId)
147
//								showAssessText(ozixunstarContainer);
130
							ogetConAss.addEventListener('tap',function() {
131
								clickGodetail(ozixunstarContainer,consultId,manFlag)
132
//								
148 133
							});
149 134
150 135
						}
@ -181,17 +166,17 @@ mui.ready(function() {
181 166
	};
182 167
	
183 168
	/*打开评价详情函数*/
184
	function goassessDetail(consultId) {
169
	function goassessDetail(consultId,manFlag) {
185 170
		mui.openWindow({
186 171
			id:'chat-assess-detail.html',
187 172
		    url:'chat-assess-detail.html',
188
		    extras:{'consultId':consultId}//向评价页面传值;咨询id
173
		    extras:{'consultId':consultId,'manFlag':manFlag}//向评价页面传值;咨询id
189 174
		});
190 175
	}
191 176
	/*点击已评价,进入评价详情*/
192
	function clickGodetail(btn,consultId) {
177
	function clickGodetail(btn,consultId,manFlag) {
193 178
		btn.addEventListener('tap',function(){
194
			goassessDetail(consultId);
179
			goassessDetail(consultId,manFlag);
195 180
		});
196 181
	}
197 182
	
@ -218,26 +203,6 @@ mui.ready(function() {
218 203
	    myWindow.document.write("<p>这是我的窗口</p>");
219 204
	}
220 205
	
221
	function showAssessText(starContainer) {
222
		var starlist = oshowStar.children;
223
		var starNum = starContainer.querySelectorAll('.icon-favorfill').length;//星星数量
224
		
225
		for(var i = 0; i < starNum; i++) { 
226
			starlist[i].classList.remove('icon-favor');
227
			starlist[i].classList.add('icon-favorfill');
228
		}
229
		var all_w = document.body.clientWidth;//屏幕宽
230
		var all_h = document.body.clientHeight;//屏幕高
231
		omiddlePopover.style.height = '200px';
232
		omiddlePopover.style.width = (all_w* 0.8)+'px';
233
		
234
	};
235
	
236
	
237
	
238
	
239
	
240
	
241 206
	
242 207
	/*更改咨询状态,进行中--完成*/
243 208
	function setState(consultId) {
@ -322,16 +287,28 @@ mui.ready(function() {
322 287
				timeout:10000,//超时时间设置为10秒;
323 288
				success:function(data){
324 289
					var myData = data.data;
325
					
326 290
					for(var i = 0; i < myData.length; i++ ){
327 291
						console.log(myData[i]['tidingsContant']);
328 292
						if(myData[i]['professor']['id'] == userid){
293
							/*判断是否有头像*/
294
							/*if(myData[i]['professor']['hasHeadImage'] == 1){
295
								oselfImg.setAttribute('src',baseUrl + "/images/head/" + item["professor"].id + "_m.jpg")
296
							}else {
297
								oselfImg.setAttribute("src","../images/default-photo.jpg");
298
							}*/
299
							
329 300
							record.push({
330 301
								sender: 'self',
331 302
								type: 'text',
332 303
								content: myData[i]["tidingsContant"]
333 304
							});
334 305
						}else{
306
							/*判断是否有头像*/
307
							/*if(myData[i]['professor']['hasHeadImage'] == 1){
308
								othatImg.setAttribute('src',baseUrl + "/images/head/" + item["professor"].id + "_m.jpg")
309
							}else {
310
								othatImg.setAttribute("src","../images/default-photo.jpg");
311
							}*/
335 312
							record.push({
336 313
								sender: 'zs',
337 314
								type: 'text',
@ -369,12 +346,12 @@ mui.ready(function() {
369 346
			}
370 347
		};
371 348
		
372
		var record = [{
349
		/*var record = [{
373 350
			sender: 'zs',
374 351
			type: 'text',
375 352
			content: 'Hi,我是 科袖 小管家!'
376
		}];
377
		
353
		}];*/
354
		var record = [];
378 355
		
379 356
		
380 357
		
@ -442,8 +419,6 @@ mui.ready(function() {
442 419
			toRobot(msg.content);
443 420
		};
444 421
		var toRobot = function(info) {
445
// 						var apiUrl = 'http://www.tuling123.com/openapi/api';
446
//			var apiUrl = baseUrl+'/ajax/tidings/qacon';//根据咨询id查询对话消息
447 422
			var apiUrl = baseUrl+"/ajax/tidings";//保存消息接口
448 423
			
449 424
			mui.ajax(apiUrl,{
@ -474,17 +449,17 @@ mui.ready(function() {
474 449
			}
475 450
			//解决长按“发送”按钮,导致键盘关闭的问题;
476 451
		ui.footerRight.addEventListener('touchstart', function(event) {
477
			if (ui.btnMsgType.classList.contains('mui-icon-paperplane')) {
452
//			if (ui.btnMsgType.classList.contains('mui-icon-paperplane')) {
478 453
				msgTextFocus();
479
				event.preventDefault();
480
			}
454
//				event.preventDefault();
455
//			}
481 456
		});
482 457
		//解决长按“发送”按钮,导致键盘关闭的问题;
483 458
		ui.footerRight.addEventListener('touchmove', function(event) {
484
			if (ui.btnMsgType.classList.contains('mui-icon-paperplane')) {
459
//			if (ui.btnMsgType.classList.contains('mui-icon-paperplane')) {
485 460
				msgTextFocus();
486
				event.preventDefault();
487
			}
461
//				event.preventDefault();
462
//			}
488 463
		});
489 464
		//					ui.footerRight.addEventListener('touchcancel', function(event) {
490 465
		//						if (ui.btnMsgType.classList.contains('mui-icon-paperplane')) {
@ -499,7 +474,7 @@ mui.ready(function() {
499 474
		//						}
500 475
		//					});
501 476
		ui.footerRight.addEventListener('release', function(event) {
502
			if (ui.btnMsgType.classList.contains('mui-icon-paperplane')) {//发送
477
//			if (ui.btnMsgType.classList.contains('mui-icon-paperplane')) {//发送
503 478
				//showKeyboard();
504 479
				ui.boxMsgText.focus();
505 480
				setTimeout(function() {
@ -513,7 +488,7 @@ mui.ready(function() {
513 488
				});
514 489
				ui.boxMsgText.value = '';
515 490
				mui.trigger(ui.boxMsgText, 'input', null); //发送消息向后台传数据
516
			} else if (ui.btnMsgType.classList.contains('mui-icon-mic')) {//说话
491
			/*} else if (ui.btnMsgType.classList.contains('mui-icon-mic')) {//说话功能
517 492
				ui.btnMsgType.classList.add('mui-icon-compose');
518 493
				ui.btnMsgType.classList.remove('mui-icon-mic');
519 494
				ui.boxMsgText.style.display = 'none';
@ -531,9 +506,9 @@ mui.ready(function() {
531 506
				setTimeout(function() {
532 507
					ui.boxMsgText.focus();
533 508
				}, 150);
534
			}
509
			}*/
535 510
		}, false);
536
		ui.footerLeft.addEventListener('tap', function(event) {
511
		/*ui.footerLeft.addEventListener('tap', function(event) {
537 512
			var btnArray = [{
538 513
				title: "拍照"
539 514
			}, {
@ -569,7 +544,7 @@ mui.ready(function() {
569 544
						break;
570 545
				}
571 546
			});
572
		}, false); 
547
		}, false); */
573 548
		var setSoundAlertVisable=function(show){
574 549
			if(show){
575 550
				ui.boxSoundAlert.style.display = 'block';

+ 9 - 14
app/js/consult.js

@ -1,7 +1,7 @@
1 1
2 2
var pageIndex = 1; // 页数
3 3
var allPages = 1; // 总页数
4
var table = document.body.querySelector(".mui-table-view");//咨询列表容器
4
var table = document.body.querySelector("#table");//咨询列表容器
5 5
6 6
var oneedval = document.getElementById("needval");//咨询/需求
7 7
var otypeval = document.getElementById("typeval");//咨询类型
@ -11,7 +11,7 @@ var osortval = document.getElementById("sortval");//时间排序
11 11
12 12
mui.init({
13 13
    pullRefresh: {
14
        container: '#pullrefresh',
14
        container: '#zixunpullrefresh',
15 15
        up: {
16 16
            contentrefresh: '正在加载...',
17 17
           
@ -32,12 +32,12 @@ function pullupRefresh() {
32 32
if(mui.os.plus) {
33 33
	mui.plusReady(function() {
34 34
		setTimeout(function() {
35
			mui('#pullrefresh').pullRefresh().pulldownLoading();
35
			mui('#zixunpullrefresh').pullRefresh().pulldownLoading();
36 36
		}, 500);
37 37
	});
38 38
} else {
39 39
	mui.ready(function() {
40
		mui('#pullrefresh').pullRefresh().pulldownLoading();
40
		mui('#zixunpullrefresh').pullRefresh().pulldownLoading();
41 41
	});
42 42
}
43 43
@ -79,16 +79,15 @@ function getaData() {
79 79
                    eachData(userid,datalist);
80 80
                   
81 81
                    if(pageIndex < allPages){
82
                        mui('#pullrefresh').pullRefresh().endPullupToRefresh(false);    /*能上拉*/
82
                        mui('#zixunpullrefresh').pullRefresh().endPullupToRefresh(false);    /*能上拉*/
83 83
                    }else{
84
                        mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);/*不能上拉*/
84
                        mui('#zixunpullrefresh').pullRefresh().endPullupToRefresh(true);/*不能上拉*/
85 85
                    }
86 86
                }
87 87
            },
88 88
            error: function(xhr, type, errerThrown) {
89 89
                mui.toast('网络异常,请稍候再试');
90
                plus.nativeUI.closeWaiting();  
91
                mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
90
                plus.nativeUI.closeWaiting(); 
92 91
            }
93 92
        });
94 93
    });
@ -119,15 +118,11 @@ function initdata() {
119 118
            timeout: 10000,
120 119
            success: function(data) {
121 120
                if (data.success) {
122
                    console.log("成功");
123
                    /*plus.webview.currentWebview().show("slide-in-right",150);*/
124
					/*plus.nativeUI.closeWaiting();*/
125 121
                    var datalist = data.data.data;
126
                    console.log(datalist.length);
127 122
	                table.innerHTML = '';//清空容器
128 123
                    eachData(userid,datalist);
129
                    mui('#pullrefresh').pullRefresh().refresh(true);//重置下拉加载
130
                    mui('#pullrefresh').scroll().scrollTo(0,0);//滚动到顶部
124
                    mui('#zixunpullrefresh').pullRefresh().refresh(true);//重置下拉加载
125
//                  mui('#pullrefresh').scroll().scrollTo(0,0);//滚动到顶部
131 126
                    
132 127
                    plus.nativeUI.closeWaiting();//关闭等待框
133 128
                }

+ 34 - 12
app/js/consultapply.js

@ -14,6 +14,7 @@
14 14
 	var oproimg = document.getElementById("proimg");//专辑头像
15 15
 	var oconsultcount = document.getElementById("consultcount");//咨询次数
16 16
 	var ostarContainer = document.getElementById("starContainer");//星级容器
17
 	var ofinished = document.getElementById("finished");//点击完成咨询,进入合作历史评价
17 18
 	
18 19
 	var osaveconsultBtn = document.getElementById("saveconsultBtn");//保存咨询,发送按钮
19 20
 	
@ -71,14 +72,19 @@
71 72
 			success:function(data){
72 73
 				var myData = data["data"];
73 74
 				if(myData["name"] == null || myData["name"] == undefined ) {
74
 					
75
 					oproname.innerText = '';
75 76
 				}else {
76 77
 					oproname.innerText = myData["name"];//专家名字
77 78
 				}
78 79
 				if(myData["title"] == null || myData["title"] == undefined ) {
79 80
 					oprotitle.innerHTML = '';
80 81
 				}else {
81
 					oprotitle.innerHTML = myData["title"]+',';//职称
82
 					if(myData["office"]){
83
 						oprotitle.innerHTML = myData["title"]+',';//职称
84
 					}else {
85
 						oprotitle.innerHTML = myData["title"]
86
 					}
87
 					
82 88
 				};
83 89
 				if(myData["office"] == null || myData["office"] == undefined ) {
84 90
 					oprooffice.innerHTML = '';
@ -88,7 +94,11 @@
88 94
 				if(myData["department"] == null || myData["department"] == undefined ) {
89 95
 					oprodepart.innerHTML = '';
90 96
 				}else {
91
 					oprodepart.innerHTML = myData["department"]+',';//所在部门
97
 					if(myData["orgName"]){
98
 						oprodepart.innerHTML = myData["department"]+',';//所在部门
99
 					}else {
100
 						oprodepart.innerHTML = myData["department"];
101
 					}
92 102
 				}
93 103
 				if(myData["orgName"] == null || myData["orgName"] == undefined ) {
94 104
 					oproorgName.innerHTML = '';
@ -117,7 +127,7 @@
117 127
					emele.classList.add('unauthicon');
118 128
				}
119 129
				oproname.appendChild(emele);
120
				console.log(emele.classList);
130
				
121 131
				
122 132
				/*专家头像*/
123 133
				if(myData["hasHeadImage"] == 0) {
@ -152,13 +162,19 @@
152 162
   	    var proId = self.proId;
153 163
   	    var flag = self.flag;
154 164
   	    var consulttitle = self.consulttitle;//咨询主题(从资源页面传过来的)
155
   	    console.log(consulttitle);
165
   	    
156 166
   	    console.log(proId);
157 167
   	    
158 168
   	 	/*专家信息数据*/
159 169
   	    proinfo(proId);
160 170
   	    if(flag == 'ziyuan') {
161 171
   	    	oconsulttitle.value = '关于'+consulttitle+'的咨询';
172
   	    	var lilist = oconsulttype_ul.querySelectorAll('li');
173
   	    	for(var i = 0 ; i < lilist.length; i++){
174
   	    		lilist[i].classList.remove('liactive');
175
   	    		lilist[1].classList.add('liactive');
176
   	    	}
177
   	    	
162 178
   	    }
163 179
   	    
164 180
   	    /*发送保存咨询*/
@ -175,13 +191,21 @@
175 191
				proinfo.show();
176 192
				mui.fire(proinfo,'backproinfo',{proId:proId}); 
177 193
   	   		}
178
			
179
180 194
		});
181 195
		
182
   	    
183
   	    
184
   	    
196
		/*专家的历史和评价*/
197
		ofinished.addEventListener('tap', function() {
198
			mui.openWindow({
199
				url: '../html/coophistory-other.html',
200
				id: 'html/coophistory-other.html',
201
				show: {
202
					autoShow: false,
203
				},
204
				extras: {
205
					professorId: proId
206
				}
207
			});
208
		});
185 209
   	});
186 210
   	
187 211
   	
@ -192,7 +216,5 @@
192 216
			aimlist[i].classList.remove('liactive');
193 217
		}
194 218
		this.classList.add('liactive');
195
		
196 219
	});
197
   	
198 220
})