"use strict";const e=require("../../common/vendor.js");if(!Array){e.resolveComponent("t-fab")()}Math;const t=e.defineComponent({__name:"index",setup(t){const o=e.ref(null),n=e.ref([{image:"https://picsum.photos/800/400?random=1",title:"专业美容服务"},{image:"https://picsum.photos/800/400?random=2",title:"预约更便捷"},{image:"https://picsum.photos/800/400?random=3",title:"优惠活动"}]),a=e.ref([{icon:"📅",text:"我要预约",path:"/pages/booking/booking"},{icon:"📋",text:"我的预约",path:"/pages/appointments/appointments"}]);e.onMounted((()=>{e.index.getStorageSync("token")?o.value=e.index.getStorageSync("user"):e.index.redirectTo({url:"/pages/login/login"})}));const i=()=>{e.index.showModal({title:"提示",content:"确定要退出登录吗？",success:t=>{t.confirm&&(e.index.removeStorageSync("token"),e.index.removeStorageSync("user"),e.index.redirectTo({url:"/pages/login/login"}))}})};return(t,o)=>({a:e.f(n.value,((e,t,o)=>({a:e.image,b:t}))),b:e.f(a.value,((t,o,n)=>({a:e.t(t.icon),b:e.t(t.text),c:t.path,d:e.o((o=>{return n=t.path,void e.index.navigateTo({url:n});var n}),t.path)}))),c:e.o(i),d:e.p({icon:"caret-right","aria-label":"退出"})})}}),o=e._export_sfc(t,[["__scopeId","data-v-4a80eaa6"]]);wx.createPage(o);
