Authored by xuhongyun

支持双击打开调用图片的大图

... ... @@ -12,7 +12,8 @@ var grayroute = require("./mid/grayrouter");
/*session 配置*/
var options = {
secret: 'yohobuy.portal', //session配置
cookie: {secure: false, maxAge: 7200000, domain: '.yohobuy.com'},
cookie: {secure: false, maxAge: 7200000},
// cookie: {secure: false, maxAge: 7200000, domain: '.yohobuy.com'},
resave: false,
saveUninitialized: true,
rolling: true
... ...
... ... @@ -458,10 +458,13 @@ require("../util/jquery-ui.min");
});
$(document).on("dblclick", ".edui-image-product .edui-product-content .edui-image-pic", function (e) {
var url = $(this).attr("src");
var original_url = url.split('?')[0];
if (original_url != "") {
window.open(original_url);
var src = $(this).attr("src");
// 去除url中的imageview
if (src.indexOf('?') != -1) {
src = src.substring(0, src.indexOf('?'));
}
if (src != "") {
window.open(src);
}
e.stopPropagation();
... ...
... ... @@ -385,7 +385,11 @@ $(document).on('click', '.btn-use-img', function() {
if (res.code == 200 && data.list instanceof Array && data.list[0].pictureBoList instanceof Array) {
$.each(data.list[0].pictureBoList, function(i, value) {
imgHtml += '<div style="float:left; border:1px solid gray; height:123px; width:125px;margin:5px;text-align: center;line-height:120px" ><a style="display:inline-block"><img class="use-img" src="' + value.fileName +'?imageView2/0/w/120/q/75'+ '" alt="" data-i="'+i+'" data-index="' + index + '" style="cursor:pointer;" /></a></div>';
imgHtml += '<div style="float:left; border:1px solid gray; height:123px; width:125px;margin:5px;text-align: center;line-height:120px" >'
+ '<a style="display:inline-block">'
+ '<img class="use-img" src="' + value.fileName + '?imageView2/0/w/120/q/75' + '" alt="" data-i="' + i + '" data-index="' + index + '" style="cursor:pointer;" />'
+ '</a>'
+ '</div>';
});
uesImgDialog = common.dialog.confirm("调用图片",imgHtml,function(){
for(var i in uesImgMap){
... ... @@ -428,6 +432,20 @@ $(document).on('click', '.use-img', function() {
// uesImgDialog.close();
});
//双击调用的图片打开原始图片
$(document).on('dblclick', '.use-img', function(e) {
var src=$(this).attr("src");
// 去除url中的imageview
if (src.indexOf('?') != -1) {
src = src.substring(0, src.indexOf('?'));
}
if (src != "") {
window.open(src);
}
});
//设置颜色封面
$('#fenmianWrap').on("click", ".btn-metro", function () {
var index = $(this).parents(".cover-image-list").data("index");
... ...