作者 王晓刚
1 个管道 的构建 通过 耗费 4 秒

商户申请

@@ -134,8 +134,6 @@ @@ -134,8 +134,6 @@
134 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script> 134 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
135 <script> 135 <script>
136 $(function(){ 136 $(function(){
137 - var html1 = '';  
138 - var html2 = '';  
139 var host = "http://"+window.location.host; 137 var host = "http://"+window.location.host;
140 wx.config( 138 wx.config(
141 {$jssdk} 139 {$jssdk}
@@ -150,8 +148,6 @@ @@ -150,8 +148,6 @@
150 $(res.localIds).each(function (key, localId) { 148 $(res.localIds).each(function (key, localId) {
151 uploadImages(localId,1); 149 uploadImages(localId,1);
152 }); 150 });
153 - console.log(html1);  
154 - $('#dom1').prepend(html1);  
155 } 151 }
156 }); 152 });
157 }); 153 });
@@ -164,7 +160,6 @@ @@ -164,7 +160,6 @@
164 $(res.localIds).each(function (key, localId) { 160 $(res.localIds).each(function (key, localId) {
165 uploadImages(localId,2); 161 uploadImages(localId,2);
166 }); 162 });
167 - $('#dom2').prepend(html2);  
168 } 163 }
169 }); 164 });
170 }); 165 });
@@ -182,21 +177,23 @@ @@ -182,21 +177,23 @@
182 console.log(res); 177 console.log(res);
183 if(res.code == 1){ 178 if(res.code == 1){
184 if(type == 1){ 179 if(type == 1){
185 - html1 += "<div class=\"images\">\n" + 180 + var html = "<div class=\"images\">\n" +
186 " <img src=\""+res.data+"\" class=\"images_one\"/>\n" + 181 " <img src=\""+res.data+"\" class=\"images_one\"/>\n" +
187 " <input type=\"hidden\" class=\"business_images\" value=\""+res.data+"\"/>\n" + 182 " <input type=\"hidden\" class=\"business_images\" value=\""+res.data+"\"/>\n" +
188 " <div class=\"close_img\">\n" + 183 " <div class=\"close_img\">\n" +
189 " <img src=\"__CDN__/assets/advertising/img/close.png\"/>\n" + 184 " <img src=\"__CDN__/assets/advertising/img/close.png\"/>\n" +
190 " </div>\n" + 185 " </div>\n" +
191 " </div>"; 186 " </div>";
  187 + $('#dom1').prepend(html);
192 }else if(type == 2){ 188 }else if(type == 2){
193 - html2 += "<div class=\"images\">\n" + 189 + var html = "<div class=\"images\">\n" +
194 " <img src=\""+res.data+"\" class=\"images_two\"/>\n" + 190 " <img src=\""+res.data+"\" class=\"images_two\"/>\n" +
195 " <input type=\"hidden\" class=\"other_images\" value=\""+res.data+"\"/>\n" + 191 " <input type=\"hidden\" class=\"other_images\" value=\""+res.data+"\"/>\n" +
196 " <div class=\"close_img\">\n" + 192 " <div class=\"close_img\">\n" +
197 " <img src=\"__CDN__/assets/advertising/img/close.png\"/>\n" + 193 " <img src=\"__CDN__/assets/advertising/img/close.png\"/>\n" +
198 " </div>\n" + 194 " </div>\n" +
199 " </div>"; 195 " </div>";
  196 + $('#dom2').prepend(html);
200 } 197 }
201 } 198 }
202 }, 199 },