Authored by ZhongW

图片压缩

@@ -200,6 +200,7 @@ require("../util/jquery-ui.min"); @@ -200,6 +200,7 @@ require("../util/jquery-ui.min");
200 var json = eval('('+r+')'); 200 var json = eval('('+r+')');
201 201
202 for (var i = 0; i < json.length; i++) { 202 for (var i = 0; i < json.length; i++) {
  203 + json[i].url = json[i].url + "?imageView2/0/w/120/q/75";
203 Base.callback(me.editor, me.dialog, json[i].url, json[i].state); 204 Base.callback(me.editor, me.dialog, json[i].url, json[i].state);
204 } 205 }
205 206
@@ -524,7 +525,10 @@ require("../util/jquery-ui.min"); @@ -524,7 +525,10 @@ require("../util/jquery-ui.min");
524 } 525 }
525 526
526 var list = Base.getAllPic(sel, $w, editor); 527 var list = Base.getAllPic(sel, $w, editor);
527 - 528 + /*$.each(list,function (index,item){
  529 + item.src = item.src + "imageView2/0/q/75";
  530 + item._src = item._src + "imageView2/0/q/75";
  531 + })*/
528 if (index != -1) { 532 if (index != -1) {
529 editor.execCommand('insertimage', list); 533 editor.execCommand('insertimage', list);
530 } 534 }
@@ -24,14 +24,14 @@ if (window.NETSALEDATA && window.NETSALEDATA.baseProductInfo && window.NETSALEDA @@ -24,14 +24,14 @@ if (window.NETSALEDATA && window.NETSALEDATA.baseProductInfo && window.NETSALEDA
24 window.UMdescriptioner = UM.getEditor('edit-descriptioner'); 24 window.UMdescriptioner = UM.getEditor('edit-descriptioner');
25 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 reg1=new RegExp(".jpg","g"); 26 var reg1=new RegExp(".jpg","g");
27 - window.NETSALEDATA.productExtBo.productDesc = window.NETSALEDATA.productExtBo.productDesc.replace(reg1,'.jpg?imageView2/0/q/65'); 27 + window.NETSALEDATA.productExtBo.productDesc = window.NETSALEDATA.productExtBo.productDesc.replace(reg1,'.jpg?imageView2/0/q/75');
28 UMdescriptioner.setContent(window.NETSALEDATA.productExtBo.productDesc) 28 UMdescriptioner.setContent(window.NETSALEDATA.productExtBo.productDesc)
29 }; 29 };
30 30
31 /*保存描述*/ 31 /*保存描述*/
32 $(document).on("click", "#btn-descriptioner", function () { 32 $(document).on("click", "#btn-descriptioner", function () {
33 var content = UMdescriptioner.getContent(); 33 var content = UMdescriptioner.getContent();
34 - var reg2=new RegExp("\\?imageView2/0/q/65","g"); 34 + var reg2=new RegExp("\\?imageView2/0/q/75","g");
35 content = content.replace(reg2,''); 35 content = content.replace(reg2,'');
36 common.util.__ajax({ 36 common.util.__ajax({
37 url:'/product/saveProductDesc', 37 url:'/product/saveProductDesc',
@@ -282,7 +282,7 @@ function changeImgQuality(flag){ @@ -282,7 +282,7 @@ function changeImgQuality(flag){
282 $.each(goodsList,function (index,item){ 282 $.each(goodsList,function (index,item){
283 $.each(item.goodsImagesList, function (_index, _item) { 283 $.each(item.goodsImagesList, function (_index, _item) {
284 if(flag && _item.imageUrl.indexOf('?') == -1){ 284 if(flag && _item.imageUrl.indexOf('?') == -1){
285 - _item.imageUrl = _item.imageUrl + '?imageView2/0/q/10'; 285 + _item.imageUrl = _item.imageUrl + '?imageView2/0/q/75';
286 } 286 }
287 if(!flag && _item.imageUrl.indexOf('?') > 0){ 287 if(!flag && _item.imageUrl.indexOf('?') > 0){
288 _item.imageUrl = _item.imageUrl.substring(0,_item.imageUrl.indexOf('?')); 288 _item.imageUrl = _item.imageUrl.substring(0,_item.imageUrl.indexOf('?'));