(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/myFamily/addFamily/addFamily"],{3937:function(t,a,e){"use strict";e.r(a);var i=e("5ce6"),n=e.n(i);for(var o in i)"default"!==o&&function(t){e.d(a,t,(function(){return i[t]}))}(o);a["default"]=n.a},"47c7":function(t,a,e){"use strict";var i=e("ab41"),n=e.n(i);n.a},"5ce6":function(t,a,e){"use strict";(function(t){Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var e=getApp(),i={data:function(){return{appletType:0,name:null,tel:null,own_room_list:null,own_room_list_index:0,typeArray:["业主","家属","租户"],type:0,nationalityArray:["中国大陆","中国香港/澳门","中国台湾","海外"],nationality:0,nationalityName:"身份证",id_card:null,sexArray:[{name:"男",checked:!0,sex:"1"},{name:"女",checked:!1,sex:"2"}],sex:"1",passport_img_uri:null,show_passport_img_uri:null,entry_img_uri:null,show_entry_img_uri:null,image_uri:null,show_image_uri:null,face_code:null,iconArray:[{iconUrl:"http://139.9.103.171:1888/img/image/zd.png",iconText:"不要遮挡",index:1},{iconUrl:"http://139.9.103.171:1888/img/image/mj.png",iconText:"不戴墨镜",index:2},{iconUrl:"http://139.9.103.171:1888/img/image/zl.png",iconText:"不能仰头俯拍",index:3},{iconUrl:"http://139.9.103.171:1888/img/image/cz.png",iconText:"光线充足",index:4},{iconUrl:"http://139.9.103.171:1888/img/image/bg.png",iconText:"浅色背景",index:5},{iconUrl:"http://139.9.103.171:1888/img/image/sh.png",iconText:"物业审核生效",index:6}]}},components:{},props:{},onShow:function(){this.appletType=t.getStorageSync("appletType")},onLoad:function(t){var a=this;a.setData({own_room_list:e.globalData.own_room_list})},methods:{nameFun:function(t){this.setData({name:t.detail.value})},telFun:function(t){this.setData({tel:t.detail.value})},id_cardFun:function(t){this.setData({id_card:t.detail.value})},typeChange:function(t){this.setData({type:t.detail.value})},roomIdChange:function(t){this.setData({own_room_list_index:t.detail.value})},sexChange:function(t){this.setData({sex:t.detail.value})},nationalityChange:function(t){var a=t.detail.value,e="";0==a?e="身份证":1==a?e="港澳居民往来内地通行证":2==a?e="台湾居民往来大陆通行证":3==a&&(e="护照"),this.setData({nationality:a,nationalityName:e})},chooseImage:function(a){var e=this,i=a.currentTarget.dataset.index;t.chooseImage({count:1,sourceType:["album","camera"],sizeType:["compressed"],success:function(t){var a=t.tempFilePaths;e.$http.uploadFile(a[0]).then((function(t){1==e.operaType?e.setData({passport_img_uri:t.data.name,show_passport_img_uri:imgUrl}):2==e.operaType?e.setData({entry_img_uri:t.data.name,show_entry_img_uri:imgUrl}):3==e.operaType&&e.setData({image_uri:t.data.name,show_image_uri:imgUrl,face_code:t.data.imgMd5})}))}})},addApplyUser:function(){var a=this,i={},n=a.name;if(n){i["name"]=n;var o=a.tel;if(o)if(this.$u.test.mobile(o)){i["tel"]=o;var l=a.own_room_list[a.own_room_list_index].id;if(l){i["room_id"]=l;var r=a.type;i["type"]=r;var u=a.id_card;if(i["id_card"]=u,0!=r||u)if(this.$isEmpty(u)||this.$u.test.idCard(u)){var s=a.nationality;i["nationality"]=s;var c=a.passport_img_uri,d=a.entry_img_uri;if(3==s&&(i["passport_img_uri"]=a.passport_img_uri,i["entry_img_uri"]=a.entry_img_uri,0==r)){if(!c)return void e.globalData.autoFailHint("请上传护照图片");if(!d)return void e.globalData.autoFailHint("请上传入境证明")}a.image_uri;i["image_uri"]=a.image_uri;a.face_code;i["face_code"]=a.face_code,i["sex"]=a.sex,i["member_id"]=e.globalData.member.id,i["create_type"]="0",i["record_type"]="1",a.$http.authentication(i).then((function(a){1==a.data.result_code?e.globalData.oneFailHint(a.data.result_msg,(function(){t.navigateBack({delta:1})})):e.globalData.oneFailHint(a.data.result_msg)}))}else e.globalData.autoFailHint("请输入正确的身份证号");else e.globalData.autoFailHint("住户类型是业主时，证件号码必填")}else e.globalData.autoFailHint("请选择房间号")}else e.globalData.autoFailHint("请填写正确手机号");else e.globalData.autoFailHint("请填写手机")}else e.globalData.autoFailHint("请填写名字")}}};a.default=i}).call(this,e("543d")["default"])},"8fac":function(t,a,e){"use strict";e.r(a);var i=e("c983"),n=e("3937");for(var o in n)"default"!==o&&function(t){e.d(a,t,(function(){return n[t]}))}(o);e("47c7");var l,r=e("f0c5"),u=Object(r["a"])(n["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],l);a["default"]=u.exports},ab41:function(t,a,e){},c983:function(t,a,e){"use strict";var i;e.d(a,"b",(function(){return n})),e.d(a,"c",(function(){return o})),e.d(a,"a",(function(){return i}));var n=function(){var t=this,a=t.$createElement;t._self._c},o=[]},df7d:function(t,a,e){"use strict";(function(t){e("4518");i(e("66fd"));var a=i(e("8fac"));function i(t){return t&&t.__esModule?t:{default:t}}t(a.default)}).call(this,e("543d")["createPage"])}},[["df7d","common/runtime","common/vendor"]]]);