143 lines
5.6 KiB
PHP
143 lines
5.6 KiB
PHP
<?php /*a:2:{s:91:"/Library/WebServer/Documents/dggxiangmu/dggzichahu/application/admin/view/supplier/add.html";i:1640333970;s:86:"/Library/WebServer/Documents/dggxiangmu/dggzichahu/application/admin/view/layout2.html";i:1628618358;}*/ ?>
|
||
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<title><?php echo url(); ?></title>
|
||
<meta name="renderer" content="webkit">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||
<link rel="stylesheet" href="/static/plug/layui-admin/dist/layuiadmin/layui/css/layui.css?v=<?php echo htmlentities($front_version); ?>" media="all">
|
||
<link rel="stylesheet" href="/static/plug/layui-admin/dist/layuiadmin/style/like.css?v=<?php echo htmlentities($front_version); ?>" media="all">
|
||
</head>
|
||
<body>
|
||
<?php echo $js_code; ?>
|
||
<script src="/static/plug/layui-admin/dist/layuiadmin/layui/layui.js?v=<?php echo htmlentities($front_version); ?>"></script>
|
||
<script src="/static/common/js/function.js?v=<?php echo htmlentities($front_version); ?>"></script>
|
||
|
||
<style>
|
||
.layui-form-label {
|
||
color: #6a6f6c;
|
||
}
|
||
.goods-li {
|
||
float: left;
|
||
opacity: 1;
|
||
position: relative;
|
||
}
|
||
|
||
.goods-img {
|
||
width: 80px;
|
||
height: 80px;
|
||
padding: 4px;
|
||
}
|
||
.goods-img-del-x {
|
||
position: absolute;
|
||
z-index: 100;
|
||
top: -4px;
|
||
right: -2px;
|
||
width: 20px;
|
||
height: 20px;
|
||
font-size: 16px;
|
||
line-height: 16px;
|
||
color: #fff;
|
||
text-align: center;
|
||
cursor: pointer;
|
||
background: hsla(0, 0%, 60%, .6);
|
||
border-radius: 10px;
|
||
}
|
||
#image{
|
||
left:110px;
|
||
}
|
||
#notice{ left:110px;}
|
||
</style>
|
||
<script src="/static/common/js/area.js"></script>
|
||
<div class="layui-form" lay-filter="layuiadmin-form-unit" id="layuiadmin-form-unit" style="padding: 20px 30px 0 0;">
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label" style="white-space: nowrap;"><font color="red">*</font>专家名称:</label>
|
||
<div class="layui-input-inline" style="width: 400px">
|
||
<input type="text" name="name" lay-verify="required" lay-vertype="tips" placeholder="" autocomplete="off" class="layui-input">
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label"><font color="red">*</font>专家分类</label>
|
||
<div class="layui-input-block" style="width: 400px">
|
||
<select name="cid" placeholder="请选择专家分类" >
|
||
<option value="0">请选择分类</option>
|
||
<?php foreach($category_list as $val): ?>
|
||
<option value="<?php echo htmlentities($val['id']); ?>"><?php echo htmlentities($val['name']); ?></option>
|
||
<?php endforeach; ?>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label" style="white-space: nowrap;"><font color="red">*</font>专家封面图:</label>
|
||
<div class="layui-input-inline">
|
||
<div class="" style="height:80px;line-height:80px">
|
||
<input name="avatar" type="hidden" value="">
|
||
<div class="img-add"></div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<label class=" layui-form-mid layui-word-aux" id="image">建议尺寸:730*530像素</label>
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label" style="white-space: nowrap;">荣誉:</label>
|
||
<div class="layui-input-inline" style="width: 400px">
|
||
<input type="text" name="honor" class="layui-input">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label" style="white-space: nowrap;">个人介绍:</label>
|
||
<div class="layui-input-inline" >
|
||
<textarea name="remark" placeholder="" class="layui-textarea" style="width: 400px;height: 100px"></textarea>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-form-item layui-hide">
|
||
<input type="button" lay-submit lay-filter="supplier-submit" id="supplier-submit" value="确认">
|
||
</div>
|
||
</div>
|
||
<script>
|
||
layui.config({
|
||
version:"<?php echo htmlentities($front_version); ?>",
|
||
base: '/static/plug/layui-admin/dist/layuiadmin/' //静态资源所在路径
|
||
}).extend({
|
||
index: 'lib/index' //主入口模块
|
||
}).use(['index', 'form','like'], function(){
|
||
var $ = layui.$
|
||
,form = layui.form
|
||
,laydate = layui.laydate
|
||
,like = layui.like;
|
||
//上传图片
|
||
like.imageUpload('.img-add', function (uri, element) {
|
||
if(uri.length>1){
|
||
layer.msg('最多最能选中1张图片');
|
||
return;
|
||
}
|
||
var html = '<div class="goods-li">\n' +
|
||
'<img class="goods-img" ' +
|
||
'src="' + uri[0] + '">' +
|
||
'<a class="goods-img-del-x">x</a>' +
|
||
'</div>';
|
||
element.prev().val(like.getUrlFileName(uri[0], '<?php echo htmlentities($storageUrl); ?>'));
|
||
element.parent().append(html);
|
||
element.css('display','none');
|
||
}, true);
|
||
//删除图片
|
||
$(document).on('click', '.goods-img-del-x', function () {
|
||
$(this).parent().siblings('input').val('');
|
||
$(this).parent().prev().css('display','block');
|
||
$(this).parent().remove();
|
||
});
|
||
//显示图片
|
||
$(document).on('click', '.goods-img', function () {
|
||
var image = $(this).attr('src');
|
||
like.showImg(image,600);
|
||
});
|
||
|
||
})
|
||
</script>
|
||
</body>
|
||
</html>
|