1 |
- import{z as s,p as e,aI as a,O as t,Q as o,aJ as r,q as i,f as n,g as l,w as d,m as c,l as m,r as u,F as p,i as _,k as f,x as y,s as g,u as b,a6 as x,n as k,j as h,I as j,J as v,aK as w}from"./index-a116b7fa.js";import{_ as N}from"./s-address-item.30defc6a.js";import{a as S,_ as A}from"./s-layout.4ae51839.js";import{_ as C}from"./s-empty.4d7f5239.js";import{_ as I}from"./_plugin-vue_export-helper.1b428a4d.js";import"./phone-international-input.b9f6c8e6.js";import"./useGoods.6b315a78.js";/* empty css */const $=I({__name:"list",setup(I){const $=s({list:[],loading:!0});function D(){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()=>{$.list=(await a.getAddressList()).data,$.loading=!1})),t((()=>{o("areaData")||r.getAreaTree().then((s=>{0===s.code&&i("areaData",s.data)}))})),(s,e)=>{const a=c(k("s-address-item"),N),t=h,o=j,r=v,i=c(k("su-fixed"),S),x=c(k("s-empty"),C),I=c(k("s-layout"),A);return n(),l(I,{title:"收货地址",bgStyle:{color:"#FFF"}},{default:d((()=>[$.list.length?(n(),l(t,{key:0},{default:d((()=>[(n(!0),m(p,null,u($.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:D,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!==$.list.length||$.loading?_("",!0):(n(),l(x,{key:1,text:"暂无收货地址",icon:"/static/data-empty.png"}))])),_:1})}}},[["__scopeId","data-v-bb0060e9"]]);export{$ as default};
|