Я использую vue js в своем приложении для просмотра веб-страниц только для фильтрации поиска пользователей. Все работает очень хорошо, пока я не запускаю свое приложение на Samsung SM-G530H
, я получаю сообщение об ошибке Uncaught SyntaxError: Unexpected token (
, я проверил все правильно, и оно работает на другом устройстве, кроме старого устройства. Пожалуйста, как сделать его совместимым на всех устройствах?
new Vue({
el: '#SearchVueContenPage',
data() {
return {
q: '',
total_result: 0,
searchProduct: null,
loading: false,
sort_filter: ``,
URL: ajax_appserver("public", "_api/searchProduct.php")
}
},
computed: {
search() {
if (!this.searchProduct) {
return []
}
if (!this.q) {
this.total_result = 0;
return this.searchProduct.recent.slice(0,4);
}
var query = this.q.toLowerCase();
var searchResult = this.searchProduct.result.filter(row => row.product_name.toLowerCase().includes(query) || row.business_name.toLowerCase().includes(query));
this.total_result = searchResult.length;
return searchResult;
}
},
mounted() {
this.loading = true;
this.fetchData().then(() => {
this.loading = false
});
},
methods: {
sortStatus: function(status) {
this.sort_filter = status;
},
async fetchData() {
ajax_fetch(this.URL).then(json => {
this.searchProduct = json;
Vue.nextTick(function(){
//Store object in IndexDb
}.bind(this));
});
}
}
});