import{y as s,n as e,L as a,N as t,p as o,e as r,f as i,w as n,l as d,k as l,r as c,F as m,g as p,j as u,v as f,s as _,t as y,a3 as g,m as b,i as h,E as x,G as j,at as k}from"./index-68dd960a.js";import{_ as v}from"./s-address-item.445bec62.js";import{a as w,_ as A}from"./s-layout.454a15cd.js";import{_ as N}from"./s-empty.fd15ca2f.js";import{A as S}from"./area.0f395be8.js";import{A as C}from"./address.ca26c74e.js";import{_ as E}from"./_plugin-vue_export-helper.1b428a4d.js";import"./phone-international-input.471da4c0.js";/* empty css                                                                */const F=E({__name:"list",setup(E){const F=s({list:[],loading:!0});function $(){let s={};_.$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},g.isEmpty(s)||_.$router.go("/pages/user/address/edit",{data:JSON.stringify(s)})}})}return e((async()=>{F.list=(await C.getAddressList()).data,F.loading=!1})),a((()=>{t("areaData")||S.getAreaTree().then((s=>{0===s.code&&o("areaData",s.data)}))})),(s,e)=>{const a=d(b("s-address-item"),v),t=h,o=x,g=j,S=d(b("su-fixed"),w),C=d(b("s-empty"),N),E=d(b("s-layout"),A);return r(),i(E,{title:"收货地址",bgStyle:{color:"#FFF"}},{default:n((()=>[F.list.length?(r(),i(t,{key:0},{default:n((()=>[(r(!0),l(m,null,c(F.list,(s=>(r(),i(a,{hasBorderBottom:"",key:s.id,item:s,onClick:e=>(k("SELECT_ADDRESS",{addressInfo:s}),void _.$router.back())},null,8,["item","onClick"])))),128))])),_:1})):p("",!0),u(S,{bottom:"",placeholder:""},{default:n((()=>[u(t,{class:"footer-box ss-flex ss-row-between ss-p-20"},{default:n((()=>[["WechatMiniProgram","WechatOfficialAccount"].includes(f(_).$platform.name)?(r(),i(g,{key:0,onClick:$,class:"border ss-reset-button sync-wxaddress ss-m-20 ss-flex ss-row-center ss-col-center"},{default:n((()=>[u(o,{class:"cicon-weixin ss-p-r-10",style:{color:"#09bb07","font-size":"40rpx"}}),y(" 导入微信地址 ")])),_:1})):p("",!0),u(g,{class:"add-btn ss-reset-button ui-Shadow-Main",onClick:e[0]||(e[0]=s=>f(_).$router.go("/pages/user/address/edit"))},{default:n((()=>[y(" 新增收货地址 ")])),_:1})])),_:1})])),_:1}),0!==F.list.length||F.loading?p("",!0):(r(),i(C,{key:1,text:"暂无收货地址",icon:"/static/data-empty.png"}))])),_:1})}}},[["__scopeId","data-v-bb0060e9"]]);export{F as default};
