90f6b839 by 任超

style:注册

1 parent 3bf4207e
1 $(function () { 1 $(function () {
2 layui.use(['form'], function () { 2 layui.use(['form'], function () {
3 var form = layui.form 3 var form = layui.form
4 form.on('select(type)', function (data) {
5 console.log(data);
6 })
7 //监听提交 4 //监听提交
8 form.on('submit(demo1)', function (data) { 5 form.on('submit(demo1)', function (data) {
9 register(data.field) 6 register(data.field)
...@@ -12,7 +9,7 @@ $(function () { ...@@ -12,7 +9,7 @@ $(function () {
12 }) 9 })
13 }) 10 })
14 11
15 // 获取受理流程信息 12 // 注册
16 function register(formData) { 13 function register(formData) {
17 $.ajax({ 14 $.ajax({
18 url: portal.api_url + "/protal/users/insert",//路径 15 url: portal.api_url + "/protal/users/insert",//路径
...@@ -28,6 +25,8 @@ function register(formData) { ...@@ -28,6 +25,8 @@ function register(formData) {
28 }) 25 })
29 window.open("../index.html","_self") 26 window.open("../index.html","_self")
30 window.history.go(-1) 27 window.history.go(-1)
28 }else {
29 layer.msg(result.message);
31 } 30 }
32 } 31 }
33 }); 32 });
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
31 <div class="layui-form-item"> 31 <div class="layui-form-item">
32 <label class="layui-form-label">证件种类</label> 32 <label class="layui-form-label">证件种类</label>
33 <div class="layui-input-block"> 33 <div class="layui-input-block">
34 <select name="interest" lay-filter="type"> 34 <select name="zjzl" lay-filter="type">
35 <option value="0">身份证</option> 35 <option value="0">身份证</option>
36 </select> 36 </select>
37 </div> 37 </div>
...@@ -40,14 +40,14 @@ ...@@ -40,14 +40,14 @@
40 <div class="layui-form-item"> 40 <div class="layui-form-item">
41 <label class="layui-form-label">身份证</label> 41 <label class="layui-form-label">身份证</label>
42 <div class="layui-input-block"> 42 <div class="layui-input-block">
43 <input type="text" name="idcard" placeholder="请输入身份证" class="layui-input"> 43 <input type="text" name="zjhm" placeholder="请输入身份证" class="layui-input">
44 </div> 44 </div>
45 </div> 45 </div>
46 46
47 <div class="layui-form-item"> 47 <div class="layui-form-item">
48 <label class="layui-form-label">户籍</label> 48 <label class="layui-form-label">户籍</label>
49 <div class="layui-input-block"> 49 <div class="layui-input-block">
50 <input type="text" name="household" disabled="disabled" class="layui-input"> 50 <input type="text" name="hjszss" disabled="disabled" class="layui-input">
51 </div> 51 </div>
52 </div> 52 </div>
53 <div class="layui-form-item"> 53 <div class="layui-form-item">
......