联调接口

const url = this.APIurl.API.api;
const token = this.GLOBAL.token;

this.$http({
type: "GET",
url,
headers: {'token': token}
}).then(response => {
console.log(response.body)
if (!response.body.error) {
this.$message({
message: '成功!',
type: 'success'
});
}
else {
this.$message.error('错误!');
}
},
response => {
alert('请求失败');
});

原文地址:https://www.cnblogs.com/lsyy2017/p/14293363.html