index.vue 3.77 KB
<template>
  <div class="min-h-screen bg-[#f9fafb] pb-[calc(160rpx+env(safe-area-inset-bottom))]">
    <!-- Navigation Header -->
    <NavHeader title="家办相关" />

    <!-- Content List -->
    <div class="px-[40rpx] mt-[40rpx] relative z-10">
      <div v-for="(section, index) in sections" :key="index"
        class="bg-white rounded-[32rpx] mb-[32rpx] pb-[56rpx] overflow-hidden shadow-sm">
        <!-- Section Header -->
        <div class="px-[40rpx] py-[32rpx]" :style="{ background: section.bgGradient }">
          <span class="text-[#1f2937] text-[32rpx] font-normal">{{ section.title }}</span>
        </div>

        <!-- Section Items -->
        <div class="flex flex-col">
          <div v-for="(item, itemIndex) in section.items" :key="itemIndex" class="flex flex-col">
            <div class="flex items-center justify-between px-[40rpx] mt-[56rpx] cursor-pointer"
              @tap="handleItemClick(item)">
              <div class="flex items-center">
                <div class="w-[96rpx] h-[96rpx] mr-[32rpx] flex items-center justify-center bg-gray-50 rounded-full">
                  <IconFont :name="item.icon" class="text-blue-600" size="32" />
                </div>
                <div class="flex flex-col">
                  <span class="text-[#1f2937] text-[28rpx] font-normal leading-[40rpx]">{{ item.title }}</span>
                  <span class="text-[#6b7280] text-[24rpx] mt-[8rpx] leading-[32rpx]">{{ item.subtitle }}</span>
                </div>
              </div>
              <IconFont name="RectRight" class="text-gray-400" size="16" />
            </div>
            <!-- Divider -->
            <div v-if="itemIndex < section.items.length - 1"
              class="w-[626rpx] h-[2rpx] bg-[#e5e7eb] mx-auto mt-[32rpx]"></div>
          </div>
        </div>
      </div>
    </div>

    <!-- Tab Bar -->
    <TabBar current="" />
  </div>
</template>

<script setup>
import { shallowRef } from 'vue'
import { useGo } from '@/hooks/useGo'
import TabBar from '@/components/TabBar.vue'
import NavHeader from '@/components/NavHeader.vue'
import IconFont from '@/components/IconFont.vue'

const go = useGo()

const sections = shallowRef([
  {
    title: '家庭成员',
    bgGradient: 'linear-gradient(90deg, #F3E8FF 0%, #E9D5FF 100%)',
    items: [
      {
        title: '成员列表',
        subtitle: '管理家庭成员信息',
        icon: 'My'
      },
      {
        title: '新增成员',
        subtitle: '添加家庭成员',
        icon: 'Edit'
      }
    ]
  },
  {
    title: '健康档案',
    bgGradient: 'linear-gradient(90deg, #F0FDF4 0%, #DCFCE7 100%)',
    items: [
      {
        title: '体检报告',
        subtitle: '查看家庭成员体检记录',
        icon: 'Order'
      },
      {
        title: '就医记录',
        subtitle: '家庭成员就医历史',
        icon: 'Clock'
      }
    ]
  },
  {
    title: '资产管理',
    bgGradient: 'linear-gradient(90deg, #FFF7ED 0%, #FFEDD5 100%)',
    items: [
      {
        title: '保单管理',
        subtitle: '家庭保单汇总',
        icon: 'Star'
      },
      {
        title: '资产总览',
        subtitle: '家庭资产分布',
        icon: 'Find'
      }
    ]
  },
  {
    title: '生活服务',
    bgGradient: 'linear-gradient(90deg, #E0F2FE 0%, #BAE6FD 100%)',
    items: [
      {
        title: '高端医疗',
        subtitle: '预约高端医疗服务',
        icon: 'Service'
      },
      {
        title: '康养服务',
        subtitle: '健康养生服务',
        icon: 'PlayCircleFill'
      }
    ]
  }
])

/**
 * Handle item click
 * @param {Object} item - Clicked item data
 */
const handleItemClick = (item) => {
  console.log('Clicked:', item.title)
  // TODO: Navigate to respective page
}
</script>

<script>
export default {
  name: 'FamilyOfficeIndex'
}
</script>