"use strict";const e=require("../../common/vendor.js"),a=require("../../api/index.js");if(!Array){(e.resolveComponent("wd-navbar")+e.resolveComponent("z-paging"))()}Math||((()=>"../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js")+(()=>"../../uni_modules/z-paging/components/z-paging/z-paging.js"))();const n=e.defineComponent({__name:"list",setup(n){const o=e.ref(null),r=e.ref(null),i=e.ref([]);e.onLoad((e=>{r.value=e.type})),e.onShow((()=>{o.value.reload()}));const s=(e,n)=>{a.api.addressPage({pageNo:e,pageSize:n}).then((e=>{o.value.complete(e.list)})).catch((e=>{o.value.complete(!1)}))},t=()=>{e.index.navigateBack()},d=a=>{e.index.navigateTo({url:a})};return(n,c)=>({a:e.o(t),b:e.p({title:"地址管理",safeAreaInsetTop:!0,"left-arrow":!0}),c:e.f(i.value,((n,i,s)=>({a:e.t(n.receiverName),b:e.t(n.receiverPhone),c:e.t(n.receiverArea),d:e.t(n.receiverAddress),e:e.o((r=>{return i=n,void e.index.showModal({title:"提示",content:"是否确认删除？",success:e=>{e.confirm&&a.api.addressDel({id:i.id}).then((e=>{o.value.reload()}))}});var i}),i),f:e.o((e=>d(`./add?id=${n.id}`)),i),g:e.o((a=>(a=>{let n=`收货人：${a.receiverName}\n手机号码：${a.receiverPhone}\n所在地区：${a.receiverArea}\n详细地址：${a.receiverAddress}`;e.index.setClipboardData({data:n,success:function(){console.log("success")}})})(n)),i),h:e.o((a=>{return o=n,void(1==r.value&&(e.index.$emit("address",o),e.index.navigateBack()));var o}),i),i:i}))),d:e.sr(o,"a56d4a9a-1",{k:"paging"}),e:e.o(s),f:e.o((e=>i.value=e)),g:e.p({"use-page-scroll":!0,modelValue:i.value}),h:e.o((e=>d("./add")))})}}),o=e._export_sfc(n,[["__scopeId","data-v-a56d4a9a"]]);wx.createPage(o);
