fix:蓝牙调试、取消验证跳转
This commit is contained in:
parent
95c6b1cfcd
commit
a193c09664
|
|
@ -53,6 +53,7 @@ export default ({ config }) => {
|
|||
},
|
||||
edgeToEdgeEnabled: true,
|
||||
predictiveBackGestureEnabled: false,
|
||||
forceDarkAllowed: false,
|
||||
|
||||
// 已去重的权限
|
||||
permissions: [
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@ export const ANDROID_ID = 'com.duomi.duooomi'
|
|||
export const IOS_ID = ANDROID_ID
|
||||
export const IOS_UNIVERSAL_LINK = 'duooomi.bowong.cn'
|
||||
export const OWNER_ID = 'x3xbTCWf7dbtWu4gGU2TeI054L77xtkt'
|
||||
export const APP_VERSION = 'dev202512261854'
|
||||
export const APP_VERSION = 'dev202512311111'
|
||||
export const ALIPAY_SCHEMA = 'alipay2021006119657394'
|
||||
export const ALIPAY_SCHEMA_SANDBOX = '9021000158673972'
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ export default function TabTwoScreen() {
|
|||
try {
|
||||
const assetList = (await imgPicker({
|
||||
maxImages: 1,
|
||||
type: ImagePicker.MediaTypeOptions.Images,
|
||||
type: ImagePicker.MediaTypeOptions.All,
|
||||
resultType: 'asset',
|
||||
})) as unknown as ImagePicker.ImagePickerAsset[]
|
||||
|
||||
|
|
|
|||
|
|
@ -11,9 +11,7 @@ import { KeyboardProvider } from 'react-native-keyboard-controller'
|
|||
import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context'
|
||||
|
||||
import { ModalPortal } from '@/@share/components'
|
||||
import { AuthLoadingScreen } from '@/components/auth-loading-screen'
|
||||
import { HotUpdate } from '@/components/hot-update'
|
||||
import { useRouteGuard } from '@/hooks/core/use-route-guard'
|
||||
import { useColorScheme } from '@/hooks/use-color-scheme'
|
||||
import { setupGlobalFetchLogger } from '@/lib/fetch-logger'
|
||||
|
||||
|
|
@ -87,15 +85,15 @@ function RootLayout() {
|
|||
|
||||
function Providers({ children }: { children: React.ReactNode }) {
|
||||
const colorScheme = useColorScheme()
|
||||
const { isLoading } = useRouteGuard()
|
||||
// const { isLoading } = useRouteGuard()
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
<SafeAreaProvider>
|
||||
<AuthLoadingScreen />
|
||||
</SafeAreaProvider>
|
||||
)
|
||||
}
|
||||
// if (isLoading) {
|
||||
// return (
|
||||
// <SafeAreaProvider>
|
||||
// <AuthLoadingScreen />
|
||||
// </SafeAreaProvider>
|
||||
// )
|
||||
// }
|
||||
|
||||
return (
|
||||
<SafeAreaProvider>
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ export const BLE_UUIDS = {
|
|||
|
||||
export const FRAME_CONSTANTS = {
|
||||
HEAD_DEVICE_TO_APP: 0xb0,
|
||||
// HEAD_APP_TO_DEVICE: 0xc7,
|
||||
HEAD_APP_TO_DEVICE: 0xb1,
|
||||
HEAD_APP_TO_DEVICE: 0xc7,
|
||||
// HEAD_APP_TO_DEVICE: 0xb1,
|
||||
|
||||
MAX_DATA_SIZE: 496,
|
||||
HEADER_SIZE: 8,
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import React from 'react'
|
||||
import { Block, Text } from '@share/components'
|
||||
import { Ionicons } from '@expo/vector-icons'
|
||||
import { Block, Text } from '@share/components'
|
||||
import React from 'react'
|
||||
|
||||
export function AuthLoadingScreen() {
|
||||
return (
|
||||
<Block className="flex-1 items-center justify-center bg-black">
|
||||
<Block className="items-center gap-[16px] border-[4px] border-accent bg-white p-[32px] shadow-large-accent">
|
||||
<Ionicons name="hourglass-outline" size={48} color="#FFE500" />
|
||||
<Block className="items-center gap-[16px] border-4 border-accent bg-white p-[32px] shadow-large-accent">
|
||||
<Ionicons color="#FFE500" name="hourglass-outline" size={48} />
|
||||
<Text className="font-900 text-[16px] italic text-black">加载中...</Text>
|
||||
</Block>
|
||||
</Block>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import * as Sentry from '@sentry/react-native'
|
||||
import * as Updates from 'expo-updates'
|
||||
import { useUpdates } from 'expo-updates'
|
||||
import { useCallback, useEffect, useState } from 'react'
|
||||
|
||||
import { Text, Block } from '@/@share/components'
|
||||
import { Block, Text } from '@/@share/components'
|
||||
import { useUpdateChecker } from '@/hooks/use-update-checker'
|
||||
|
||||
import { ProgressLine } from './progress'
|
||||
import * as Sentry from '@sentry/react-native'
|
||||
|
||||
export const HotUpdate = () => {
|
||||
const { hasUpdate = true } = useUpdateChecker()
|
||||
|
|
@ -84,7 +84,9 @@ export const HotUpdate = () => {
|
|||
<Block className="p-[10px]">
|
||||
<ProgressLine className="h-[5px] w-full" progress={downloadProgress} progressClassName="h-[5px]" />
|
||||
<Block className="mt-1 flex-row items-center justify-between px-1">
|
||||
<Text className="text-[12px]">{isDownloading ? '更新中' : downloadProgress >= 100 ? '更新成功' : '更新失败'}</Text>
|
||||
<Text className="text-[12px]">
|
||||
{isDownloading ? '更新中' : downloadProgress >= 100 ? '更新成功' : '更新失败'}
|
||||
</Text>
|
||||
<Text className="text-[12px]">{downloadProgress}%</Text>
|
||||
</Block>
|
||||
</Block>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import Svg, { Circle } from 'react-native-svg'
|
||||
|
||||
import { Text, Block } from '@/@share/components'
|
||||
import { Block, Text } from '@/@share/components'
|
||||
import { cn } from '@/utils/cn'
|
||||
type ProgressProps = {
|
||||
progress: number
|
||||
|
|
@ -11,7 +11,10 @@ type ProgressProps = {
|
|||
export function ProgressLine({ progress, className, progressClassName }: ProgressProps) {
|
||||
return (
|
||||
<Block className={cn('h-[3px] w-full flex-row items-center rounded-[80] bg-line', className)}>
|
||||
<Block className={cn('h-[3px] rounded-full bg-primary', progressClassName)} style={{ width: `${progress > 100 ? 100 : progress}%` }} />
|
||||
<Block
|
||||
className={cn('h-[3px] rounded-full bg-primary', progressClassName)}
|
||||
style={{ width: `${progress > 100 ? 100 : progress}%` }}
|
||||
/>
|
||||
</Block>
|
||||
)
|
||||
}
|
||||
|
|
@ -23,7 +26,14 @@ type ProgressRingProps = {
|
|||
progress: number
|
||||
minWidth?: number
|
||||
}
|
||||
export function ProgressRing({ radius, strokeColor, strokeWidth, textColor, progress, minWidth = 66 }: ProgressRingProps) {
|
||||
export function ProgressRing({
|
||||
radius,
|
||||
strokeColor,
|
||||
strokeWidth,
|
||||
textColor,
|
||||
progress,
|
||||
minWidth = 66,
|
||||
}: ProgressRingProps) {
|
||||
// Calculate the progress for the circular indicator
|
||||
const circumference = 2 * Math.PI * radius
|
||||
const strokeDashoffset = circumference - (progress / 100) * circumference
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { useEffect } from 'react'
|
||||
import { useRouter, useSegments } from 'expo-router'
|
||||
import { useEffect } from 'react'
|
||||
|
||||
import { useAuth } from './use-auth'
|
||||
|
||||
const PUBLIC_ROUTES = [
|
||||
|
|
@ -8,6 +9,7 @@ const PUBLIC_ROUTES = [
|
|||
'index', // 首页(探索页)
|
||||
'auth', // 登录注册页
|
||||
'pointList', // 积分列表页
|
||||
'explore',
|
||||
]
|
||||
|
||||
function isPublicRoute(segments: string[]): boolean {
|
||||
|
|
@ -29,6 +31,8 @@ export function useRouteGuard() {
|
|||
const segments = useSegments()
|
||||
const router = useRouter()
|
||||
|
||||
console.log('useAuth-----------------', { isAuthenticated, isLoading, segments })
|
||||
|
||||
useEffect(() => {
|
||||
if (isLoading) return
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue