Authored by ZhongW

网销优化

... ... @@ -51,7 +51,7 @@
</div>
</div>
</div>
<div class="panel-footer" style="display: none;">
<div class="panel-footer" >
<button class="btn btn-primary" id="save-searchKey">保存</button>
</div>
</div>
... ...
... ... @@ -401,18 +401,65 @@ 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));
});
}
}
});
})
/*$(".edui-image-product .edui-product-content", me.dialog).append("<table class='content-table'>");
$(".edui-image-product .edui-product-content .content-table", me.dialog).append("<tr>");
$.each(data.data.list[0].pictureBoList, function(i, value) {
var url=value.fileName;
if (url) {
url+="?imageView2/0/w/120/q/75";
$("<img src='" + url + "' class='edui-image-pic' />").on("load", function () {
console.log(this);
var $item = $("<div class='edui-image-item'><div class='edui-image-close'></div></div>").append(this);
$(".edui-image-product .edui-product-content", me.dialog).append($item);
$(".edui-image-product .edui-product-content .content-table tbody tr", me.dialog).append($item);
// 支持拖拽调整顺序
$(".edui-image-product .edui-product-content", me.dialog).sortable({
// 支持拖拽调整顺序
$(".edui-image-product .edui-product-content .content-table tbody tr", me.dialog).sortable({
items: ".edui-image-item"
});
... ... @@ -424,7 +471,9 @@ require("../util/jquery-ui.min");
});
}
});
});*/
}
}
});
... ...
... ... @@ -245,8 +245,24 @@ $(document).on("click", "#passBtn", 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;
... ...
... ... @@ -219,16 +219,16 @@ var g = new common.grid({
sortName = '',
html = '';
if (item.smallSortName) {
/*if (item.smallSortName) {
sortName = item.smallSortName
} else if (item.middleSortName) {
sortName = item.middleSortName;
} else {
sortName = item.maxSortName;
}
}*/
html += '<p><strong>名称:</strong><a target="_blank" href="' + item.productUrl + '">' + productName + '</a></p>';
html += '<p><strong>品牌:</strong>' + brandName + '</p>';
html += '<p><strong>类目:</strong>' + sortName;
html += '<p><strong>类目:</strong>' + item.maxSortName+"/"+item.middleSortName+"/"+item.smallSortName;
return html + '</p>';
}
}, {
... ...