作者 董瑞恩
1 个管道 的构建 通过 耗费 0 秒

cost

@@ -121,11 +121,14 @@ @@ -121,11 +121,14 @@
121 yes: function (index, layero) { 121 yes: function (index, layero) {
122 //do something 122 //do something
123 var iframeWin = window[layero.find('iframe')[0]['name']]; 123 var iframeWin = window[layero.find('iframe')[0]['name']];
124 - console.log(iframeWin); 124 + var selectedCategories = iframeWin.confirm();
  125 + console.log(selectedCategories);
  126 + if (selectedCategories.selectedCategoriesId.length == 0) {
125 127
126 -  
127 -  
128 - //console.log(layer.getFrameIndex(index)); 128 + }
  129 + $('#js-categories-id-input').val(selectedCategories.selectedCategoriesId.join(','));
  130 + $('#js-categories-name-input').val(selectedCategories.selectedCategoriesName.join(' '));
  131 + console.log(layer.getFrameIndex(index));
129 layer.close(index); //如果设定了yes回调,需进行手工关闭 132 layer.close(index); //如果设定了yes回调,需进行手工关闭
130 } 133 }
131 }); 134 });