text: webpackJsonp([87],{Bw7z:function(e,s){},TwTX:function(e,s,t){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var a=t("NHbQ"),i=t.n(a),d=t("6L+O"),r={name:"",data:function(){return{show:!1,province:{value:"点击选择所在地区"},city:{value:""},area:{value:""},components:{VDistpicker:i.a},list:[],editAddress:{realname:"",telphone:"",street:"",is_address:!1}}},methods:{choose:function(){this.show=!0},onChangeProvince:function(e){this.province=e},onChangeCity:function(e){this.city=e},onChangeArea:function(e){this.area=e,this.show=!1},publish:function(){var e=this,s={realname:this.editAddress.realname,telphone:this.editAddress.telphone,street:this.editAddress.street,province:this.province.value,city:this.city.value,area:this.area.value,is_address:this.editAddress.is_address};this.$route.query.id&&(s.id=this.$route.query.id),Object(d.i)(s).then(function(s){e.editAddress.realname="",e.editAddress.telphone="",e.editAddress.street="",e.province.value="点击选择所在地区",e.city.value="",e.area.value="",e.$router.go(-1)})},alert_show:function(){this.show=!1}},activated:function(){var e=this;document.title="添加地址";var s=this.$route.query.id;s&&Object(d.m)({id:s}).then(function(s){e.editAddress.realname=s.data.realname,e.editAddress.telphone=s.data.telphone,e.editAddress.street=s.data.street,e.province.value=s.data.province,e.editAddress.is_address=s.data.is_address,e.city.value=s.data.city,e.area.value=s.data.area})},watch:{$route:function(e,s){this.$router.go(0)}}},o={render:function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{on:{click:e.alert_show}},[t("div",{staticClass:"address"},[t("div",{staticClass:"address__row"},[t("div",{staticClass:"address__title"},[e._v("收货人")]),e._v(" "),t("div",{staticClass:"address__right"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.editAddress.realname,expression:"editAddress.realname"}],staticClass:"address__control",attrs:{type:"text",placeholder:"请输入收货人姓名"},domProps:{value:e.editAddress.realname},on:{input:function(s){s.target.composing||e.$set(e.editAddress,"realname",s.target.value)}}})])]),e._v(" "),t("div",{staticClass:"address__row"},[t("div",{staticClass:"address__title"},[e._v("手机号码")]),e._v(" "),t("div",{staticClass:"address__right"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.editAddress.telphone,expression:"editAddress.telphone"}],staticClass:"address__control",attrs:{type:"text",placeholder:"请输入手机号码"},domProps:{value:e.editAddress.telphone},on:{input:function(s){s.target.composing||e.$set(e.editAddress,"telphone",s.target.value)}}})])]),e._v(" "),t("div",{staticClass:"address__row",on:{click:function(s){return s.stopPropagation(),e.choose(s)}}},[t("div",{staticClass:"address__title"},[e._v("所在地区")]),e._v(" "),t("div",{staticClass:"address__right"},[t("div",{staticClass:"addr",class:e.show?"addressclick":""},[e._v(e._s(e.province.value)+" "+e._s(e.city.value)+" "+e._s(e.area.value))])])]),e._v(" "),t("div",{staticClass:"address__row"},[t("div",{staticClass:"address__title"},[e._v("收货地址")]),e._v(" "),t("div",{staticClass:"address__right"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.editAddress.street,expression:"editAddress.street"}],staticClass:"address__control",attrs:{type:"text",placeholder:"请输入详细收货地址"},domProps:{value:e.editAddress.street},on:{input:function(s){s.target.composing||e.$set(e.editAddress,"street",s.target.value)}}})])]),e._v(" "),t("div",{staticClass:"address__row"},[t("div",{staticClass:"address__title"},[e._v("设为默认")]),e._v(" "),t("div",{staticClass:"address__right",staticStyle:{float:"right","margin-top":"14px"}},[t("ks-switch",{staticClass:"ks-fl",model:{value:e.editAddress.is_address,callback:function(s){e.$set(e.editAddress,"is_address",s)},expression:"editAddress.is_address"}})],1)])]),e._v(" "),t("ks-button",{staticClass:"pre-step",staticStyle:{background:"#e40c0c",color:"#fff"},on:{click:e.publish}},[e._v("保存")]),e._v(" "),e.show?t("div",{staticClass:"masked"}):e._e(),e._v(" "),e.show?t("div",{staticClass:"site",on:{click:function(e){e.stopPropagation()}}},[t("v-distpicker",{attrs:{type:"mobile"},on:{province:e.onChangeProvince,city:e.onChangeCity,area:e.onChangeArea}})],1):e._e()],1)},staticRenderFns:[]};var n=t("C7Lr")(r,o,!1,function(e){t("Bw7z")},"data-v-38f940e1",null);s.default=n.exports}});