(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-user-address"],{"22bbe":function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"user",class:t.$store.state.AppStyle,staticStyle:{"background-color":"#f6f6f6"}},[a("v-uni-view",{staticClass:"header",style:[{height:t.CustomBar+"px"}]},[a("v-uni-view",{staticClass:"cu-bar bg-white",style:{height:t.CustomBar+"px","padding-top":t.StatusBar+"px"}},[a("v-uni-view",{staticClass:"action",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.back.apply(void 0,arguments)}}},[a("v-uni-text",{staticClass:"cuIcon-back"})],1),a("v-uni-view",{staticClass:"content text-bold",style:[{top:t.StatusBar+"px"}]},[t._v("收货地址")]),a("v-uni-view",{staticClass:"action",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.userEdit.apply(void 0,arguments)}}},[a("v-uni-button",{staticClass:"cu-btn round bg-blue"},[t._v("保存")])],1)],1)],1),a("v-uni-view",{style:[{padding:t.NavBar+"px 10px 0px 10px"}]}),a("v-uni-form",[a("v-uni-view",{staticClass:"cu-form-group margin-top"},[a("v-uni-view",{staticClass:"title"},[t._v("收货人名称")]),a("v-uni-input",{attrs:{placeholder:"请输入收货人名称",name:"input"},model:{value:t.name,callback:function(e){t.name=e},expression:"name"}})],1),a("v-uni-view",{staticClass:"cu-form-group"},[a("v-uni-view",{staticClass:"title"},[t._v("收货人电话")]),a("v-uni-input",{attrs:{placeholder:"请输入收货人电话",name:"input",type:"number"},model:{value:t.telephone,callback:function(e){t.telephone=e},expression:"telephone"}})],1),a("v-uni-view",{staticClass:"cu-form-group"},[a("v-uni-textarea",{staticClass:"text",attrs:{placeholder:"输入收货地址(精确到省市区街道)"},model:{value:t.address,callback:function(e){t.address=e},expression:"address"}})],1)],1),0==t.isLoading?a("v-uni-view",{staticClass:"loading"},[a("v-uni-view",{staticClass:"loading-main"},[a("v-uni-image",{attrs:{src:n("f408")}})],1)],1):t._e()],1)},i=[]},"344d":function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("d4b5");var a=n("af30"),i={data:function(){return{StatusBar:this.StatusBar,CustomBar:this.CustomBar,NavBar:this.StatusBar+this.CustomBar,AppStyle:this.$store.state.AppStyle,uid:0,name:"",telephone:"",address:"",userInfo:"",token:"",isLoading:0}},onPullDownRefresh:function(){},onShow:function(){a.localStorage.getItem("token")&&(this.token=a.localStorage.getItem("token")),this.userStatus(),this.getCacheInfo()},onLoad:function(){},methods:{back:function(){uni.navigateBack({delta:1})},getCacheInfo:function(){if(a.localStorage.getItem("userinfo")){var t=JSON.parse(a.localStorage.getItem("userinfo"));this.uid=t.uid,this.userInfo=t}},userEdit:function(){var t=this;if(""==t.name||""==t.telephone||""==t.address)return uni.showToast({title:"请完成表单输入",icon:"none"}),!1;var e=t.name+"|"+t.telephone+"|"+t.address,n={uid:t.uid,name:t.userInfo.name,address:e};uni.showLoading({title:"加载中"}),t.$Net.request({url:t.$API.userEdit(),data:{params:JSON.stringify(t.$API.removeObjectEmptyKey(n)),token:t.token},header:{"Content-Type":"application/x-www-form-urlencoded"},method:"get",dataType:"json",success:function(e){setTimeout((function(){uni.hideLoading()}),1e3),uni.showToast({title:e.data.msg,icon:"none"}),1==e.data.code&&(uni.showToast({title:"操作成功！",icon:"none"}),setTimeout((function(){t.back()}),1e3))},fail:function(t){setTimeout((function(){uni.hideLoading()}),1e3),uni.showToast({title:"网络开小差了哦",icon:"none"}),uni.stopPullDownRefresh()}})},userStatus:function(){var t=this;t.$Net.request({url:t.$API.userStatus(),data:{token:t.token},header:{"Content-Type":"application/x-www-form-urlencoded"},method:"get",dataType:"json",success:function(e){if(1==e.data.code){var n=e.data.data.address;if(n){var a=n.split("|");t.name=a[0],t.telephone=a[1],t.address=a[2]}}setTimeout((function(){t.isLoading=1,clearTimeout("timer")}),300)},fail:function(e){uni.showToast({title:"网络开小差了哦",icon:"none"});setTimeout((function(){t.isLoading=1,clearTimeout("timer")}),300)}})}}};e.default=i},8283:function(t,e,n){"use strict";n.r(e);var a=n("344d"),i=n.n(a);for(var s in a)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(s);e["default"]=i.a},c1ae:function(t,e,n){"use strict";n.r(e);var a=n("22bbe"),i=n("8283");for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);var o=n("828b"),u=Object(o["a"])(i["default"],a["b"],a["c"],!1,null,"0e6f20a6",null,!1,a["a"],void 0);e["default"]=u.exports}}]);