require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/users/user_address/addClient"],{"4be2":function(t,e,n){"use strict";n.r(e);var i=n("91b3"),r=n.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e["default"]=r.a},"4c3f":function(t,e,n){},6672:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){}));var i=function(){var t=this.$createElement,e=(this._self._c,this.addressInfo.length);this.$mp.data=Object.assign({},{$root:{g0:e}})},r=[]},"91b3":function(t,e,n){"use strict";(function(t){var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("7ca3")),s=n("92f9"),a=n("8f59"),o=i(n("89cc")),d=i(n("fabc"));function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){(0,r.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var l={components:{areaWindow:function(){n.e("components/areaWindow/index").then(function(){return resolve(n("e636"))}.bind(null,n)).catch(n.oe)}},mixins:[o.default],data:function(){return{id:0,userAddress:{},district:[],display:!1,addressInfo:[],addressVal:"",latitude:"",longitude:"",city_id:0,addressValue:""}},computed:u(u({},(0,a.mapGetters)(["isLogin"])),{},{addressText:function(){return this.addressInfo.map((function(t){return t.label})).join("/")}}),onLoad:function(t){},methods:{changeRegion:function(){this.display=!0},OnChangeAddress:function(t){this.latitude="",this.longitude="",this.addressInfo=t},changeClose:function(){this.display=!1},chooseLocation:function(){var e=this,n=this;t.chooseLocation({success:function(t){var i,r;i=t.latitude.toString(),r=t.longitude.toString(),e.latitude=t.latitude,e.longitude=t.longitude,(0,s.getGeocoder)({lat:i,long:r}).then((function(t){var e=t.data;(0,s.getCityList)(e.address_component.province+"/"+e.address_component.city+"/"+e.address_component.district+"/"+(e.address_reference.town?e.address_reference.town.title:"")).then((function(t){n.addressInfo=t.data,n.userAddress.detail=e.formatted_addresses.recommend})).catch((function(t){n.$util.Tips({title:t})}))}))},fail:function(t){}})},formSubmit:function(e){var n=e.detail.value;if(!n.real_name)return this.$util.Tips({title:"请填写收货人姓名"});if(!n.phone)return this.$util.Tips({title:"请填写联系电话"});if(!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(n.phone))return this.$util.Tips({title:"请输入正确的手机号码"});if(!this.addressInfo.length)return this.$util.Tips({title:"请选择所在地区"});if(this.addressInfo.length<3)return this.$util.Tips({title:"请补全所在地区信息"});if(!n.detail)return this.$util.Tips({title:"请填写详细地址"});n.id=0;var i=this.addressInfo;n.address={province:i[0].label,city:i[1].label,district:i[2].label,street:i[3]?i[3].label:"",city_id:i[i.length-1].id?i[i.length-1].id:this.city_id},t.$emit("refresh",n),t.navigateBack()},identify:function(){var t=this,e=(0,d.default)(this.addressValue.trim(),{type:0,textFilter:[],nameMaxLength:4});this.addressValue.trim()&&(0,s.getCityList)(e.province+"/"+e.city+"/"+e.area).then((function(n){t.addressInfo=n.data,t.userAddress.phone=e.phone,t.userAddress.real_name=e.name,t.userAddress.detail=e.detail})).catch((function(e){return t.$util.Tips({title:e})}))}}};e.default=l}).call(this,n("df3c")["default"])},a59a:function(t,e,n){"use strict";n.r(e);var i=n("6672"),r=n("4be2");for(var s in r)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(s);n("e151");var a=n("828b"),o=Object(a["a"])(r["default"],i["b"],i["c"],!1,null,"c7ee1af4",null,!1,i["a"],void 0);e["default"]=o.exports},e151:function(t,e,n){"use strict";var i=n("4c3f"),r=n.n(i);r.a},f2c1:function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("f076");i(n("3240"));var r=i(n("a59a"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(r.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])}},[["f2c1","common/runtime","common/vendor","pages/users/common/vendor"]]]);