From bf9ea19771516ed5f5dc2bd5f67fdfdec2786f02 Mon Sep 17 00:00:00 2001
From: liangzai <2440983361@qq.com>
Date: Wed, 3 Jun 2026 11:53:48 +0800
Subject: [PATCH] f
---
manifest.config.ts | 12 +++++++++++-
pages.config.ts | 8 ++++----
src/App.vue | 13 ++++++++++++-
src/auto-imports.d.ts | 2 ++
src/components.d.ts | 5 +++++
src/components/ImageSaveGuide.vue | 16 ----------------
src/composables/usePrivacyConsent.ts | 18 ++++++++++++++++++
src/layouts/default.vue | 2 ++
src/layouts/home.vue | 3 ++-
src/pages/launch.vue | 2 +-
src/pages/privacy-consent.vue | 12 ++++++++++++
src/static/colors.css | 19 -------------------
12 files changed, 69 insertions(+), 43 deletions(-)
diff --git a/manifest.config.ts b/manifest.config.ts
index 716a00c..8dadf37 100644
--- a/manifest.config.ts
+++ b/manifest.config.ts
@@ -11,6 +11,13 @@ export default defineManifestConfig({
'app-plus': {
usingComponents: true,
nvueStyleCompiler: 'uni-app',
+ darkmode: false,
+ safearea: {
+ background: '#ffffff',
+ bottom: {
+ offset: 'none',
+ },
+ },
compatible: {
ignoreVersion: true,
runtimeVersion: "1.7.0,1.8.0,1.9.0",
@@ -49,7 +56,10 @@ export default defineManifestConfig({
"NSLocalNetworkUsageDescription": "需要本地网络进行服务使用",
"NSPhotoLibraryAddUsageDescription": "需要保存二维码海报"
},
- "idfa": false
+ "idfa": false,
+ "plist": {
+ "UIUserInterfaceStyle": "Light"
+ }
},
/* SDK配置 */
"sdkConfigs": {
diff --git a/pages.config.ts b/pages.config.ts
index 9b0a66c..d80f1ac 100644
--- a/pages.config.ts
+++ b/pages.config.ts
@@ -38,10 +38,10 @@ export default defineUniPages({
{ path: 'pages/withdraw-details', auth: true, style: { navigationBarTitleText: '提现记录' } },
],
globalStyle: {
- backgroundColor: '@bgColor',
- backgroundColorBottom: '@bgColorBottom',
- backgroundColorTop: '@bgColorTop',
- backgroundTextStyle: '@bgTxtStyle',
+ backgroundColor: '#fcfcfc',
+ backgroundColorBottom: '#fcfcfc',
+ backgroundColorTop: '#fcfcfc',
+ backgroundTextStyle: 'dark',
navigationBarBackgroundColor: '#ffffff',
navigationBarTextStyle: 'black',
navigationBarTitleText: 'BDRP',
diff --git a/src/App.vue b/src/App.vue
index 01d21eb..9ee92fd 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,10 +1,21 @@
diff --git a/src/auto-imports.d.ts b/src/auto-imports.d.ts
index b6cb3ab..9cbd6db 100644
--- a/src/auto-imports.d.ts
+++ b/src/auto-imports.d.ts
@@ -43,6 +43,7 @@ declare global {
const effectScope: typeof import('vue')['effectScope']
const ensureCurrentPageAccess: typeof import('./composables/useNavigationAuthGuard')['ensureCurrentPageAccess']
const ensurePageAccessByUrl: typeof import('./composables/useNavigationAuthGuard')['ensurePageAccessByUrl']
+ const ensurePrivacyConsentIfNeeded: typeof import('./composables/usePrivacyConsent')['ensurePrivacyConsentIfNeeded']
const extendRef: typeof import('@vueuse/core')['extendRef']
const getAgentInfo: typeof import('./utils/storage')['getAgentInfo']
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
@@ -438,6 +439,7 @@ declare module 'vue' {
readonly effectScope: UnwrapRef
readonly ensureCurrentPageAccess: UnwrapRef
readonly ensurePageAccessByUrl: UnwrapRef
+ readonly ensurePrivacyConsentIfNeeded: UnwrapRef
readonly extendRef: UnwrapRef
readonly getAgentInfo: UnwrapRef
readonly getCurrentInstance: UnwrapRef
diff --git a/src/components.d.ts b/src/components.d.ts
index dc5a1a1..acdc6fe 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -20,5 +20,10 @@ declare module 'vue' {
RealNameAuthDialog: typeof import('./components/RealNameAuthDialog.vue')['default']
SectionTitle: typeof import('./components/SectionTitle.vue')['default']
VipBanner: typeof import('./components/VipBanner.vue')['default']
+ WdButton: typeof import('wot-design-uni/components/wd-button/wd-button.vue')['default']
+ WdNavbar: typeof import('wot-design-uni/components/wd-navbar/wd-navbar.vue')['default']
+ WdPopup: typeof import('wot-design-uni/components/wd-popup/wd-popup.vue')['default']
+ WdTabbar: typeof import('wot-design-uni/components/wd-tabbar/wd-tabbar.vue')['default']
+ WdTabbarItem: typeof import('wot-design-uni/components/wd-tabbar-item/wd-tabbar-item.vue')['default']
}
}
diff --git a/src/components/ImageSaveGuide.vue b/src/components/ImageSaveGuide.vue
index 4f3c00e..d2d6328 100644
--- a/src/components/ImageSaveGuide.vue
+++ b/src/components/ImageSaveGuide.vue
@@ -259,20 +259,4 @@ function close() {
font-size: 15px;
}
}
-
-/* 深色模式适配 */
-@media (prefers-color-scheme: dark) {
- .guide-content {
- background: rgba(30, 30, 30, 0.95);
- color: #e5e5e5;
- }
-
- .guide-title {
- color: #ffffff;
- }
-
- .guide-instruction {
- color: #d1d5db;
- }
-}
diff --git a/src/composables/usePrivacyConsent.ts b/src/composables/usePrivacyConsent.ts
index 92e47b8..f3eeeff 100644
--- a/src/composables/usePrivacyConsent.ts
+++ b/src/composables/usePrivacyConsent.ts
@@ -106,3 +106,21 @@ export function installPrivacyGuards() {
installPrivacyNavigationGuard()
installPrivacyRequestGuard()
}
+
+const PRIVACY_FLOW_ROUTES = new Set([
+ 'pages/privacy-consent',
+ 'pages/privacy-policy',
+ 'pages/launch',
+])
+
+/** 未同意时若已落在业务页(如 iOS web-view 返回后栈异常),强制回到授权页 */
+export function ensurePrivacyConsentIfNeeded() {
+ if (hasAcceptedPrivacyPolicy())
+ return
+ const pages = getCurrentPages()
+ const page = pages[pages.length - 1] as { route?: string } | undefined
+ const route = normalizeRoute(page?.route || '')
+ if (PRIVACY_FLOW_ROUTES.has(route))
+ return
+ uni.reLaunch({ url: PRIVACY_CONSENT_PAGE })
+}
diff --git a/src/layouts/default.vue b/src/layouts/default.vue
index 7539b1b..db18bcb 100644
--- a/src/layouts/default.vue
+++ b/src/layouts/default.vue
@@ -7,6 +7,7 @@ import {
useRouter,
} from '@/composables/uni-router'
import { ensurePageAccessByUrl } from '@/composables/useNavigationAuthGuard'
+import { ensurePrivacyConsentIfNeeded } from '@/composables/usePrivacyConsent'
import { useGlobalNotification } from '@/composables/useGlobalNotification'
const router = useRouter()
@@ -91,6 +92,7 @@ onMounted(() => {
})
onShow(() => {
+ ensurePrivacyConsentIfNeeded()
syncTitle()
ensureAuthIfNeeded()
console.log('[通知DEBUG] default layout onShow')
diff --git a/src/layouts/home.vue b/src/layouts/home.vue
index 3470010..a5713ca 100644
--- a/src/layouts/home.vue
+++ b/src/layouts/home.vue
@@ -4,7 +4,7 @@ import { onMounted, reactive, ref } from 'vue'
import { getCurrentUniRoute } from '@/composables/uni-router'
import { openCustomerService } from '@/composables/useCustomerService'
import { ensurePageAccessByUrl } from '@/composables/useNavigationAuthGuard'
-import { getPrivacyConsentPageUrl } from '@/composables/usePrivacyConsent'
+import { ensurePrivacyConsentIfNeeded, getPrivacyConsentPageUrl } from '@/composables/usePrivacyConsent'
import { useGlobalNotification } from '@/composables/useGlobalNotification'
const {
@@ -75,6 +75,7 @@ function ensureAuthIfNeeded() {
}
onShow(() => {
+ ensurePrivacyConsentIfNeeded()
syncTabbar()
ensureAuthIfNeeded()
console.log('[通知DEBUG] home layout onShow')
diff --git a/src/pages/launch.vue b/src/pages/launch.vue
index 21ef372..04d6de6 100644
--- a/src/pages/launch.vue
+++ b/src/pages/launch.vue
@@ -13,7 +13,7 @@ async function routeOnLaunch() {
routing.value = true
try {
if (!hasAcceptedPrivacyPolicy()) {
- uni.reLaunch({ url: getPrivacyConsentPageUrl() })
+ uni.redirectTo({ url: getPrivacyConsentPageUrl() })
return
}
await bootstrap()
diff --git a/src/pages/privacy-consent.vue b/src/pages/privacy-consent.vue
index f22aad7..b9decb3 100644
--- a/src/pages/privacy-consent.vue
+++ b/src/pages/privacy-consent.vue
@@ -1,15 +1,27 @@