(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/healthCode/healthCode"],{"0018":function(t,n,e){"use strict";(function(t){e("4518");o(e("66fd"));var n=o(e("168f"));function o(t){return t&&t.__esModule?t:{default:t}}t(n.default)}).call(this,e("543d")["createPage"])},"168f":function(t,n,e){"use strict";e.r(n);var o=e("d174"),i=e("cc81");for(var u in i)"default"!==u&&function(t){e.d(n,t,(function(){return i[t]}))}(u);e("65c0");var r,a=e("f0c5"),s=Object(a["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],r);n["default"]=s.exports},"65c0":function(t,n,e){"use strict";var o=e("e81e"),i=e.n(o);i.a},8926:function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e={data:function(){return{loading:!0,infoShow:!1,hideName:"",personInfo:{name:"*",idNumber:"*"},timer:"",nowStr:"",healthCode:{},tips:"按照目前掌握的防疫相关数据，暂未发现您存在与防疫相关异常健康状况。防疫相关数据会随着疫情发展及时更新。此次查询并不会排除您的防疫相关健康风险。"}},onLoad:function(){console.log(this.$u.sys()),this.getDateStr(),this.init()},beforeDestroy:function(){clearInterval(this.timer)},methods:{init:function(){var n=getApp().globalData.member;this.personInfo.name=n.name,this.personInfo.idNumber=n.idcard,this.$isEmpty(this.personInfo.name)?t.showModal({content:"系统异常",showCancel:!1,success:function(n){t.navigateBack({delta:1})}}):(this.hideName=this.handelName(this.personInfo.name),this.$isEmpty(this.personInfo.idNumber)?this.infoShow=!0:this.fetchCode())},infoConfirm:function(){return this.$isEmpty(this.personInfo.idNumber)?(this.$u.toast("请输入身份证号"),void(this.infoShow=!0)):this.$u.test.idCard(this.personInfo.idNumber)?void this.fetchCode():(this.$u.toast("请输入正确的身份证号"),void(this.infoShow=!0))},fetchCode:function(){this.loading=!0;var n=this,e="health/getCode",o={userName:this.personInfo.name,idCardNumber:this.personInfo.idNumber};getApp().globalData.postRequest(o,e,(function(e){1!=e.data.result_code&&t.showModal({content:e.data.result_msg,showCancel:!1,success:function(n){n.confirm&&t.navigateBack({delta:1})}}),n.healthCode=e.data.result_msg,n.loading=!1}))},handelName:function(t){var n,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=t.length-e-o;if(2===t.length)n=t.substring(0,1)+"*";else if(t.length>2){for(var u="",r=0;r<i;r++)u+="*";n=t.substring(0,e)+u+t.substring(t.length-o)}else n=t;return n},getDateStr:function(){var t=this;this.timer=setInterval((function(){t.nowStr=t.$util.dateFormat(new Date,"yyyy-MM-dd hh:mm:ss")}),1e3)},navigate:function(n){t.navigateTo({url:n})}}};n.default=e}).call(this,e("543d")["default"])},cc81:function(t,n,e){"use strict";e.r(n);var o=e("8926"),i=e.n(o);for(var u in o)"default"!==u&&function(t){e.d(n,t,(function(){return o[t]}))}(u);n["default"]=i.a},d174:function(t,n,e){"use strict";e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return u})),e.d(n,"a",(function(){return o}));var o={uModal:function(){return e.e("uview-ui/components/u-modal/u-modal").then(e.bind(null,"0dd2"))},uForm:function(){return e.e("uview-ui/components/u-form/u-form").then(e.bind(null,"2690"))},uFormItem:function(){return Promise.all([e.e("common/vendor"),e.e("uview-ui/components/u-form-item/u-form-item")]).then(e.bind(null,"5968"))},uInput:function(){return Promise.all([e.e("common/vendor"),e.e("uview-ui/components/u-input/u-input")]).then(e.bind(null,"3de1"))}},i=function(){var t=this,n=t.$createElement;t._self._c},u=[]},e81e:function(t,n,e){}},[["0018","common/runtime","common/vendor"]]]);