text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pagesA-editAddress-editAddress"],{"3dff":function(t,e,i){"use strict";i.r(e);var n=i("a3fb"),a=i.n(n);for(var s in n)"default"!==s&&function(t){i.d(e,t,function(){return n[t]})}(s);e["default"]=a.a},"70e8":function(t,e,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"content"},[i("v-uni-view",{staticClass:"box"},[i("v-uni-view",{staticClass:"box_left"},[t._v("姓名")]),i("v-uni-view",{staticClass:"box_right"},[i("v-uni-input",{attrs:{type:"text",value:"",placeholder:"收件人姓名"},model:{value:t.user.consignee,callback:function(e){t.$set(t.user,"consignee",e)},expression:"user.consignee"}})],1)],1),i("v-uni-view",{staticClass:"box"},[i("v-uni-view",{staticClass:"box_left"},[t._v("电话")]),i("v-uni-view",{staticClass:"box_right"},[i("v-uni-input",{attrs:{type:"number",maxlength:"11",value:"",placeholder:"收件人手机号"},model:{value:t.user.phone,callback:function(e){t.$set(t.user,"phone",e)},expression:"user.phone"}})],1)],1),i("v-uni-view",{staticClass:"box"},[i("v-uni-view",{staticClass:"box_left"},[t._v("地区")]),i("v-uni-view",{staticClass:"box_right"},[i("v-uni-view",{staticClass:"citybtn",on:{click:function(e){e=t.$handleEvent(e),t.showMulLinkageThreePicker(e)}}},[t._v(t._s(t.pickerText))]),i("v-uni-view",[i("v-uni-image",{attrs:{src:"../../static/xiala.png",mode:""}})],1)],1)],1),i("v-uni-view",{staticClass:"box"},[i("v-uni-view",{staticClass:"box_left"},[t._v("详细地址")]),i("v-uni-view",{staticClass:"box_right_right"},[i("v-uni-input",{attrs:{type:"text",value:"",placeholder:"街道门牌,楼层房间号等信息"},model:{value:t.user.details,callback:function(e){t.$set(t.user,"details",e)},expression:"user.details"}}),i("v-uni-image",{attrs:{src:"../../static/address.png",mode:""},on:{click:function(e){e=t.$handleEvent(e),t.gosite(e)}}})],1)],1),i("v-uni-view",{staticClass:"box"},[i("v-uni-view",{staticClass:"box_left"},[t._v("地址定位")]),i("v-uni-view",{staticClass:"box_right_right",on:{click:function(e){e=t.$handleEvent(e),t.openMap()}}},[i("v-uni-text",[t._v(t._s(t.mapAddressName))]),i("v-uni-image",{attrs:{src:"../../static/right-arrow.png",mode:""}})],1)],1),i("v-uni-view",{staticClass:"box"},[i("v-uni-view",{staticClass:"box_left_two"},[t._v("设为默认收件地址")]),i("v-uni-view",{staticClass:"box_right_two"},[i("v-uni-switch",{staticStyle:{transform:"scale(0.8)"},attrs:{color:"#D23535"},on:{change:function(e){e=t.$handleEvent(e),t.switchBtn(e)}}})],1)],1),i("v-uni-button",{staticClass:"btn",on:{click:function(e){e=t.$handleEvent(e),t.submit(e)}}},[t._v("提交")]),i("mpvue-city-picker",{ref:"mpvueCityPicker",attrs:{themeColor:t.themeColor,pickerValueDefault:t.cityPickerValueDefault},on:{onConfirm:function(e){e=t.$handleEvent(e),t.onConfirm(e)}}})],1)},a=[];i.d(e,"a",function(){return n}),i.d(e,"b",function(){return a})},a0a6:function(t,e,i){"use strict";i.r(e);var n=i("70e8"),a=i("3dff");for(var s in a)"default"!==s&&function(t){i.d(e,t,function(){return a[t]})}(s);i("f452");var o=i("2877"),c=Object(o["a"])(a["default"],n["a"],n["b"],!1,null,"f363c856",null);e["default"]=c.exports},a3fb:function(t,e,i){"use strict";var n=i("288e");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("7f7f"),i("28a5");var a=n(i("898f")),s=n(i("c997")),o=n(i("d148")),c=n(i("f9e7")),r=new s.default,u={data:function(){return{cityPickerValueDefault:[0,0,1],themeColor:"#007AFF",pickerText:"选择省/市/区",mode:"",deepLength:1,pickerValueDefault:[0],pickerValueArray:[],user:{consignee:"",phone:"",province:"",city:"",district:"",details:"",default:"0",longitude:null,latitude:null},IDcard:"",addressId:"",mapAddressName:"在地图上搜索并选择地址"}},components:{mpvueCityPicker:a.default},onLoad:function(t){console.log(t);var e=this;e.addressId=t.addressId,new c.default({key:"N76BZ-DTGKD-4TZ4H-PSTQQ-G2BCK-WWFZH"}),e.addressId&&r.submit({request:{s:["USERADDRESSSELFGET",[{id:e.addressId}]]},callback:function(t){var i=o.default.checkError(t,"s",function(t,e){uni.showToast({title:e,icon:"none"})});console.log(i),e.user=i.s;var n=i.s.province,a=i.s.city,s=i.s.district;e.pickerText=n+"-"+a+"-"+s},error:function(t){o.default.err("err",t,1)}})},methods:{showMulLinkageThreePicker:function(){this.$refs.mpvueCityPicker.show()},onConfirm:function(t){console.log(t);var e=t.label;this.pickerText=e;var i=e.split("-");this.user.province=i[0],this.user.city=i[1],this.user.district=i[2]},gosite:function(){var t=this;uni.chooseLocation({success:function(e){console.log("位置名称："+e.name),console.log("详细地址："+e.address),t.user.details=e.address,console.log("纬度："+e.latitude),console.log("经度："+e.longitude)}})},openMap:function(){var t=this;uni.chooseLocation({keyword:t.user.details,success:function(e){console.log("res",e),t.user.latitude=e.latitude,t.user.longitude=e.longitude,t.mapAddressName=e.name,console.log("经度："+e.longitude),console.log("详细地址："+e.address),console.log("纬度："+e.latitude)}})},submit:function(){var t=this.user,e=this;t.consignee&&t.phone&&t.province&&t.city&&t.district&&t.details&&t.longitude&&t.latitude?(uni.showLoading({title:"请稍等..."}),e.addressId?r.submit({request:{add:["USERADDRESSSELFEDIT",[t]]},callback:function(t){var e=o.default.checkError(t,"add",function(t,e){uni.showToast({title:e,icon:"none"})});e.add&&uni.showToast({title:"修改成功",success:function(){setTimeout(function(){uni.navigateBack({})},2e3)}})},error:function(t){o.default.err("err",t,1)}}):r.submit({request:{add:["USERADDRESSSELFADD",[t]]},callback:function(t){var e=o.default.checkError(t,"add",function(t,e){uni.showToast({title:e,icon:"none"})});e.add&&uni.showToast({title:"添加成功",success:function(){setTimeout(function(){uni.navigateBack({})},2e3)}})},error:function(t){o.default.err("err",t,1)}})):uni.showToast({title:"有完成项",icon:"none"})},switchBtn:function(t){var e=this;console.log("switch1 发生 change 事件，携带值为",t.target.value),1==t.target.value?e.user.default=1:e.user.default=0,console.log(e.user.default)}}};e.default=u},bd5e:function(t,e,i){e=t.exports=i("2350")(!1),e.push([t.i,"uni-page-body[data-v-f363c856]{background-color:#fafafa}.content[data-v-f363c856]{width:100%;font-size:%?28?%;padding-top:%?40?%;color:#676769}.box[data-v-f363c856]{width:%?690?%;padding:0 %?30?%;height:%?80?%;line-height:%?80?%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-bottom:%?20?%}.box_left[data-v-f363c856]{width:20%;height:%?80?%}.box_left_two[data-v-f363c856]{width:%?550?%}.box_right[data-v-f363c856]{width:70%;height:%?70?%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.box_right_right[data-v-f363c856]{width:70%;height:%?80?%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.box_right_right uni-input[data-v-f363c856]{width:87%;height:%?70?%;line-height:%?70?%}.box_right_right uni-image[data-v-f363c856]{width:%?40?%;height:%?40?%}.box_right uni-image[data-v-f363c856]{width:%?40?%;height:%?40?%;margin-top:%?20?%;margin-left:%?30?%}.box_right_two[data-v-f363c856]{width:%?150?%}.box_right uni-input[data-v-f363c856]{width:97%;height:100%;border:%?1?% #ccc solid;border-radius:%?15?%;padding-left:3%;margin-top:%?10?%;background-color:#fff}.btn[data-v-f363c856]{width:%?690?%;height:%?90?%;line-height:%?90?%;background-color:rgba(242 155 135);color:#fff;font-size:%?32?%;margin-top:%?120?%}.citybtn[data-v-f363c856]{width:auto;height:%?60?%;overflow:hidden}body.?%PAGE?%[data-v-f363c856]{background-color:#fafafa}",""])},f452:function(t,e,i){"use strict";var n=i("fa61"),a=i.n(n);a.a},fa61:function(t,e,i){var n=i("bd5e");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("4f06").default;a("df72ef8c",n,!0,{sourceMap:!1,shadowMode:!1})}}]);