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="content">
<view :style="themeStyle" class="content">
<view class="u-tabs-box">
<u-tabs
:list="list"
@@ -204,8 +204,10 @@ import { isECouponOrder } from '@/utils/goodsType.js'
import { getAfterSaleList, cancelAfterSale } from '@/api/after-sale.js'
import { getOrderList } from '@/api/order.js'
import storage from '@/utils/storage'
import { getThemeStyle } from '@/utils/theme'
const store = useStore()
const themeStyle = computed(() => getThemeStyle(store.state.theme))
const lightColor = computed(() => store.getters.lightColor)
const list = [

View File

@@ -1,5 +1,5 @@
<template>
<view class="page-wrap">
<view :style="themeStyle" class="page-wrap">
<scroll-view scroll-y class="page-scroll">
<up-form
:model="form"
@@ -173,8 +173,10 @@ import { isAppointmentOrder } from '@/utils/goodsType.js'
import { computePartialRefundPrice } from '@/utils/appointmentGoods.js'
import { handleUploadAfterRead } from '@/utils/uploadHelper.js'
import storage from '@/utils/storage.js'
import { getThemeStyle } from '@/utils/theme'
const store = useStore()
const themeStyle = computed(() => getThemeStyle(store.state.theme))
const { proxy } = getCurrentInstance()!
const $u = proxy!.$u

View File

@@ -1,5 +1,5 @@
<template>
<view class="mp-iphonex-bottom content">
<view :style="themeStyle" class="mp-iphonex-bottom content">
<up-form
:model="form"
ref="uForm"
@@ -81,8 +81,10 @@ import { unitPrice } from '@/utils/filters.js'
import { getLogistics } from '@/api/address.js'
import { fillShipInfo } from '@/api/after-sale.js'
import storage from '@/utils/storage'
import { getThemeStyle } from '@/utils/theme'
const store = useStore()
const themeStyle = computed(() => getThemeStyle(store.state.theme))
const lightColor = computed(() => store.getters.lightColor)
const companySelectShow = ref(false)

View File

@@ -1,5 +1,5 @@
<template>
<view>
<view :style="themeStyle">
<view class="after-sales-goods-detail-view">
<view class="header">
<view>
@@ -58,13 +58,17 @@
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { ref, computed } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { unitPrice, parseGoodsImageUrl } from '@/utils/filters.js'
import { getAfterSaleInfo } from '@/api/after-sale'
import storage from '@/utils/storage'
// 深链进入时拦截 E_COUPON,后端 apply/save 亦会拒绝
import { isECouponOrder } from '@/utils/goodsType.js'
import { useStore } from '@/store'
import { getThemeStyle } from '@/utils/theme'
const store = useStore()
const themeStyle = computed(() => getThemeStyle(store.state.theme))
const sn = ref('')
const sku = ref<any>({})

View File

@@ -1,5 +1,5 @@
<template>
<view v-if="serviceDetail">
<view :style="themeStyle" v-if="serviceDetail">
<view class="after-sales-goods-detail-view">
<view class="header">
<view>
@@ -185,7 +185,7 @@
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { ref, computed } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { useStore } from '@/store'
import {
@@ -201,8 +201,10 @@ import {
getAfterSaleLog,
getAfterSaleReason,
} from '@/api/after-sale.js'
import { getThemeStyle } from '@/utils/theme'
const store = useStore()
const themeStyle = computed(() => getThemeStyle(store.state.theme))
const reason = ref('')
const serviceTypeList: Record<string, string> = {

View File

@@ -1,5 +1,5 @@
<template>
<view>
<view :style="themeStyle">
<view class="header">
<u-icon name='checkmark' size="150" color="#ff6b35"></u-icon>
<view class="success-text">售后申请提交成功</view>
@@ -21,7 +21,12 @@
</view>
</template>
<script setup lang="ts">
<script setup lang="ts">import { computed } from 'vue'
import { useStore } from '@/store'
import { getThemeStyle } from '@/utils/theme'
const store = useStore()
const themeStyle = computed(() => getThemeStyle(store.state.theme))
function navigateToAfterSales() {
uni.redirectTo({
url: '/pages/order/afterSales/afterSales',