vue axios用法

可以用在前端后端(vue,Node.js)

用法:

- npm install axios

安装完成后,需要在使用的文件中导入

import asiox from 'asiox'

const http = {

  get(url) {

   return axios({

      url,

      method: 'GET'

    })

  }

}

export default http // 暴露接口

然后在需要的地方导入即可

猜你喜欢

转载自www.cnblogs.com/sunyang-001/p/11105876.html