180 lines
7.8 KiB
PHP
180 lines
7.8 KiB
PHP
<?php /*a:2:{s:92:"/Library/WebServer/Documents/dggxiangmu/dggzichahu/application/admin/view/supplier/edit.html";i:1641741931;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>
|
||
|
||
<script src="/static/common/js/area.js"></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>
|
||
<div class="layui-form" lay-filter="layuiadmin-form-unit" id="layuiadmin-form-unit" style="padding: 20px 30px 0 0;">
|
||
<input type="hidden" value="<?php echo htmlentities($info['id']); ?>" name="id">
|
||
<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" value="<?php echo htmlentities($info['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="请选择专家分类" >
|
||
<?php foreach($category_list as $item => $val): ?>
|
||
<option value="<?php echo htmlentities($item); ?>" <?php if($item == $info['cid']): ?>selected="selected"<?php endif; ?> ><?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;">专家封面图:</label>
|
||
<div class="layui-input-inline">
|
||
<div style="height:80px;line-height:80px">
|
||
<input name="avatar" type="hidden" value="<?php echo htmlentities($info['avatar']); ?>">
|
||
<?php if(!empty($info['avatar'])): ?>
|
||
<div class="img-add" style="display: none" ></div>
|
||
<div class="goods-li">
|
||
<img class="goods-img" src="<?php echo htmlentities($info['avatar']); ?>">
|
||
<a class="goods-img-del-x" style="display: none">x</a>
|
||
</div>
|
||
<?php else: ?>
|
||
<div class="img-add" ></div>
|
||
<?php endif; ?>
|
||
</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">首页推荐</label>
|
||
<div class="layui-input-inline" id="" >
|
||
<input type="radio" name="is_notice" lay-filter="is_notice" style="width: 500px" value=1 title="是" <?php if($info['is_notice'] == 1): ?>checked<?php endif; ?>>
|
||
<input type="radio" name="is_notice" lay-filter="is_notice" style="width: 500px" value=0 title="否"<?php if($info['is_notice'] == 0): ?>checked<?php endif; ?>>
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<label class=" layui-form-mid layui-word-aux" id="notice">在商城首页的名家推荐显示</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="position" value="<?php echo htmlentities($info['position']); ?>" placeholder="" 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" style="width: 400px">
|
||
<input type="text" name="honor" value="<?php echo htmlentities($info['honor']); ?>" placeholder="" 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"><?php echo htmlentities($info['remark']); ?></textarea>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-form-item layui-hide">
|
||
<input type="button" lay-submit lay-filter="supplier-submit-edit" id="supplier-submit-edit" 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);
|
||
});
|
||
|
||
// 删除按钮的显示与隐藏
|
||
$(document).on('mouseover', '.goods-img', function () {
|
||
$(this).next().show();
|
||
});
|
||
$(document).on('mouseout', '.goods-img', function () {
|
||
$(this).next().hide();
|
||
});
|
||
$(document).on('mouseover', '.goods-img-del-x', function () {
|
||
$(this).show();
|
||
});
|
||
$(document).on('mouseout', '.goods-img-del-x', function () {
|
||
$(this).hide();
|
||
});
|
||
})
|
||
</script>
|
||
</body>
|
||
</html>
|