标签:gets prot response install lin 生产环境 axios UNC .com
1、npm install axios 后 在main.js中import
import Axios from ‘axios‘
Vue.prototype.$http = Axios
2、请求配置
this.$http.get(
{
‘url‘:‘http://sss.com/getSysTime.do‘,
‘crossDomain‘: true, //跨域的配置项
‘params‘: {
firstName: ‘Fred‘,
lastName: ‘Flintstone‘
}
}
).then(function(response) {
console.log(response)
});
大哥,能用的话记得点推荐!
标签:gets prot response install lin 生产环境 axios UNC .com
原文地址:https://www.cnblogs.com/1rookie/p/10792525.html