vaeThink2/app/admin/template/route/edit.html

71 lines
2.3 KiB
HTML
Raw Permalink Normal View History

2020-04-01 09:59:41 +08:00
{include file="common/head"}
<form class="layui-form" style="padding: 20px 70px 0 0;">
<div class="layui-form-item">
<label class="layui-form-label">应用(模块)</label>
<div class="layui-input-block">
<input type="text" name="module" lay-verify="required" autocomplete="off" placeholder="请输入应用名" class="layui-input" value="{$data.module}">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">原始链接</label>
<div class="layui-input-block">
<input type="text" name="full_url" lay-verify="required" autocomplete="off" placeholder="请输入完整的原始链接" class="layui-input" value="{$data.full_url}">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">美化后</label>
<div class="layui-input-block">
<input type="text" name="url" lay-verify="required" placeholder="请输入美化后想要显示的链接" autocomplete="off" class="layui-input" value="{$data.url}">
<div class="layui-form-mid layui-word-aux">url格式一般为name/:参数1/:参数2</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">状态</label>
<div class="layui-input-block">
<input type="radio" name="status" value="1" title="启用" {eq name="$data.status" value="1"}checked{/eq}>
<input type="radio" name="status" value="0" title="禁用" {eq name="$data.status" value="0"}checked{/eq}>
</div>
</div>
{:token_meta()}
<div class="layui-form-item">
<div class="layui-input-block">
<input type="hidden" name="id" value="{$data.id}" />
<button class="layui-btn" lay-submit="" lay-filter="vaeform">立即提交</button>
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
</div>
</div>
</form>
{include file="common/foot"}
<script>
layui.config({
base: '__AVIEW__/module/'
}).use(['form','vae'], function(){
var form = layui.form
,layer = layui.layer
,$ = layui.$
,vae = layui.vae;
//监听提交
form.on('submit(vaeform)', function(data){
vae.ajax({
url:"{:url('admin/route/edit')}",
type:'post',
data:data.field,
success:function(e){
layer.msg(e.msg);
if(e.code==200){
vae.close();
}
}
})
return false;
});
});
</script>
</body>
</html>