Authored by xwx

杭州-视图中心-资产视图收藏资源优化

@@ -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 -  
98 - proxy.$http.post(`/api-web/favorites/save/res?favId=${favIds.value}&resIds=${props.resId}`, {}, function (res) {  
99 - if (res && res.code ==0) {  
100 - let msg = !res.msg ? '收藏成功!' : res.msg;  
101 - let type = !res.success ? 'warning' : 'success';  
102 - proxy.$global.showMsg(msg,type);  
103 - showDialog(false);  
104 - }  
105 - }); 97 + if (favIds.value != '' && favIds.value != null) {
  98 +
  99 + proxy.$http.post(`/api-web/favorites/save/res?favId=${favIds.value}&resIds=${props.resId}`, {}, function (res) {
  100 + if (res && res.code == 0) {
  101 + let msg = !res.msg ? '收藏成功!' : res.msg;
  102 + let type = !res.success ? 'warning' : 'success';
  103 + proxy.$global.showMsg(msg, type);
  104 + showDialog(false);
  105 + }
  106 + });
  107 + }else {
  108 + proxy.$global.showMsg('请选择收藏夹', 'warning');
  109 + }
106 } 110 }
107 111
108 112