style(PointsDetail): 更新积分详情页卡片样式为白色背景和阴影
refactor(RewardCategories): 移除商户列表模板并简化分类显示逻辑
Showing
2 changed files
with
11 additions
and
39 deletions
| ... | @@ -21,7 +21,7 @@ | ... | @@ -21,7 +21,7 @@ |
| 21 | </view> | 21 | </view> |
| 22 | <!-- Strategy cards --> | 22 | <!-- Strategy cards --> |
| 23 | <view class="space-y-3 mb-6"> | 23 | <view class="space-y-3 mb-6"> |
| 24 | - <view class="bg-blue-50 p-4 rounded-lg flex items-start"> | 24 | + <view class="bg-white border border-gray-100 p-4 rounded-lg flex items-start shadow-sm"> |
| 25 | <view class="w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center mr-3"> | 25 | <view class="w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center mr-3"> |
| 26 | <My size="20" class="text-blue-500" /> | 26 | <My size="20" class="text-blue-500" /> |
| 27 | </view> | 27 | </view> |
| ... | @@ -32,7 +32,7 @@ | ... | @@ -32,7 +32,7 @@ |
| 32 | </p> | 32 | </p> |
| 33 | </view> | 33 | </view> |
| 34 | </view> | 34 | </view> |
| 35 | - <view class="bg-blue-50 p-4 rounded-lg flex items-start"> | 35 | + <view class="bg-white border border-gray-100 p-4 rounded-lg flex items-start shadow-sm"> |
| 36 | <view class="w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center mr-3"> | 36 | <view class="w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center mr-3"> |
| 37 | <My size="20" class="text-blue-500" /> | 37 | <My size="20" class="text-blue-500" /> |
| 38 | </view> | 38 | </view> |
| ... | @@ -43,7 +43,7 @@ | ... | @@ -43,7 +43,7 @@ |
| 43 | </p> | 43 | </p> |
| 44 | </view> | 44 | </view> |
| 45 | </view> | 45 | </view> |
| 46 | - <view class="bg-blue-50 p-4 rounded-lg flex items-start"> | 46 | + <view class="bg-white border border-gray-100 p-4 rounded-lg flex items-start shadow-sm"> |
| 47 | <view class="w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center mr-3"> | 47 | <view class="w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center mr-3"> |
| 48 | <My size="20" class="text-blue-500" /> | 48 | <My size="20" class="text-blue-500" /> |
| 49 | </view> | 49 | </view> | ... | ... |
| 1 | +<!-- | ||
| 2 | + * @Date: 2025-08-27 17:47:03 | ||
| 3 | + * @LastEditors: hookehuyr hookehuyr@gmail.com | ||
| 4 | + * @LastEditTime: 2025-08-28 16:35:59 | ||
| 5 | + * @FilePath: /lls_program/src/pages/RewardCategories/index.vue | ||
| 6 | + * @Description: 文件描述 | ||
| 7 | +--> | ||
| 1 | <template> | 8 | <template> |
| 2 | <view class="min-h-screen flex flex-col bg-white"> | 9 | <view class="min-h-screen flex flex-col bg-white"> |
| 3 | <!-- <AppHeader title="积分兑换" :showBack="false" /> --> | 10 | <!-- <AppHeader title="积分兑换" :showBack="false" /> --> |
| 4 | <view class="flex-1 pb-20"> | 11 | <view class="flex-1 pb-20"> |
| 5 | <view class="p-4 space-y-4"> | 12 | <view class="p-4 space-y-4"> |
| 6 | <view v-for="(category, index) in categories" :key="category.id" class="rounded-lg overflow-hidden shadow-sm" @click="goToRewards(index)"> | 13 | <view v-for="(category, index) in categories" :key="category.id" class="rounded-lg overflow-hidden shadow-sm" @click="goToRewards(index)"> |
| 7 | - <template v-if="category.id !== 'merchants'"> | ||
| 8 | <view class="relative h-40"> | 14 | <view class="relative h-40"> |
| 9 | <view class="absolute inset-0 bg-black bg-opacity-30 flex flex-col justify-end p-4 text-white" :style="{ background: category.bgColor || 'linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.6))' }"> | 15 | <view class="absolute inset-0 bg-black bg-opacity-30 flex flex-col justify-end p-4 text-white" :style="{ background: category.bgColor || 'linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.6))' }"> |
| 10 | <h3 class="text-xl font-bold mb-1">{{ category.title }}</h3> | 16 | <h3 class="text-xl font-bold mb-1">{{ category.title }}</h3> |
| ... | @@ -17,28 +23,6 @@ | ... | @@ -17,28 +23,6 @@ |
| 17 | <image :src="category.iconUrl" alt="" class="w-8 h-8" /> | 23 | <image :src="category.iconUrl" alt="" class="w-8 h-8" /> |
| 18 | </view> | 24 | </view> |
| 19 | </view> | 25 | </view> |
| 20 | - </template> | ||
| 21 | - <template v-else> | ||
| 22 | - <view class="bg-white border border-gray-100 rounded-lg p-4"> | ||
| 23 | - <view class="flex justify-between items-center mb-3"> | ||
| 24 | - <view> | ||
| 25 | - <h3 class="text-lg font-bold">{{ category.title }}</h3> | ||
| 26 | - <p class="text-sm text-gray-600"> | ||
| 27 | - {{ category.description }} | ||
| 28 | - </p> | ||
| 29 | - </view> | ||
| 30 | - <Right size="20" class="text-gray-400" /> | ||
| 31 | - </view> | ||
| 32 | - <view class="grid grid-cols-5 gap-2"> | ||
| 33 | - <view v-for="(merchant, index) in category.merchants.slice(0, 10)" :key="index" class="flex flex-col items-center"> | ||
| 34 | - <image :src="merchant.logo" :alt="merchant.name" class="w-12 h-12 object-contain rounded-md" /> | ||
| 35 | - <span class="text-xs text-gray-600 mt-1 text-center truncate w-full"> | ||
| 36 | - {{ merchant.name }} | ||
| 37 | - </span> | ||
| 38 | - </view> | ||
| 39 | - </view> | ||
| 40 | - </view> | ||
| 41 | - </template> | ||
| 42 | </view> | 26 | </view> |
| 43 | </view> | 27 | </view> |
| 44 | </view> | 28 | </view> |
| ... | @@ -68,7 +52,6 @@ const categories = ref([ | ... | @@ -68,7 +52,6 @@ const categories = ref([ |
| 68 | image: 'https://images.unsplash.com/photo-1563013544-824ae1b704d3?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1740&q=80', | 52 | image: 'https://images.unsplash.com/photo-1563013544-824ae1b704d3?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1740&q=80', |
| 69 | bgPosition: 'center', | 53 | bgPosition: 'center', |
| 70 | bgColor: 'linear-gradient(135deg, #0ea5e9, #2563eb)', | 54 | bgColor: 'linear-gradient(135deg, #0ea5e9, #2563eb)', |
| 71 | - iconUrl: 'https://cdn-icons-png.flaticon.com/512/3144/3144456.png' | ||
| 72 | }, | 55 | }, |
| 73 | { | 56 | { |
| 74 | id: 'merchants', | 57 | id: 'merchants', |
| ... | @@ -76,18 +59,7 @@ const categories = ref([ | ... | @@ -76,18 +59,7 @@ const categories = ref([ |
| 76 | description: '丰富商户积分兑换', | 59 | description: '丰富商户积分兑换', |
| 77 | image: 'https://images.unsplash.com/photo-1607082349566-187342175e2f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1740&q=80', | 60 | image: 'https://images.unsplash.com/photo-1607082349566-187342175e2f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1740&q=80', |
| 78 | bgPosition: 'center', | 61 | bgPosition: 'center', |
| 79 | - merchants: [ | 62 | + bgColor: 'linear-gradient(135deg, #007bff, #0056b3)', |
| 80 | - { name: '上海老饭店', logo: 'https://placehold.co/100x100/e2f3ff/0369a1?text=上海老饭店&font=roboto' }, | ||
| 81 | - { name: '功德林', logo: 'https://placehold.co/100x100/e2f3ff/0369a1?text=功德林&font=roboto' }, | ||
| 82 | - { name: '一茶一坐', logo: 'https://placehold.co/100x100/e2f3ff/0369a1?text=一茶一坐&font=roboto' }, | ||
| 83 | - { name: '杏花楼', logo: 'https://placehold.co/100x100/e2f3ff/0369a1?text=杏花楼&font=roboto' }, | ||
| 84 | - { name: '新雅', logo: 'https://placehold.co/100x100/e2f3ff/0369a1?text=新雅&font=roboto' }, | ||
| 85 | - { name: '五芳斋', logo: 'https://placehold.co/100x100/e2f3ff/0369a1?text=五芳斋&font=roboto' }, | ||
| 86 | - { name: '沈大成', logo: 'https://placehold.co/100x100/e2f3ff/0369a1?text=沈大成&font=roboto' }, | ||
| 87 | - { name: '老凤祥', logo: 'https://placehold.co/100x100/e2f3ff/0369a1?text=老凤祥&font=roboto' }, | ||
| 88 | - { name: '御宝轩', logo: 'https://placehold.co/100x100/e2f3ff/0369a1?text=御宝轩&font=roboto' }, | ||
| 89 | - { name: '恒源祥', logo: 'https://placehold.co/100x100/e2f3ff/0369a1?text=恒源祥&font=roboto' } | ||
| 90 | - ] | ||
| 91 | } | 63 | } |
| 92 | ]); | 64 | ]); |
| 93 | 65 | ... | ... |
-
Please register or login to post a comment