Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. Vue.component('cn-search',{
  2. template: "#cn-search",
  3. data: function(){
  4. return {
  5. cadastrNumber: '',
  6. searchResult: {}
  7. }
  8. },
  9. methods: {
  10. getObjectsByCN: function() {
  11. let _this = this;
  12. axios.get('/api.php?action=get_object_by_cn', {
  13. params: {
  14. id: this.cadastrNumber
  15. }
  16. })
  17. .then(function (response) {
  18. _this.searchResult = response.data;
  19. console.log(response);
  20. })
  21. .catch(function (error) {
  22. console.log(error);
  23. });
  24. }
  25. }
  26. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement