Advertisement
Guest User

Untitled

a guest
Nov 14th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. getStreet(city_id){
  2.           let token = localStorage.getItem('user-token')
  3.           fetch('/api/v1/street', {
  4.             headers: {'Accept': 'application/json', 'Content-Type': 'application/json'},
  5.             method: 'POST',
  6.             body: JSON.stringify({token: token, data: {
  7.               // city_id: this.cities.city_id
  8.               city_id: this.city_id
  9.             }})
  10.           })
  11.           .then(result => {
  12.             return result.json()
  13.           }).then(data=>{
  14.             this.streets =  data.result.list
  15.             console.log(data.result.list)
  16.           })
  17.           .catch((error) => {
  18.             console.log(error)
  19.           })
  20.           console.log(this.newBuilding.city_id)
  21.         },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement