f
This commit is contained in:
@@ -11,6 +11,13 @@ export default defineManifestConfig({
|
|||||||
'app-plus': {
|
'app-plus': {
|
||||||
usingComponents: true,
|
usingComponents: true,
|
||||||
nvueStyleCompiler: 'uni-app',
|
nvueStyleCompiler: 'uni-app',
|
||||||
|
darkmode: false,
|
||||||
|
safearea: {
|
||||||
|
background: '#ffffff',
|
||||||
|
bottom: {
|
||||||
|
offset: 'none',
|
||||||
|
},
|
||||||
|
},
|
||||||
compatible: {
|
compatible: {
|
||||||
ignoreVersion: true,
|
ignoreVersion: true,
|
||||||
runtimeVersion: "1.7.0,1.8.0,1.9.0",
|
runtimeVersion: "1.7.0,1.8.0,1.9.0",
|
||||||
@@ -49,7 +56,10 @@ export default defineManifestConfig({
|
|||||||
"NSLocalNetworkUsageDescription": "需要本地网络进行服务使用",
|
"NSLocalNetworkUsageDescription": "需要本地网络进行服务使用",
|
||||||
"NSPhotoLibraryAddUsageDescription": "需要保存二维码海报"
|
"NSPhotoLibraryAddUsageDescription": "需要保存二维码海报"
|
||||||
},
|
},
|
||||||
"idfa": false
|
"idfa": false,
|
||||||
|
"plist": {
|
||||||
|
"UIUserInterfaceStyle": "Light"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/* SDK配置 */
|
/* SDK配置 */
|
||||||
"sdkConfigs": {
|
"sdkConfigs": {
|
||||||
|
|||||||
@@ -38,10 +38,10 @@ export default defineUniPages({
|
|||||||
{ path: 'pages/withdraw-details', auth: true, style: { navigationBarTitleText: '提现记录' } },
|
{ path: 'pages/withdraw-details', auth: true, style: { navigationBarTitleText: '提现记录' } },
|
||||||
],
|
],
|
||||||
globalStyle: {
|
globalStyle: {
|
||||||
backgroundColor: '@bgColor',
|
backgroundColor: '#fcfcfc',
|
||||||
backgroundColorBottom: '@bgColorBottom',
|
backgroundColorBottom: '#fcfcfc',
|
||||||
backgroundColorTop: '@bgColorTop',
|
backgroundColorTop: '#fcfcfc',
|
||||||
backgroundTextStyle: '@bgTxtStyle',
|
backgroundTextStyle: 'dark',
|
||||||
navigationBarBackgroundColor: '#ffffff',
|
navigationBarBackgroundColor: '#ffffff',
|
||||||
navigationBarTextStyle: 'black',
|
navigationBarTextStyle: 'black',
|
||||||
navigationBarTitleText: 'BDRP',
|
navigationBarTitleText: 'BDRP',
|
||||||
|
|||||||
13
src/App.vue
13
src/App.vue
@@ -1,10 +1,21 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { installPrivacyGuards } from '@/composables/usePrivacyConsent'
|
import {
|
||||||
|
ensurePrivacyConsentIfNeeded,
|
||||||
|
installPrivacyGuards,
|
||||||
|
} from '@/composables/usePrivacyConsent'
|
||||||
|
|
||||||
const NOTIFICATION_SESSION_KEY = 'bdrp_app_shown_notifications'
|
const NOTIFICATION_SESSION_KEY = 'bdrp_app_shown_notifications'
|
||||||
|
|
||||||
onLaunch(async () => {
|
onLaunch(async () => {
|
||||||
installPrivacyGuards()
|
installPrivacyGuards()
|
||||||
uni.removeStorageSync(NOTIFICATION_SESSION_KEY)
|
uni.removeStorageSync(NOTIFICATION_SESSION_KEY)
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
plus.nativeUI.setUIStyle('light')
|
||||||
|
// #endif
|
||||||
|
ensurePrivacyConsentIfNeeded()
|
||||||
|
})
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
|
ensurePrivacyConsentIfNeeded()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
2
src/auto-imports.d.ts
vendored
2
src/auto-imports.d.ts
vendored
@@ -43,6 +43,7 @@ declare global {
|
|||||||
const effectScope: typeof import('vue')['effectScope']
|
const effectScope: typeof import('vue')['effectScope']
|
||||||
const ensureCurrentPageAccess: typeof import('./composables/useNavigationAuthGuard')['ensureCurrentPageAccess']
|
const ensureCurrentPageAccess: typeof import('./composables/useNavigationAuthGuard')['ensureCurrentPageAccess']
|
||||||
const ensurePageAccessByUrl: typeof import('./composables/useNavigationAuthGuard')['ensurePageAccessByUrl']
|
const ensurePageAccessByUrl: typeof import('./composables/useNavigationAuthGuard')['ensurePageAccessByUrl']
|
||||||
|
const ensurePrivacyConsentIfNeeded: typeof import('./composables/usePrivacyConsent')['ensurePrivacyConsentIfNeeded']
|
||||||
const extendRef: typeof import('@vueuse/core')['extendRef']
|
const extendRef: typeof import('@vueuse/core')['extendRef']
|
||||||
const getAgentInfo: typeof import('./utils/storage')['getAgentInfo']
|
const getAgentInfo: typeof import('./utils/storage')['getAgentInfo']
|
||||||
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
|
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
|
||||||
@@ -438,6 +439,7 @@ declare module 'vue' {
|
|||||||
readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
|
readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
|
||||||
readonly ensureCurrentPageAccess: UnwrapRef<typeof import('./composables/useNavigationAuthGuard')['ensureCurrentPageAccess']>
|
readonly ensureCurrentPageAccess: UnwrapRef<typeof import('./composables/useNavigationAuthGuard')['ensureCurrentPageAccess']>
|
||||||
readonly ensurePageAccessByUrl: UnwrapRef<typeof import('./composables/useNavigationAuthGuard')['ensurePageAccessByUrl']>
|
readonly ensurePageAccessByUrl: UnwrapRef<typeof import('./composables/useNavigationAuthGuard')['ensurePageAccessByUrl']>
|
||||||
|
readonly ensurePrivacyConsentIfNeeded: UnwrapRef<typeof import('./composables/usePrivacyConsent')['ensurePrivacyConsentIfNeeded']>
|
||||||
readonly extendRef: UnwrapRef<typeof import('@vueuse/core')['extendRef']>
|
readonly extendRef: UnwrapRef<typeof import('@vueuse/core')['extendRef']>
|
||||||
readonly getAgentInfo: UnwrapRef<typeof import('./utils/storage')['getAgentInfo']>
|
readonly getAgentInfo: UnwrapRef<typeof import('./utils/storage')['getAgentInfo']>
|
||||||
readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
|
readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
|
||||||
|
|||||||
5
src/components.d.ts
vendored
5
src/components.d.ts
vendored
@@ -20,5 +20,10 @@ declare module 'vue' {
|
|||||||
RealNameAuthDialog: typeof import('./components/RealNameAuthDialog.vue')['default']
|
RealNameAuthDialog: typeof import('./components/RealNameAuthDialog.vue')['default']
|
||||||
SectionTitle: typeof import('./components/SectionTitle.vue')['default']
|
SectionTitle: typeof import('./components/SectionTitle.vue')['default']
|
||||||
VipBanner: typeof import('./components/VipBanner.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']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -259,20 +259,4 @@ function close() {
|
|||||||
font-size: 15px;
|
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -106,3 +106,21 @@ export function installPrivacyGuards() {
|
|||||||
installPrivacyNavigationGuard()
|
installPrivacyNavigationGuard()
|
||||||
installPrivacyRequestGuard()
|
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 })
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import {
|
|||||||
useRouter,
|
useRouter,
|
||||||
} from '@/composables/uni-router'
|
} from '@/composables/uni-router'
|
||||||
import { ensurePageAccessByUrl } from '@/composables/useNavigationAuthGuard'
|
import { ensurePageAccessByUrl } from '@/composables/useNavigationAuthGuard'
|
||||||
|
import { ensurePrivacyConsentIfNeeded } from '@/composables/usePrivacyConsent'
|
||||||
import { useGlobalNotification } from '@/composables/useGlobalNotification'
|
import { useGlobalNotification } from '@/composables/useGlobalNotification'
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
@@ -91,6 +92,7 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
|
ensurePrivacyConsentIfNeeded()
|
||||||
syncTitle()
|
syncTitle()
|
||||||
ensureAuthIfNeeded()
|
ensureAuthIfNeeded()
|
||||||
console.log('[通知DEBUG] default layout onShow')
|
console.log('[通知DEBUG] default layout onShow')
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { onMounted, reactive, ref } from 'vue'
|
|||||||
import { getCurrentUniRoute } from '@/composables/uni-router'
|
import { getCurrentUniRoute } from '@/composables/uni-router'
|
||||||
import { openCustomerService } from '@/composables/useCustomerService'
|
import { openCustomerService } from '@/composables/useCustomerService'
|
||||||
import { ensurePageAccessByUrl } from '@/composables/useNavigationAuthGuard'
|
import { ensurePageAccessByUrl } from '@/composables/useNavigationAuthGuard'
|
||||||
import { getPrivacyConsentPageUrl } from '@/composables/usePrivacyConsent'
|
import { ensurePrivacyConsentIfNeeded, getPrivacyConsentPageUrl } from '@/composables/usePrivacyConsent'
|
||||||
import { useGlobalNotification } from '@/composables/useGlobalNotification'
|
import { useGlobalNotification } from '@/composables/useGlobalNotification'
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@@ -75,6 +75,7 @@ function ensureAuthIfNeeded() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
|
ensurePrivacyConsentIfNeeded()
|
||||||
syncTabbar()
|
syncTabbar()
|
||||||
ensureAuthIfNeeded()
|
ensureAuthIfNeeded()
|
||||||
console.log('[通知DEBUG] home layout onShow')
|
console.log('[通知DEBUG] home layout onShow')
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ async function routeOnLaunch() {
|
|||||||
routing.value = true
|
routing.value = true
|
||||||
try {
|
try {
|
||||||
if (!hasAcceptedPrivacyPolicy()) {
|
if (!hasAcceptedPrivacyPolicy()) {
|
||||||
uni.reLaunch({ url: getPrivacyConsentPageUrl() })
|
uni.redirectTo({ url: getPrivacyConsentPageUrl() })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
await bootstrap()
|
await bootstrap()
|
||||||
|
|||||||
@@ -1,15 +1,27 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useAppBootstrap } from '@/composables/useAppBootstrap'
|
import { useAppBootstrap } from '@/composables/useAppBootstrap'
|
||||||
|
import { useReportWebview } from '@/composables/useReportWebview'
|
||||||
import { getPrivacyDecision, setPrivacyDecision } from '@/composables/usePrivacyConsent'
|
import { getPrivacyDecision, setPrivacyDecision } from '@/composables/usePrivacyConsent'
|
||||||
|
|
||||||
definePage({ layout: false })
|
definePage({ layout: false })
|
||||||
|
|
||||||
const { bootstrap } = useAppBootstrap()
|
const { bootstrap } = useAppBootstrap()
|
||||||
|
const { buildSitePathUrl } = useReportWebview()
|
||||||
const handling = ref(false)
|
const handling = ref(false)
|
||||||
const rejectConfirming = ref(false)
|
const rejectConfirming = ref(false)
|
||||||
|
|
||||||
function openPrivacyPolicy() {
|
function openPrivacyPolicy() {
|
||||||
|
const url = buildSitePathUrl('/app/privacyPolicy')
|
||||||
|
// #ifdef APP-IOS
|
||||||
|
if (url) {
|
||||||
|
plus.runtime.openURL(url)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
uni.showToast({ title: '隐私政策链接不可用', icon: 'none' })
|
||||||
|
// #endif
|
||||||
|
// #ifndef APP-IOS
|
||||||
uni.navigateTo({ url: '/pages/privacy-policy' })
|
uni.navigateTo({ url: '/pages/privacy-policy' })
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleAgree() {
|
async function handleAgree() {
|
||||||
|
|||||||
@@ -133,25 +133,6 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===== 暗色主题支持 ===== */
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
:root {
|
|
||||||
--color-text-primary: #ffffff;
|
|
||||||
--color-text-secondary: #e5e5e5;
|
|
||||||
--color-text-tertiary: #a3a3a3;
|
|
||||||
--color-text-quaternary: #737373;
|
|
||||||
|
|
||||||
--color-bg-primary: #1a1a1a;
|
|
||||||
--color-bg-secondary: #262626;
|
|
||||||
--color-bg-tertiary: #404040;
|
|
||||||
--color-bg-quaternary: #525252;
|
|
||||||
|
|
||||||
--color-border-primary: #404040;
|
|
||||||
--color-border-secondary: #525252;
|
|
||||||
--color-border-tertiary: #737373;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ===== 工具类 ===== */
|
/* ===== 工具类 ===== */
|
||||||
.text-primary {
|
.text-primary {
|
||||||
color: var(--color-primary) !important;
|
color: var(--color-primary) !important;
|
||||||
|
|||||||
Reference in New Issue
Block a user