Browse Source

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

wangaidan 8 years ago
parent
commit
4622f90650
3 changed files with 26 additions and 35 deletions
  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
		<link href="../css/app.css" rel="stylesheet" />
10
		<link href="../css/app.css" rel="stylesheet" />
11
		<style type="text/css">
11
		<style type="text/css">
12
			#consultcon {
12
			#consultcon {
13
				min-height: 20px !important;
13
				min-height: 40px !important;
14
				font-size: 14px;
14
				font-size: 14px;
15
				padding: 0;
15
				padding: 0;
16
				line-height: 11px;
16
				line-height: 1.5;
17
				margin-top: 4px;
17
				margin-top: 4px;
18
				border-bottom: 1px solid #F0F0F0;
18
				border-bottom: 1px solid #F0F0F0;
19
			}
19
			}
107
								</div>-->
107
								</div>-->
108
								<!--<div class="row mui-input-row text">-->
108
								<!--<div class="row mui-input-row text">-->
109
									<textarea id='consultcon' class="mui-input-clear question content" style=""></textarea>
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
								<!--</div>-->
111
								<!--</div>-->
112
							</li>
112
							</li>
113
						</ul>
113
						</ul>

+ 1 - 1
app/js/consult.js

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
			if(item["consultType"]) {
463
			if(item["consultType"]) {

+ 22 - 31
app/js/consultapply.js

103
	 					oconsultcount.innerHTML =  myData["consultCount"];//咨询次数
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
					if(myData.authType) {
107
					if(myData.authType) {
121
						nameli.classList.add('icon-vip');
108
						nameli.classList.add('icon-vip');
122
						nameli.classList.add('authicon-cu');
109
						nameli.classList.add('authicon-cu');
138
						}
125
						}
139
					}
126
					}
140
					
127
					
141
					
142
					
143
					
144
					
145
					
146
					
147
					
148
					
149
					/*专家头像*/
128
					/*专家头像*/
150
					if(myData["hasHeadImage"] == 0) {
129
					if(myData["hasHeadImage"] == 0) {
151
						oproimg.setAttribute('src','../images/default-photo.jpg');
130
						oproimg.setAttribute('src','../images/default-photo.jpg');
152
					}else {
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
	 				plus.nativeUI.closeWaiting();
143
	 				plus.nativeUI.closeWaiting();
165
					plus.webview.currentWebview().show("slide-in-right",150);
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
 	}
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
   	mui.plusReady(function () {
178
   	mui.plusReady(function () {
188
   		var userid = plus.storage.getItem('userid');
179
   		var userid = plus.storage.getItem('userid');