Sfoglia il codice sorgente

1.咨询列表和申请专家头像改正
2.咨询申请内容样式修改

wangaidan 8 anni fa
parent
commit
4622f90650
3 ha cambiato i file con 26 aggiunte e 35 eliminazioni
  1. 3 3
      app/html/consultapply.html
  2. 1 1
      app/js/consult.js
  3. 22 31
      app/js/consultapply.js

+ 3 - 3
app/html/consultapply.html

@ -10,10 +10,10 @@
10 10
		<link href="../css/app.css" rel="stylesheet" />
11 11
		<style type="text/css">
12 12
			#consultcon {
13
				min-height: 20px !important;
13
				min-height: 40px !important;
14 14
				font-size: 14px;
15 15
				padding: 0;
16
				line-height: 11px;
16
				line-height: 1.5;
17 17
				margin-top: 4px;
18 18
				border-bottom: 1px solid #F0F0F0;
19 19
			}
@ -107,7 +107,7 @@
107 107
								</div>-->
108 108
								<!--<div class="row mui-input-row text">-->
109 109
									<textarea id='consultcon' class="mui-input-clear question content" style=""></textarea>
110
									<!--<div id="count">300</div>-->
110
									<div id="count">300</div>
111 111
								<!--</div>-->
112 112
							</li>
113 113
						</ul>

+ 1 - 1
app/js/consult.js

@ -457,7 +457,7 @@ function eachData(userid,datalist) {
457 457
				}
458 458
			}
459 459
			
460
			(item["professor"]["hasHeadImage"] == 0) ? photoUrl = "../images/default-photo.jpg":photoUrl = baseUrl + "/images/head/" + item["professor"].id + "_m.jpg";
460
			(item["professor"]["hasHeadImage"] == 0) ? photoUrl = "../images/default-photo.jpg":photoUrl = baseUrl + "/images/head/" + item["professor"].id + "_l.jpg";
461 461
			
462 462
			//咨询类型,只取两个字
463 463
			if(item["consultType"]) {

+ 22 - 31
app/js/consultapply.js

@ -103,20 +103,7 @@
103 103
	 					oconsultcount.innerHTML =  myData["consultCount"];//咨询次数
104 104
	 				};
105 105
	 				
106
107
	 				
108 106
	 				/*是否认证*/
109
	 				/*
110
	 				var emele = document.createElement("em");
111
	 				emele.setAttribute('class','mui-icon iconfont icon-vip');
112
	 				if(myData["authentication"] == true){
113
						emele.classList.add('authicon');
114
						
115
					}else if(myData["authentication"] == false){
116
						emele.classList.add('unauthicon');
117
					}
118
					oproname.appendChild(emele);*/
119
					
120 107
					if(myData.authType) {
121 108
						nameli.classList.add('icon-vip');
122 109
						nameli.classList.add('authicon-cu');
@ -138,19 +125,11 @@
138 125
						}
139 126
					}
140 127
					
141
					
142
					
143
					
144
					
145
					
146
					
147
					
148
					
149 128
					/*专家头像*/
150 129
					if(myData["hasHeadImage"] == 0) {
151 130
						oproimg.setAttribute('src','../images/default-photo.jpg');
152 131
					}else {
153
						oproimg.setAttribute('src',baseUrl+'/images/head/'+myData['id']+'_m.jpg');
132
						oproimg.setAttribute('src',baseUrl+'/images/head/'+myData['id']+'_l.jpg');
154 133
					}
155 134
	 				
156 135
	 				/*星级*/
@ -164,15 +143,6 @@
164 143
	 				plus.nativeUI.closeWaiting();
165 144
					plus.webview.currentWebview().show("slide-in-right",150);
166 145
 					
167
 					
168
 					
169
 					
170
 					
171
 					
172
 					
173
 					
174
 					
175
 					
176 146
 				}
177 147
 				
178 148
 			},
@ -183,6 +153,27 @@
183 153
 	}
184 154
 	
185 155
 	
156
 	/*咨询申请字数限制*/
157
	function checkLen(obj) {  
158
159
		var maxChars = 300;//最多字符数  
160
		
161
		if (obj.value.length > maxChars) {
162
			
163
			obj.value = obj.value.substring(0,maxChars); 
164
		}
165
		
166
		var curr = maxChars - obj.value.length;  
167
		
168
		document.getElementById("count").innerHTML = curr.toString(); 	
169
	};
170
 	
171
 	oconsultcon.addEventListener('keyup',function(){
172
		
173
		checkLen(oconsultcon);
174
	});
175
 	
176
 	
186 177
 	
187 178
   	mui.plusReady(function () {
188 179
   		var userid = plus.storage.getItem('userid');