接口请求–post带参数
handleFetch(row) {
let url = '', params = {};
if(row.collectStatus === 0) {
url = '/file/collect';
params ={
fiscal: this.query.fiscal,
detailId: row.id,
}
}else {
url = '/file/cancelCollect';
params ={
id: row.id,
}
};
this.$loading();
fetch.post(url,params).then(({data,msg}) => {
this.$loadingClose();
this.$message({
type: 'success',
message: msg
});
}).catch(({msg}) => {
this.$message({type: 'error',message: msg})
})```
}