Authored by ZhongW

Merge branch 'hotfix_网销页面图片下载大小' into grey

... ... @@ -23,7 +23,7 @@ module.exports=function(app) {
}
});
app.get("/","common.index");
app.get("/","common.Index");
app.get("/error", "common.Error");
... ...
... ... @@ -200,6 +200,7 @@ require("../util/jquery-ui.min");
var json = eval('('+r+')');
for (var i = 0; i < json.length; i++) {
json[i].url = json[i].url + "?imageView2/0/w/120/q/75";
Base.callback(me.editor, me.dialog, json[i].url, json[i].state);
}
... ... @@ -524,7 +525,10 @@ require("../util/jquery-ui.min");
}
var list = Base.getAllPic(sel, $w, editor);
/*$.each(list,function (index,item){
item.src = item.src + "imageView2/0/q/75";
item._src = item._src + "imageView2/0/q/75";
})*/
if (index != -1) {
editor.execCommand('insertimage', list);
}
... ...
... ... @@ -20,20 +20,27 @@ if (window.NETSALEDATA && window.NETSALEDATA.baseProductInfo && window.NETSALEDA
/*商品描述*/
window.UMdescriptioner = UM.getEditor('edit-descriptioner');
if (window.NETSALEDATA && window.NETSALEDATA.productExtBo.productDesc && window.NETSALEDATA.productExtBo.productDesc) {
var reg_jpg=new RegExp(".jpg","g");
var reg_png=new RegExp(".png","g");
var reg_gif=new RegExp(".gif","g");
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');
window.NETSALEDATA.productExtBo.productDesc = window.NETSALEDATA.productExtBo.productDesc.replace(reg1,'.jpg?imageView2/0/q/75');
UMdescriptioner.setContent(window.NETSALEDATA.productExtBo.productDesc)
};
/*保存描述*/
$(document).on("click", "#btn-descriptioner", function () {
var content = UMdescriptioner.getContent();
var reg2=new RegExp("\\?imageView2/0/q/75","g");
content = content.replace(reg2,'');
common.util.__ajax({
url:'/product/saveProductDesc',
data:{
productSkn:productSkn,
productDesc:UMdescriptioner.getContent()
productDesc:content
}
});
});
... ... @@ -274,12 +281,26 @@ if (!count && goodsList[0]) {
}
renderGoodList();
function renderGoodList() {
function changeImgQuality(flag){
$.each(goodsList,function (index,item){
$.each(item.goodsImagesList, function (_index, _item) {
if(flag && _item.imageUrl.indexOf('?') == -1){
_item.imageUrl = _item.imageUrl + '?imageView2/0/q/75';
}
if(!flag && _item.imageUrl.indexOf('?') > 0){
_item.imageUrl = _item.imageUrl.substring(0,_item.imageUrl.indexOf('?'));
}
});
})
}
function renderGoodList() {
var map = {
"男": 1,
"女": 2
};
var gender = map[window.NETSALEDATA.baseProductInfo.baseProduct.gender]||3;
changeImgQuality(true);
$("#fenmianWrap").html(common.util.__template2($("#fenmianTemp").html(), {
goodsList: goodsList,
gender:gender
... ... @@ -484,7 +505,7 @@ function getFenManData () {
goodsImagesBoList: []
},
msg = '';
changeImgQuality(false);
$.each(goodsList, function (index, item) {
if (item.isDefault == "Y") {
map.productSkc = item.productSkc;
... ...