Showing
1 changed file
with
6 additions
and
2 deletions
@@ -94,15 +94,19 @@ export default { | @@ -94,15 +94,19 @@ export default { | ||
94 | proxy.$global.showMsg("资源编号不存在,请确认!", "warning") | 94 | proxy.$global.showMsg("资源编号不存在,请确认!", "warning") |
95 | return; | 95 | return; |
96 | } | 96 | } |
97 | + if (favIds.value != '' && favIds.value != null) { | ||
97 | 98 | ||
98 | proxy.$http.post(`/api-web/favorites/save/res?favId=${favIds.value}&resIds=${props.resId}`, {}, function (res) { | 99 | proxy.$http.post(`/api-web/favorites/save/res?favId=${favIds.value}&resIds=${props.resId}`, {}, function (res) { |
99 | - if (res && res.code ==0) { | 100 | + if (res && res.code == 0) { |
100 | let msg = !res.msg ? '收藏成功!' : res.msg; | 101 | let msg = !res.msg ? '收藏成功!' : res.msg; |
101 | let type = !res.success ? 'warning' : 'success'; | 102 | let type = !res.success ? 'warning' : 'success'; |
102 | - proxy.$global.showMsg(msg,type); | 103 | + proxy.$global.showMsg(msg, type); |
103 | showDialog(false); | 104 | showDialog(false); |
104 | } | 105 | } |
105 | }); | 106 | }); |
107 | + }else { | ||
108 | + proxy.$global.showMsg('请选择收藏夹', 'warning'); | ||
109 | + } | ||
106 | } | 110 | } |
107 | 111 | ||
108 | 112 |
-
Please register or login to post a comment