Sfoglia il codice sorgente

1.聊天返回咨询,若改变状态,咨询列表状态随着改变
2.资源信心和专家信息中,关注未登录判断
3.聊天页头像改成大的

wangaidan 8 anni fa
parent
commit
7d53ccf088

+ 5 - 6
app/html/chat-assess.html

@ -20,8 +20,7 @@
20 20
			#textbox #question {
21 21
				padding: 0;
22 22
				border: none;
23
				overflow: hidden;
24
				height: 20px;
23
				height: 40px;
25 24
				border-bottom:1px solid #F0F0F0
26 25
			}
27 26
			
@ -52,12 +51,12 @@
52 51
					<div class="mui-inline">评价留言</div>
53 52
				</div>
54 53
				<div class="row mui-input-row" id="textbox">
55
					<!--<div id='question' class="mui-input-clear question textareabox" contenteditable="true"></div>-->
54
					<!--<div id='question' class="mui-input-clear question textareabox" contenteditable="true" style="-webkit-user-select:text;"></div>-->
56 55
					
57
						<textarea id="question"class="mui-input-clear question textareabox"> </textarea>
56
					<textarea id="question"class="mui-input-clear question textareabox"> </textarea>
57
					
58
					<div class="text_count"><span><span id="text-count">300</span>字</span></div>
58 59
					
59
					<div class="text_count"><span><span id="text-count">0</span>/300字</span></div>
60
					<input type="text" value="0" style="display: none;" id="inp"/>
61 60
				</div>
62 61
				
63 62
			</div>

+ 19 - 2
app/js/chat-assess.js

@ -4,7 +4,7 @@ mui.ready(function(){
4 4
	
5 5
	var oplaceholder =document.getElementById("placeholder");//
6 6
	var otextNum = document.getElementById("text-count");//字数
7
	var oinp = document.getElementById("inp");//用来放评价字数的隐藏于
7
8 8
	
9 9
	var oassesscontent = document.getElementById("question");//评价内容
10 10
	var ostarContainer = document.getElementById("starContainer");//星星容器
@ -40,7 +40,7 @@ mui.ready(function(){
40 40
	};
41 41
	//点击评价区域,placeholder效果,字数限制效果、
42 42
	oassesscontent.addEventListener('keyup',function(){
43
		limitTextCountFn();
43
		checkLen(oassesscontent);
44 44
	});
45 45
	//评价字数限制
46 46
	//字数限制函数
@ -55,6 +55,23 @@ mui.ready(function(){
55 55
			
56 56
		} 
57 57
	};
58
	
59
	/*字数限制*/
60
	function checkLen(obj) {  
61
62
		var maxChars = 300;//最多字符数  
63
		
64
		if (obj.value.length > maxChars) {
65
			
66
			obj.value = obj.value.substring(0,maxChars); 
67
		}
68
		
69
		var curr = maxChars - obj.value.length;  
70
		
71
		document.getElementById("text-count").innerHTML = curr.toString(); 	
72
	};
73
	
74
	
58 75
59 76
	mui.plusReady(function(){
60 77
		var userid = plus.storage.getItem('userid');

+ 1 - 1
app/js/chats.js

@ -295,7 +295,7 @@
295 295
									sender: 'self',
296 296
									type: 'text',
297 297
									content: myData[i]["tidingsContant"],
298
									imgurl:baseUrl + "/images/head/" + myData[i]["professor"].id + "_m.jpg"
298
									imgurl:baseUrl + "/images/head/" + myData[i]["professor"].id + "_l.jpg"
299 299
								});
300 300
								
301 301
							}else {

+ 9 - 5
app/js/consult.js

@ -167,7 +167,7 @@ function initData(){
167 167
			type:'get',
168 168
			timeout:10000,
169 169
			success:function(data){
170
				if (data.success && data.data.data != '') {
170
				if (data.success) {
171 171
                		table.innerHTML = '';//下拉刷新,清空数据
172 172
                		var datalist = data.data.data;
173 173
					eachData(userid,datalist);
@ -492,16 +492,20 @@ function eachData(userid,datalist) {
492 492
	            		+ '<span class="listtit">'+item["professor"]["name"]+'<em id="nameli" class="mui-icon iconfont '+proModify+'">'+modifyaddEle+'</em><span class="thistime">'+lastReplyTime+'</span></span>';
493 493
	        str += '<p class="listtit2">';
494 494
	        if(item["professor"]["title"]){
495
	        	str += '<span>'+item["professor"]["title"]+'</span>, ';
495
	        		str += '<span>'+item["professor"]["title"]+'</span>, ';
496 496
	        };
497 497
	        if(item["professor"]["office"]){
498
	        	str += '<span>'+item["professor"]["office"]+'</span>, ';
498
	        		if(item["professor"]["orgName"]){
499
	        			str += '<span>'+item["professor"]["office"]+'</span>, ';
500
	        		}else {
501
	        			str += '<span>'+item["professor"]["office"]+'</span>';
502
	        		}
499 503
	        };
500 504
	        if(item["professor"]["orgName"]){
501
	        	str += '<span>'+item["professor"]["orgName"]+'</span>';
505
	        		str += '<span>'+item["professor"]["orgName"]+'</span>';
502 506
	        };
503 507
	        if(item["professor"]["address"]){
504
	        	str += '<span>  | '+item["professor"]["address"]+'</span>';
508
	        		str += '<span>  | '+item["professor"]["address"]+'</span>';
505 509
	        };
506 510
	        
507 511
	        str +='</p><p class="listtit3 onlyone">'+lastReplyCon+'</p></div></a>';

+ 4 - 2
app/js/proinfobrow.js

@ -350,7 +350,8 @@ mui.plusReady(function() {
350 350
				}
351 351
			})
352 352
		} else {
353
			plus.nativeUI.toast("请先登录");
353
//			plus.nativeUI.toast("请先登录");
354
			isLogin();
354 355
		}
355 356
356 357
	})
@ -378,7 +379,8 @@ mui.plusReady(function() {
378 379
		if(userid && userid != null && userid != "null") {
379 380
			collectionExpert($this);
380 381
		} else {
381
			plus.nativeUI.toast("请先登录");
382
//			plus.nativeUI.toast("请先登录");
383
			isLogin();
382 384
		}
383 385
	});
384 386

+ 2 - 1
app/js/resinforbrow.js

@ -260,7 +260,8 @@ mui.plusReady(function() {
260 260
		if(userid && userid != null && userid != "null") {
261 261
			collectionExpert($this);
262 262
		} else {
263
			plus.nativeUI.toast("请先登录");
263
//			plus.nativeUI.toast("请先登录");
264
			isLogin();
264 265
		}
265 266
	});
266 267