import{v as s,n as e,J as a,K as t,R as o,e as r,f as i,w as d,l,k as n,r as c,F as m,g as u,j as p,u as f,s as _,p as y,a2 as g,m as b,i as x,C as k,D as j,as as h}from"./index-219abc09.js";import{_ as v}from"./s-address-item.c9541ef3.js";import{a as w,_ as A}from"./s-layout.e3f07a22.js";import{_ as C}from"./s-empty.0224d4b9.js";import{A as N}from"./area.c7fa9e39.js";import{A as S}from"./address.ca1c88de.js";import{_ as D}from"./_plugin-vue_export-helper.1b428a4d.js";import"./form.480ce5b4.js";/* empty css                                                                */const $=D({__name:"list",setup(D){const $=s({list:[],loading:!0});function E(){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()=>{$.list=(await S.getAddressList()).data,$.loading=!1})),a((()=>{t("areaData")||N.getAreaTree().then((s=>{0===s.code&&o("areaData",s.data)}))})),(s,e)=>{const a=l(b("s-address-item"),v),t=x,o=k,g=j,N=l(b("su-fixed"),w),S=l(b("s-empty"),C),D=l(b("s-layout"),A);return r(),i(D,{title:"收货地址",bgStyle:{color:"#FFF"}},{default:d((()=>[$.list.length?(r(),i(t,{key:0},{default:d((()=>[(r(!0),n(m,null,c($.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:E,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!==$.list.length||$.loading?u("",!0):(r(),i(S,{key:1,text:"暂无收货地址",icon:"/static/data-empty.png"}))])),_:1})}}},[["__scopeId","data-v-bb0060e9"]]);export{$ as default};
