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) {
|
confirm(item) {
|
||||||
// let type;
|
let id = '';
|
||||||
// let id;
|
if(item.type){
|
||||||
// console.log(item,"数据佛海")
|
id = item.favoriteId;
|
||||||
// switch (this.tabName) {
|
} else {
|
||||||
// case 'course': {
|
id = item.id;
|
||||||
// type = 1;
|
}
|
||||||
// id = item.objId;
|
|
||||||
// break;
|
apiFavorite.del(id).then(res => {
|
||||||
// }
|
|
||||||
// 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 => {
|
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
this.$message.success('取消收藏成功');
|
this.$message.success('取消收藏成功');
|
||||||
if (this.tabName == 'qa') {
|
if (this.tabName == 'qa') {
|
||||||
|
|||||||
Reference in New Issue
Block a user