diff --git a/src/views/frontend/Home.vue b/src/views/frontend/Home.vue index c464814..1989673 100644 --- a/src/views/frontend/Home.vue +++ b/src/views/frontend/Home.vue @@ -42,35 +42,7 @@ const projects = ref([ } ]) -const carousel = ref([ - { - id: 1, - title: '电商平台', - labels: ['Vue3', 'Node.js', 'PHP'], - category: ['Web', 'Uni app', '微信小程序'], - description: '基于Vue3和Node.js开发的电商平台,提供完整的购物流程,包括注册、登录、购物、支付等功能。', - cover: 'https://pic.rmb.bdstatic.com/bjh/80852bfe7c321988191838517ba64e309354.jpeg@h_1280', - route: '1' - }, - { - id: 2, - title: 'OA系统', - labels: ['React', 'PHP'], - category: ['Web', 'Uni app', '微信小程序'], - description: '基于React和PHP开发的OA系统,提供完整的流程管理、审批、报表等功能。亮点:1、100万用户、2、Saas系统1、100万用户、2、Saas系统1、100万用户、2、Saas系统1、100万用户、2、Saas系统1、100万用户、2、Saas系统1、100万用户、2、Saas系统', - cover: 'https://img2.baidu.com/it/u=1629222614,1358629025&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500', - route: '2' - }, - { - id: 2, - title: '团购app', - labels: ['React', 'PHP'], - category: ['Web', 'Uni app', '微信小程序'], - description: '基于React和PHP开发的OA系统,提供完整的流程管理、审批、报表等功能。亮点:1、100万用户、2、Saas系统1、100万用户、2、Saas系统1、100万用户、2、Saas系统1、100万用户、2、Saas系统1、100万用户、2、Saas系统1、100万用户、2、Saas系统', - cover: 'https://img1.baidu.com/it/u=362305842,3264792867&fm=253&fmt=auto?w=712&h=712', - route: '2' - } -]) +const carousel = ref([]) const testimonials = [ { @@ -102,21 +74,27 @@ const partners = [ { name: 'Microsoft', logo: 'https://pic.rmb.bdstatic.com/bjh/80852bfe7c321988191838517ba64e309354.jpeg@h_1280' }, ] +const projectLoading = ref(false); const getProjectList = () => { + projectLoading.value = true; homeProjectListApi({ page: 1, pageSize: 6 }).then((res) => { - projects.value = res.items + projects.value = res.items; + projectLoading.value = false }) } +const swiperOptionsLoading = ref(false); const getCarouseList = () => { + swiperOptionsLoading.value = true; homeCarouselListApi({ page: 1, pageSize: 6 }).then((res) => { - carousel.value = res.items + carousel.value = res.items; + swiperOptionsLoading.value = false }) } @@ -155,7 +133,12 @@ const breakpoints = {