methods: {
search: function () {
this.searching = true;
getData().then(function (res) => {
this.docs = res;
this.searching = false;
});
}
},
url: 'https://lk.webvm.ru/billmgr?authinfo=' + login + ':' + password + '&out=xml&func=user',
$authheaders = array("Authorization: Bearer ACCESS_TOKEN");
$file = fopen('test.pdf', 'wb');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'https://www.googleapis.com/drive/v3/files/FILE_ID?alt=media');
curl_setopt($ch, CURLOPT_FAILONERROR, true);
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_FILE, $file);
curl_setopt($ch, CURLOPT_HTTPHEADER, $authheaders);
curl_exec($ch);
curl_close($ch);
fclose($file);
$new_arr = [];
$limit = 6;
$count = (int) floor(count($array) / $limit);
for($i = 0; $i<$count; $i++) {
$new_arr[] = [
'weather_c' => $array[($limit * $i) + 1],
'population' => $array[($limit * $i) + 3],
'city_name' => $array[($limit * $i) + 5]
];
}
$obj = (object) $new_arr;
var SliderPoint = document.getElementsByClassName('slider-point');
var maxHeightSlider = Math.max.apply(null, sliderPoint.map(function (el) { return el.offsetHeight }));
for(var i = 0; i<SliderPoint.length; i++){
SliderPoint[i].style.height = maxHeightSlider + 'px';
}
<script>
function images_click_handler(e) {
hs.expand(e.target);
}
var images = document.querySelectorAll('.div_example');
images.forEach(function (image) {
image.addEventListener('click', images_click_handler, false);
});
</script>
withCallback()
превращает обычное json ответ в jsonp. Про jsonp можно подробно читать здесь.