style(theme): 统一应用主题样式并更新组件样式变量

- 在多个页面组件中添加动态主题样式绑定
- 将硬编码的颜色值替换为CSS变量和主题配置
- 引入主题样式计算逻辑到各个页面
- 更新优惠券、地址、订单等页面的主题适配
- 替换线性渐变背景为动态主题颜色
- 移除uni_modules组件中的$set方法调用以优化性能
- 更新README中主题色管理状态为已完成
This commit is contained in:
pikachu1995@126.com
2026-10-09 16:02:11 +08:00
parent 74d186ff36
commit a32f6d2313
58 changed files with 519 additions and 301 deletions

View File

@@ -1,5 +1,5 @@
<template>
<view class="wap">
<view :style="themeStyle" class="wap">
<u-navbar
title="预存款列表"
:fixed="true"
@@ -53,9 +53,13 @@
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { ref, onMounted, computed } from 'vue'
import { getWalletLog, getUserWallet } from '@/api/members'
import { unitPrice } from '@/utils/filters.js'
import { unitPrice } from '@/utils/filters.js'
import { useStore } from '@/store'
import { getThemeStyle } from '@/utils/theme'
const store = useStore()
const themeStyle = computed(() => getThemeStyle(store.state.theme))
const walletNum = ref(0)
const swiperCurrent = ref(0)

View File

@@ -1,5 +1,5 @@
<template>
<view class="page">
<view :style="themeStyle" class="page">
<u-navbar
title="余额"
:auto-back="false"
@@ -39,10 +39,14 @@
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { ref, computed } from 'vue'
import { onShow } from '@dcloudio/uni-app'
import { getUserWallet } from '@/api/members'
import { isLogin, navigateToLogin, unitPrice } from '@/utils/filters.js'
import { useStore } from '@/store'
import { getThemeStyle } from '@/utils/theme'
const store = useStore()
const themeStyle = computed(() => getThemeStyle(store.state.theme))
const walletNum = ref(0)

View File

@@ -1,5 +1,5 @@
<template>
<view class="page">
<view :style="themeStyle" class="page">
<view class="form-card">
<view class="title">充值金额</view>
<view class="amount-row">
@@ -20,8 +20,12 @@
</template>
<script setup lang="ts">
import { ref, watch } from 'vue'
import { ref, watch, computed } from 'vue'
import { recharge } from '@/api/members'
import { useStore } from '@/store'
import { getThemeStyle } from '@/utils/theme'
const store = useStore()
const themeStyle = computed(() => getThemeStyle(store.state.theme))
const price = ref('')
const flag = ref(true)

View File

@@ -1,5 +1,5 @@
<template>
<view class="wap">
<view :style="themeStyle" class="wap">
<u-navbar
title="提现记录"
:fixed="true"
@@ -26,10 +26,14 @@
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { ref, computed } from 'vue'
import { onShow } from '@dcloudio/uni-app'
import { getWithdrawApplyPage, getWithdrawApplyWechatTransferInfo } from '@/api/members'
import { unitPrice } from '@/utils/filters.js'
import { useStore } from '@/store'
import { getThemeStyle } from '@/utils/theme'
const store = useStore()
const themeStyle = computed(() => getThemeStyle(store.state.theme))
const loaded = ref(false)
const params = ref({

View File

@@ -1,5 +1,5 @@
<template>
<view class="page">
<view :style="themeStyle" class="page">
<view class="form-card">
<view class="field-label">提现类型</view>
<view class="readonly-value">{{ typeLabel }}</view>
@@ -62,6 +62,10 @@
import { ref, computed, getCurrentInstance, onMounted } from 'vue'
import { getUserWallet, withdrawalApply, withdrawalSettingVO } from '@/api/members'
import { unitPrice } from '@/utils/filters.js'
import { useStore } from '@/store'
import { getThemeStyle } from '@/utils/theme'
const store = useStore()
const themeStyle = computed(() => getThemeStyle(store.state.theme))
const { proxy } = getCurrentInstance()!