main.js:

import axios from 'axios'

Vue.prototype.$axios = axios

然后使用:

this.$axios.get("https://www.xymapp.cn/api//xym/about/xxx").then(response => {
                console.log(response) //得到返回结果数据
            }).catch(error => {
                console.log(error.message)
            })

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
  • 2021-04-13
  • 2022-01-31
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-10
  • 2022-12-23
  • 2021-07-30
相关资源
相似解决方案