Commit 0fe65897 by zhao_shaonan

上传照片之后添加预览大图

parent ef7cbbb9
......@@ -407,6 +407,7 @@ header.title i{margin-right:5px;}
.diyLeft{ margin-right: 3px; }
.diyLeft i{ margin-left: 3px; background: url(/static/rygl/css/images/upload-icon1.png) no-repeat 0 0; }
.diyCancel i{ background: url(/static/rygl/css/images/upload-icon1.png) no-repeat 0 -11px; }
.fa-search-plus:hover{color:#fff;}
.diyRight i{ margin-right: 3px; background: url(/static/rygl/css/images/upload-icon1.png) no-repeat 0 -22px; }
.goods-edit .upload-tip{ font: 12px/23px "Microsoft YaHei"; color: #a3a3a3;vertical-align: top; }
.inputARea{overflow: hidden;line-height: 30px;padding:5px 0;}
......
......@@ -237,7 +237,7 @@
<div class="diyBar"> \
<div class="diyProgress">0%</div> \
</div> \
<p class="diyControl"><span class="diyLeft"><i></i></span><span class="diyCancel"><i></i></span><span class="diyRight"><i></i></span></p>\
<p class="diyControl"><span class="diyCancel"><i></i></span><i class="fa fa-search-plus" style="color:#B4B8BA;font-size:14px;position: relative;top:-7px;"></i></p>\
</div> \
</li>';
......@@ -260,6 +260,15 @@
$fileBox.find('.diyLeft').one('click',function(){
leftLi($(this).parents('.diyUploadHover').prev(), $(this).parents('.diyUploadHover'));
});
//绑定预览放大
$fileBox.find('.fa-search-plus').on('click',function(){
console.log($(this).parent(".diyControl").next("img").attr("src"))
var src=$(this).parent(".diyControl").next("img").attr("src");
layer.photos({
photos: { "data": [{"src":src }] }
,anim: 5 //0-6的选择,指定弹出图片动画类型,默认随机(请注意,3.0之前的版本用shift参数)
});
});
//绑定右移事件;
$fileBox.find('.diyRight').one('click',function(){
......@@ -275,7 +284,7 @@
//生成预览缩略图;
webUploader.makeThumb( file, function( error, dataSrc ) {
if ( !error ) {
$fileBox.find('.viewThumb').append('<img style="width: 160px;height: 220px;" id="img_'+file_id+'" src="'+dataSrc+'" >');
$fileBox.find('.viewThumb').append('<img style="width: 100%;" id="img_'+file_id+'" src="'+dataSrc+'" >');
var num = file_id.substr(file_id.length-1);
alert(num);
if(num<4){
......
......@@ -8,11 +8,14 @@
<title></title>
<!--- 代码框-->
<link rel="stylesheet" href="/static/easyui-window/css/easyui.css">
<link rel="stylesheet" href="/static/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="/static/js/layer/skin/layer.css">
<link rel="stylesheet" href="/static/rygl/css/details.css">
<script type="text/javascript" src="/static/rygl/js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="/static/easyui-window/js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/static/xtba/zlcc/easyui-window/js/function-zdy.js"></script>
<script src="/static/rygl/js/webuploader.min.js"></script>
<script type="text/javascript" src="/static/js/layer/layer.js"></script>
<script src="/static/rygl/js/diyUpload.js"></script>
<body style="overflow: auto;background: #fff;">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment