Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
lls_program
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-09-08 14:03:04 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a2ae0a042910714ac2715753d621df5e515d7827
a2ae0a04
1 parent
41b04e76
feat(主题): 统一使用主题颜色配置替换硬编码颜色
将多处硬编码的蓝色主题色替换为统一的主题颜色配置,便于维护和统一调整
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
30 additions
and
9 deletions
src/pages/ActivitiesCover/index.vue
src/pages/CheckinList/index.vue
src/pages/CouponDetail/index.vue
src/pages/JoinFamily/index.vue
src/pages/RewardDetail/index.vue
src/pages/UploadMedia/index.less
src/pages/UploadMedia/index.vue
src/utils/config.js
src/pages/ActivitiesCover/index.vue
View file @
a2ae0a0
...
...
@@ -46,7 +46,7 @@
type="primary"
size="large"
class="join-button"
color="#3B82F6
"
:color="THEME_COLORS.PRIMARY
"
:loading="isJoining"
@click="checkFamilyStatusAndJoinActivity"
>
...
...
@@ -139,6 +139,8 @@ import ShareButton from '../../components/ShareButton/index.vue'
// 接口信息
import { getMyFamiliesAPI } from '@/api/family'
import { handleSharePageAuth, addShareFlag } from '@/utils/authRedirect'
// 主题颜色配置
import { THEME_COLORS } from '@/utils/config'
// 默认海报图
const defaultPoster = 'https://cdn.ipadbiz.cn/lls_prog/images/welcome_1.png';
...
...
src/pages/CheckinList/index.vue
View file @
a2ae0a0
...
...
@@ -70,6 +70,8 @@
import { ref, computed, onMounted } from 'vue'
import Taro from '@tarojs/taro'
import BottomNav from '../../components/BottomNav.vue'
// 导入主题颜色
import { THEME_COLORS } from '@/utils/config'
/**
* 打卡列表页面组件
...
...
@@ -247,7 +249,7 @@ const loadCheckinData = async () => {
.progress-info {
font-size: 26rpx;
color:
#3B82F6
;
color:
v-bind('THEME_COLORS.PRIMARY')
;
background-color: #EBF4FF;
padding: 12rpx 20rpx;
border-radius: 20rpx;
...
...
src/pages/CouponDetail/index.vue
View file @
a2ae0a0
...
...
@@ -54,7 +54,7 @@
<!-- Bottom Button -->
<view class="fixed bottom-0 left-0 right-0 p-4 bg-white border-t border-gray-100">
<nut-button type="primary" size="large" block
color="#3B82F6
" @click="handleRedeem">
<nut-button type="primary" size="large" block
:color="THEME_COLORS.PRIMARY
" @click="handleRedeem">
立即核销
</nut-button>
</view>
...
...
@@ -65,6 +65,8 @@
import { ref } from 'vue';
import Taro from '@tarojs/taro';
import AppHeader from '../../components/AppHeader.vue';
// 导入主题颜色
import { THEME_COLORS } from '@/utils/config';
// Mock reward data based on the image
const reward = ref({
...
...
src/pages/JoinFamily/index.vue
View file @
a2ae0a0
...
...
@@ -16,7 +16,7 @@
:key="index"
class="motto-input-box"
:style="{
borderColor: focusedIndex === index ?
'#3b82f6'
: '#d1d5db'
borderColor: focusedIndex === index ?
THEME_COLORS.PRIMARY
: '#d1d5db'
}"
>
<input
...
...
@@ -150,7 +150,7 @@
<nut-button
@click="confirmJoinFamily"
class="flex-1"
:color="selectedFamilyId ?
'#3b82f6'
: 'gray'"
:color="selectedFamilyId ?
THEME_COLORS.PRIMARY
: 'gray'"
:disabled="!selectedFamilyId"
size="large"
>
...
...
@@ -168,6 +168,8 @@ import Taro from '@tarojs/taro';
import { My, Check } from '@nutui/icons-vue-taro';
// 获取接口信息
import { searchFamilyByPassphraseAPI, joinFamilyAPI } from '@/api/family';
// 导入主题颜色
import { THEME_COLORS } from '@/utils/config';
// 默认头像
const defaultAvatar = 'https://cdn.ipadbiz.cn/mlaj/images/icon_1.jpeg'
...
...
src/pages/RewardDetail/index.vue
View file @
a2ae0a0
...
...
@@ -62,7 +62,7 @@
type="primary"
size="large"
block
:color="reward.can_redeem ?
'#3B82F6'
: '#D1D5DB'"
:color="reward.can_redeem ?
THEME_COLORS.PRIMARY
: '#D1D5DB'"
:disabled="!reward.can_redeem"
@click="handleRedeem"
>
...
...
@@ -79,6 +79,8 @@ import { getUserProfileAPI } from '@/api/user';
import { handleSharePageAuth, addShareFlag } from '@/utils/authRedirect';
// 导入接口
import { getCouponDetailAPI, redeemCouponAPI } from '@/api/coupon';
// 导入主题颜色
import { THEME_COLORS } from '@/utils/config';
const isCreator = ref(false);
const couponId = ref('');
...
...
src/pages/UploadMedia/index.less
View file @
a2ae0a0
...
...
@@ -98,7 +98,7 @@
}
&.primary {
background-color:
#3b82f6
;
background-color:
v-bind('THEME_COLORS.PRIMARY')
;
color: #ffffff;
&:active {
...
...
src/pages/UploadMedia/index.vue
View file @
a2ae0a0
...
...
@@ -145,7 +145,7 @@
import { ref, onMounted } from 'vue';
import Taro from '@tarojs/taro';
import { Left, Photograph, Close } from '@nutui/icons-vue-taro';
import BASE_URL from '@/utils/config';
import BASE_URL
, { THEME_COLORS }
from '@/utils/config';
//
const playIcon = 'https://cdn.ipadbiz.cn/lls_prog/icon/play.svg';
...
...
src/utils/config.js
View file @
a2ae0a0
/*
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-09-0
6 13:24:57
* @LastEditTime: 2025-09-0
8 14:00:36
* @FilePath: /lls_program/src/utils/config.js
* @Description: 环境配置文件 - 根据小程序运行环境自动切换API地址
*/
...
...
@@ -42,3 +42,14 @@ export default BASE_URL;
// 默认封面图片地址
export
const
DEFAULT_COVER_IMG
=
'https://images.unsplash.com/photo-1558981806-ec527fa84c39?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=60'
// 主题颜色配置
export
const
THEME_COLORS
=
{
// 主题蓝色 - 可统一调整
PRIMARY
:
'#4A90E2'
,
// 其他颜色可以在这里添加
SECONDARY
:
'#6B7280'
,
SUCCESS
:
'#10B981'
,
WARNING
:
'#F59E0B'
,
ERROR
:
'#EF4444'
}
...
...
Please
register
or
login
to post a comment