Browse Source

咨询空数据Bug修复

dell 8 years ago
parent
commit
8ffc96acdf
1 changed files with 8 additions and 2 deletions
  1. 8 2
      src/main/webapp/js/consult.js

+ 8 - 2
src/main/webapp/js/consult.js

37
			text = "";
37
			text = "";
38
			state = "";
38
			state = "";
39
		}
39
		}
40
		//数据为空时
41
		if(data[i]["professor"] == undefined || data[i]["professor"] == null){
42
			return ;
43
		}
40
		
44
		
41
		if(data[i]["professor"]["title"] == undefined){
45
		if(data[i]["professor"]["title"] == undefined){
42
			data[i]["professor"]["title"] = '';
46
			data[i]["professor"]["title"] = '';
278
		dataType: "json",
282
		dataType: "json",
279
		contentType: "application/x-www-form-urlencoded",
283
		contentType: "application/x-www-form-urlencoded",
280
		success:function(response){
284
		success:function(response){
285
			//数据为空时
281
			if(response["data"]["data"] == null || response["data"]["data"] == undefined || response["data"]["data"] == ""){
286
			if(response["data"]["data"] == null || response["data"]["data"] == undefined || response["data"]["data"] == ""){
282
				return false;
287
				return ;
283
			}
288
			}
284
			else{
289
			else{
285
				//拿到收到回复数据
290
				//拿到收到回复数据
336
		dataType: "json",
341
		dataType: "json",
337
		contentType: "application/x-www-form-urlencoded",
342
		contentType: "application/x-www-form-urlencoded",
338
		success:function(response){
343
		success:function(response){
344
			//数据为空时
339
			if(response["data"]["data"] == null || response["data"]["data"] == undefined || response["data"]["data"] == ""){
345
			if(response["data"]["data"] == null || response["data"]["data"] == undefined || response["data"]["data"] == ""){
340
				return false;
346
				return ;
341
			}
347
			}
342
			else{
348
			else{
343
				var consultStr;
349
				var consultStr;