Authored by ZhongW

网销优化

... ... @@ -402,7 +402,51 @@ require("../util/jquery-ui.min");
success:function(res){
var data = res;
if (res.code == 200 && data.data.list instanceof Array && data.data.list[0].pictureBoList instanceof Array) {
$.each(data.data.list[0].pictureBoList, function(i, value) {
var picArray = data.data.list[0].pictureBoList;
var skuArray = [];
$.each(picArray, function(i, value) {
if(skuArray.indexOf(value.productSku) == -1 ){
skuArray.push(value.productSku);
}
});
$(".edui-image-product .edui-product-content", me.dialog).append("<table class='content-table'>");
$.each(skuArray, function(i, skuItem) {
$(".edui-image-product .edui-product-content .content-table", me.dialog).append("<tr style='border-top:solid black 1px;border-bottom:solid black 1px;padding:8px;margin:10px' class='tr"+i+"'>");
$(".edui-image-product .edui-product-content .content-table tbody .tr"+i, me.dialog).append("<td>"+skuItem+"&nbsp;&nbsp;&nbsp;&nbsp;</td>");
$(".edui-image-product .edui-product-content .content-table tbody .tr"+i, me.dialog).append("<td class='td"+i+"'>");
$.each(picArray, function(j, picItem) {
if(skuItem == picItem.productSku){
var url=picItem.fileName;
if (url) {
url+="?imageView2/0/w/120/q/75";
$("<img src='" + url + "' class='edui-image-pic' />").on("load", function () {
var $item = $("<div class='edui-image-item' style='margin:5px'><div class='edui-image-close'></div></div>").append(this);
$(".edui-image-product .edui-product-content .content-table tbody .tr"+i+" .td"+i, me.dialog).append($item);
// 支持拖拽调整顺序
$(".edui-image-product .edui-product-content .content-table tbody .tr"+i+" .td"+i, me.dialog).sortable({
items: ".edui-image-item"
});
Base.scale(this, 120);
$item.width(120);
Base.close($(this));
});
}
}
});
})
/*$.each(data.data.list[0].pictureBoList, function(i, value) {
var url=value.fileName;
if (url) {
url+="?imageView2/0/w/120/q/75";
... ... @@ -425,7 +469,7 @@ require("../util/jquery-ui.min");
});
}
});
});*/
}
}
});
... ...
... ... @@ -132,9 +132,23 @@ $(document).on("click", "#saveAllInfo", function() {
//类似描点跳转,描点会影响history.go(-1)
$('.floatnav').on('click', 'li', function() {
var name = $(this).attr('name'),
scrollTop = $('.netsale-position[name="' + name + '"]').offset().top;
var name = $(this).attr('name');
//控制隐藏缩放
var idx= name.replace("position","");
var idxName= "";
if(idx >= 9){
idxName = "position9";
}else{
idxName = name ;
}
if(parseInt(idx) >= 8){
$('.netsale-position[name="' + idxName + '"]').parent().next().css("display","");
$('.netsale-position[name="' + idxName + '"]').parent().find(".tooltips").find("i").removeClass("fa-plus").addClass("fa-minus");
$('.netsale-position[name="' + idxName + '"]').parent().find(".tooltips").removeClass("maximize")
}
var scrollTop = $('.netsale-position[name="' + name + '"]').offset().top;
$(window).scrollTop(scrollTop);
return false;
});
... ...
... ... @@ -190,11 +190,13 @@ var g = new common.grid({
html = '';
if (item.smallSortName) {
sortName = item.smallSortName
} else if (item.middleSortName) {
sortName = item.middleSortName;
} else {
sortName = item.maxSortName;
sortName = item.smallSortName;
}
if (item.middleSortName) {
sortName = item.middleSortName+"/"+sortName;
}
if (item.maxSortName) {
sortName = item.maxSortName+"/"+sortName;
}
html += '<p><strong>名称:</strong><a target="_blank" href="' + item.productUrl + '">' + productName + '</a></p>';
html += '<p><strong>品牌:</strong>' + brandName + '</p>';
... ...