vue使用axios调用api接口

1.使用axios插件

cnpm intsll axios

2.引入插件

import axios from 'axios'

3.使用插件

  mounted: function () {
    axios.get('http://www.yjtj.com/phalapi/public/?service=App.Examples_CURD.GetList&typeid=11')
      .then(response => (this.info = response))
  }

猜你喜欢

转载自blog.csdn.net/hfdbjyfv/article/details/84988031