import{B as s,v as e,aH as a,Q as t,T as o,aI as r,x as i,f as n,g as l,w as d,q as c,p as m,r as u,F as p,i as _,n as f,z as y,s as g,m as b,a8 as x,u as h,l as k,K as j,L as v,aJ as w}from"./index-007bf156.js";import{_ as N}from"./s-address-item.89afa959.js";import{a as S,_ as A}from"./s-layout.19bedb43.js";import{_ as C}from"./s-empty.df9577ad.js";import{_ as $}from"./_plugin-vue_export-helper.1b428a4d.js";import"./phone-international-input.3617e4e0.js";import"./useGoods.ac3bf93e.js";/* empty css                                                                */const D=$({__name:"list",setup($){const D=s({list:[],loading:!0});function E(){let s={};g.$platform.useProvider("wechat").jssdk.openAddress({success:e=>{s={consignee:e.userName,mobile:e.telNumber,province_name:e.provinceName,city_name:e.cityName,district_name:e.countryName,address:e.detailInfo,region:"",is_default:!1},x.isEmpty(s)||g.$router.go("/pages/user/address/edit",{data:JSON.stringify(s)})}})}return e((async()=>{D.list=(await a.getAddressList()).data,D.loading=!1})),t((()=>{o("areaData")||r.getAreaTree().then((s=>{0===s.code&&i("areaData",s.data)}))})),(s,e)=>{const a=c(h("s-address-item"),N),t=k,o=j,r=v,i=c(h("su-fixed"),S),x=c(h("s-empty"),C),$=c(h("s-layout"),A);return n(),l($,{title:"收货地址",bgStyle:{color:"#FFF"}},{default:d((()=>[D.list.length?(n(),l(t,{key:0},{default:d((()=>[(n(!0),m(p,null,u(D.list,(s=>(n(),l(a,{hasBorderBottom:"",key:s.id,item:s,onClick:e=>(w("SELECT_ADDRESS",{addressInfo:s}),void g.$router.back())},null,8,["item","onClick"])))),128))])),_:1})):_("",!0),f(i,{bottom:"",placeholder:""},{default:d((()=>[f(t,{class:"footer-box ss-flex ss-row-between ss-p-20"},{default:d((()=>[["WechatMiniProgram","WechatOfficialAccount"].includes(y(g).$platform.name)?(n(),l(r,{key:0,onClick:E,class:"border ss-reset-button sync-wxaddress ss-m-20 ss-flex ss-row-center ss-col-center"},{default:d((()=>[f(o,{class:"cicon-weixin ss-p-r-10",style:{color:"#09bb07","font-size":"40rpx"}}),b(" 导入微信地址 ")])),_:1})):_("",!0),f(r,{class:"add-btn ss-reset-button ui-Shadow-Main",onClick:e[0]||(e[0]=s=>y(g).$router.go("/pages/user/address/edit"))},{default:d((()=>[b(" 新增收货地址 ")])),_:1})])),_:1})])),_:1}),0!==D.list.length||D.loading?_("",!0):(n(),l(x,{key:1,text:"暂无收货地址",icon:"/static/data-empty.png"}))])),_:1})}}},[["__scopeId","data-v-bb0060e9"]]);export{D as default};
