(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-my-add-address"],{"02e2":function(e,t,a){"use strict";a.r(t);var i=a("8adb"),n=a.n(i);for(var r in i)["default"].indexOf(r)<0&&function(e){a.d(t,e,(function(){return i[e]}))}(r);t["default"]=n.a},"094e":function(e,t,a){"use strict";var i=a("9e2b"),n=a.n(i);n.a},"0d511":function(e,t,a){"use strict";a("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a("c975");var i={name:"bar-title",props:{bgColor:{type:String,default:""},isBack:{type:Boolean,default:!0},backText:{type:String,default:""},fixed:{type:Boolean,default:!0},shadow:{type:Boolean,default:!1},title:{type:String,default:""}},data:function(){return{isWechatBrowser:!1}},methods:{BackPage:function(){uni.navigateBack()},leftTap:function(){this.$emit("leftTap")},contentTap:function(){this.$emit("contentTap")},rightTap:function(){this.$emit("rightTap")}},created:function(){uni.setNavigationBarTitle({title:this.title}),this.isWechatBrowser=navigator.userAgent.toLocaleLowerCase().indexOf("micromessenger")>0}};t.default=i},"10eb":function(e,t,a){"use strict";a("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},a("d9e2"),a("d401")},4053:function(e,t,a){"use strict";a("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(Array.isArray(e))return(0,i.default)(e)};var i=function(e){return e&&e.__esModule?e:{default:e}}(a("b680"))},5606:function(e,t,a){var i=a("24fb");t=i(!1),t.push([e.i,".zaiui-bar-title-box .cu-bar[data-v-095caefc]{padding-top:0;min-height:calc(0px + %?101?%)}.zaiui-bar-title-box .cu-bar .content[data-v-095caefc]{top:0}.zaiui-bar-title-box .cu-bar .content .cu-tag[data-v-095caefc]{position:relative;top:%?-2.72?%;padding:0 %?5.45?%}.zaiui-bar-title-box .cu-bar .content .cu-tag uni-text[data-v-095caefc]{position:relative;top:%?2?%}.zaiui-bar-title-box .cu-bar.fixed.no-shadow[data-v-095caefc]{box-shadow:inherit}.zaiui-bar-title-box .cu-bar.bg-white[data-v-095caefc]{color:#333}.zaiui-bar-title-box .zaiui-seat-height[data-v-095caefc]{width:100%;height:calc(0px + %?101?%)}",""]),e.exports=t},"713c":function(e,t,a){"use strict";a.r(t);var i=a("ede5"),n=a("df75a");for(var r in n)["default"].indexOf(r)<0&&function(e){a.d(t,e,(function(){return n[e]}))}(r);a("094e");var o=a("f0c5"),s=Object(o["a"])(n["default"],i["b"],i["c"],!1,null,"095caefc",null,!1,i["a"],void 0);t["default"]=s.exports},"7d86":function(e,t,a){var i=a("f954");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var n=a("4f06").default;n("10302c61",i,!0,{sourceMap:!1,shadowMode:!1})},"8adb":function(e,t,a){"use strict";a("7a82");var i=a("ee27").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(a("d0ff"));a("99af"),a("c740"),a("a434"),a("d81d"),a("c975"),a("ac1f"),a("00b4");var r=i(a("713c")),o=i(a("b27f")),s={components:{barTitle:r.default},data:function(){return{name:"",phone:"",id:"",address:"",addressShow:!1,areas:[[{name:"省份选择",value:"-1"}],[{name:"城市选择",value:"-1"}],[{name:"县区选择",value:"-1"}]],areasIndex:[0,0,0],roleDeep:4,type:2}},onLoad:function(e){var t=this;this.id=e.id||"",this.id?this.reqByuser({url:"?l=address.getInfo",data:{id:this.id},success:function(e){if(1==e.data.status){var a=e.data.data;t.phone=a.phone,t.address=a.address,t.city=a.city,t.type=a.type,t.name=a.name,t.initAreasIndex([a.province_id,a.city_id,a.county_id])}}}):this.loadAreas(0,1)},onReady:function(){o.default.setBarColor(!0),uni.pageScrollTo({scrollTop:0,duration:0})},methods:{initAreasIndex:function(e){var t=this,a=[].concat(e);(function i(n,r){t.loadAreas(n,r,0,(function(n){var o=n.findIndex((function(t){return e[r-1]==t.id}));1==r&&o++,t.areasIndex[r-1]=Math.max(0,o);var s=a.shift();s&&r<3&&i(s,r+1)}),1)})(0,1)},loadAreas:function(e,t,a,i){var r=this;t>4||this.req({url:"http://center.yuandaibao.com/package/area/?l=data.get",data:{level:t,parent:e},success:function(o){if(1==o.data.status){var s=o.data.data;if(t-1<3){var u=s.list;0==e&&(u=[{name:"省份选择",value:"-1"}].concat((0,n.default)(u))),r.areas.splice(t-1,1,u)}if("function"==typeof i&&i(s.list),a&&t-1)uni.showToast({icon:"error",title:"请填写地址"});else if(r){var s={name:t,province:this.areas[0][this.areasIndex[0]].id,city:this.areas[1][this.areasIndex[1]].id,county:this.areas[2][this.areasIndex[2]].id,address:r,phone:a,type:i,id:n};this.reqByuser({url:"?l=address.up",data:s,success:function(e){1==e.data.status&&(uni.showToast({icon:"success",title:"提交成功"}),uni.navigateBack({}))}})}else uni.showToast({icon:"error",title:"请填写详细地址"});else uni.showToast({icon:"error",title:"手机号格式错误"});else uni.showToast({icon:"error",title:"请填写手机号"});else uni.showToast({icon:"error",title:"请填写昵称"})}}};t.default=s},"9e2b":function(e,t,a){var i=a("5606");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var n=a("4f06").default;n("38d2a49e",i,!0,{sourceMap:!1,shadowMode:!1})},a9e0:function(e,t,a){"use strict";a("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},a("a4d3"),a("e01a"),a("d3b7"),a("d28b"),a("3ca3"),a("ddb0"),a("a630")},b27f:function(e,t,a){"use strict";a("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a("a9e3"),a("d401"),a("d3b7"),a("25f0"),a("e25e"),a("c975"),a("ac1f"),a("5319");var i={strLeng:function(e){if(e){for(var t=e.length,a=0,i=0;i128?a+=2:a+=1;return a}return 0},getPageNum:function(e,t){var a=Number(e)/Number(t);if(a%1!==0){var i=a.toString(),n=parseInt(i.substring(0,i.indexOf("."))),r=i.replace(/\d+\.(\d*)/,"$1");r>0&&(a=n+1)}return a},setBarColor:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e?uni.setNavigationBarColor({frontColor:"#000000",backgroundColor:"#FAFAFA"}):uni.setNavigationBarColor({frontColor:"#ffffff",backgroundColor:"#FAFAFA"})},zaiui_log:function(e){}},n=i;t.default=n},b902:function(e,t,a){"use strict";var i=a("7d86"),n=a.n(i);n.a},ce08:function(e,t,a){"use strict";a.d(t,"b",(function(){return i})),a.d(t,"c",(function(){return n})),a.d(t,"a",(function(){}));var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-uni-view",[a("bar-title",{attrs:{bgColor:"bg-white",isBack:!0,title:e.id?"编辑地址":"新增地址"}},[a("template",{attrs:{slot:"content"},slot:"content"},[e._v(e._s(e.id?"编辑地址":"新增地址"))])],2),a("v-uni-view",{staticClass:"cu-form-group margin-top"},[a("v-uni-view",{staticClass:"title"},[e._v("收货人名")]),a("v-uni-input",{attrs:{placeholder:"您的姓名"},model:{value:e.name,callback:function(t){e.name=t},expression:"name"}})],1),a("v-uni-view",{staticClass:"cu-form-group"},[a("v-uni-view",{staticClass:"title"},[e._v("手机号码")]),a("v-uni-input",{attrs:{placeholder:"卖家和快递员联系您的方式"},model:{value:e.phone,callback:function(t){e.phone=t},expression:"phone"}})],1),a("v-uni-view",{staticClass:"cu-form-group"},[a("v-uni-view",{staticClass:"title"},[e._v("所在地区")]),a("v-uni-picker",{attrs:{mode:"multiSelector",value:e.areasIndex,"range-key":"name",range:e.areas},on:{columnchange:function(t){arguments[0]=t=e.$handleEvent(t),e.bindMultiPickerColumnChange.apply(void 0,arguments)},change:function(t){arguments[0]=t=e.$handleEvent(t),e.multChange.apply(void 0,arguments)}}},[a("v-uni-view",{staticClass:"picker"},[e._l(e.areas,(function(t,a){return a<3?[e._v(e._s(e.areas[a]&&e.areas[a][e.areasIndex[a]]&&e.areas[a][e.areasIndex[a]].name)),a