|
@@ -20,20 +20,27 @@ if (window.NETSALEDATA && window.NETSALEDATA.baseProductInfo && window.NETSALEDA |
|
@@ -20,20 +20,27 @@ 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
|
+ var reg_jpg=new RegExp(".jpg","g");
|
|
|
27
|
+ var reg_png=new RegExp(".png","g");
|
|
|
28
|
+ var reg_gif=new RegExp(".gif","g");
|
|
|
29
|
+ window.NETSALEDATA.productExtBo.productDesc = window.NETSALEDATA.productExtBo.productDesc.replace(reg_jpg,'.jpg?imageView2/0/q/75').replace(reg_png,'.png?imageView2/0/q/75').replace(reg_gif,'.gif?imageView2/0/q/75');
|
|
|
30
|
+ window.NETSALEDATA.productExtBo.productDesc = window.NETSALEDATA.productExtBo.productDesc.replace(reg1,'.jpg?imageView2/0/q/75');
|
27
|
UMdescriptioner.setContent(window.NETSALEDATA.productExtBo.productDesc)
|
31
|
UMdescriptioner.setContent(window.NETSALEDATA.productExtBo.productDesc)
|
28
|
};
|
32
|
};
|
29
|
|
33
|
|
30
|
/*保存描述*/
|
34
|
/*保存描述*/
|
31
|
$(document).on("click", "#btn-descriptioner", function () {
|
35
|
$(document).on("click", "#btn-descriptioner", function () {
|
|
|
36
|
+ var content = UMdescriptioner.getContent();
|
|
|
37
|
+ var reg2=new RegExp("\\?imageView2/0/q/75","g");
|
|
|
38
|
+ content = content.replace(reg2,'');
|
32
|
common.util.__ajax({
|
39
|
common.util.__ajax({
|
33
|
url:'/product/saveProductDesc',
|
40
|
url:'/product/saveProductDesc',
|
34
|
data:{
|
41
|
data:{
|
35
|
productSkn:productSkn,
|
42
|
productSkn:productSkn,
|
36
|
- productDesc:UMdescriptioner.getContent()
|
43
|
+ productDesc:content
|
37
|
}
|
44
|
}
|
38
|
});
|
45
|
});
|
39
|
});
|
46
|
});
|
|
@@ -274,12 +281,26 @@ if (!count && goodsList[0]) { |
|
@@ -274,12 +281,26 @@ if (!count && goodsList[0]) { |
274
|
}
|
281
|
}
|
275
|
renderGoodList();
|
282
|
renderGoodList();
|
276
|
|
283
|
|
277
|
-function renderGoodList() {
|
284
|
+function changeImgQuality(flag){
|
|
|
285
|
+ $.each(goodsList,function (index,item){
|
|
|
286
|
+ $.each(item.goodsImagesList, function (_index, _item) {
|
|
|
287
|
+ if(flag && _item.imageUrl.indexOf('?') == -1){
|
|
|
288
|
+ _item.imageUrl = _item.imageUrl + '?imageView2/0/q/75';
|
|
|
289
|
+ }
|
|
|
290
|
+ if(!flag && _item.imageUrl.indexOf('?') > 0){
|
|
|
291
|
+ _item.imageUrl = _item.imageUrl.substring(0,_item.imageUrl.indexOf('?'));
|
|
|
292
|
+ }
|
|
|
293
|
+ });
|
|
|
294
|
+ })
|
|
|
295
|
+}
|
|
|
296
|
+
|
|
|
297
|
+function renderGoodList() {
|
278
|
var map = {
|
298
|
var map = {
|
279
|
"男": 1,
|
299
|
"男": 1,
|
280
|
"女": 2
|
300
|
"女": 2
|
281
|
};
|
301
|
};
|
282
|
var gender = map[window.NETSALEDATA.baseProductInfo.baseProduct.gender]||3;
|
302
|
var gender = map[window.NETSALEDATA.baseProductInfo.baseProduct.gender]||3;
|
|
|
303
|
+ changeImgQuality(true);
|
283
|
$("#fenmianWrap").html(common.util.__template2($("#fenmianTemp").html(), {
|
304
|
$("#fenmianWrap").html(common.util.__template2($("#fenmianTemp").html(), {
|
284
|
goodsList: goodsList,
|
305
|
goodsList: goodsList,
|
285
|
gender:gender
|
306
|
gender:gender
|
|
@@ -484,7 +505,7 @@ function getFenManData () { |
|
@@ -484,7 +505,7 @@ function getFenManData () { |
484
|
goodsImagesBoList: []
|
505
|
goodsImagesBoList: []
|
485
|
},
|
506
|
},
|
486
|
msg = '';
|
507
|
msg = '';
|
487
|
-
|
508
|
+ changeImgQuality(false);
|
488
|
$.each(goodsList, function (index, item) {
|
509
|
$.each(goodsList, function (index, item) {
|
489
|
if (item.isDefault == "Y") {
|
510
|
if (item.isDefault == "Y") {
|
490
|
map.productSkc = item.productSkc;
|
511
|
map.productSkc = item.productSkc;
|