103 lines
3.9 KiB
HTML
103 lines
3.9 KiB
HTML
{extend name="common/base"/}
|
|
<!-- 主体 -->
|
|
{block name="body"}
|
|
<form class="layui-form p-4">
|
|
<h3 class="pb-3">编辑用户实名</h3>
|
|
<table class="layui-table layui-table-form">
|
|
<tr><td class="layui-td-gray-2">姓名<font>*</font></td>
|
|
<td><input type="text" name="name" lay-verify="required" lay-reqText="请完善姓名" value="{$detail.name}" autocomplete="off" placeholder="请输入姓名" class="layui-input"></td><td class="layui-td-gray-2">身份证号<font>*</font></td>
|
|
<td><input type="text" name="idcard" lay-verify="required" lay-reqText="请完善身份证号" value="{$detail.idcard}" autocomplete="off" placeholder="请输入身份证号" class="layui-input"></td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td class="layui-td-gray-2">审核状态<font>*</font></td>
|
|
<td>
|
|
<input type="radio" name="status" value="0" title="审核中" {eq name="$detail.status" value="0"} checked{/eq}>
|
|
<input type="radio" name="status" value="1" title="通过" {eq name="$detail.status" value="1"} checked{/eq}>
|
|
<input type="radio" name="status" value="2" title="不通过" {eq name="$detail.status" value="2"} checked{/eq}>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="layui-td-gray-2">身份证正面<font>*</font></td>
|
|
<td colspan="5" style="vertical-align:top">
|
|
<div class="layui-upload">
|
|
<button type="button" class="layui-btn layui-btn-sm" id="upload_btn_pic_z">选择上传图片</button>
|
|
<div class="layui-upload-list" id="upload_box_pic_z">
|
|
<img src="{$detail.pic_z}" onerror="javascript:this.src='{__GOUGU__}/gougu/images/nonepic600x360.jpg';this.onerror=null;" style="width:200px;max-width:200px" />
|
|
<input type="hidden" name="pic_z" value="{$detail.pic_z}" lay-verify="required" lay-reqText="请完善身份证正面">
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr><tr><td class="layui-td-gray-2">身份证反面<font>*</font></td>
|
|
<td colspan="5" style="vertical-align:top">
|
|
<div class="layui-upload">
|
|
<button type="button" class="layui-btn layui-btn-sm" id="upload_btn_pic_f">选择上传图片</button>
|
|
<div class="layui-upload-list" id="upload_box_pic_f">
|
|
<img src="{$detail.pic_f}" onerror="javascript:this.src='{__GOUGU__}/gougu/images/nonepic600x360.jpg';this.onerror=null;" style="width:200px;max-width:200px" />
|
|
<input type="hidden" name="pic_f" value="{$detail.pic_f}" lay-verify="required" lay-reqText="请完善身份证反面">
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div class="py-3">
|
|
<input type="hidden" name="id" value="{$detail.id}"/>
|
|
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即提交</button>
|
|
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
|
</div>
|
|
</form>
|
|
{/block}
|
|
<!-- /主体 -->
|
|
|
|
<!-- 脚本 -->
|
|
{block name="script"}
|
|
<script>
|
|
var moduleInit = ['tool'];
|
|
|
|
function gouguInit() {
|
|
var form = layui.form, tool = layui.tool;
|
|
|
|
//上传身份证正面
|
|
var upload_pic_z = layui.upload.render({
|
|
elem: '#upload_btn_pic_z',
|
|
url: '/admin/api/upload',
|
|
done: function (res) {
|
|
//如果上传失败
|
|
if (res.code == 1) {
|
|
return layer.msg('上传失败');
|
|
}
|
|
//上传成功
|
|
$('#upload_box_pic_z input').attr('value', res.data.filepath);
|
|
$('#upload_box_pic_z img').attr('src', res.data.filepath);
|
|
}
|
|
});//上传身份证反面
|
|
var upload_pic_f = layui.upload.render({
|
|
elem: '#upload_btn_pic_f',
|
|
url: '/admin/api/upload',
|
|
done: function (res) {
|
|
//如果上传失败
|
|
if (res.code == 1) {
|
|
return layer.msg('上传失败');
|
|
}
|
|
//上传成功
|
|
$('#upload_box_pic_f input').attr('value', res.data.filepath);
|
|
$('#upload_box_pic_f img').attr('src', res.data.filepath);
|
|
}
|
|
});
|
|
|
|
//监听提交
|
|
form.on('submit(webform)', function (data) {
|
|
|
|
let callback = function (e) {
|
|
layer.msg(e.msg);
|
|
if (e.code == 0) {
|
|
tool.sideClose(1000);
|
|
}
|
|
}
|
|
tool.post("/admin/szxc_user_authentication/edit", data.field, callback);
|
|
return false;
|
|
});
|
|
}
|
|
</script>
|
|
{/block}
|
|
<!-- /脚本 --> |