Откуда в скрипте берутся данные для вывода?

$.ajax({

				type:"GET",
				url:"https://sce.playa.ru/sce-web/api/clinic/street",
				data: "id=e8fc8399-f18d-4c86-940d-f4036647f600&street="+$('#doc_street').val(),
				// crossDomain: true,
    // 			dataType: 'jsonp',
				success: function($msg){
					console.log(1);
					if($msg!=''){
						$('#list_street').show();
						$val='';
						$arr = $msg.data;
						for($i=0;$i<$arr.length;$i++){
							$val=$val+'<div class="street_check_id">'+$arr[$i].name+'</div>';
							$('#doctor_result').html('');
							$('#list_street').html($val);
						}
					}else{
						$('#doctor_result').html('');
						$('#list_street').hide();
					}
				}
			});
		}else{
			$('#doctor_result').html('');
			$('#list_street').hide();
		}
	});
	
	$('#doc_house').keyup(function(){
		$('#search_line').val(0);
		$('#list_house').html('');
		$.ajax({
			type:"GET",
			url:"https://sce.playa.ru/sce-web/api/clinic/address",
			data:"id=e8fc8399-f18d-4c86-940d-f4036647f600&street="+$('#search_street_id').val(),
			// crossDomain: true,
   //  			dataType: 'jsonp',
			success: function($msg){
				if($msg!=''){
					if($('#doc_house').val()!=''){
						$('#list_house').show();								
						$val='';	
						var $arr = [];
						for($i=0;$i<$msg.data.length;$i++){	
							$arr[$i]=$msg.data[$i].house;
						}	
						var dh = $('#doc_house').val();
						$filterArr = $arr.filter(function(hid) {
							if(hid.indexOf(dh) != '-1'){
								return true
							}else{
								return false
							}
						});	
						console.log($filterArr);
						for($i=0;$i<$filterArr.length;$i++){	
							$val=$val+'<div class="house_check_id">'+$filterArr[$i]+'</div>';
							$('#doctor_result').html('');
							$('#list_house').html($val);
						}
					}else{
						$('#list_house').show();								
						$val='';
						$arr = $msg.data;
						for($i=0;$i<$arr.length;$i++){						
							$val=$val+'<div class="house_check_id">'+$arr[$i].house+'</div>';
							$('#doctor_result').html('');
							$('#list_house').html($val);
						}								
					}
				}else{
					$('#doctor_result').html('');
					$('#list_house').hide();
				}
			}
		});
	});
	
	$('.street_check_id').live('click',function(){
		$thisName=$(this).text();
		$('#search_street_id').val($thisName);
		$('#doc_street').val($thisName);
		$('#list_street').html('');
		$('#list_street').hide();
	});
	
	$('.house_check_id').live('click',function(){
		$thisName=$(this).text();
		$('#search_line').val($thisName);
		$('#doc_house').val($thisName);
		$('#list_house').html('');
		$('#list_house').hide();
		$('#doctor_result').html('');
		$.ajax({
			type:"GET",
			url:"https://sce.playa.ru/sce-web/api/clinic/doctor",
			data:"id=e8fc8399-f18d-4c86-940d-f4036647f600&street="+$('#search_street_id').val()+"&house="+$('#search_line').val(),
			// crossDomain: true,
   //  			dataType: 'jsonp',
			success: function($msg){
				$doc_name=$msg.name;
				$('#doctor_result').html($doc_name);
			}
		});
	});

Не могу понять, из какого файла здесь берутся данные для вывода в форму?
  • Вопрос задан
  • 37 просмотров
Пригласить эксперта
Ответы на вопрос 1
dimonchik2013
@dimonchik2013
non progredi est regredi
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы