(function (b) { config.init(); b("i.menu_back").on("tap", function () { window.location = "family.html" }); var a = { doing: function () { setTimeout(function () { window.location = "family.html" }, 2000) } }; b("i.menu_cn,#iDataAdd").on("tap", function () { if (validate.check("#testForm")) { var birthDay = null; if (b("#idNo").val().length == 18) { birthDay = b("#idNo").val().substr(6, 8).replace(/(.{4})(.{2})/, "$1-$2-") } else { birthDay = '2000-01-01'; } var c = { trueName: b("#trueName").val(), phone: b("#phone").val(), tel: b("#tel").val(), email: b("#email").val(), idNo: b("#idNo").val(), birthDay: birthDay, address: b("#address").val(), sex: b("#sex").val(), nation: b("#nation").val(), province: null, city: null, area: null, ownership: b("#ownership").val() }; hzAPI.sendData(window.apiUrl + "?c=Index&a=customerFamilyAdd", c, false, ["身份证号已存在,添加失败", "添加成功"], null, null, a) } }) })(Zepto);