feat: 添加三师七证详情页和瀑布流展示功能
重构路由配置,新增MastersDetail页面 实现戒子页面的瀑布流图片展示功能 优化新闻详情页的样式和布局 移除不再使用的Teachers相关组件 添加Vant组件类型声明和mock数据
Showing
12 changed files
with
391 additions
and
448 deletions
| ... | @@ -19,14 +19,17 @@ declare module 'vue' { | ... | @@ -19,14 +19,17 @@ declare module 'vue' { |
| 19 | VanCheckbox: typeof import('vant/es')['Checkbox'] | 19 | VanCheckbox: typeof import('vant/es')['Checkbox'] |
| 20 | VanCollapse: typeof import('vant/es')['Collapse'] | 20 | VanCollapse: typeof import('vant/es')['Collapse'] |
| 21 | VanCollapseItem: typeof import('vant/es')['CollapseItem'] | 21 | VanCollapseItem: typeof import('vant/es')['CollapseItem'] |
| 22 | + VanEmpty: typeof import('vant/es')['Empty'] | ||
| 22 | VanField: typeof import('vant/es')['Field'] | 23 | VanField: typeof import('vant/es')['Field'] |
| 23 | VanForm: typeof import('vant/es')['Form'] | 24 | VanForm: typeof import('vant/es')['Form'] |
| 24 | VanGrid: typeof import('vant/es')['Grid'] | 25 | VanGrid: typeof import('vant/es')['Grid'] |
| 25 | VanGridItem: typeof import('vant/es')['GridItem'] | 26 | VanGridItem: typeof import('vant/es')['GridItem'] |
| 26 | VanIcon: typeof import('vant/es')['Icon'] | 27 | VanIcon: typeof import('vant/es')['Icon'] |
| 27 | VanImage: typeof import('vant/es')['Image'] | 28 | VanImage: typeof import('vant/es')['Image'] |
| 29 | + VanList: typeof import('vant/es')['List'] | ||
| 28 | VanNavBar: typeof import('vant/es')['NavBar'] | 30 | VanNavBar: typeof import('vant/es')['NavBar'] |
| 29 | VanNoticeBar: typeof import('vant/es')['NoticeBar'] | 31 | VanNoticeBar: typeof import('vant/es')['NoticeBar'] |
| 32 | + VanOverlay: typeof import('vant/es')['Overlay'] | ||
| 30 | VanProgress: typeof import('vant/es')['Progress'] | 33 | VanProgress: typeof import('vant/es')['Progress'] |
| 31 | VanRate: typeof import('vant/es')['Rate'] | 34 | VanRate: typeof import('vant/es')['Rate'] |
| 32 | VanSidebar: typeof import('vant/es')['Sidebar'] | 35 | VanSidebar: typeof import('vant/es')['Sidebar'] |
| ... | @@ -42,5 +45,6 @@ declare module 'vue' { | ... | @@ -42,5 +45,6 @@ declare module 'vue' { |
| 42 | VanTabs: typeof import('vant/es')['Tabs'] | 45 | VanTabs: typeof import('vant/es')['Tabs'] |
| 43 | VanTag: typeof import('vant/es')['Tag'] | 46 | VanTag: typeof import('vant/es')['Tag'] |
| 44 | VideoPlayer: typeof import('./components/VideoPlayer.vue')['default'] | 47 | VideoPlayer: typeof import('./components/VideoPlayer.vue')['default'] |
| 48 | + WaterfallGallery: typeof import('./components/WaterfallGallery.vue')['default'] | ||
| 45 | } | 49 | } |
| 46 | } | 50 | } | ... | ... |
| 1 | /* | 1 | /* |
| 2 | * @Date: 2025-10-30 10:29:15 | 2 | * @Date: 2025-10-30 10:29:15 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-10-30 10:29:24 | 4 | + * @LastEditTime: 2025-10-30 20:53:14 |
| 5 | - * @FilePath: /itomix/h5_vite_template/src/router/index.js | 5 | + * @FilePath: /stdj_h5/src/router/index.js |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | */ | 7 | */ |
| 8 | import { createRouter, createWebHistory } from 'vue-router' | 8 | import { createRouter, createWebHistory } from 'vue-router' |
| ... | @@ -20,34 +20,29 @@ const routes = [ | ... | @@ -20,34 +20,29 @@ const routes = [ |
| 20 | component: Home | 20 | component: Home |
| 21 | }, | 21 | }, |
| 22 | { | 22 | { |
| 23 | - path: '/teachers', | 23 | + path: '/masters', |
| 24 | - name: 'Teachers', | 24 | + name: '三師七證', |
| 25 | - component: () => import('../views/Teachers.vue') | 25 | + component: () => import('../views/Masters.vue') |
| 26 | }, | 26 | }, |
| 27 | { | 27 | { |
| 28 | - path: '/teachers/:id', | 28 | + path: '/masters/:id', |
| 29 | - name: 'TeacherDetail', | 29 | + name: '三師七證详情', |
| 30 | - component: () => import('../views/TeacherDetail.vue') | 30 | + component: () => import('../views/MastersDetail.vue') |
| 31 | }, | 31 | }, |
| 32 | { | 32 | { |
| 33 | - path: '/volunteers', | 33 | + path: '/news/:id', |
| 34 | - name: 'Volunteers', | 34 | + name: 'NewsDetail', |
| 35 | - component: () => import('../views/Volunteers.vue') | 35 | + component: () => import('../views/NewsDetail.vue') |
| 36 | }, | 36 | }, |
| 37 | { | 37 | { |
| 38 | path: '/students', | 38 | path: '/students', |
| 39 | - name: 'Students', | 39 | + name: '戒子', |
| 40 | component: () => import('../views/Students.vue') | 40 | component: () => import('../views/Students.vue') |
| 41 | }, | 41 | }, |
| 42 | { | 42 | { |
| 43 | - path: '/students/:id', | 43 | + path: '/volunteers', |
| 44 | - name: 'StudentDetail', | 44 | + name: '义工', |
| 45 | - component: () => import('../views/StudentDetail.vue') | 45 | + component: () => import('../views/Volunteers.vue') |
| 46 | - }, | ||
| 47 | - { | ||
| 48 | - path: '/news/:id', | ||
| 49 | - name: 'NewsDetail', | ||
| 50 | - component: () => import('../views/NewsDetail.vue') | ||
| 51 | }, | 46 | }, |
| 52 | { | 47 | { |
| 53 | path: '/:pathMatch(.*)*', | 48 | path: '/:pathMatch(.*)*', |
| ... | @@ -74,7 +69,7 @@ router.beforeEach((to, from, next) => { | ... | @@ -74,7 +69,7 @@ router.beforeEach((to, from, next) => { |
| 74 | if (to.meta.title) { | 69 | if (to.meta.title) { |
| 75 | document.title = to.meta.title | 70 | document.title = to.meta.title |
| 76 | } | 71 | } |
| 77 | - | 72 | + |
| 78 | // 这里可以添加权限验证逻辑 | 73 | // 这里可以添加权限验证逻辑 |
| 79 | next() | 74 | next() |
| 80 | }) | 75 | }) |
| ... | @@ -83,4 +78,4 @@ router.afterEach(() => { | ... | @@ -83,4 +78,4 @@ router.afterEach(() => { |
| 83 | // 路由跳转后的逻辑 | 78 | // 路由跳转后的逻辑 |
| 84 | }) | 79 | }) |
| 85 | 80 | ||
| 86 | -export default router | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 81 | +export default router | ... | ... |
| ... | @@ -240,3 +240,87 @@ export const communityPosts = [ | ... | @@ -240,3 +240,87 @@ export const communityPosts = [ |
| 240 | createdAt: '2023-03-14T15:45:00Z' | 240 | createdAt: '2023-03-14T15:45:00Z' |
| 241 | } | 241 | } |
| 242 | ]; | 242 | ]; |
| 243 | + | ||
| 244 | +// 瀑布流图片数据 - 用于义工和戒子页面 | ||
| 245 | +export const waterfallImages = [ | ||
| 246 | + { | ||
| 247 | + id: 1, | ||
| 248 | + url: 'https://cdn.ipadbiz.cn/mlaj/images/zMRLZh40kms.jpg', | ||
| 249 | + height: 300, | ||
| 250 | + title: '义工活动' | ||
| 251 | + }, | ||
| 252 | + { | ||
| 253 | + id: 2, | ||
| 254 | + url: 'https://cdn.ipadbiz.cn/mlaj/images/27kCu7bXGEI.jpg', | ||
| 255 | + height: 400, | ||
| 256 | + title: '学习交流' | ||
| 257 | + }, | ||
| 258 | + { | ||
| 259 | + id: 3, | ||
| 260 | + url: 'https://cdn.ipadbiz.cn/mlaj/images/jbwr0qZvpD4.jpg', | ||
| 261 | + height: 350, | ||
| 262 | + title: '禅修体验' | ||
| 263 | + }, | ||
| 264 | + { | ||
| 265 | + id: 4, | ||
| 266 | + url: 'https://cdn.ipadbiz.cn/mlaj/images/GGCP6vshpPY.jpg', | ||
| 267 | + height: 280, | ||
| 268 | + title: '传统文化' | ||
| 269 | + }, | ||
| 270 | + { | ||
| 271 | + id: 5, | ||
| 272 | + url: 'https://cdn.ipadbiz.cn/mlaj/images/2JIvboGLeho.jpg', | ||
| 273 | + height: 320, | ||
| 274 | + title: '法会现场' | ||
| 275 | + }, | ||
| 276 | + { | ||
| 277 | + id: 6, | ||
| 278 | + url: 'https://cdn.ipadbiz.cn/mlaj/images/_6HzPU9Hyfg (2).jpg', | ||
| 279 | + height: 380, | ||
| 280 | + title: '诵经学习' | ||
| 281 | + }, | ||
| 282 | + { | ||
| 283 | + id: 7, | ||
| 284 | + url: 'https://cdn.ipadbiz.cn/mlaj/images/2Juj2cXWB7U.jpg', | ||
| 285 | + height: 290, | ||
| 286 | + title: '义工服务' | ||
| 287 | + }, | ||
| 288 | + { | ||
| 289 | + id: 8, | ||
| 290 | + url: 'https://cdn.ipadbiz.cn/mlaj/images/Y17FE9Fuw4Y.jpg', | ||
| 291 | + height: 360, | ||
| 292 | + title: '戒子生活' | ||
| 293 | + }, | ||
| 294 | + { | ||
| 295 | + id: 9, | ||
| 296 | + url: 'https://cdn.ipadbiz.cn/mlaj/images/-G3rw6Y02D0.jpg', | ||
| 297 | + height: 310, | ||
| 298 | + title: '修行日常' | ||
| 299 | + }, | ||
| 300 | + { | ||
| 301 | + id: 10, | ||
| 302 | + url: 'https://cdn.ipadbiz.cn/mlaj/images/Oalh2MojUuk.jpg', | ||
| 303 | + height: 340, | ||
| 304 | + title: '集体活动' | ||
| 305 | + } | ||
| 306 | +]; | ||
| 307 | + | ||
| 308 | +// 生成更多瀑布流数据的函数 | ||
| 309 | +export const generateWaterfallData = (page = 1, pageSize = 10) => { | ||
| 310 | + const baseImages = waterfallImages; | ||
| 311 | + const startIndex = (page - 1) * pageSize; | ||
| 312 | + const data = []; | ||
| 313 | + | ||
| 314 | + for (let i = 0; i < pageSize; i++) { | ||
| 315 | + const baseIndex = i % baseImages.length; | ||
| 316 | + const baseImage = baseImages[baseIndex]; | ||
| 317 | + data.push({ | ||
| 318 | + ...baseImage, | ||
| 319 | + id: startIndex + i + 1, | ||
| 320 | + height: Math.floor(Math.random() * 200) + 250, // 随机高度 250-450px | ||
| 321 | + title: `${baseImage.title} ${Math.floor((startIndex + i) / baseImages.length) + 1}` | ||
| 322 | + }); | ||
| 323 | + } | ||
| 324 | + | ||
| 325 | + return data; | ||
| 326 | +}; | ... | ... |
| ... | @@ -187,6 +187,9 @@ | ... | @@ -187,6 +187,9 @@ |
| 187 | import { ref, computed, nextTick, onMounted, watch } from 'vue' | 187 | import { ref, computed, nextTick, onMounted, watch } from 'vue' |
| 188 | import VideoPlayer from '@/components/VideoPlayer.vue' | 188 | import VideoPlayer from '@/components/VideoPlayer.vue' |
| 189 | import { useTitle } from '@vueuse/core'; | 189 | import { useTitle } from '@vueuse/core'; |
| 190 | +import { useRouter } from 'vue-router' | ||
| 191 | + | ||
| 192 | +const router = useRouter() | ||
| 190 | 193 | ||
| 191 | // 页面标题 | 194 | // 页面标题 |
| 192 | useTitle('西园戒幢律寺三坛大戒法会'); | 195 | useTitle('西园戒幢律寺三坛大戒法会'); |
| ... | @@ -322,14 +325,17 @@ const viewMore = (type) => { | ... | @@ -322,14 +325,17 @@ const viewMore = (type) => { |
| 322 | case 'masters': | 325 | case 'masters': |
| 323 | console.log('跳转到三师七证页面') | 326 | console.log('跳转到三师七证页面') |
| 324 | // 这里可以添加跳转到三师七证页面的逻辑 | 327 | // 这里可以添加跳转到三师七证页面的逻辑 |
| 328 | + router.push('/masters') | ||
| 325 | break | 329 | break |
| 326 | case 'students': | 330 | case 'students': |
| 327 | console.log('跳转到戒子页面') | 331 | console.log('跳转到戒子页面') |
| 328 | // 这里可以添加跳转到戒子页面的逻辑 | 332 | // 这里可以添加跳转到戒子页面的逻辑 |
| 333 | + router.push('/students') | ||
| 329 | break | 334 | break |
| 330 | case 'volunteers': | 335 | case 'volunteers': |
| 331 | console.log('跳转到义工页面') | 336 | console.log('跳转到义工页面') |
| 332 | // 这里可以添加跳转到义工页面的逻辑 | 337 | // 这里可以添加跳转到义工页面的逻辑 |
| 338 | + router.push('/volunteers') | ||
| 333 | break | 339 | break |
| 334 | } | 340 | } |
| 335 | } else { | 341 | } else { |
| ... | @@ -467,6 +473,7 @@ const attachTransitionEndOnce = (looping) => { | ... | @@ -467,6 +473,7 @@ const attachTransitionEndOnce = (looping) => { |
| 467 | const handleNewsClick = (item) => { | 473 | const handleNewsClick = (item) => { |
| 468 | console.log('点击新闻:', item) | 474 | console.log('点击新闻:', item) |
| 469 | // 这里可以添加跳转到新闻详情页面的逻辑 | 475 | // 这里可以添加跳转到新闻详情页面的逻辑 |
| 476 | + router.push({ name: 'NewsDetail', params: { id: item.date } }) | ||
| 470 | } | 477 | } |
| 471 | </script> | 478 | </script> |
| 472 | 479 | ... | ... |
src/views/Masters.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div class="masters-container"> | ||
| 3 | + <!-- 一行一个 Item(单列) --> | ||
| 4 | + <section class="single-list"> | ||
| 5 | + <div | ||
| 6 | + class="item-card" | ||
| 7 | + v-for="(item, i) in singleItems" | ||
| 8 | + :key="`single-${i}`" | ||
| 9 | + @click="goDetail(item)" | ||
| 10 | + > | ||
| 11 | + <div class="item-image"> | ||
| 12 | + <img :src="item.image" :alt="item.name" /> | ||
| 13 | + </div> | ||
| 14 | + <div class="item-caption"> | ||
| 15 | + <div class="item-role">{{ item.role }}</div> | ||
| 16 | + <div class="item-name">{{ item.name }}</div> | ||
| 17 | + </div> | ||
| 18 | + </div> | ||
| 19 | + </section> | ||
| 20 | + | ||
| 21 | + <!-- 一行两个 Item(双列) --> | ||
| 22 | + <section class="grid-two"> | ||
| 23 | + <div | ||
| 24 | + class="item-card small" | ||
| 25 | + v-for="(item, i) in gridItems" | ||
| 26 | + :key="`grid-${i}`" | ||
| 27 | + @click="goDetail(item)" | ||
| 28 | + > | ||
| 29 | + <div class="item-image"> | ||
| 30 | + <img :src="item.image" :alt="item.name" /> | ||
| 31 | + </div> | ||
| 32 | + <div class="item-caption"> | ||
| 33 | + <div class="item-role">{{ item.role }}</div> | ||
| 34 | + <div class="item-name">{{ item.name }}</div> | ||
| 35 | + </div> | ||
| 36 | + </div> | ||
| 37 | + </section> | ||
| 38 | + </div> | ||
| 39 | +</template> | ||
| 40 | + | ||
| 41 | +<script setup> | ||
| 42 | +import { ref } from 'vue' | ||
| 43 | +import { useRouter } from 'vue-router' | ||
| 44 | +import { useTitle } from '@vueuse/core'; | ||
| 45 | + | ||
| 46 | +const router = useRouter() | ||
| 47 | + | ||
| 48 | +useTitle('三師七證') | ||
| 49 | + | ||
| 50 | +// 单列数据(示例) | ||
| 51 | +const singleItems = ref([ | ||
| 52 | + { | ||
| 53 | + id: 101, | ||
| 54 | + role: '中国·戒幢律寺', | ||
| 55 | + name: '上明仁传师', | ||
| 56 | + image: '/src/assets/images/02 西园戒幢律寺三坛大戒法会/截图/全家福3_副本.jpg' | ||
| 57 | + }, | ||
| 58 | + { | ||
| 59 | + id: 102, | ||
| 60 | + role: '中国·戒幢律寺', | ||
| 61 | + name: '上明仁传师', | ||
| 62 | + image: '/src/assets/images/02 西园戒幢律寺三坛大戒法会/截图/全家福3_副本.jpg' | ||
| 63 | + }, | ||
| 64 | + { | ||
| 65 | + id: 103, | ||
| 66 | + role: '中国·戒幢律寺', | ||
| 67 | + name: '上明仁传师', | ||
| 68 | + image: '/src/assets/images/02 西园戒幢律寺三坛大戒法会/截图/全家福3_副本.jpg' | ||
| 69 | + } | ||
| 70 | +]) | ||
| 71 | + | ||
| 72 | +// 双列数据(示例) | ||
| 73 | +const gridItems = ref([ | ||
| 74 | + { | ||
| 75 | + id: 201, | ||
| 76 | + role: '传戒师', | ||
| 77 | + name: '上智和法师', | ||
| 78 | + image: '/src/assets/images/02 西园戒幢律寺三坛大戒法会/截图/全家福3_副本.jpg' | ||
| 79 | + }, | ||
| 80 | + { | ||
| 81 | + id: 202, | ||
| 82 | + role: '教授师', | ||
| 83 | + name: '上德弘法师', | ||
| 84 | + image: '/src/assets/images/02 西园戒幢律寺三坛大戒法会/截图/全家福3_副本.jpg' | ||
| 85 | + }, | ||
| 86 | + { | ||
| 87 | + id: 203, | ||
| 88 | + role: '羯磨师', | ||
| 89 | + name: '上寂明法师', | ||
| 90 | + image: '/src/assets/images/02 西园戒幢律寺三坛大戒法会/截图/全家福3_副本.jpg' | ||
| 91 | + }, | ||
| 92 | + { | ||
| 93 | + id: 204, | ||
| 94 | + role: '得戒和尚', | ||
| 95 | + name: '上慧觉法师', | ||
| 96 | + image: '/src/assets/images/02 西园戒幢律寺三坛大戒法会/截图/全家福3_副本.jpg' | ||
| 97 | + }, | ||
| 98 | + { | ||
| 99 | + id: 205, | ||
| 100 | + role: '引礼师', | ||
| 101 | + name: '上圆道法师', | ||
| 102 | + image: '/src/assets/images/02 西园戒幢律寺三坛大戒法会/截图/全家福3_副本.jpg' | ||
| 103 | + }, | ||
| 104 | + { | ||
| 105 | + id: 206, | ||
| 106 | + role: '开导师', | ||
| 107 | + name: '上演真法师', | ||
| 108 | + image: '/src/assets/images/02 西园戒幢律寺三坛大戒法会/截图/全家福3_副本.jpg' | ||
| 109 | + } | ||
| 110 | +]) | ||
| 111 | + | ||
| 112 | +const goDetail = (item) => { | ||
| 113 | + router.push(`/masters/${item.id}`) | ||
| 114 | +} | ||
| 115 | +</script> | ||
| 116 | + | ||
| 117 | +<style scoped> | ||
| 118 | +/* 页面容器 */ | ||
| 119 | +.masters-container { | ||
| 120 | + padding: 1.5rem; | ||
| 121 | + background: #F2EBDB; | ||
| 122 | +} | ||
| 123 | + | ||
| 124 | +/* 单列列表区 */ | ||
| 125 | +.single-list { | ||
| 126 | + display: flex; | ||
| 127 | + flex-direction: column; | ||
| 128 | + gap: 1rem; | ||
| 129 | + margin-bottom: 1rem; | ||
| 130 | +} | ||
| 131 | + | ||
| 132 | +/* 双列网格区 */ | ||
| 133 | +.grid-two { | ||
| 134 | + display: grid; | ||
| 135 | + grid-template-columns: repeat(2, 1fr); | ||
| 136 | + gap: 0.75rem; | ||
| 137 | +} | ||
| 138 | + | ||
| 139 | +/* 卡片 */ | ||
| 140 | +.item-card { | ||
| 141 | + position: relative; | ||
| 142 | + background: #fff; | ||
| 143 | + border: 2px solid #6B4102; | ||
| 144 | + overflow: hidden; | ||
| 145 | + transition: transform 0.2s ease; | ||
| 146 | + padding: 0.5rem; | ||
| 147 | +} | ||
| 148 | + | ||
| 149 | +.item-card:hover { | ||
| 150 | + transform: translateY(-0.125rem); | ||
| 151 | +} | ||
| 152 | + | ||
| 153 | +.item-card.small { | ||
| 154 | + /* 双列卡片视觉上更紧凑 */ | ||
| 155 | + border: 1px solid rgba(107, 65, 2, 0.8); | ||
| 156 | +} | ||
| 157 | + | ||
| 158 | +/* 图片区域 - 采用固定纵向比例 */ | ||
| 159 | +.item-image { | ||
| 160 | + width: 100%; | ||
| 161 | + aspect-ratio: 3 / 4; | ||
| 162 | + background: #f5f5f5; | ||
| 163 | +} | ||
| 164 | + | ||
| 165 | +.item-image img { | ||
| 166 | + width: 100%; | ||
| 167 | + height: 100%; | ||
| 168 | + object-fit: cover; | ||
| 169 | + display: block; | ||
| 170 | +} | ||
| 171 | + | ||
| 172 | +/* 底部说明条 */ | ||
| 173 | +.item-caption { | ||
| 174 | + position: absolute; | ||
| 175 | + left: 0; | ||
| 176 | + right: 0; | ||
| 177 | + bottom: 0; | ||
| 178 | + background: rgba(107, 65, 2, 0.8); | ||
| 179 | + color: #fff; | ||
| 180 | + padding: 0.75rem; | ||
| 181 | + text-align: center; | ||
| 182 | +} | ||
| 183 | + | ||
| 184 | +.item-role { | ||
| 185 | + font-size: 0.75rem; | ||
| 186 | + opacity: 0.95; | ||
| 187 | +} | ||
| 188 | + | ||
| 189 | +.item-name { | ||
| 190 | + font-size: 0.875rem; | ||
| 191 | + font-weight: 600; | ||
| 192 | + margin-top: 0.25rem; | ||
| 193 | +} | ||
| 194 | + | ||
| 195 | +/* 响应式调整 */ | ||
| 196 | +@media (max-width: 48rem) { | ||
| 197 | + .item-caption { | ||
| 198 | + padding: 0.625rem; | ||
| 199 | + margin: 0.5rem; | ||
| 200 | + } | ||
| 201 | +} | ||
| 202 | + | ||
| 203 | +@media (max-width: 30rem) { | ||
| 204 | + .masters-container { | ||
| 205 | + padding: 0.75rem; | ||
| 206 | + } | ||
| 207 | + .item-caption { | ||
| 208 | + padding: 0.5rem; | ||
| 209 | + margin: 0.5rem; | ||
| 210 | + } | ||
| 211 | + .item-name { | ||
| 212 | + font-size: 0.8125rem; | ||
| 213 | + } | ||
| 214 | +} | ||
| 215 | + | ||
| 216 | +@media (max-width: 20rem) { | ||
| 217 | + .grid-two { | ||
| 218 | + gap: 0.5rem; | ||
| 219 | + } | ||
| 220 | + .item-caption { | ||
| 221 | + padding: 0.375rem; | ||
| 222 | + margin: 0.5rem; | ||
| 223 | + } | ||
| 224 | + .item-name { | ||
| 225 | + font-size: 0.75rem; | ||
| 226 | + } | ||
| 227 | +} | ||
| 228 | +</style> |
src/views/MastersDetail.vue
0 → 100644
| 1 | +<!-- | ||
| 2 | + * @Date: 2025-10-30 20:00:25 | ||
| 3 | + * @LastEditors: hookehuyr hookehuyr@gmail.com | ||
| 4 | + * @LastEditTime: 2025-10-30 20:50:36 | ||
| 5 | + * @FilePath: /stdj_h5/src/views/MastersDetail.vue | ||
| 6 | + * @Description: 文件描述 | ||
| 7 | +--> | ||
| 8 | +<template> | ||
| 9 | + <div class="masters-detail-container"> | ||
| 10 | + <section class="single-list"> | ||
| 11 | + <div class="item-card"> | ||
| 12 | + | ||
| 13 | + </div> | ||
| 14 | + </section> | ||
| 15 | + </div> | ||
| 16 | +</template> | ||
| 17 | + | ||
| 18 | +<script setup> | ||
| 19 | +import { ref } from 'vue' | ||
| 20 | +import { useTitle } from '@vueuse/core'; | ||
| 21 | + | ||
| 22 | +useTitle('三師七證 - 詳情') | ||
| 23 | +</script> | ||
| 24 | + | ||
| 25 | + | ||
| 26 | +<style scoped> | ||
| 27 | +.masters-detail-container { | ||
| 28 | + padding: 1.5rem; | ||
| 29 | + background: #F2EBDB; | ||
| 30 | + min-height: 100vh; /* 背景至少覆盖整个视口高度 */ | ||
| 31 | + width: 100%; | ||
| 32 | + box-sizing: border-box; | ||
| 33 | +} | ||
| 34 | + | ||
| 35 | +.single-list { | ||
| 36 | + display: flex; | ||
| 37 | + flex-direction: column; | ||
| 38 | + gap: 1rem; | ||
| 39 | + margin-bottom: 1rem; | ||
| 40 | +} | ||
| 41 | + | ||
| 42 | +.item-card { | ||
| 43 | + position: relative; | ||
| 44 | + background: #fff; | ||
| 45 | + border: 2px solid #6B4102; | ||
| 46 | + overflow: hidden; | ||
| 47 | + transition: transform 0.2s ease; | ||
| 48 | + padding: 0.5rem; | ||
| 49 | +} | ||
| 50 | + | ||
| 51 | +</style> |
This diff is collapsed. Click to expand it.
src/views/StudentDetail.vue
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
src/views/TeacherDetail.vue
deleted
100644 → 0
This diff is collapsed. Click to expand it.
src/views/Teachers.vue
deleted
100644 → 0
| 1 | -<template> | ||
| 2 | - <div class="page-container"> | ||
| 3 | - <!-- 导航栏 --> | ||
| 4 | - <van-nav-bar title="三师七证" left-arrow @click-left="$router.back()" class="custom-nav"> | ||
| 5 | - <template #right> | ||
| 6 | - <van-icon name="search" size="18" /> | ||
| 7 | - </template> | ||
| 8 | - </van-nav-bar> | ||
| 9 | - | ||
| 10 | - <!-- 内容区域 --> | ||
| 11 | - <div class="content-container"> | ||
| 12 | - <!-- 顶部说明 --> | ||
| 13 | - <div class="intro-section"> | ||
| 14 | - <div class="intro-card"> | ||
| 15 | - <div class="intro-icon">📜</div> | ||
| 16 | - <div class="intro-content"> | ||
| 17 | - <h3>三师七证</h3> | ||
| 18 | - <p>三师:得戒和尚、羯磨阿阇梨、教授阿阇梨<br>七证:七位证明师</p> | ||
| 19 | - </div> | ||
| 20 | - </div> | ||
| 21 | - </div> | ||
| 22 | - | ||
| 23 | - <!-- 筛选栏 --> | ||
| 24 | - <div class="filter-section"> | ||
| 25 | - <van-tabs v-model:active="activeTab" @change="handleTabChange" class="custom-tabs"> | ||
| 26 | - <van-tab title="全部" name="all"></van-tab> | ||
| 27 | - <van-tab title="三师" name="teachers"></van-tab> | ||
| 28 | - <van-tab title="七证" name="witnesses"></van-tab> | ||
| 29 | - </van-tabs> | ||
| 30 | - </div> | ||
| 31 | - | ||
| 32 | - <!-- 法师列表 --> | ||
| 33 | - <div class="teachers-list"> | ||
| 34 | - <div | ||
| 35 | - v-for="teacher in filteredTeachers" | ||
| 36 | - :key="teacher.id" | ||
| 37 | - class="teacher-card" | ||
| 38 | - @click="handleTeacherClick(teacher)" | ||
| 39 | - > | ||
| 40 | - <div class="teacher-avatar"> | ||
| 41 | - <img v-if="teacher.avatar" :src="teacher.avatar" :alt="teacher.name" /> | ||
| 42 | - <div v-else class="avatar-placeholder"> | ||
| 43 | - <span>{{ teacher.name.charAt(0) }}</span> | ||
| 44 | - </div> | ||
| 45 | - </div> | ||
| 46 | - | ||
| 47 | - <div class="teacher-info"> | ||
| 48 | - <div class="teacher-header"> | ||
| 49 | - <h4 class="teacher-name">{{ teacher.name }}</h4> | ||
| 50 | - <div class="teacher-role" :class="getRoleClass(teacher.role)"> | ||
| 51 | - {{ teacher.role }} | ||
| 52 | - </div> | ||
| 53 | - </div> | ||
| 54 | - | ||
| 55 | - <div class="teacher-details"> | ||
| 56 | - <p class="teacher-title">{{ teacher.title }}</p> | ||
| 57 | - <p class="teacher-temple">{{ teacher.temple }}</p> | ||
| 58 | - <div class="teacher-meta"> | ||
| 59 | - <span class="ordination-year">{{ teacher.ordinationYear }}年受戒</span> | ||
| 60 | - <span class="experience">{{ teacher.experience }}年戒腊</span> | ||
| 61 | - </div> | ||
| 62 | - </div> | ||
| 63 | - </div> | ||
| 64 | - | ||
| 65 | - <div class="teacher-actions"> | ||
| 66 | - <van-icon name="arrow" /> | ||
| 67 | - </div> | ||
| 68 | - </div> | ||
| 69 | - </div> | ||
| 70 | - | ||
| 71 | - <!-- 空状态 --> | ||
| 72 | - <van-empty v-if="filteredTeachers.length === 0" description="暂无相关法师信息" /> | ||
| 73 | - </div> | ||
| 74 | - </div> | ||
| 75 | -</template> | ||
| 76 | - | ||
| 77 | -<script setup> | ||
| 78 | -import { ref, computed } from 'vue' | ||
| 79 | -import { useRouter } from 'vue-router' | ||
| 80 | - | ||
| 81 | -const router = useRouter() | ||
| 82 | -const activeTab = ref('all') | ||
| 83 | - | ||
| 84 | -// 法师数据 | ||
| 85 | -const teachers = ref([ | ||
| 86 | - { | ||
| 87 | - id: 1, | ||
| 88 | - name: '慧明法师', | ||
| 89 | - title: '方丈', | ||
| 90 | - role: '得戒和尚', | ||
| 91 | - temple: '大觉寺', | ||
| 92 | - ordinationYear: 1985, | ||
| 93 | - experience: 39, | ||
| 94 | - avatar: null, | ||
| 95 | - type: 'teacher' | ||
| 96 | - }, | ||
| 97 | - { | ||
| 98 | - id: 2, | ||
| 99 | - name: '智慧法师', | ||
| 100 | - title: '首座', | ||
| 101 | - role: '羯磨阿阇梨', | ||
| 102 | - temple: '大觉寺', | ||
| 103 | - ordinationYear: 1990, | ||
| 104 | - experience: 34, | ||
| 105 | - avatar: null, | ||
| 106 | - type: 'teacher' | ||
| 107 | - }, | ||
| 108 | - { | ||
| 109 | - id: 3, | ||
| 110 | - name: '觉悟法师', | ||
| 111 | - title: '监院', | ||
| 112 | - role: '教授阿阇梨', | ||
| 113 | - temple: '大觉寺', | ||
| 114 | - ordinationYear: 1992, | ||
| 115 | - experience: 32, | ||
| 116 | - avatar: null, | ||
| 117 | - type: 'teacher' | ||
| 118 | - }, | ||
| 119 | - { | ||
| 120 | - id: 4, | ||
| 121 | - name: '慈悲法师', | ||
| 122 | - title: '知客', | ||
| 123 | - role: '证明师', | ||
| 124 | - temple: '大觉寺', | ||
| 125 | - ordinationYear: 1995, | ||
| 126 | - experience: 29, | ||
| 127 | - avatar: null, | ||
| 128 | - type: 'witness' | ||
| 129 | - }, | ||
| 130 | - { | ||
| 131 | - id: 5, | ||
| 132 | - name: '般若法师', | ||
| 133 | - title: '维那', | ||
| 134 | - role: '证明师', | ||
| 135 | - temple: '大觉寺', | ||
| 136 | - ordinationYear: 1998, | ||
| 137 | - experience: 26, | ||
| 138 | - avatar: null, | ||
| 139 | - type: 'witness' | ||
| 140 | - }, | ||
| 141 | - { | ||
| 142 | - id: 6, | ||
| 143 | - name: '禅定法师', | ||
| 144 | - title: '典座', | ||
| 145 | - role: '证明师', | ||
| 146 | - temple: '大觉寺', | ||
| 147 | - ordinationYear: 2000, | ||
| 148 | - experience: 24, | ||
| 149 | - avatar: null, | ||
| 150 | - type: 'witness' | ||
| 151 | - }, | ||
| 152 | - { | ||
| 153 | - id: 7, | ||
| 154 | - name: '精进法师', | ||
| 155 | - title: '书记', | ||
| 156 | - role: '证明师', | ||
| 157 | - temple: '大觉寺', | ||
| 158 | - ordinationYear: 2002, | ||
| 159 | - experience: 22, | ||
| 160 | - avatar: null, | ||
| 161 | - type: 'witness' | ||
| 162 | - }, | ||
| 163 | - { | ||
| 164 | - id: 8, | ||
| 165 | - name: '持戒法师', | ||
| 166 | - title: '库头', | ||
| 167 | - role: '证明师', | ||
| 168 | - temple: '大觉寺', | ||
| 169 | - ordinationYear: 2005, | ||
| 170 | - experience: 19, | ||
| 171 | - avatar: null, | ||
| 172 | - type: 'witness' | ||
| 173 | - }, | ||
| 174 | - { | ||
| 175 | - id: 9, | ||
| 176 | - name: '忍辱法师', | ||
| 177 | - title: '僧值', | ||
| 178 | - role: '证明师', | ||
| 179 | - temple: '大觉寺', | ||
| 180 | - ordinationYear: 2008, | ||
| 181 | - experience: 16, | ||
| 182 | - avatar: null, | ||
| 183 | - type: 'witness' | ||
| 184 | - }, | ||
| 185 | - { | ||
| 186 | - id: 10, | ||
| 187 | - name: '布施法师', | ||
| 188 | - title: '衣钵', | ||
| 189 | - role: '证明师', | ||
| 190 | - temple: '大觉寺', | ||
| 191 | - ordinationYear: 2010, | ||
| 192 | - experience: 14, | ||
| 193 | - avatar: null, | ||
| 194 | - type: 'witness' | ||
| 195 | - } | ||
| 196 | -]) | ||
| 197 | - | ||
| 198 | -// 过滤后的法师列表 | ||
| 199 | -const filteredTeachers = computed(() => { | ||
| 200 | - if (activeTab.value === 'all') { | ||
| 201 | - return teachers.value | ||
| 202 | - } else if (activeTab.value === 'teachers') { | ||
| 203 | - return teachers.value.filter(teacher => teacher.type === 'teacher') | ||
| 204 | - } else if (activeTab.value === 'witnesses') { | ||
| 205 | - return teachers.value.filter(teacher => teacher.type === 'witness') | ||
| 206 | - } | ||
| 207 | - return teachers.value | ||
| 208 | -}) | ||
| 209 | - | ||
| 210 | -// 获取角色样式类 | ||
| 211 | -const getRoleClass = (role) => { | ||
| 212 | - if (role.includes('和尚') || role.includes('阿阇梨')) { | ||
| 213 | - return 'role-teacher' | ||
| 214 | - } | ||
| 215 | - return 'role-witness' | ||
| 216 | -} | ||
| 217 | - | ||
| 218 | -// 处理标签切换 | ||
| 219 | -const handleTabChange = (name) => { | ||
| 220 | - activeTab.value = name | ||
| 221 | -} | ||
| 222 | - | ||
| 223 | -// 处理法师点击 | ||
| 224 | -const handleTeacherClick = (teacher) => { | ||
| 225 | - router.push(`/teachers/${teacher.id}`) | ||
| 226 | -} | ||
| 227 | -</script> | ||
| 228 | - | ||
| 229 | -<style scoped> | ||
| 230 | -.page-container { | ||
| 231 | - min-height: 100vh; | ||
| 232 | - background: #fafafa; | ||
| 233 | -} | ||
| 234 | - | ||
| 235 | -.custom-nav { | ||
| 236 | - background: linear-gradient(135deg, #fbbf24, #f97316); | ||
| 237 | - color: white; | ||
| 238 | -} | ||
| 239 | - | ||
| 240 | -.custom-nav :deep(.van-nav-bar__title) { | ||
| 241 | - color: white; | ||
| 242 | - font-weight: 600; | ||
| 243 | -} | ||
| 244 | - | ||
| 245 | -.custom-nav :deep(.van-icon) { | ||
| 246 | - color: white; | ||
| 247 | -} | ||
| 248 | - | ||
| 249 | -.content-container { | ||
| 250 | - padding-top: 46px; | ||
| 251 | -} | ||
| 252 | - | ||
| 253 | -.intro-section { | ||
| 254 | - padding: 16px; | ||
| 255 | -} | ||
| 256 | - | ||
| 257 | -.intro-card { | ||
| 258 | - background: white; | ||
| 259 | - border-radius: 12px; | ||
| 260 | - padding: 20px; | ||
| 261 | - display: flex; | ||
| 262 | - align-items: center; | ||
| 263 | - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); | ||
| 264 | -} | ||
| 265 | - | ||
| 266 | -.intro-icon { | ||
| 267 | - font-size: 32px; | ||
| 268 | - margin-right: 16px; | ||
| 269 | -} | ||
| 270 | - | ||
| 271 | -.intro-content h3 { | ||
| 272 | - font-size: 18px; | ||
| 273 | - font-weight: 600; | ||
| 274 | - color: #333; | ||
| 275 | - margin: 0 0 8px 0; | ||
| 276 | -} | ||
| 277 | - | ||
| 278 | -.intro-content p { | ||
| 279 | - font-size: 14px; | ||
| 280 | - color: #666; | ||
| 281 | - margin: 0; | ||
| 282 | - line-height: 1.5; | ||
| 283 | -} | ||
| 284 | - | ||
| 285 | -.filter-section { | ||
| 286 | - background: white; | ||
| 287 | - border-bottom: 1px solid #eee; | ||
| 288 | -} | ||
| 289 | - | ||
| 290 | -.custom-tabs :deep(.van-tab) { | ||
| 291 | - font-weight: 500; | ||
| 292 | -} | ||
| 293 | - | ||
| 294 | -.custom-tabs :deep(.van-tab--active) { | ||
| 295 | - color: #f59e0b; | ||
| 296 | -} | ||
| 297 | - | ||
| 298 | -.custom-tabs :deep(.van-tabs__line) { | ||
| 299 | - background: #f59e0b; | ||
| 300 | -} | ||
| 301 | - | ||
| 302 | -.teachers-list { | ||
| 303 | - padding: 16px; | ||
| 304 | -} | ||
| 305 | - | ||
| 306 | -.teacher-card { | ||
| 307 | - background: white; | ||
| 308 | - border-radius: 12px; | ||
| 309 | - padding: 16px; | ||
| 310 | - margin-bottom: 12px; | ||
| 311 | - display: flex; | ||
| 312 | - align-items: center; | ||
| 313 | - gap: 16px; | ||
| 314 | - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); | ||
| 315 | - cursor: pointer; | ||
| 316 | - transition: all 0.3s ease; | ||
| 317 | -} | ||
| 318 | - | ||
| 319 | -.teacher-card:hover { | ||
| 320 | - transform: translateY(-3px); | ||
| 321 | - box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); | ||
| 322 | -} | ||
| 323 | - | ||
| 324 | -.teacher-card:active { | ||
| 325 | - transform: translateY(-1px); | ||
| 326 | - box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12); | ||
| 327 | -} | ||
| 328 | - | ||
| 329 | -.teacher-avatar { | ||
| 330 | - width: 60px; | ||
| 331 | - height: 60px; | ||
| 332 | - border-radius: 50%; | ||
| 333 | - overflow: hidden; | ||
| 334 | - margin-right: 16px; | ||
| 335 | - flex-shrink: 0; | ||
| 336 | -} | ||
| 337 | - | ||
| 338 | -.teacher-avatar img { | ||
| 339 | - width: 100%; | ||
| 340 | - height: 100%; | ||
| 341 | - object-fit: cover; | ||
| 342 | -} | ||
| 343 | - | ||
| 344 | -.avatar-placeholder { | ||
| 345 | - width: 100%; | ||
| 346 | - height: 100%; | ||
| 347 | - background: linear-gradient(135deg, #fbbf24, #f97316); | ||
| 348 | - display: flex; | ||
| 349 | - align-items: center; | ||
| 350 | - justify-content: center; | ||
| 351 | - color: white; | ||
| 352 | - font-size: 24px; | ||
| 353 | - font-weight: 600; | ||
| 354 | -} | ||
| 355 | - | ||
| 356 | -.teacher-info { | ||
| 357 | - flex: 1; | ||
| 358 | -} | ||
| 359 | - | ||
| 360 | -.teacher-header { | ||
| 361 | - display: flex; | ||
| 362 | - align-items: center; | ||
| 363 | - justify-content: space-between; | ||
| 364 | - margin-bottom: 8px; | ||
| 365 | -} | ||
| 366 | - | ||
| 367 | -.teacher-name { | ||
| 368 | - font-size: 18px; | ||
| 369 | - font-weight: 600; | ||
| 370 | - color: #333; | ||
| 371 | - margin: 0; | ||
| 372 | -} | ||
| 373 | - | ||
| 374 | -.teacher-role { | ||
| 375 | - padding: 4px 8px; | ||
| 376 | - border-radius: 12px; | ||
| 377 | - font-size: 12px; | ||
| 378 | - font-weight: 500; | ||
| 379 | -} | ||
| 380 | - | ||
| 381 | -.role-teacher { | ||
| 382 | - background: linear-gradient(135deg, #fbbf24, #f97316); | ||
| 383 | - color: white; | ||
| 384 | -} | ||
| 385 | - | ||
| 386 | -.role-witness { | ||
| 387 | - background: #f0f9ff; | ||
| 388 | - color: #0369a1; | ||
| 389 | - border: 1px solid #bae6fd; | ||
| 390 | -} | ||
| 391 | - | ||
| 392 | -.teacher-details { | ||
| 393 | - space-y: 4px; | ||
| 394 | -} | ||
| 395 | - | ||
| 396 | -.teacher-title { | ||
| 397 | - font-size: 16px; | ||
| 398 | - color: #666; | ||
| 399 | - margin: 0 0 4px 0; | ||
| 400 | -} | ||
| 401 | - | ||
| 402 | -.teacher-temple { | ||
| 403 | - font-size: 14px; | ||
| 404 | - color: #999; | ||
| 405 | - margin: 0 0 8px 0; | ||
| 406 | -} | ||
| 407 | - | ||
| 408 | -.teacher-meta { | ||
| 409 | - display: flex; | ||
| 410 | - gap: 16px; | ||
| 411 | -} | ||
| 412 | - | ||
| 413 | -.ordination-year, | ||
| 414 | -.experience { | ||
| 415 | - font-size: 12px; | ||
| 416 | - color: #999; | ||
| 417 | - background: #f5f5f5; | ||
| 418 | - padding: 2px 6px; | ||
| 419 | - border-radius: 4px; | ||
| 420 | -} | ||
| 421 | - | ||
| 422 | -.teacher-actions { | ||
| 423 | - margin-left: 12px; | ||
| 424 | - color: #ccc; | ||
| 425 | -} | ||
| 426 | -</style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment