94 lines
3.7 KiB
HTML
94 lines
3.7 KiB
HTML
{layout name="layout2" /}
|
||
<style>
|
||
.layui-form-label {
|
||
color: #6a6f6c;
|
||
width: 100px;
|
||
}
|
||
.layui-input-block {
|
||
margin-left: 130px;
|
||
}
|
||
.tips{
|
||
color: red;
|
||
margin-right: 5px;
|
||
}
|
||
</style>
|
||
<div class="layui-form" lay-filter="layuiadmin-form-user_level" id="layuiadmin-form-user_level" style="padding: 20px 30px 0 0;">
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label"><span class="tips">*</span>等级名称:</label>
|
||
<div class="layui-input-inline">
|
||
<input type="text" name="name" lay-verify="required" lay-verType="tips" autocomplete="off" class="layui-input">
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label"><span class="tips">*</span>成长值:</label>
|
||
<div class="layui-input-inline">
|
||
<input type="number" name="growth_value" min="0" lay-verify="required" lay-verType="tips" autocomplete="off" class="layui-input">
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label"><span class="tips">*</span>等级图标:</label>
|
||
<div class="layui-input-inline">
|
||
<div class="like-upload-image">
|
||
<div class="upload-image-elem"><a class="add-upload-image" id="image"> + 添加图片</a></div>
|
||
</div>
|
||
<div class=" layui-form-mid layui-word-aux" style="white-space: nowrap">建议尺寸:100*100像素,jpg,jpeg,png图片类型</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label"><span class="tips">*</span>等级背景图:</label>
|
||
<div class="layui-input-inline">
|
||
<div class="like-upload-image">
|
||
<div class="upload-image-elem"><a class="add-upload-image" id="background_image"> + 添加图片</a></div>
|
||
</div>
|
||
<div class=" layui-form-mid layui-word-aux" style="white-space: nowrap">建议尺寸:800*500像素,jpg,jpeg,png图片类型</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label">会员折扣:</label>
|
||
<div class="layui-input-inline">
|
||
<input type="number" name="discount" min="0" max="10" autocomplete="off" class="layui-input">
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label"></label>
|
||
<div class=" layui-form-mid layui-word-aux" style="white-space: nowrap">等级享受的折扣,填写0~10,例如7.5折表示100元商品只需支付75元。留空或者填0表示不打折</div>
|
||
</div>
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label">等级说明:</label>
|
||
<div class="layui-input-block">
|
||
<textarea name="remark" class="layui-textarea"></textarea>
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item layui-hide">
|
||
<input type="button" lay-submit lay-filter="add-user_level-submit" id="add-user_level-submit" value="确认">
|
||
</div>
|
||
</div>
|
||
<script>
|
||
layui.config({
|
||
version:"{$front_version}",
|
||
base: '/static/lib/' //静态资源所在路径
|
||
}).use(['form'], function(){
|
||
var $ = layui.$
|
||
,form = layui.form;
|
||
|
||
// 图片上传
|
||
like.delUpload();
|
||
// 图标
|
||
$(document).on("click", "#image", function () {
|
||
like.imageUpload({
|
||
limit: 1,
|
||
field: "image",
|
||
that: $(this)
|
||
});
|
||
})
|
||
// 背景图
|
||
$(document).on("click", "#background_image", function () {
|
||
like.imageUpload({
|
||
limit: 1,
|
||
field: "background_image",
|
||
that: $(this)
|
||
});
|
||
})
|
||
|
||
})
|
||
</script> |