style(theme): 统一使用主题颜色变量替换硬编码颜色值
将多处硬编码的颜色值替换为主题颜色变量,提高代码可维护性 更新活动封面页的背景高度以适应新的底部区域高度 更新默认海报图片
Showing
4 changed files
with
12 additions
and
6 deletions
| ... | @@ -11,7 +11,7 @@ | ... | @@ -11,7 +11,7 @@ |
| 11 | top: 0; | 11 | top: 0; |
| 12 | left: 0; | 12 | left: 0; |
| 13 | width: 100vw; | 13 | width: 100vw; |
| 14 | - height: calc(100vh - 100rpx); // 减去底部区域的高度,确保背景图不被遮挡 | 14 | + height: calc(100vh - 300rpx); // 减去底部区域的高度,确保背景图不被遮挡 |
| 15 | object-fit: cover; | 15 | object-fit: cover; |
| 16 | object-position: top center; | 16 | object-position: top center; |
| 17 | z-index: 1; | 17 | z-index: 1; | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2022-09-19 14:11:06 | 2 | * @Date: 2022-09-19 14:11:06 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-09-07 11:09:26 | 4 | + * @LastEditTime: 2025-09-11 10:27:08 |
| 5 | * @FilePath: /lls_program/src/pages/ActivitiesCover/index.vue | 5 | * @FilePath: /lls_program/src/pages/ActivitiesCover/index.vue |
| 6 | * @Description: 活动海报页面 - 展示活动信息并处理定位授权 | 6 | * @Description: 活动海报页面 - 展示活动信息并处理定位授权 |
| 7 | --> | 7 | --> |
| ... | @@ -117,7 +117,7 @@ | ... | @@ -117,7 +117,7 @@ |
| 117 | @click="onLocationConfirm" | 117 | @click="onLocationConfirm" |
| 118 | type="primary" | 118 | type="primary" |
| 119 | size="normal" | 119 | size="normal" |
| 120 | - color="#007AFF" | 120 | + :color="THEME_COLORS.PRIMARY" |
| 121 | block | 121 | block |
| 122 | > | 122 | > |
| 123 | 同意授权 | 123 | 同意授权 |
| ... | @@ -139,9 +139,11 @@ import ShareButton from '../../components/ShareButton/index.vue' | ... | @@ -139,9 +139,11 @@ import ShareButton from '../../components/ShareButton/index.vue' |
| 139 | // 接口信息 | 139 | // 接口信息 |
| 140 | import { getMyFamiliesAPI } from '@/api/family' | 140 | import { getMyFamiliesAPI } from '@/api/family' |
| 141 | import { handleSharePageAuth, addShareFlag } from '@/utils/authRedirect' | 141 | import { handleSharePageAuth, addShareFlag } from '@/utils/authRedirect' |
| 142 | +// 导入主题颜色 | ||
| 143 | +import { THEME_COLORS } from '@/utils/config'; | ||
| 142 | 144 | ||
| 143 | // 默认海报图 | 145 | // 默认海报图 |
| 144 | -const defaultPoster = 'https://cdn.ipadbiz.cn/lls_prog/images/welcome_1.png'; | 146 | +const defaultPoster = 'https://cdn.ipadbiz.cn/lls_prog/images/welcome_3.jpg'; |
| 145 | /** | 147 | /** |
| 146 | * 活动海报页面组件 | 148 | * 活动海报页面组件 |
| 147 | * 功能:展示活动信息、处理定位授权、跳转到活动页面 | 149 | * 功能:展示活动信息、处理定位授权、跳转到活动页面 | ... | ... |
| ... | @@ -66,7 +66,7 @@ | ... | @@ -66,7 +66,7 @@ |
| 66 | 66 | ||
| 67 | <!-- Save Button --> | 67 | <!-- Save Button --> |
| 68 | <view class="fixed bottom-0 left-0 right-0 p-4 bg-white border-t border-gray-100"> | 68 | <view class="fixed bottom-0 left-0 right-0 p-4 bg-white border-t border-gray-100"> |
| 69 | - <nut-button type="primary" size="large" :color="isFormValid ? '#4A90E2' : '#D8D8D8'" block @click="handleSave" :disabled="!isFormValid">保存</nut-button> | 69 | + <nut-button type="primary" size="large" :color="isFormValid ? THEME_COLORS.PRIMARY : '#D8D8D8'" block @click="handleSave" :disabled="!isFormValid">保存</nut-button> |
| 70 | </view> | 70 | </view> |
| 71 | 71 | ||
| 72 | <!-- Popups --> | 72 | <!-- Popups --> |
| ... | @@ -114,6 +114,8 @@ import BASE_URL from '@/utils/config'; | ... | @@ -114,6 +114,8 @@ import BASE_URL from '@/utils/config'; |
| 114 | const defaultAvatar = 'https://cdn.ipadbiz.cn/mlaj/images/icon_1.jpeg' | 114 | const defaultAvatar = 'https://cdn.ipadbiz.cn/mlaj/images/icon_1.jpeg' |
| 115 | // 获取接口信息 | 115 | // 获取接口信息 |
| 116 | import { updateUserProfileAPI } from '@/api/user'; | 116 | import { updateUserProfileAPI } from '@/api/user'; |
| 117 | +// 导入主题颜色 | ||
| 118 | +import { THEME_COLORS } from '@/utils/config'; | ||
| 117 | 119 | ||
| 118 | /** | 120 | /** |
| 119 | * @description 表单数据 | 121 | * @description 表单数据 | ... | ... |
| ... | @@ -66,7 +66,7 @@ | ... | @@ -66,7 +66,7 @@ |
| 66 | 66 | ||
| 67 | <!-- Save Button --> | 67 | <!-- Save Button --> |
| 68 | <view class="fixed bottom-0 left-0 right-0 p-4 bg-white border-t border-gray-100"> | 68 | <view class="fixed bottom-0 left-0 right-0 p-4 bg-white border-t border-gray-100"> |
| 69 | - <nut-button type="primary" size="large" color="#4A90E2" block @click="handleSave">保存</nut-button> | 69 | + <nut-button type="primary" size="large" :color="THEME_COLORS.PRIMARY" block @click="handleSave">保存</nut-button> |
| 70 | </view> | 70 | </view> |
| 71 | 71 | ||
| 72 | <!-- Popups --> | 72 | <!-- Popups --> |
| ... | @@ -114,6 +114,8 @@ import BASE_URL from '@/utils/config'; | ... | @@ -114,6 +114,8 @@ import BASE_URL from '@/utils/config'; |
| 114 | const defaultAvatar = 'https://cdn.ipadbiz.cn/mlaj/images/icon_1.jpeg' | 114 | const defaultAvatar = 'https://cdn.ipadbiz.cn/mlaj/images/icon_1.jpeg' |
| 115 | // 获取接口信息 | 115 | // 获取接口信息 |
| 116 | import { getUserProfileAPI, updateUserProfileAPI } from '@/api/user'; | 116 | import { getUserProfileAPI, updateUserProfileAPI } from '@/api/user'; |
| 117 | +// 导入主题颜色 | ||
| 118 | +import { THEME_COLORS } from '@/utils/config'; | ||
| 117 | 119 | ||
| 118 | /** | 120 | /** |
| 119 | * @description 表单数据 | 121 | * @description 表单数据 | ... | ... |
-
Please register or login to post a comment