Showing
1 changed file
with
20 additions
and
4 deletions
@@ -20,20 +20,22 @@ if (window.NETSALEDATA && window.NETSALEDATA.baseProductInfo && window.NETSALEDA | @@ -20,20 +20,22 @@ if (window.NETSALEDATA && window.NETSALEDATA.baseProductInfo && window.NETSALEDA | ||
20 | 20 | ||
21 | 21 | ||
22 | 22 | ||
23 | - | ||
24 | /*商品描述*/ | 23 | /*商品描述*/ |
25 | window.UMdescriptioner = UM.getEditor('edit-descriptioner'); | 24 | window.UMdescriptioner = UM.getEditor('edit-descriptioner'); |
26 | if (window.NETSALEDATA && window.NETSALEDATA.productExtBo.productDesc && window.NETSALEDATA.productExtBo.productDesc) { | 25 | if (window.NETSALEDATA && window.NETSALEDATA.productExtBo.productDesc && window.NETSALEDATA.productExtBo.productDesc) { |
26 | + window.NETSALEDATA.productExtBo.productDesc = window.NETSALEDATA.productExtBo.productDesc.replace(".jpg",'.jpg?imageView2/0/q/10'); | ||
27 | UMdescriptioner.setContent(window.NETSALEDATA.productExtBo.productDesc) | 27 | UMdescriptioner.setContent(window.NETSALEDATA.productExtBo.productDesc) |
28 | }; | 28 | }; |
29 | 29 | ||
30 | /*保存描述*/ | 30 | /*保存描述*/ |
31 | $(document).on("click", "#btn-descriptioner", function () { | 31 | $(document).on("click", "#btn-descriptioner", function () { |
32 | + var content = UMdescriptioner.getContent(); | ||
33 | + content = content.replace("?imageView2/0/q/10",''); | ||
32 | common.util.__ajax({ | 34 | common.util.__ajax({ |
33 | url:'/product/saveProductDesc', | 35 | url:'/product/saveProductDesc', |
34 | data:{ | 36 | data:{ |
35 | productSkn:productSkn, | 37 | productSkn:productSkn, |
36 | - productDesc:UMdescriptioner.getContent() | 38 | + productDesc:content |
37 | } | 39 | } |
38 | }); | 40 | }); |
39 | }); | 41 | }); |
@@ -274,12 +276,26 @@ if (!count && goodsList[0]) { | @@ -274,12 +276,26 @@ if (!count && goodsList[0]) { | ||
274 | } | 276 | } |
275 | renderGoodList(); | 277 | renderGoodList(); |
276 | 278 | ||
277 | -function renderGoodList() { | 279 | +function changeImgQuality(flag){ |
280 | + $.each(goodsList,function (index,item){ | ||
281 | + $.each(item.goodsImagesList, function (_index, _item) { | ||
282 | + if(flag && _item.imageUrl.indexOf('?') == -1){ | ||
283 | + _item.imageUrl = _item.imageUrl + '?imageView2/0/q/10'; | ||
284 | + } | ||
285 | + if(!flag && _item.imageUrl.indexOf('?') > 0){ | ||
286 | + _item.imageUrl = _item.imageUrl.substring(0,_item.imageUrl.indexOf('?')); | ||
287 | + } | ||
288 | + }); | ||
289 | + }) | ||
290 | +} | ||
291 | + | ||
292 | +function renderGoodList() { | ||
278 | var map = { | 293 | var map = { |
279 | "男": 1, | 294 | "男": 1, |
280 | "女": 2 | 295 | "女": 2 |
281 | }; | 296 | }; |
282 | var gender = map[window.NETSALEDATA.baseProductInfo.baseProduct.gender]||3; | 297 | var gender = map[window.NETSALEDATA.baseProductInfo.baseProduct.gender]||3; |
298 | + changeImgQuality(true); | ||
283 | $("#fenmianWrap").html(common.util.__template2($("#fenmianTemp").html(), { | 299 | $("#fenmianWrap").html(common.util.__template2($("#fenmianTemp").html(), { |
284 | goodsList: goodsList, | 300 | goodsList: goodsList, |
285 | gender:gender | 301 | gender:gender |
@@ -484,7 +500,7 @@ function getFenManData () { | @@ -484,7 +500,7 @@ function getFenManData () { | ||
484 | goodsImagesBoList: [] | 500 | goodsImagesBoList: [] |
485 | }, | 501 | }, |
486 | msg = ''; | 502 | msg = ''; |
487 | - | 503 | + changeImgQuality(false); |
488 | $.each(goodsList, function (index, item) { | 504 | $.each(goodsList, function (index, item) { |
489 | if (item.isDefault == "Y") { | 505 | if (item.isDefault == "Y") { |
490 | map.productSkc = item.productSkc; | 506 | map.productSkc = item.productSkc; |
-
Please register or login to post a comment