"use strict";const e=require("../common/vendor.js"),i=require("../common/assets.js"),t={data(){return{baseUrl:getApp().globalData.baseUrl,customRules:{name:{rules:[{required:!0,errorMessage:"姓名不能为空"}]},sfzh:{rules:[{required:!0,errorMessage:"身份证号不能为空"}]}},formData:{name:"",sfzh:""}}},onReady(){this.$refs.baseForm.setRules(this.customRules)},methods:{handleBindCard(){this.$refs.baseForm.validate().then(r=>{e.index.showLoading({title:"加载中"}),e.index.request({url:this.baseUrl+"/wxsfrz/wxRegister?name="+this.formData.name+"&sfzh="+this.formData.sfzh+"&openid="+getApp().globalData.openId,method:"POST",success:({data:o})=>{o.code==200?(e.index.hideLoading(),setTimeout(()=>{e.index.reLaunch({url:"/pages/bindCard?name="+this.formData.name+"&sfzh="+this.formData.sfzh})},500)):(e.index.hideLoading(),e.index.showToast({title:o.msg,icon:"none"}))}})})}}};if(!Array){const r=e.resolveComponent("uni-easyinput"),o=e.resolveComponent("uni-forms-item"),a=e.resolveComponent("uni-forms");(r+o+a)()}const m=()=>"../uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js",l=()=>"../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.js",c=()=>"../uni_modules/uni-forms/components/uni-forms/uni-forms.js";Math||(m+l+c)();function d(r,o,a,_,s,u){return{a:i._imports_0$1,b:i._imports_1,c:e.o(n=>s.formData.name=n),d:e.p({placeholder:"请输入姓名",modelValue:s.formData.name}),e:e.p({label:"姓名",required:!0,name:"name"}),f:e.o(n=>s.formData.sfzh=n),g:e.p({placeholder:"请输入身份证号",modelValue:s.formData.sfzh}),h:e.p({label:"身份证号",required:!0,name:"sfzh"}),i:e.sr("baseForm","c9a20a98-0"),j:e.p({"label-position":"top",modelValue:s.formData,rules:s.customRules}),k:e.o((...n)=>u.handleBindCard&&u.handleBindCard(...n))}}const f=e._export_sfc(t,[["render",d],["__scopeId","data-v-c9a20a98"]]);wx.createPage(f);
