Browse Source

一些优化

pull/16/head
xiaoz 6 years ago
parent
commit
9504459709
  1. 55
      static/embed.js
  2. 12
      static/style.css

55
static/embed.js

@ -15,7 +15,16 @@ layui.use(['layer', 'form','element','upload','flow'], function(){
}); });
flow.lazyimg({ flow.lazyimg({
elem:'#adminpic img' elem:'#adminpic img'
}); });
//图片查看器
layer.photos({
photos: '#adminpic'
,anim: 5 //0-6的选择,指定弹出图片动画类型,默认随机(请注意,3.0之前的版本用shift参数)
});
layer.photos({
photos: '#found-img'
,anim: 5 //0-6的选择,指定弹出图片动画类型,默认随机(请注意,3.0之前的版本用shift参数)
});
//首页拖拽上传 //首页拖拽上传
upload.render({ upload.render({
@ -52,6 +61,17 @@ layui.use(['layer', 'form','element','upload','flow'], function(){
,content: '请勿上传违规图片!' ,content: '请勿上传违规图片!'
}); });
} }
if(obj.level == null){
$.get("./dispose.php?id="+res.id,function(data,status){
var obj = eval('(' + data + ')');
if(obj.level == 3){
layer.open({
title: '温馨提示'
,content: '请勿上传违规图片!'
});
}
});
}
}); });
} }
} }
@ -303,3 +323,36 @@ function about(){
content: "./about.php" content: "./about.php"
}); });
} }
//删除本页所有照片
function delall(){
layer.confirm('确认删除本页所有图片?', {icon: 3, title:'提示'}, function(index){
//do something
layer.close(index);
});
}
//预览图片
function previewimg(id,url){
var imgid = "img" + id;
var upid = id - 1;
var dnid = id + 1;
$("#show" + upid).hide();
$("#show" + dnid).hide();
$("#img" + id).attr('src',url);
$("#show" + id).show();
}
//隐藏图片
function hideimg(id){
var upid = id - 1;
var dnid = id + 1;
$("#show" + id).hide();
$("#show" + upid).hide();
$("#show" + dnid).hide();
}

12
static/style.css

@ -159,3 +159,15 @@
color:#009688; color:#009688;
text-decoration: none; text-decoration: none;
} }
.showimg{
display:none;
position:absolute;
max-width:460px;
top:3em;
z-index:99;
border:1px solid #e2e2e2;
border-radius:5px;
}
.layui-table img {
max-width: 460px;
}
Loading…
Cancel
Save