hookehuyr

feat: 新增资料列表页面并优化图标组件

- 新增 "资料列表" 页面 (`src/pages/material-list/index.vue`),包含搜索栏、资料列表展示及收藏功能
- 注册页面路由至 `src/app.config.js` 并添加页面配置文件
- 扩展 `IconFont` 组件,新增 `StarFill` 图标以支持收藏状态切换
- 更新 CHANGELOG.md 文档,记录新增功能与优化项
...@@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file. ...@@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
5 ## [Unreleased] 5 ## [Unreleased]
6 6
7 ### Changed 7 ### Changed
8 +- 优化 "资料列表" 页面 (`src/pages/material-list`):
9 + - 替换页面内所有静态图片资源为 NutUI 图标组件 (`IconFont`),提升加载性能与视觉一致性
10 + - 扩展 `IconFont` 组件,新增 `StarFill` 图标支持
8 - 优化 "我的" 页面 (`src/pages/mine`): 11 - 优化 "我的" 页面 (`src/pages/mine`):
9 - 重构页面布局,严格还原设计稿 (`docs/design/manulife-V1/我的`) 样式 12 - 重构页面布局,严格还原设计稿 (`docs/design/manulife-V1/我的`) 样式
10 - 引入用户卡片背景图,优化头像、姓名及工号展示布局 13 - 引入用户卡片背景图,优化头像、姓名及工号展示布局
...@@ -38,6 +41,11 @@ All notable changes to this project will be documented in this file. ...@@ -38,6 +41,11 @@ All notable changes to this project will be documented in this file.
38 - 补充 `src/pages/feedback/index.vue``NavHeader` 组件的引用 41 - 补充 `src/pages/feedback/index.vue``NavHeader` 组件的引用
39 42
40 ### Added 43 ### Added
44 +- 新增 "资料列表" 页面 (`src/pages/material-list/index`):
45 + - 实现基于 Design 的列表 UI,精确还原设计稿 (`docs/design/manulife-V1/资料列表`)
46 + - 集成 `NavHeader``TabBar` 组件,保持全站导航一致性
47 + - 使用 Tailwind CSS 进行样式开发,替代原有 CSS
48 + - 注册路由至 `src/app.config.js`
41 - 新增 "我的" 页面 (`src/pages/mine`),包含用户信息展示、功能菜单列表 49 - 新增 "我的" 页面 (`src/pages/mine`),包含用户信息展示、功能菜单列表
42 - 新增 "我的计划书" 页面 (`src/pages/plan`),实现计划书列表展示、搜索过滤、状态切换功能 50 - 新增 "我的计划书" 页面 (`src/pages/plan`),实现计划书列表展示、搜索过滤、状态切换功能
43 - 新增 "我的收藏" 页面 (`src/pages/favorites`),实现文章/资料收藏列表及分类筛选功能 51 - 新增 "我的收藏" 页面 (`src/pages/favorites`),实现文章/资料收藏列表及分类筛选功能
......
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
...@@ -15,6 +15,7 @@ const pages = [ ...@@ -15,6 +15,7 @@ const pages = [
15 'pages/onboarding/index', 15 'pages/onboarding/index',
16 'pages/family-office/index', 16 'pages/family-office/index',
17 'pages/knowledge-base/index', 17 'pages/knowledge-base/index',
18 + 'pages/material-list/index',
18 'pages/signing/index', 19 'pages/signing/index',
19 'pages/mine/index', 20 'pages/mine/index',
20 'pages/plan/index', 21 'pages/plan/index',
......
1 <!-- 1 <!--
2 * @Date: 2026-01-29 21:30:20 2 * @Date: 2026-01-29 21:30:20
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2026-01-29 23:14:24 4 + * @LastEditTime: 2026-01-30 15:29:14
5 * @FilePath: /manulife-weapp/src/components/IconFont.vue 5 * @FilePath: /manulife-weapp/src/components/IconFont.vue
6 * @Description: 图标字体组件 6 * @Description: 图标字体组件
7 --> 7 -->
...@@ -35,6 +35,7 @@ import { ...@@ -35,6 +35,7 @@ import {
35 Search, 35 Search,
36 Service, 36 Service,
37 Star, 37 Star,
38 + StarFill,
38 Top, 39 Top,
39 Photograph, 40 Photograph,
40 Del 41 Del
...@@ -83,6 +84,7 @@ const icons = { ...@@ -83,6 +84,7 @@ const icons = {
83 Search, 84 Search,
84 Service, 85 Service,
85 Star, 86 Star,
87 + StarFill,
86 Top, 88 Top,
87 Photograph, 89 Photograph,
88 Del 90 Del
......
1 +export default {
2 + navigationBarTitleText: '资料列表',
3 + enablePullDownRefresh: true,
4 + backgroundColor: '#F9FAFB',
5 + navigationStyle: 'custom'
6 +}
1 +<!--
2 + * @Date: 2026-01-30
3 + * @Description: 资料列表页
4 +-->
5 +<template>
6 + <div class="min-h-screen bg-[#F9FAFB] pb-[calc(160rpx+env(safe-area-inset-bottom))]">
7 + <!-- Navigation Header -->
8 + <NavHeader title="资料列表" />
9 +
10 + <!-- Search Bar -->
11 + <div class="px-[32rpx] mt-[32rpx]">
12 + <div class="bg-white rounded-[12rpx] flex items-center px-[32rpx] py-[24rpx]">
13 + <IconFont name="Search" size="20" color="#9CA3AF" customClass="mr-[16rpx]" />
14 + <input
15 + v-model="searchValue"
16 + type="text"
17 + placeholder="搜索资料..."
18 + class="flex-1 text-[28rpx] text-[#1F2937] placeholder-gray-400 bg-transparent outline-none"
19 + @confirm="onSearch"
20 + />
21 + </div>
22 + </div>
23 +
24 + <!-- Material List -->
25 + <div class="px-[32rpx] mt-[40rpx]">
26 + <div class="bg-white rounded-[32rpx] p-[32rpx] shadow-sm">
27 + <div v-for="(item, index) in list" :key="index">
28 + <div class="flex justify-between items-start pt-[32rpx] first:pt-0">
29 + <div class="flex items-start flex-1 mr-[20rpx]">
30 + <div class="w-[80rpx] h-[88rpx] mr-[24rpx] flex-shrink-0 flex items-center justify-center bg-blue-50 rounded-[12rpx]">
31 + <IconFont :name="item.iconName || 'Order'" size="32" :color="item.iconColor || '#2563EB'" />
32 + </div>
33 + <div class="flex flex-col">
34 + <span class="text-[#1F2937] text-[28rpx] font-normal leading-[1.2] mb-[14rpx] line-clamp-2">
35 + {{ item.title }}
36 + </span>
37 + <span class="text-[#6B7280] text-[24rpx] leading-[1.3] line-clamp-1">
38 + {{ item.desc }}
39 + </span>
40 + </div>
41 + </div>
42 + <!-- Action Icon (Download/Detail) -->
43 + <IconFont name="Download" size="20" color="#9CA3AF" />
44 + </div>
45 +
46 + <div class="flex items-center mt-[16rpx] ml-[104rpx] pb-[32rpx]">
47 + <span class="text-[#9CA3AF] text-[24rpx] mr-[40rpx]">{{ item.size }}</span>
48 + <div class="flex items-center" @click="toggleCollect(item)">
49 + <IconFont
50 + :name="item.collected ? 'StarFill' : 'Star'"
51 + size="12"
52 + :color="item.collected ? '#F59E0B' : '#9CA3AF'"
53 + customClass="mr-[8rpx]"
54 + />
55 + <span :class="['text-[24rpx]', item.collected ? 'text-[#F59E0B]' : 'text-[#9CA3AF]']">
56 + {{ item.collected ? '已收藏' : '收藏' }}
57 + </span>
58 + </div>
59 + </div>
60 +
61 + <!-- Divider -->
62 + <div v-if="index < list.length - 1" class="h-[1px] bg-[#E5E7EB] w-full mb-[32rpx]"></div>
63 + </div>
64 + </div>
65 + </div>
66 +
67 + <!-- Tab Bar -->
68 + <TabBar />
69 + </div>
70 +</template>
71 +
72 +<script setup>
73 +import { ref } from 'vue'
74 +import NavHeader from '@/components/NavHeader.vue'
75 +import TabBar from '@/components/TabBar.vue'
76 +import IconFont from '@/components/IconFont.vue'
77 +
78 +const searchValue = ref('')
79 +
80 +const list = ref([
81 + {
82 + title: '2024年保险代理人考试大纲.pdf',
83 + desc: '最新考试范围与重点解析',
84 + size: '2.1MB',
85 + iconName: 'Order',
86 + iconColor: '#EF4444',
87 + collected: true
88 + },
89 + {
90 + title: '历年真题汇总及解析.pdf',
91 + desc: '2019-2023年真题完整版',
92 + size: '5.3MB',
93 + iconName: 'Order',
94 + iconColor: '#EF4444',
95 + collected: false
96 + },
97 + {
98 + title: '考试技巧与经验分享.pdf',
99 + desc: '高分学员备考心得',
100 + size: '1.8MB',
101 + iconName: 'Order',
102 + iconColor: '#EF4444',
103 + collected: false
104 + },
105 + {
106 + title: '保险基础知识速记手册.pdf',
107 + desc: '核心知识点快速记忆',
108 + size: '3.2MB',
109 + iconName: 'Order',
110 + iconColor: '#EF4444',
111 + collected: false
112 + },
113 + {
114 + title: '模拟试卷10套及答案.pdf',
115 + desc: '考前冲刺模拟练习',
116 + size: '4.5MB',
117 + iconName: 'Order',
118 + iconColor: '#EF4444',
119 + collected: true
120 + },
121 + {
122 + title: '法律法规重点条款解读.pdf',
123 + desc: '保险相关法规详解',
124 + size: '2.8MB',
125 + iconName: 'Order',
126 + iconColor: '#EF4444',
127 + collected: false
128 + },
129 + {
130 + title: '考试常见易错题分析.pdf',
131 + desc: '高频错题归纳总结',
132 + size: '1.5MB',
133 + iconName: 'Order',
134 + iconColor: '#EF4444',
135 + collected: false
136 + },
137 + {
138 + title: '案例分析题库及解答.pdf',
139 + desc: '实务案例精选练习',
140 + size: '3.9MB',
141 + iconName: 'Order',
142 + iconColor: '#EF4444',
143 + collected: false
144 + },
145 + {
146 + title: '考前冲刺复习资料.pdf',
147 + desc: '最后一周复习要点',
148 + size: '2.3MB',
149 + iconName: 'Order',
150 + iconColor: '#EF4444',
151 + collected: false
152 + },
153 + {
154 + title: '考场注意事项及答题技巧.pdf',
155 + desc: '应试策略与时间分配',
156 + size: '1.2MB',
157 + iconName: 'Order',
158 + iconColor: '#EF4444',
159 + collected: false
160 + }
161 +])
162 +
163 +/**
164 + * Search handler
165 + */
166 +const onSearch = () => {
167 + console.log('Searching for:', searchValue.value)
168 +}
169 +
170 +/**
171 + * Toggle collect status
172 + * @param {Object} item
173 + */
174 +const toggleCollect = (item) => {
175 + item.collected = !item.collected
176 +}
177 +</script>