import{y as s,n as e,L as a,M as t,p as o,e as r,f as i,w as d,l as n,k as l,r as c,F as m,g as u,j as p,v as f,s as _,t as y,a3 as g,m as b,i as x,E as j,G as k,at as h}from"./index-9aa72eed.js";import{_ as v}from"./s-address-item.3e17a7b2.js";import{a as w,_ as A}from"./s-layout.bffb18b8.js";import{_ as E}from"./s-empty.3adf8b58.js";import{A as N}from"./area.c3ed5c80.js";import{A as S}from"./address.4cae6ae0.js";import{_ as C}from"./_plugin-vue_export-helper.1b428a4d.js";import"./form.c66b5271.js";/* empty css                                                                */const F=C({__name:"list",setup(C){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 S.getAddressList()).data,F.loading=!1})),a((()=>{t("areaData")||N.getAreaTree().then((s=>{0===s.code&&o("areaData",s.data)}))})),(s,e)=>{const a=n(b("s-address-item"),v),t=x,o=j,g=k,N=n(b("su-fixed"),w),S=n(b("s-empty"),E),C=n(b("s-layout"),A);return r(),i(C,{title:"收货地址",bgStyle:{color:"#FFF"}},{default:d((()=>[F.list.length?(r(),i(t,{key:0},{default:d((()=>[(r(!0),l(m,null,c(F.list,(s=>(r(),i(a,{hasBorderBottom:"",key:s.id,item:s,onClick:e=>(h("SELECT_ADDRESS",{addressInfo:s}),void _.$router.back())},null,8,["item","onClick"])))),128))])),_:1})):u("",!0),p(N,{bottom:"",placeholder:""},{default:d((()=>[p(t,{class:"footer-box ss-flex ss-row-between ss-p-20"},{default:d((()=>[["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:d((()=>[p(o,{class:"cicon-weixin ss-p-r-10",style:{color:"#09bb07","font-size":"40rpx"}}),y(" 导入微信地址 ")])),_:1})):u("",!0),p(g,{class:"add-btn ss-reset-button ui-Shadow-Main",onClick:e[0]||(e[0]=s=>f(_).$router.go("/pages/user/address/edit"))},{default:d((()=>[y(" 新增收货地址 ")])),_:1})])),_:1})])),_:1}),0!==F.list.length||F.loading?u("",!0):(r(),i(S,{key:1,text:"暂无收货地址",icon:"/static/data-empty.png"}))])),_:1})}}},[["__scopeId","data-v-bb0060e9"]]);export{F as default};
