feat: 更新项目配置,提升版本号至1.1.0;移除app.constants.js文件,调整相关导入路径

This commit is contained in:
康猛 2026-01-15 10:53:26 +08:00
parent a66f7f9460
commit 47f14d3da6
10 changed files with 47 additions and 79 deletions

View File

@ -1,14 +1,19 @@
const withCmakeVersion = require('./plugins/withCmakeVersion')
const PROJECT_ID = 'c951a6a3-e1d8-4e39-8636-c476da1fe5be'
const VERSION = '1.0.0'
const APPNAME = 'duooomi'
const EXPO_PROJECT = 'duooomi'
const SCHEME = 'duooomi'
const EXPO_OWER = 'bowong'
const ANDROID_ID = 'com.duomi.duooomi'
const IOS_ID = ANDROID_ID
const IOS_UNIVERSAL_LINK = 'duooomi.bowong.cn'
export const PROJECT_ID = 'c951a6a3-e1d8-4e39-8636-c476da1fe5be'
export const APPNAME = 'duooomi'
export const EXPO_PROJECT = 'duooomi'
export const SCHEME = 'duooomi'
export const EXPO_OWER = 'bowong'
export const ANDROID_ID = 'com.duomi.duooomi'
export const IOS_ID = ANDROID_ID
export const IOS_UNIVERSAL_LINK = 'duooomi.bowong.cn'
// 原生版本,原生代码变更时需要更新此版本号
export const VERSION = '1.1.0'
// JavaScript版本JS代码变更时需要更新此版本号
export const APP_VERSION = 'dev202601151820'
const ALIPAY_SCHEMA = 'alipay2021006119657394'
const ALIPAY_SCHEMA_SANDBOX = 'alipay9021000158673972'

View File

@ -1,13 +0,0 @@
export const PROJECT_ID = 'c951a6a3-e1d8-4e39-8636-c476da1fe5be'
export const VERSION = '1.0.0'
export const APPNAME = 'duooomi'
export const EXPO_PROJECT = 'duooomi'
export const SCHEME = 'duooomi'
export const EXPO_OWER = 'bowong'
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 = 'dev202601141820'
export const ALIPAY_SCHEMA = 'alipay2021006119657394'
export const ALIPAY_SCHEMA_SANDBOX = '9021000158673972'

View File

