使用this.$http.get 和 this.$http.post传参

get:
getInfo(){

    this
.$http.get('接口地址',{params:{参数}},{emulateJSON:true}).then(result =>{ console.log(result) }) }
post:

   getInfo(){
    this.$http.post('接口地址',{参数},{emulateJSON:true}).then(result =>{
      console.log(result.body.rows)
    })
   }

 

posted @ 2023-02-01 16:34  ·休伯利安  阅读(755)  评论(0)    收藏  举报