pages-user-address-list.JmXbZwwG.js 2.8 KB

1
  1. import{v as s,G as e,bQ as a,U as t,T as o,bR as i,H as r,a as d,b as n,d as l,w as _,u as c,e as p,x as u,y as m,F as f,z as y,f as g,s as b,g as h,j as x,t as v,a9 as j,i as k,l as w,O as A,bi as N}from"./index-dGICJBA1.js";import{_ as S}from"./s-address-item.DnGcX4w_.js";import{a as $,_ as C}from"./s-layout.2n749i-h.js";import{_ as E}from"./s-empty.DZWZVG5X.js";import{_ as D}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./s-menu-tools.BHmVopdZ.js";import"./s-search-block.vue_vue_type_style_index_0_scoped_f692e81a_lang.BkXbqiPQ.js";import"./uni-icons.BZJC71FJ.js";import"./s-layout.vue_vue_type_style_index_0_scoped_c1143e8c_lang.C9LLV9dD.js";import"./phone-international-input.vue_vue_type_style_index_0_scoped_0f0268ff_lang.DfrFtxCM.js";import"./s-search-block.DW-gs1wX.js";import"./phone-international-input.BSO1ObdH.js";/* empty css */const F=D({__name:"list",setup(D){const F=s({list:[],loading:!0});function O(){let s={};b.$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},j.isEmpty(s)||b.$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")||i.getAreaTree().then((s=>{0===s.code&&r("areaData",s.data)}))})),(s,e)=>{const a=d(n("s-address-item"),S),t=k,o=w,i=A,r=d(n("su-fixed"),$),j=d(n("s-empty"),E),D=d(n("s-layout"),C);return p(),l(D,{title:c(v)("address.shipping_address"),bgStyle:{color:"#FFF"}},{default:_((()=>[F.list.length?(p(),l(t,{key:0},{default:_((()=>[(p(!0),u(f,null,m(F.list,(s=>(p(),l(a,{hasBorderBottom:"",key:s.id,item:s,onClick:e=>(N("SELECT_ADDRESS",{addressInfo:s}),void b.$router.back())},null,8,["item","onClick"])))),128))])),_:1})):y("",!0),g(r,{bottom:"",placeholder:""},{default:_((()=>[g(t,{class:"footer-box ss-flex ss-row-between ss-p-20"},{default:_((()=>[["WechatMiniProgram","WechatOfficialAccount"].includes(c(b).$platform.name)?(p(),l(i,{key:0,onClick:O,class:"border ss-reset-button sync-wxaddress ss-m-20 ss-flex ss-row-center ss-col-center"},{default:_((()=>[g(o,{class:"cicon-weixin ss-p-r-10",style:{color:"#09bb07","font-size":"40rpx"}}),h(" "+x(c(v)("address.import_wechat_address")),1)])),_:1})):y("",!0),g(i,{class:"add-btn ss-reset-button ui-Shadow-Main",onClick:e[0]||(e[0]=s=>c(b).$router.go("/pages/user/address/edit"))},{default:_((()=>[h(x(c(v)("address.add_new_shipping_address")),1)])),_:1})])),_:1})])),_:1}),0!==F.list.length||F.loading?y("",!0):(p(),l(j,{key:1,text:c(v)("address.no_shipping_address"),icon:"/static/data-empty.png"},null,8,["text"]))])),_:1},8,["title"])}}},[["__scopeId","data-v-090b2b92"]]);export{F as default};