Showing
4 changed files
with
12 additions
and
39 deletions
@@ -127,21 +127,7 @@ edit.prototype = { | @@ -127,21 +127,7 @@ edit.prototype = { | ||
127 | } | 127 | } |
128 | 128 | ||
129 | /*初始化文件上传*/ | 129 | /*初始化文件上传*/ |
130 | -<<<<<<< HEAD | ||
131 | - if ($('input[type="file"]', that.el).length > 0) { | ||
132 | - $('input[type="file"]', that.el).each(function() { | ||
133 | - var src = $(this).attr("value"); | ||
134 | - var _id = $(this).attr("id") || $(this).attr("name"); | ||
135 | - var Temp = '<ul class="upload-image-list" id="img-' + _id + '">'; | ||
136 | - Temp += '<li class="fileinput-button">'; | ||
137 | - Temp += '<a class="fileinput-button-icon" href="javascript:void(0);">'; | ||
138 | - if (src) { | ||
139 | - var ext = src.split('.').pop().toLowerCase(); | ||
140 | - if (ext == "mp4") { | ||
141 | - Temp += '<video width="76" height="80" src="' + src + '"></video>'; | ||
142 | - } else { | ||
143 | - Temp += '<img width="76" height="80" src="' + src + '">'; | ||
144 | -======= | 130 | + |
145 | if($('input[type="file"]',that.el).length>0){ | 131 | if($('input[type="file"]',that.el).length>0){ |
146 | $('input[type="file"]',that.el).each(function(){ | 132 | $('input[type="file"]',that.el).each(function(){ |
147 | var src=$(this).attr("value"); | 133 | var src=$(this).attr("value"); |
@@ -158,11 +144,7 @@ edit.prototype = { | @@ -158,11 +144,7 @@ edit.prototype = { | ||
158 | } | 144 | } |
159 | }else{ | 145 | }else{ |
160 | Temp+='+'; | 146 | Temp+='+'; |
161 | ->>>>>>> master | ||
162 | } | 147 | } |
163 | - } else { | ||
164 | - Temp += '+'; | ||
165 | - } | ||
166 | Temp += '</a>'; | 148 | Temp += '</a>'; |
167 | Temp += '</li>'; | 149 | Temp += '</li>'; |
168 | Temp += '</ul>'; | 150 | Temp += '</ul>'; |
@@ -180,7 +162,6 @@ edit.prototype = { | @@ -180,7 +162,6 @@ edit.prototype = { | ||
180 | // $(this).attr("value",response.data); | 162 | // $(this).attr("value",response.data); |
181 | // } | 163 | // } |
182 | // }); | 164 | // }); |
183 | -<<<<<<< HEAD | ||
184 | $('input[type="file"]', that.el).ajaxfileupload({ | 165 | $('input[type="file"]', that.el).ajaxfileupload({ |
185 | 'action': '/ajax/upload', | 166 | 'action': '/ajax/upload', |
186 | 'params': { | 167 | 'params': { |
@@ -188,14 +169,6 @@ edit.prototype = { | @@ -188,14 +169,6 @@ edit.prototype = { | ||
188 | "bucket": that.option.bucket || 'smart', | 169 | "bucket": that.option.bucket || 'smart', |
189 | __type: "upload" | 170 | __type: "upload" |
190 | }, | 171 | }, |
191 | -======= | ||
192 | - if(!that.option.bucket){ | ||
193 | - alert("bucket不存在"); | ||
194 | - } | ||
195 | - $('input[type="file"]',that.el).ajaxfileupload({ | ||
196 | - 'action': '/ajax/upload', | ||
197 | - 'params':{"userId":543883,"bucket":that.option.bucket,__type:"upload"}, | ||
198 | ->>>>>>> master | ||
199 | 'onComplete': function(response) { | 172 | 'onComplete': function(response) { |
200 | if (response.status && response.code == 200) { | 173 | if (response.status && response.code == 200) { |
201 | var _w = $(this).next().find('.fileinput-button-icon'); | 174 | var _w = $(this).next().find('.fileinput-button-icon'); |
@@ -227,6 +227,8 @@ common.edit.ajaxfileupload("#fenmianfile",{ | @@ -227,6 +227,8 @@ common.edit.ajaxfileupload("#fenmianfile",{ | ||
227 | } | 227 | } |
228 | } | 228 | } |
229 | }); | 229 | }); |
230 | + | ||
231 | + | ||
230 | $(document).on("click",".cover-color .btn-metro",function(){ | 232 | $(document).on("click",".cover-color .btn-metro",function(){ |
231 | var index=$(this).parents("ul").data("index"); | 233 | var index=$(this).parents("ul").data("index"); |
232 | var index1=$(this).parents(".cover-image-item").data("index"); | 234 | var index1=$(this).parents(".cover-image-item").data("index"); |
@@ -238,8 +240,8 @@ $(document).on("click",".cover-color .btn-metro",function(){ | @@ -238,8 +240,8 @@ $(document).on("click",".cover-color .btn-metro",function(){ | ||
238 | } | 240 | } |
239 | var groups=$(this).parent(".cover-color"); | 241 | var groups=$(this).parent(".cover-color"); |
240 | item.isDefault=groups.find("a").eq(0).hasClass("info")?"Y":"N"; | 242 | item.isDefault=groups.find("a").eq(0).hasClass("info")?"Y":"N"; |
241 | - item.genderCover=groups.find("a").eq(0).hasClass("info")?"1":"0"; | ||
242 | - item.genderCover=groups.find("a").eq(0).hasClass("info")?"2":"0"; | 243 | + item.genderCover=groups.find("a").eq(1).hasClass("info")?"1":"0"; |
244 | + item.genderCover=groups.find("a").eq(2).hasClass("info")?"2":"0"; | ||
243 | console.log(item); | 245 | console.log(item); |
244 | }); | 246 | }); |
245 | $(document).on("click",".goods-color a",function(){ | 247 | $(document).on("click",".goods-color a",function(){ |
@@ -258,8 +260,6 @@ $(document).on("click","#fenMainSave",function(){ | @@ -258,8 +260,6 @@ $(document).on("click","#fenMainSave",function(){ | ||
258 | common.util.__ajax({ | 260 | common.util.__ajax({ |
259 | url:'/netSale/manageProductImg', | 261 | url:'/netSale/manageProductImg', |
260 | data:data | 262 | data:data |
261 | - },function(data){ | ||
262 | - console.log(data); | ||
263 | }); | 263 | }); |
264 | return false; | 264 | return false; |
265 | }); | 265 | }); |
@@ -269,7 +269,6 @@ GOLABDATA.on("fenmian",function(){ | @@ -269,7 +269,6 @@ GOLABDATA.on("fenmian",function(){ | ||
269 | goodsImagesBoList:[] | 269 | goodsImagesBoList:[] |
270 | }; | 270 | }; |
271 | $.each(goodsImagesList,function(index,item){ | 271 | $.each(goodsImagesList,function(index,item){ |
272 | - map.isDefault=item.isDefault; | ||
273 | if(item.isDefault=="Y"){ | 272 | if(item.isDefault=="Y"){ |
274 | map.productSkc=item.productSkc; | 273 | map.productSkc=item.productSkc; |
275 | map.productSkn=item.productSkn; | 274 | map.productSkn=item.productSkn; |
@@ -6,15 +6,12 @@ | @@ -6,15 +6,12 @@ | ||
6 | <h2 class="panel-title">小编推荐</h2> | 6 | <h2 class="panel-title">小编推荐</h2> |
7 | </div> | 7 | </div> |
8 | <div class="panel-body nopadding"> | 8 | <div class="panel-body nopadding"> |
9 | -<<<<<<< HEAD | ||
10 | <script id="edit-recommender" type="text/plain" style="width:100%;height:500px;"></script> | 9 | <script id="edit-recommender" type="text/plain" style="width:100%;height:500px;"></script> |
11 | <p> | 10 | <p> |
12 | <span class="red">提示:与商品相关的逛信息自动抓取到下列各模块中,若要在商品详情中展示,请将其编辑在【小编推荐】中。 | 11 | <span class="red">提示:与商品相关的逛信息自动抓取到下列各模块中,若要在商品详情中展示,请将其编辑在【小编推荐】中。 |
13 | -</span> | 12 | + </span> |
14 | </p> | 13 | </p> |
15 | -======= | ||
16 | - <script id="editor" type="text/plain" style="width:100%;height:400px;"></script> | ||
17 | ->>>>>>> master | 14 | + |
18 | </div> | 15 | </div> |
19 | <div class="panel-footer"> | 16 | <div class="panel-footer"> |
20 | <button class="btn btn-primary" id="btn-recommand">保存</button> | 17 | <button class="btn btn-primary" id="btn-recommand">保存</button> |
@@ -73,7 +73,11 @@ | @@ -73,7 +73,11 @@ | ||
73 | </div> | 73 | </div> |
74 | <div class="col-sm-11"> | 74 | <div class="col-sm-11"> |
75 | <div class="goods-color height40"> | 75 | <div class="goods-color height40"> |
76 | - <a href="javascript:;" class="btn btn-default btn-metro" data-index=[[index]]>设置默认</a> | 76 | + [[if item.isDefault=="Y"]] |
77 | + <a href="javascript:;" class="btn btn-default btn-metro info" data-index=[[index]]>设置默认</a> | ||
78 | + [[else]] | ||
79 | + <a href="javascript:;" class="btn btn-default btn-metro" data-index=[[index]]>设置默认</a> | ||
80 | + [[/if]] | ||
77 | <!-- <a href="javascript:;" class="btn btn-default btn-metro">调用图片</a> --> | 81 | <!-- <a href="javascript:;" class="btn btn-default btn-metro">调用图片</a> --> |
78 | </div> | 82 | </div> |
79 | </div> | 83 | </div> |
-
Please register or login to post a comment