|
@@ -20,6 +20,11 @@ var descriptionEdit = new common.edit('#descriptionerWrap'); |
|
@@ -20,6 +20,11 @@ var descriptionEdit = new common.edit('#descriptionerWrap'); |
20
|
window.UMdescriptioner = UM.getEditor('edit-descriptioner');
|
20
|
window.UMdescriptioner = UM.getEditor('edit-descriptioner');
|
21
|
descriptionEdit.init();
|
21
|
descriptionEdit.init();
|
22
|
if (window.NETSALEDATA && window.NETSALEDATA.productExtBo.productDesc && window.NETSALEDATA.productExtBo.productDesc) {
|
22
|
if (window.NETSALEDATA && window.NETSALEDATA.productExtBo.productDesc && window.NETSALEDATA.productExtBo.productDesc) {
|
|
|
23
|
+ var reg1=new RegExp(".jpg","g");
|
|
|
24
|
+ var reg_jpg=new RegExp(".jpg","g");
|
|
|
25
|
+ var reg_png=new RegExp(".png","g");
|
|
|
26
|
+ var reg_gif=new RegExp(".gif","g");
|
|
|
27
|
+ 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');
|
23
|
UMdescriptioner.setContent(window.NETSALEDATA.productExtBo.productDesc)
|
28
|
UMdescriptioner.setContent(window.NETSALEDATA.productExtBo.productDesc)
|
24
|
};
|
29
|
};
|
25
|
|
30
|
|
|
@@ -37,8 +42,10 @@ GOLABDATA.on("LYproductDesc", function () { |
|
@@ -37,8 +42,10 @@ GOLABDATA.on("LYproductDesc", function () { |
37
|
|
42
|
|
38
|
$(document).on("click", "#btn-descriptioner", function () {
|
43
|
$(document).on("click", "#btn-descriptioner", function () {
|
39
|
$('#productDesc').val(UMdescriptioner.getContent());
|
44
|
$('#productDesc').val(UMdescriptioner.getContent());
|
40
|
- descriptionEdit.submit('/product/saveProductDesc', function (option) {
|
45
|
+ descriptionEdit.submit('/product/saveProductDesc', function (option) {
|
41
|
option.data = GOLABDATA.fire('LYproductDesc');
|
46
|
option.data = GOLABDATA.fire('LYproductDesc');
|
|
|
47
|
+ var reg2=new RegExp("\\?imageView2/0/q/75","g");
|
|
|
48
|
+ option.data.productDesc = option.data.productDesc.replace(reg2,'');
|
42
|
option.success = function (res) {
|
49
|
option.success = function (res) {
|
43
|
if (res.code == '200') {
|
50
|
if (res.code == '200') {
|
44
|
descriptionEdit.$tip(res.message, function () {
|
51
|
descriptionEdit.$tip(res.message, function () {
|
|
@@ -313,12 +320,26 @@ if (!count && goodsList[0]) { |
|
@@ -313,12 +320,26 @@ if (!count && goodsList[0]) { |
313
|
}
|
320
|
}
|
314
|
renderGoodList();
|
321
|
renderGoodList();
|
315
|
|
322
|
|
|
|
323
|
+function changeImgQuality(flag){
|
|
|
324
|
+ $.each(goodsList,function (index,item){
|
|
|
325
|
+ $.each(item.goodsImagesList, function (_index, _item) {
|
|
|
326
|
+ if(flag && _item.imageUrl.indexOf('?') == -1){
|
|
|
327
|
+ _item.imageUrl = _item.imageUrl + '?imageView2/0/q/75';
|
|
|
328
|
+ }
|
|
|
329
|
+ if(!flag && _item.imageUrl.indexOf('?') > 0){
|
|
|
330
|
+ _item.imageUrl = _item.imageUrl.substring(0,_item.imageUrl.indexOf('?'));
|
|
|
331
|
+ }
|
|
|
332
|
+ });
|
|
|
333
|
+ })
|
|
|
334
|
+}
|
|
|
335
|
+
|
316
|
function renderGoodList() {
|
336
|
function renderGoodList() {
|
317
|
var map = {
|
337
|
var map = {
|
318
|
"男": 1,
|
338
|
"男": 1,
|
319
|
"女": 2
|
339
|
"女": 2
|
320
|
};
|
340
|
};
|
321
|
var gender = map[window.NETSALEDATA.baseProductInfo.baseProduct.gender]||3;
|
341
|
var gender = map[window.NETSALEDATA.baseProductInfo.baseProduct.gender]||3;
|
|
|
342
|
+ changeImgQuality(true);
|
322
|
$("#fenmianWrap").html(common.util.__template2($("#fenmianTemp").html(), {
|
343
|
$("#fenmianWrap").html(common.util.__template2($("#fenmianTemp").html(), {
|
323
|
goodsList: goodsList,
|
344
|
goodsList: goodsList,
|
324
|
gender:gender
|
345
|
gender:gender
|
|
@@ -515,7 +536,7 @@ GOLABDATA.on("fenmian", function () { |
|
@@ -515,7 +536,7 @@ GOLABDATA.on("fenmian", function () { |
515
|
goodsImagesBoList: []
|
536
|
goodsImagesBoList: []
|
516
|
},
|
537
|
},
|
517
|
errorMsg = '';
|
538
|
errorMsg = '';
|
518
|
-
|
539
|
+ changeImgQuality(false);
|
519
|
$.each(goodsList, function (index, item) {
|
540
|
$.each(goodsList, function (index, item) {
|
520
|
if (item.isDefault == "Y") {
|
541
|
if (item.isDefault == "Y") {
|
521
|
map.productSkc = item.productSkc;
|
542
|
map.productSkc = item.productSkc;
|