pages-user-address-list.196a24ed.js 2.3 KB

1
  1. import{z as s,p as e,aE as a,O as t,Q as o,aF 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,a7 as x,n as h,j,I as k,J as w,aG as v}from"./index-ba48620e.js";import{_ as A}from"./s-address-item.8fe44b44.js";import{a as N,_ as S}from"./s-layout.04b95866.js";import{_ as C}from"./s-empty.a75760f9.js";import{_ as E}from"./_plugin-vue_export-helper.1b428a4d.js";import"./phone-international-input.dd3ca29e.js";import"./useGoods.edb8879f.js";/* empty css */const F=E({__name:"list",setup(E){const F=s({list:[],loading:!0});function $(){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()=>{F.list=(await a.getAddressList()).data,F.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"),A),t=j,o=k,r=w,i=c(h("su-fixed"),N),x=c(h("s-empty"),C),E=c(h("s-layout"),S);return n(),l(E,{title:"收货地址",bgStyle:{color:"#FFF"}},{default:d((()=>[F.list.length?(n(),l(t,{key:0},{default:d((()=>[(n(!0),m(p,null,u(F.list,(s=>(n(),l(a,{hasBorderBottom:"",key:s.id,item:s,onClick:e=>(v("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:$,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!==F.list.length||F.loading?_("",!0):(n(),l(x,{key:1,text:"暂无收货地址",icon:"/static/data-empty.png"}))])),_:1})}}},[["__scopeId","data-v-bb0060e9"]]);export{F as default};