pages-user-address-list.2592f666.js 2.4 KB

1
  1. 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,a1 as g,m as b,i as k,E as x,G as h,aq as j}from"./index-b48a414d.js";import{_ as v}from"./s-address-item.88e47ed1.js";import{a as w,_ as A}from"./s-layout.d6dcdc81.js";import{_ as N}from"./s-empty.6d3471cc.js";import{A as C}from"./area.f23dc950.js";import{A as S}from"./address.0cc5c9d0.js";import{_ as E}from"./_plugin-vue_export-helper.1b428a4d.js";import"./phone-international-input.feef99c7.js";/* empty css */const $=E({__name:"list",setup(E){const $=s({list:[],loading:!0});function D(){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")||C.getAreaTree().then((s=>{0===s.code&&o("areaData",s.data)}))})),(s,e)=>{const a=d(b("s-address-item"),v),t=k,o=x,g=h,C=d(b("su-fixed"),w),S=d(b("s-empty"),N),E=d(b("s-layout"),A);return r(),i(E,{title:"收货地址",bgStyle:{color:"#FFF"}},{default:n((()=>[$.list.length?(r(),i(t,{key:0},{default:n((()=>[(r(!0),l(m,null,c($.list,(s=>(r(),i(a,{hasBorderBottom:"",key:s.id,item:s,onClick:e=>(j("SELECT_ADDRESS",{addressInfo:s}),void _.$router.back())},null,8,["item","onClick"])))),128))])),_:1})):p("",!0),u(C,{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:D,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!==$.list.length||$.loading?p("",!0):(r(),i(S,{key:1,text:"暂无收货地址",icon:"/static/data-empty.png"}))])),_:1})}}},[["__scopeId","data-v-bb0060e9"]]);export{$ as default};