(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/me/pagesOne/address/newAddress/newAddress"],{"25dc":function(n,t,e){"use strict";e.d(t,"b",(function(){return o})),e.d(t,"c",(function(){return i})),e.d(t,"a",(function(){}));var o=function(){var n=this.$createElement;this._self._c},i=[]},"2cbf":function(n,t,e){"use strict";(function(n){var t=e("4ea4");e("0178");t(e("66fd"));var o=t(e("cb67"));wx.__webpack_require_UNI_MP_PLUGIN__=e,n(o.default)}).call(this,e("543d")["createPage"])},"705d":function(n,t,e){"use strict";e.r(t);var o=e("d521"),i=e.n(o);for(var s in o)["default"].indexOf(s)<0&&function(n){e.d(t,n,(function(){return o[n]}))}(s);t["default"]=i.a},cb67:function(n,t,e){"use strict";e.r(t);var o=e("25dc"),i=e("705d");for(var s in i)["default"].indexOf(s)<0&&function(n){e.d(t,n,(function(){return i[n]}))}(s);var a=e("f0c5"),d=Object(a["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);t["default"]=d.exports},d521:function(n,t,e){"use strict";(function(n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={data:function(){return{info:{type:1,name:"",mobile:"",areas:"",address:"",default:"1"},buttonText:"新增地址"}},components:{wangdingPickerAddress:function(){Promise.all([e.e("common/vendor"),e.e("components/wangding-pickerAddress/wangding-pickerAddress")]).then(function(){return resolve(e("043f"))}.bind(null,e)).catch(e.oe)}},onLoad:function(t){t.id&&(n.setNavigationBarTitle({title:"修改地址"}),this.buttonText="修改地址",this.getAddress(t.id)),"1"==t.type&&this.$tools.showtt("请先填写地址再下单")},methods:{chooseLocation:function(){var t=this;n.chooseLocation({success:function(n){console.log(n),t.info.lon=n.longitude,t.info.lat=n.latitude}})},newAddress:function(){var n=this,t=this;if(function(){for(var n in t.info)return""!==t.info[n]}()&&t.$tools.isPhone(t.info.mobile)){var e="user/add_address";"修改地址"==this.buttonText&&(e="index/edit_address"),t.axiosFromToken("POST",e,this.info,"请稍等").then((function(t){1==t.code&&(n.goBack(1),n.showtt(t.msg,"succesc")),n.showtt(t.msg)}))}else t.showtt("请检查信息是否填写并正确")},addressChange:function(n){this.info.areas=n.data.join()},swtichChange:function(n){this.info.default=n.detail.value?"1":"0"},getAddress:function(n){var t=this;this.$tools.axiosFromToken("POST","user/sel_address",{type:2},"加载中").then((function(e){var o=e.data.filter((function(t){return t.id==n}));t.info=o[0],t.info.id=n}))}}};t.default=o}).call(this,e("543d")["default"])}},[["2cbf","common/runtime","common/vendor"]]]);