联调接口

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('请求失败');
});

posted @ 2021-01-18 16:23  在学习编程的lsy呀  阅读(77)  评论(0编辑  收藏  举报