(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7cc2623b"],{"09d8":function(e,r,t){"use strict";t.d(r,"h",(function(){return a})),t.d(r,"f",(function(){return n})),t.d(r,"a",(function(){return i})),t.d(r,"c",(function(){return o})),t.d(r,"b",(function(){return d})),t.d(r,"e",(function(){return u})),t.d(r,"d",(function(){return c})),t.d(r,"g",(function(){return m}));var s=t("b775");function a(e){return Object(s["a"])({url:"/orders/update_address",method:"get",params:e})}function n(e){return Object(s["a"])({url:"/orders/show_address",method:"get",params:e})}function i(e){return Object(s["a"])({url:"/orders/add_address",method:"get",params:e})}function o(e){return Object(s["a"])({url:"/orders/submit_order",method:"post",data:e})}function d(e){return Object(s["a"])({url:"/order/shelvedorder",method:"post",data:e})}function u(e){return Object(s["a"])({url:"/orders/get_crown",method:"get",params:e})}function c(e){return Object(s["a"])({url:"/orders/GetUserId",method:"get",params:e})}function m(e){return Object(s["a"])({url:"/orders/UpAddress",method:"get",params:e})}},"539f":function(e,r,t){"use strict";t.r(r);var s=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",{staticClass:"app-container"},[t("el-form",{ref:"form",attrs:{model:e.form,rules:e.addressRules,"label-width":"80px"}},[t("el-form-item",{attrs:{label:"收货人:",prop:"username"}},[t("el-input",{attrs:{placeholder:"收货人"},model:{value:e.form.username,callback:function(r){e.$set(e.form,"username",r)},expression:"form.username"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"手机号:",prop:"mobile"}},[t("el-input",{attrs:{placeholder:"手机号",minlength:"11",maxlength:"11","show-word-limit":""},model:{value:e.form.mobile,callback:function(r){e.$set(e.form,"mobile",r)},expression:"form.mobile"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"省市区：",prop:"address"}},[t("VDistpicker",{attrs:{province:e.address.province,city:e.address.city,area:e.address.area},on:{province:e.province,city:e.city,area:e.area}})],1),e._v(" "),t("el-form-item",{attrs:{label:"地址:",prop:"address"}},[t("el-input",{attrs:{type:"textarea",placeholder:"地址",maxlength:"50","show-word-limit":""},model:{value:e.form.address,callback:function(r){e.$set(e.form,"address",r)},expression:"form.address"}})],1),e._v(" "),t("el-form-item",[t("el-button",{attrs:{size:"mini"},on:{click:e.handleCancel}},[e._v("\n        取消\n      ")]),e._v(" "),t("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.handleSubmit}},[e._v("\n        修改\n      ")])],1)],1)],1)},a=[],n=(t("96cf"),t("1da1")),i=t("784f"),o=t.n(i),d=t("09d8"),u={components:{VDistpicker:o.a},props:{form:{type:Object,default:function(){return{id:"",username:"",mobile:"",address:""}}}},data:function(){return{addressRules:{username:[{required:!0,message:"请输入收货人姓名",trigger:"blur"}],mobile:[{required:!0,message:"请输入收货人手机号",trigger:"blur"},{min:11,max:11,message:"手机号格式不正确",trigger:"blur"}],address:[{required:!0,message:"请输入收货人地址",trigger:"blur"},{max:50,message:"地址长度超出",trigger:"blur"}]},address:{province:this.form.province,city:this.form.city,area:this.form.town}}},methods:{province:function(e){var r=e.value;this.address.province=r},city:function(e){var r=e.value;this.address.city=r},area:function(e){var r=e.value;this.address.area=r},handleCancel:function(){this.$refs.form.resetFields(),this.$emit("update:cancel")},handleSubmit:function(){var e=this;this.$refs.form.validate((function(r){if(!r)return!1;var t=e.form,s=t.id,a=t.username,n=t.mobile,i=t.address,o=e.address,d=o.province,u=o.city,c=o.area;e.updateOrderAddress({address_id:s,province:d,city:u,town:c,username:a,mobile:n,address:i})}))},updateOrderAddress:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(r){var t,s,a,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(d["h"])(r);case 2:t=e.sent;try{s=t.message,a=t.code,200===a?(this.$message.success(s),this.$refs.form.resetFields(),this.$emit("update:success")):this.$message.error(s)}catch(i){n=t.message?t.message:i.message,n=i.message?i.message:"请求失败",this.$message.error(n)}case 4:case"end":return e.stop()}}),e,this)})));function r(r){return e.apply(this,arguments)}return r}()}},c=u,m=t("2877"),l=Object(m["a"])(c,s,a,!1,null,"5f5dd381",null);r["default"]=l.exports}}]);