@ -9,7 +9,7 @@ import { KeyboardAwareScrollView } from 'react-native-keyboard-controller'
import { imgPicker } from '@/@share/apis'
import { Block, Toast, VideoBox } from '@/@share/components'
import { APP_VERSION } from '@/app.constants'
import { APP_VERSION } from '@/app.config'
import { BLE_UUIDS, PROTOCOL_VERSION } from '@/ble'
import { bleManager } from '@/ble/managers/bleManager'
import { ThemedText } from '@/components/themed-text'
@ -31,10 +31,10 @@ export default observer(function TabTwoScreen() {
discoveredDevices,
loading,
error,
contents,
} = bleStore.state
const { galleryList: contents } = bleStore
const bleSessionId = bleStore.bleSessionId
const startScan = () => bleManager.startScan()

View File

@ -3,7 +3,7 @@ import 'react-native-reanimated'
import { DarkTheme, DefaultTheme, ThemeProvider } from '@react-navigation/native'
import * as Sentry from '@sentry/react-native'
// import { useKeepAwake } from 'expo-keep-awake'
import { useKeepAwake } from 'expo-keep-awake'
import { Stack, useNavigationContainerRef } from 'expo-router'
import { StatusBar } from 'expo-status-bar'
import { useEffect } from 'react'
@ -93,6 +93,7 @@ function RootLayout() {
<Stack.Screen name="auth" options={{ headerShown: false }} />
<Stack.Screen name="forgotPassword" options={{ headerShown: false }} />
<Stack.Screen name="pointList" options={{ headerShown: false }} />
<Stack.Screen name="webView" options={{ headerShown: false }} />
</Stack>
</Providers>
)
@ -101,7 +102,7 @@ function RootLayout() {
function Providers({ children }: { children: React.ReactNode }) {
const colorScheme = useColorScheme()
useUserSession()
// useKeepAwake()
useKeepAwake()
return (
<SafeAreaProvider>

View File

@ -5,7 +5,7 @@ import React, { useCallback, useMemo, useState } from 'react'
import { TextInput } from 'react-native'
import { KeyboardAwareScrollView } from 'react-native-keyboard-controller'
import { APP_VERSION } from '@/app.constants'
import { APP_VERSION } from '@/app.config'
import BannerSection from '@/components/BannerSection'
import { emailOtp as emailOtpService, setAuthToken, signIn, signUp } from '@/lib/auth'
import { isValidEmail } from '@/utils'

View File

@ -1,4 +1,3 @@
// ...existing code...
import { Ionicons } from '@expo/vector-icons'
import { Block, Text, Toast } from '@share/components'
import { router } from 'expo-router'

View File

@ -11,7 +11,7 @@ import { Dimensions, Platform, RefreshControl, ScrollView } from 'react-native'
import { useSafeAreaInsets } from 'react-native-safe-area-context'
import { Block, Img, Text, Toast } from '@/@share/components'
import { IOS_UNIVERSAL_LINK, SCHEME } from '@/app.constants'
import { IOS_UNIVERSAL_LINK, SCHEME } from '@/app.config'
import { handleError } from '@/hooks/data/use-error'
import { userBalanceStore } from '@/stores'
import { openUrl } from '@/utils'
@ -114,10 +114,12 @@ const ChargePage = observer(function ChargePage() {
}
const openWeb = () => {
// webview 显示异常
// router.push({
// pathname: '/webview',
// params: {
// url: 'https://example.com/agreement',
// // url: 'http://baidu.com',
// url: 'https://mixvideo.bowong.cc/terms',
// title: '付费服务协议',
// },
// })

View File

@ -1,6 +1,6 @@
import { Ionicons } from '@expo/vector-icons'
import { Block, Text } from '@share/components'
import { router, useLocalSearchParams } from 'expo-router'
import { router, Stack, useLocalSearchParams } from 'expo-router'
import { useRef, useState } from 'react'
import { ActivityIndicator, Alert, Share } from 'react-native'
import { useSafeAreaInsets } from 'react-native-safe-area-context'
@ -22,9 +22,9 @@ export default function WebViewPage() {
if (!url) {
return (
<Block className="flex-1 items-center justify-center bg-black">
<Block className="flex-1 items-center justify-center bg-white">
<Ionicons name="alert-circle-outline" size={64} color="#666" />
<Text className="mt-4 text-lg text-white">URL参数缺失</Text>
<Text className="mt-4 text-lg text-black">URL参数缺失</Text>
<Block className="mt-4 rounded-lg bg-accent px-6 py-3" onClick={() => router.back()}>
<Text className="font-bold text-black"></Text>
</Block>
@ -118,51 +118,21 @@ export default function WebViewPage() {
}
}
return (
<Block className="flex-1 bg-black" style={{ paddingTop: insets.top }}>
{/* Header */}
<Block className="flex-row items-center bg-black px-4 py-3">
<Block className="mr-3 size-10 items-center justify-center rounded-full bg-white/10" onClick={goBack}>
<Ionicons name="arrow-back" size={20} color="white" />
</Block>
<Block className="flex-1">
<Text className="text-base font-bold text-white" numberOfLines={1}>
{title || '网页浏览'}
</Text>
<Text className="text-xs text-white/60" numberOfLines={1}>
{currentUrl}
</Text>
</Block>
<Block className="flex-row gap-2">
<Block
className={`size-10 items-center justify-center rounded-full ${canGoBack ? 'bg-white/10' : 'bg-white/5'}`}
onClick={goBack}
style={{ opacity: canGoBack ? 1 : 0.5 }}
>
<Ionicons name="chevron-back" size={18} color="white" />
</Block>
<Block
className={`size-10 items-center justify-center rounded-full ${
canGoForward ? 'bg-white/10' : 'bg-white/5'
}`}
onClick={goForward}
style={{ opacity: canGoForward ? 1 : 0.5 }}
>
<Ionicons name="chevron-forward" size={18} color="white" />
</Block>
<Block className="size-10 items-center justify-center rounded-full bg-white/10" onClick={reload}>
<Ionicons name="reload" size={18} color="white" />
</Block>
<Block className="size-10 items-center justify-center rounded-full bg-white/10" onClick={shareUrl}>
<Ionicons name="share" size={18} color="white" />
</Block>
</Block>
const renderHeader = () => (
<Block className="flex-row items-center justify-between px-[16px]" style={{ paddingTop: 12, paddingBottom: 12 }}>
<Block className="ml-[-8px] size-[40px] items-center justify-center" opacity={0.7} onClick={() => router.back()}>
<Ionicons color="black" name="chevron-back" size={24} />
</Block>
<Text className="text-[16px] font-[700] text-black">{title}</Text>
<Block className="w-[32px]" />
</Block>
)
return (
<Block className="flex-1" style={{ paddingTop: 0 }}>
<Stack.Screen options={{ headerShown: false }} />
{/* Header */}
{renderHeader()}
{/* Progress Bar */}
{loading && progress < 1 && (
@ -184,7 +154,7 @@ export default function WebViewPage() {
<WebView
ref={webViewRef}
source={{ uri: url }}
style={{ flex: 1, backgroundColor: 'transparent' }}
style={{ flex: 1 }}
onLoad={() => setLoading(false)}
onLoadStart={() => setLoading(true)}
onLoadEnd={() => setLoading(false)}

View File

@ -37,6 +37,7 @@
"expo-image-manipulator": "~14.0.8",
"expo-image-picker": "~17.0.8",
"expo-insights": "~0.10.8",
"expo-keep-awake": "^15.0.8",
"expo-linear-gradient": "^15.0.8",
"expo-linking": "^8.0.10",
"expo-media-library": "~18.2.0",
@ -71,6 +72,7 @@
"react-native-svg": "^15.15.1",
"react-native-video": "^6.18.0",
"react-native-web": "~0.21.0",
"react-native-webview": "^13.16.0",
"react-native-worklets": "0.5.1",
"tailwind-variants": "^0.2.1",
"twrnc": "^4.11.1",

View File

@ -65,6 +65,7 @@
"expo-image-manipulator": "~14.0.8",
"expo-image-picker": "~17.0.8",
"expo-insights": "~0.10.8",
"expo-keep-awake": "^15.0.8",
"expo-linear-gradient": "^15.0.8",
"expo-linking": "^8.0.10",
"expo-media-library": "~18.2.0",
@ -99,6 +100,7 @@
"react-native-svg": "^15.15.1",
"react-native-video": "^6.18.0",
"react-native-web": "~0.21.0",
"react-native-webview": "^13.16.0",
"react-native-worklets": "0.5.1",
"tailwind-variants": "^0.2.1",
"twrnc": "^4.11.1",