vue post传参请求接口(qs) 判断跳转
<script src="../../../../../../r/cms/www/xasrcwFront/js/qs.js"></script>
//收藏
collectionBtn() {
console.log("收藏职位" + this.getid);
let data = qs.stringify({
jobId: this.getid
})
request_POST("/fontonline/resume/deliver", data).then((res) => {
console.log(res);
if (res.data.code == 200) {
this.$message({
message: '收藏成功',
type: 'success'
});
} else if (res.data.code == 501) {
this.$message({
message: '用户没有登录,请先登录',
type: 'error'
});
setTimeout(() => {
window.open(this.apiHost + 'firmlogin/firmlogin', '_parent');
}, 1500)
} else {
this.$message({
message: '收藏失败',
type: 'warning'
});
}
})
},