ourJs = function (params) {
var params = params;
};
Vue.component('feedback-common', {
data: function data() {
return {
name: '',
firstName: '',
phone: '',
text: '',
email: '',
service: 'feedback',
BX.ready(function() {
node = BX('search_box-result'); //сюда будем вставлять полученный html
BX.bindDelegate(document.body, 'keyup', {
className: 'search_new'
}, function () {
var inputName = document.querySelector("[name='search']");
search = inputName.value;
BX.ajax({
url: "/new-search/ajax.php",
data: {'search':search},
method: 'POST',
timeout: 30,
async: true,
processData: true,
scriptsRunFirst: true,
emulateOnload: true,
start: true,
cache: false,
onsuccess: function(data){
node.innerHTML = data;
},
onfailure: function(){
}
});
});
});