<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["addAddress"],{"383a":function(e,s,a){"use strict";a("7478")},"63c5":function(e,s,a){"use strict";a.r(s);var r=function(){var e=this,s=e.$createElement,a=e._self._c||s;return a("el-container",{attrs:{direction:"vertical"}},[a("el-form",{ref:"From",attrs:{model:e.address,rules:e.addressRules,"label-position":"top","label-width":"80px"}},[a("el-form-item",{attrs:{label:"Street Address:",prop:"location",error:e.error}},[a("el-input",{staticClass:"form-input__medium",attrs:{id:"search",placeholder:"Street Address"},model:{value:e.address.location,callback:function(s){e.$set(e.address,"location",s)},expression:"address.location"}})],1),a("el-form-item",{attrs:{label:"Apartment Complex Or Floor Number (optional):",prop:"address"}},[a("el-input",{staticClass:"form-input__medium",attrs:{maxlength:30,placeholder:"Apartment Complex Or Floor Number (optional)"},model:{value:e.address.address,callback:function(s){e.$set(e.address,"address",s)},expression:"address.address"}})],1),a("el-form-item",{attrs:{label:"Complex Password (optional):",prop:"password"}},[a("el-input",{staticClass:"form-input__medium",attrs:{maxlength:30,placeholder:"Complex Password (optional):"},model:{value:e.address.password,callback:function(s){e.$set(e.address,"password","string"===typeof s?s.trim():s)},expression:"address.password"}})],1),a("el-form-item",{attrs:{label:"Name",prop:"name"}},[a("el-input",{staticClass:"form-input__medium",attrs:{placeholder:"Name"},model:{value:e.address.name,callback:function(s){e.$set(e.address,"name",s)},expression:"address.name"}})],1),a("el-form-item",{attrs:{label:"Phone #",prop:"phone"}},[a("el-input",{staticClass:"form-input__medium",attrs:{placeholder:"Phone"},model:{value:e.address.phone,callback:function(s){e.$set(e.address,"phone","string"===typeof s?s.trim():s)},expression:"address.phone"}})],1),a("el-form-item",{attrs:{label:"Email",prop:"email"}},[a("el-input",{staticClass:"form-input__medium",attrs:{placeholder:"Email"},model:{value:e.address.email,callback:function(s){e.$set(e.address,"email","string"===typeof s?s.trim():s)},expression:"address.email"}})],1),a("el-form-item",[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-color":"#28A745","active-text":"Set up as default","inactive-color":"#999999"},model:{value:e.address.checked,callback:function(s){e.$set(e.address,"checked",s)},expression:"address.checked"}})],1),a("el-form-item",[a("el-button",{staticClass:"marginTop40",attrs:{disabled:!e.disabled,type:"success"},on:{click:e.handleSave}},[e._v("Save")])],1)],1)],1)},t=[],d=(a("b0c0"),a("498a"),a("a9e3"),a("9f87")),l={name:"AddOrEditAddress",data:function(){return{address:{name:null,phone:null,email:null,location:null,latitude:null,longitude:null,address:"",password:null,checked:0},addressRules:{name:[{required:!0,message:"Please enter the name of the consignee",trigger:"blur"}],phone:[{required:!0,message:"Please enter the mobile phone number of the consignee",trigger:"blur"},{validator:this.$validate.validatePhone,trigger:"blur"}],email:[{required:!0,message:"Please enter the email address of the consignee",trigger:"blur"},{validator:this.$validate.validateEmail,trigger:"blur"}],location:[],address:[],password:[]},error:null,tempAddress:null}},computed:{disabled:function(){return Boolean(this.address.name)&amp;&amp;Boolean(this.address.phone)&amp;&amp;Boolean(this.address.email)&amp;&amp;Boolean(this.address.location)}},watch:{"address.location":function(e){e?this.tempAddress&amp;&amp;this.tempAddress==e.trim()?this.error=null:this.error="Incorrect address information":this.error="Please enter your city or streetï¼"}},methods:{handleSave:function(){var e=this;this.$refs.From.validate().then((function(){e.error||(e.$route.params.id?e.$api.editCustomerAddress({addressId:e.$route.params.id,defaultAddress:e.address.checked,unit:e.address.address.trim(),allAddress:e.address.location.trim(),accessPassword:e.address.password,lat:e.address.latitude,lon:e.address.longitude,name:e.address.name.trim(),phone:e.address.phone,email:e.address.email}).then((function(s){200==s.code&amp;&amp;e.$router.back()})):e.$api.addCustomerAddress({defaultAddress:e.address.checked,unit:e.address.address.trim(),allAddress:e.address.location.trim(),accessPassword:e.address.password,lat:e.address.latitude,lon:e.address.longitude,name:e.address.name.trim(),phone:e.address.phone,email:e.address.email}).then((function(s){200==s.code&amp;&amp;e.$router.back()})))}))},handleCallback:function(){var e=this;d["b"].mapSearch(document.getElementById("search")).then((function(s){e.tempAddress=s.formatted_address,e.address.location=s.formatted_address,e.address.latitude=s.geometry.location.lat(),e.address.longitude=s.geometry.location.lng(),e.handleCallback()})).catch((function(){e.handleCallback(),e.error="Incorrect address information"}))}},mounted:function(){this.handleCallback()},created:function(){this.$route.params.id&amp;&amp;(this.address={name:this.$route.query.name,phone:this.$route.query.phone,email:this.$route.query.email,location:this.$route.query.allAddress.trim(),address:this.$route.query.unit,password:this.$route.query.accessPassword,latitude:this.$route.query.lat,longitude:this.$route.query.lon,checked:Number(this.$route.query.defaultAddress)},this.tempAddress=this.$route.query.allAddress.trim())}},o=l,i=(a("383a"),a("2877")),n=Object(i["a"])(o,r,t,!1,null,"b3f25be0",null);s["default"]=n.exports},7478:function(e,s,a){}}]);</pre></body></html>