/**axios封装* 请求拦截、相应拦截、错误统一处理*/importaxiosfrom'axios';import{Message}from"element-ui";// import QS from 'qs';//qs.stringify()是将对象 序列化成URL的形式,以&进行拼接// let protocol = window.location.protocol; //协议// let host = window.location.host; //主机// axios....
1. npm install @nuxtjs/axios --安装axios依赖包 2. nuxt.config.js文件中配置信息 modules: [ // Doc: https://github.com/nuxt-community/axios-module#usage '@nuxtjs/axios' ], axios: { proxy: true, prefix: 'https://api.hhsqu.com/api/', credentials: true // See https://github.com/...
1. npm install @nuxtjs/axios --安装axios依赖包 2. nuxt.config.js文件中配置信息 modules: [ // Doc: https://github.com/nuxt-community/axios-module#usage '@nuxtjs/axios' ], axios: { proxy: true, prefix: 'https://api.hhsqu.com/api/', credentials: true // See https://github.com/...