mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-11-13 12:28:50 +08:00
style(theme): 统一应用主题样式并更新组件样式变量
- 在多个页面组件中添加动态主题样式绑定 - 将硬编码的颜色值替换为CSS变量和主题配置 - 引入主题样式计算逻辑到各个页面 - 更新优惠券、地址、订单等页面的主题适配 - 替换线性渐变背景为动态主题颜色 - 移除uni_modules组件中的$set方法调用以优化性能 - 更新README中主题色管理状态为已完成
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<div :style="themeStyle" class="wrapper">
|
||||
<div v-if="!wechatLogin" class="login-body">
|
||||
<u-navbar :auto-back="false" :border="false" :fixed="true" :placeholder="true" @leftClick="back"></u-navbar>
|
||||
<div class="login-header">
|
||||
@@ -145,6 +145,7 @@ import storage from '@/utils/storage.js'
|
||||
import wechatH5Login from './wechatH5Login.vue'
|
||||
import { md5 } from '@/utils/md5.js'
|
||||
import { secrecyMobile } from '@/utils/filters.js'
|
||||
import { getThemeStyle } from '@/utils/theme'
|
||||
|
||||
interface LoginListItem {
|
||||
icon: string
|
||||
@@ -155,6 +156,7 @@ interface LoginListItem {
|
||||
}
|
||||
|
||||
const store = useStore()
|
||||
const themeStyle = computed(() => getThemeStyle(store.state.theme))
|
||||
const { proxy } = getCurrentInstance()!
|
||||
|
||||
const lightColor = computed(() => store.getters.lightColor)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view :style="themeStyle" class="container">
|
||||
<u-navbar
|
||||
title="扫码登录授权"
|
||||
:fixed="true"
|
||||
@@ -32,10 +32,14 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue'
|
||||
import { ref, watch, computed } from 'vue'
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import { forceLogin } from '@/utils/filters.js'
|
||||
import { scannerCodeLogin, scannerCodeLoginConfirm } from '@/api/login'
|
||||
import { useStore } from '@/store'
|
||||
import { getThemeStyle } from '@/utils/theme'
|
||||
const store = useStore()
|
||||
const themeStyle = computed(() => getThemeStyle(store.state.theme))
|
||||
|
||||
const errorMsg = ref('')
|
||||
const token = ref('')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view :style="themeStyle" class="container">
|
||||
<u-navbar :auto-back="false" @leftClick="back" title="公众网页登录"></u-navbar>
|
||||
<view class="wx-auth-container">
|
||||
<div class="box">
|
||||
@@ -20,10 +20,14 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { ref, onMounted, computed } from 'vue'
|
||||
import { whetherNavigate } from '@/utils/Foundation'
|
||||
import config from '@/config/config'
|
||||
import api from '@/config/api.js'
|
||||
import { useStore } from '@/store'
|
||||
import { getThemeStyle } from '@/utils/theme'
|
||||
const store = useStore()
|
||||
const themeStyle = computed(() => getThemeStyle(store.state.theme))
|
||||
|
||||
const projectName = ref(config.name)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view :style="themeStyle" class="container">
|
||||
<u-navbar :auto-back="false" :fixed="true" :placeholder="true" @leftClick="back" title="小程序登录"></u-navbar>
|
||||
<u-modal v-model:show="phoneAuthPopup" :mask-close-able="true" :title="projectName+'商城'"
|
||||
:show-confirm-button="false">
|
||||
@@ -54,8 +54,10 @@ import { whetherNavigate } from '@/utils/Foundation'
|
||||
import { getUserInfo } from '@/api/members'
|
||||
import storage from '@/utils/storage.js'
|
||||
import config from '@/config/config'
|
||||
import { getThemeStyle } from '@/utils/theme'
|
||||
|
||||
const store = useStore()
|
||||
const themeStyle = computed(() => getThemeStyle(store.state.theme))
|
||||
const lightColor = computed(() => store.getters.lightColor)
|
||||
|
||||
const checked = ref(false)
|
||||
|
||||
Reference in New Issue
Block a user