mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 11:26:43 +08:00
我的收藏取消收藏
This commit is contained in:
@@ -668,45 +668,14 @@ export default {
|
||||
});
|
||||
},
|
||||
confirm(item) {
|
||||
// let type;
|
||||
// let id;
|
||||
// console.log(item,"数据佛海")
|
||||
// switch (this.tabName) {
|
||||
// case 'course': {
|
||||
// type = 1;
|
||||
// id = item.objId;
|
||||
// break;
|
||||
// }
|
||||
// case 'qa': {
|
||||
// type = 4;
|
||||
// id = item.question.id;
|
||||
// break;
|
||||
// }
|
||||
// case 'case': {
|
||||
// type = 3;
|
||||
// id = item.cases.id;
|
||||
// break;
|
||||
// }
|
||||
// case 'article': {
|
||||
// type = 2;
|
||||
// id = item.articleId;
|
||||
// break;
|
||||
// }
|
||||
// case 'all': {
|
||||
// type = item.objType;
|
||||
// if(type==1){
|
||||
// id = item.objId;
|
||||
// }
|
||||
// if(type==2){
|
||||
// id = item.articleId;
|
||||
// }
|
||||
// if(type==4){
|
||||
// id = item.question.id;
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
apiFavorite.del(item.id).then(res => {
|
||||
let id = '';
|
||||
if(item.type){
|
||||
id = item.favoriteId;
|
||||
} else {
|
||||
id = item.id;
|
||||
}
|
||||
|
||||
apiFavorite.del(id).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.$message.success('取消收藏成功');
|
||||
if (this.tabName == 'qa') {
|
||||
|
||||
Reference in New Issue
Block a user