feat: 优化首页资料列表显示样式
- 将首页"本周热门资料"列表左边的图片替换为图标样式 - 使用 80rpx × 88rpx 圆角蓝色背景容器 - 图标尺寸 32,与资料列表页面保持一致 - 不同资料项使用不同颜色图标(红/蓝/绿) - 优化文案:"热卖产品:" → "热卖产品" - 修正产品按钮文案:"产品资料" → "产品详情" Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Showing
5 changed files
with
30 additions
and
27 deletions
| ... | @@ -41,7 +41,7 @@ | ... | @@ -41,7 +41,7 @@ |
| 41 | <!-- Hot Products --> | 41 | <!-- Hot Products --> |
| 42 | <view class="bg-white rounded-[32rpx] shadow-sm p-[32rpx] mb-[24rpx]"> | 42 | <view class="bg-white rounded-[32rpx] shadow-sm p-[32rpx] mb-[24rpx]"> |
| 43 | <view class="flex justify-between items-center mb-[24rpx]"> | 43 | <view class="flex justify-between items-center mb-[24rpx]"> |
| 44 | - <text class="text-gray-900 text-[32rpx] font-bold">热卖产品:</text> | 44 | + <text class="text-gray-900 text-[32rpx] font-bold">热卖产品</text> |
| 45 | <view class="flex items-center text-blue-600" @tap="go('/pages/knowledge-base/index')"> | 45 | <view class="flex items-center text-blue-600" @tap="go('/pages/knowledge-base/index')"> |
| 46 | <text class="text-[26rpx] mr-[4rpx]">查看更多</text> | 46 | <text class="text-[26rpx] mr-[4rpx]">查看更多</text> |
| 47 | <IconFont name="rectRight" size="12" /> | 47 | <IconFont name="rectRight" size="12" /> |
| ... | @@ -69,7 +69,7 @@ | ... | @@ -69,7 +69,7 @@ |
| 69 | class="flex-1 !h-[64rpx] !rounded-[16rpx] !text-[26rpx] !m-0 !border-blue-600" | 69 | class="flex-1 !h-[64rpx] !rounded-[16rpx] !text-[26rpx] !m-0 !border-blue-600" |
| 70 | @tap="goToProductDetail(1)" | 70 | @tap="goToProductDetail(1)" |
| 71 | > | 71 | > |
| 72 | - 产品资料 | 72 | + 产品详情 |
| 73 | </nut-button> | 73 | </nut-button> |
| 74 | <nut-button | 74 | <nut-button |
| 75 | color="#2563EB" | 75 | color="#2563EB" |
| ... | @@ -129,8 +129,9 @@ | ... | @@ -129,8 +129,9 @@ |
| 129 | <view class="flex flex-col gap-[32rpx]"> | 129 | <view class="flex flex-col gap-[32rpx]"> |
| 130 | <!-- Item 1 --> | 130 | <!-- Item 1 --> |
| 131 | <view class="flex gap-[24rpx]"> | 131 | <view class="flex gap-[24rpx]"> |
| 132 | - <image class="w-[200rpx] h-[140rpx] rounded-[12rpx] bg-gray-200" | 132 | + <view class="w-[80rpx] h-[88rpx] flex-shrink-0 flex items-center justify-center bg-blue-50 rounded-[12rpx]"> |
| 133 | - src="https://picsum.photos/seed/mat1/200/140" mode="aspectFill" /> | 133 | + <IconFont name="order" size="32" color="#EF4444" /> |
| 134 | + </view> | ||
| 134 | <view class="flex-1 flex flex-col justify-between py-[4rpx]"> | 135 | <view class="flex-1 flex flex-col justify-between py-[4rpx]"> |
| 135 | <text class="text-gray-800 text-[28rpx] leading-[40rpx] line-clamp-2">2024年保险市场趋势分析报告</text> | 136 | <text class="text-gray-800 text-[28rpx] leading-[40rpx] line-clamp-2">2024年保险市场趋势分析报告</text> |
| 136 | <view class="flex justify-between items-end"> | 137 | <view class="flex justify-between items-end"> |
| ... | @@ -142,8 +143,9 @@ | ... | @@ -142,8 +143,9 @@ |
| 142 | <view class="h-[2rpx] bg-gray-100"></view> | 143 | <view class="h-[2rpx] bg-gray-100"></view> |
| 143 | <!-- Item 2 --> | 144 | <!-- Item 2 --> |
| 144 | <view class="flex gap-[24rpx]"> | 145 | <view class="flex gap-[24rpx]"> |
| 145 | - <image class="w-[200rpx] h-[140rpx] rounded-[12rpx] bg-gray-200" | 146 | + <view class="w-[80rpx] h-[88rpx] flex-shrink-0 flex items-center justify-center bg-blue-50 rounded-[12rpx]"> |
| 146 | - src="https://picsum.photos/seed/mat2/200/140" mode="aspectFill" /> | 147 | + <IconFont name="order" size="32" color="#3B82F6" /> |
| 148 | + </view> | ||
| 147 | <view class="flex-1 flex flex-col justify-between py-[4rpx]"> | 149 | <view class="flex-1 flex flex-col justify-between py-[4rpx]"> |
| 148 | <text class="text-gray-800 text-[28rpx] leading-[40rpx] line-clamp-2">高净值客户需求分析与产品匹配</text> | 150 | <text class="text-gray-800 text-[28rpx] leading-[40rpx] line-clamp-2">高净值客户需求分析与产品匹配</text> |
| 149 | <view class="flex justify-between items-end"> | 151 | <view class="flex justify-between items-end"> |
| ... | @@ -155,8 +157,9 @@ | ... | @@ -155,8 +157,9 @@ |
| 155 | <view class="h-[2rpx] bg-gray-100"></view> | 157 | <view class="h-[2rpx] bg-gray-100"></view> |
| 156 | <!-- Item 3 --> | 158 | <!-- Item 3 --> |
| 157 | <view class="flex gap-[24rpx]"> | 159 | <view class="flex gap-[24rpx]"> |
| 158 | - <image class="w-[200rpx] h-[140rpx] rounded-[12rpx] bg-gray-200" | 160 | + <view class="w-[80rpx] h-[88rpx] flex-shrink-0 flex items-center justify-center bg-blue-50 rounded-[12rpx]"> |
| 159 | - src="https://picsum.photos/seed/mat3/200/140" mode="aspectFill" /> | 161 | + <IconFont name="order" size="32" color="#10B981" /> |
| 162 | + </view> | ||
| 160 | <view class="flex-1 flex flex-col justify-between py-[4rpx]"> | 163 | <view class="flex-1 flex flex-col justify-between py-[4rpx]"> |
| 161 | <text class="text-gray-800 text-[28rpx] leading-[40rpx] line-clamp-2">保险合同条款解读与风险提示</text> | 164 | <text class="text-gray-800 text-[28rpx] leading-[40rpx] line-clamp-2">保险合同条款解读与风险提示</text> |
| 162 | <view class="flex justify-between items-end"> | 165 | <view class="flex justify-between items-end"> | ... | ... |
| 1 | +/* | ||
| 2 | + * @Date: 2026-01-29 21:53:42 | ||
| 3 | + * @LastEditors: hookehuyr hookehuyr@gmail.com | ||
| 4 | + * @LastEditTime: 2026-01-31 10:53:44 | ||
| 5 | + * @FilePath: /manulife-weapp/src/pages/knowledge-base/index.config.js | ||
| 6 | + * @Description: 产品知识库页面配置文件 | ||
| 7 | + */ | ||
| 1 | export default definePageConfig({ | 8 | export default definePageConfig({ |
| 2 | - navigationBarTitleText: '资料知识库', | 9 | + navigationBarTitleText: '产品知识库', |
| 3 | navigationStyle: 'custom' | 10 | navigationStyle: 'custom' |
| 4 | }) | 11 | }) | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div class="min-h-screen bg-[#F9FAFB] pb-[calc(160rpx+env(safe-area-inset-bottom))]"> | 2 | <div class="min-h-screen bg-[#F9FAFB] pb-[calc(160rpx+env(safe-area-inset-bottom))]"> |
| 3 | <!-- Navigation Header --> | 3 | <!-- Navigation Header --> |
| 4 | - <NavHeader title="资料知识库" /> | 4 | + <NavHeader title="产品知识库" /> |
| 5 | 5 | ||
| 6 | <!-- Content Area --> | 6 | <!-- Content Area --> |
| 7 | <div class="px-[40rpx] mt-[40rpx]"> | 7 | <div class="px-[40rpx] mt-[40rpx]"> | ... | ... |
| ... | @@ -11,13 +11,9 @@ | ... | @@ -11,13 +11,9 @@ |
| 11 | <div class="px-[32rpx] mt-[32rpx]"> | 11 | <div class="px-[32rpx] mt-[32rpx]"> |
| 12 | <div class="bg-white rounded-[12rpx] flex items-center px-[32rpx] py-[24rpx]"> | 12 | <div class="bg-white rounded-[12rpx] flex items-center px-[32rpx] py-[24rpx]"> |
| 13 | <IconFont name="search" size="20" color="#9CA3AF" class="mr-[16rpx]" /> | 13 | <IconFont name="search" size="20" color="#9CA3AF" class="mr-[16rpx]" /> |
| 14 | - <input | 14 | + <input v-model="searchValue" type="text" placeholder="搜索资料..." |
| 15 | - v-model="searchValue" | ||
| 16 | - type="text" | ||
| 17 | - placeholder="搜索资料..." | ||
| 18 | class="flex-1 text-[28rpx] text-[#1F2937] placeholder-gray-400 bg-transparent outline-none" | 15 | class="flex-1 text-[28rpx] text-[#1F2937] placeholder-gray-400 bg-transparent outline-none" |
| 19 | - @confirm="onSearch" | 16 | + @confirm="onSearch" /> |
| 20 | - /> | ||
| 21 | </div> | 17 | </div> |
| 22 | </div> | 18 | </div> |
| 23 | 19 | ||
| ... | @@ -27,7 +23,8 @@ | ... | @@ -27,7 +23,8 @@ |
| 27 | <div v-for="(item, index) in list" :key="index"> | 23 | <div v-for="(item, index) in list" :key="index"> |
| 28 | <div class="flex justify-between items-start pt-[32rpx] first:pt-0"> | 24 | <div class="flex justify-between items-start pt-[32rpx] first:pt-0"> |
| 29 | <div class="flex items-start flex-1 mr-[20rpx]" @tap="onView(item)"> | 25 | <div class="flex items-start flex-1 mr-[20rpx]" @tap="onView(item)"> |
| 30 | - <div class="w-[80rpx] h-[88rpx] mr-[24rpx] flex-shrink-0 flex items-center justify-center bg-blue-50 rounded-[12rpx]"> | 26 | + <div |
| 27 | + 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'" /> | 28 | <IconFont :name="item.iconName || 'order'" size="32" :color="item.iconColor || '#2563EB'" /> |
| 32 | </div> | 29 | </div> |
| 33 | <div class="flex flex-col"> | 30 | <div class="flex flex-col"> |
| ... | @@ -44,12 +41,8 @@ | ... | @@ -44,12 +41,8 @@ |
| 44 | <div class="flex items-center mt-[16rpx] ml-[104rpx] pb-[32rpx]"> | 41 | <div class="flex items-center mt-[16rpx] ml-[104rpx] pb-[32rpx]"> |
| 45 | <span class="text-[#9CA3AF] text-[24rpx] mr-[40rpx]">{{ item.size }}</span> | 42 | <span class="text-[#9CA3AF] text-[24rpx] mr-[40rpx]">{{ item.size }}</span> |
| 46 | <div class="flex items-center" @click="toggleCollect(item)"> | 43 | <div class="flex items-center" @click="toggleCollect(item)"> |
| 47 | - <IconFont | 44 | + <IconFont :name="item.collected ? 'StarFill' : 'Star'" size="12" |
| 48 | - :name="item.collected ? 'StarFill' : 'Star'" | 45 | + :color="item.collected ? '#F59E0B' : '#9CA3AF'" class="mr-[8rpx]" /> |
| 49 | - size="12" | ||
| 50 | - :color="item.collected ? '#F59E0B' : '#9CA3AF'" | ||
| 51 | - class="mr-[8rpx]" | ||
| 52 | - /> | ||
| 53 | <span :class="['text-[24rpx]', item.collected ? 'text-[#F59E0B]' : 'text-[#9CA3AF]']"> | 46 | <span :class="['text-[24rpx]', item.collected ? 'text-[#F59E0B]' : 'text-[#9CA3AF]']"> |
| 54 | {{ item.collected ? '已收藏' : '收藏' }} | 47 | {{ item.collected ? '已收藏' : '收藏' }} |
| 55 | </span> | 48 | </span> | ... | ... |
| ... | @@ -54,14 +54,14 @@ | ... | @@ -54,14 +54,14 @@ |
| 54 | 54 | ||
| 55 | <!-- Actions --> | 55 | <!-- Actions --> |
| 56 | <view class="flex justify-end gap-[24rpx]"> | 56 | <view class="flex justify-end gap-[24rpx]"> |
| 57 | - <view class="flex items-center text-gray-500" @tap="onDelete(item)"> | ||
| 58 | - <IconFont name="del" size="14" class="mr-[8rpx]" /> | ||
| 59 | - <text class="text-[24rpx]">删除</text> | ||
| 60 | - </view> | ||
| 61 | <view class="flex items-center text-blue-600" @tap="onView(item)"> | 57 | <view class="flex items-center text-blue-600" @tap="onView(item)"> |
| 62 | <IconFont name="order" size="14" class="mr-[8rpx]" /> | 58 | <IconFont name="order" size="14" class="mr-[8rpx]" /> |
| 63 | <text class="text-[24rpx]">查看</text> | 59 | <text class="text-[24rpx]">查看</text> |
| 64 | </view> | 60 | </view> |
| 61 | + <view class="flex items-center text-red-500" @tap="onDelete(item)"> | ||
| 62 | + <IconFont name="del" size="14" class="mr-[8rpx]" /> | ||
| 63 | + <text class="text-[24rpx]">删除</text> | ||
| 64 | + </view> | ||
| 65 | </view> | 65 | </view> |
| 66 | </view> | 66 | </view> |
| 67 | 67 | ... | ... |
-
Please register or login to post a comment