"use strict";const e=require("../../../common/vendor.js"),s=require("../../../sheep/index.js"),r=require("../../../sheep/api/system/area.js"),i=require("../../../sheep/api/member/address.js");if(require("../../../sheep/helper/index.js"),require("../../../sheep/url/index.js"),require("../../../sheep/store/index.js"),require("../../../sheep/store/app.js"),require("../../../sheep/api/promotion/diy.js"),require("../../../sheep/request/index.js"),require("../../../sheep/config/index.js"),require("../../../sheep/platform/index.js"),require("../../../sheep/platform/provider/wechat/index.js"),require("../../../sheep/platform/provider/wechat/miniProgram.js"),require("../../../sheep/api/member/auth.js"),require("../../../sheep/api/member/social.js"),require("../../../sheep/api/member/user.js"),require("../../../sheep/platform/provider/apple/index.js"),require("../../../sheep/platform/share.js"),require("../../../sheep/router/index.js"),require("../../../sheep/hooks/useModal.js"),require("../../../sheep/helper/test.js"),require("../../../sheep/api/member/signin.js"),require("../../../sheep/helper/throttle.js"),require("../../../sheep/platform/pay.js"),require("../../../sheep/api/pay/order.js"),require("../../../sheep/store/user.js"),require("../../../sheep/store/cart.js"),require("../../../sheep/api/trade/cart.js"),require("../../../sheep/api/pay/wallet.js"),require("../../../sheep/api/trade/order.js"),require("../../../sheep/api/promotion/coupon.js"),require("../../../sheep/store/sys.js"),require("../../../sheep/store/modal.js"),require("../../../sheep/config/zIndex.js"),require("../../../sheep/helper/digit.js"),!Array){(e.resolveComponent("s-address-item")+e.resolveComponent("su-fixed")+e.resolveComponent("s-empty")+e.resolveComponent("s-layout"))()}Math||((()=>"../../../sheep/components/s-address-item/s-address-item.js")+(()=>"../../../sheep/ui/su-fixed/su-fixed.js")+(()=>"../../../sheep/components/s-empty/s-empty.js")+(()=>"../../../sheep/components/s-layout/s-layout.js"))();const t={__name:"list",setup(t){const o=e.reactive({list:[],loading:!0});function a(){let r={};e.index.chooseAddress({success:i=>{r={consignee:i.userName,mobile:i.telNumber,province_name:i.provinceName,city_name:i.cityName,district_name:i.countyName,address:i.detailInfo,region:"",is_default:!1},e.lodashExports.isEmpty(r)||s.sheep.$router.go("/pages/user/address/edit",{data:JSON.stringify(r)})},fail:e=>{console.log("uni.chooseAddress调用失败，问题是：",e)}})}return e.onShow((async()=>{o.list=(await i.AddressApi.getAddressList()).data,o.loading=!1})),e.onBeforeMount((()=>{e.index.getStorageSync("areaData")||r.AreaApi.getAreaTree().then((s=>{0===s.code&&e.index.setStorageSync("areaData",s.data)}))})),(r,i)=>e.e({a:o.list.length},o.list.length?{b:e.f(o.list,((r,i,t)=>({a:r.id,b:e.o((i=>{return t=r,e.index.$emit("SELECT_ADDRESS",{addressInfo:t}),void s.sheep.$router.back();var t}),r.id),c:"16205758-1-"+t+",16205758-0",d:e.p({hasBorderBottom:!0,item:r})})))}:{},{c:["WechatMiniProgram","WechatOfficialAccount"].includes(e.unref(s.sheep).$platform.name)},["WechatMiniProgram","WechatOfficialAccount"].includes(e.unref(s.sheep).$platform.name)?{d:e.o(a)}:{},{e:e.o((r=>e.unref(s.sheep).$router.go("/pages/user/address/edit"))),f:e.p({bottom:!0,placeholder:!0}),g:0===o.list.length&&!o.loading},0!==o.list.length||o.loading?{}:{h:e.p({text:"暂无收货地址",icon:"/static/data-empty.png"})},{i:e.p({title:"收货地址",bgStyle:{color:"#FFF"}})})}},o=e._export_sfc(t,[["__scopeId","data-v-16205758"]]);wx.createPage(o);
