vue——vue-resource

get请求

getSearch () {
      return this.$http.get('https://xxx.xxx.com/xxx.json', {params: {name: this.searchString}})
        .then(response => {
          this.carList = response.data.data
          console.log(this.carList)
        }).catch(response => {
          this.error = 'CarList查询失败'
          console.log(this.error)
        })
    }

 

posted @ 2018-03-28 17:00  嘆世殘者——華帥  阅读(123)  评论(0)    收藏  举报