diff --git a/app/auth.tsx b/app/auth.tsx
index 72137ab..f81d7c0 100644
--- a/app/auth.tsx
+++ b/app/auth.tsx
@@ -8,7 +8,7 @@ import { KeyboardAwareScrollView } from 'react-native-keyboard-controller'
import { APP_VERSION } from '@/app.config'
import BannerSection from '@/components/BannerSection'
import { getSession, phoneNumber, setAuthToken, signIn } from '@/lib/auth'
-import { isValidEmail, isValidPhone } from '@/utils'
+import { isValidPhone } from '@/utils'
import { openUrl } from '@/utils/webview-helper'
const APP_NAME = '多米'
@@ -44,7 +44,7 @@ export default function Auth() {
}
}
}, [])
-
+
// 获取验证码
const handleSendCode = useCallback(async () => {
if (!isValidPhone(phone)) {
@@ -66,7 +66,7 @@ export default function Auth() {
if (result.error) {
// 处理不同类型的错误
const errorMessage = result.error.message || '验证码发送失败'
-
+
// 如果是 403 错误,可能是请求过于频繁
if (result.error.status === 403) {
Toast.show({ title: '请求过于频繁,请稍后再试' })
@@ -150,7 +150,6 @@ export default function Auth() {
},
)
})
-
} catch (error: any) {
console.error('登录/注册失败:', error)
Toast.show({ title: error.message || '操作失败,请稍后重试' })
@@ -238,7 +237,7 @@ export default function Auth() {
setAgreed(!agreed)}
- className={`size-[20px] items-center justify-center border-[2px] border-black ${agreed ? 'bg-black' : 'bg-white'}`}
+ className={`size-[20px] items-center justify-center border-2 border-black ${agreed ? 'bg-black' : 'bg-white'}`}
>
{agreed && }
@@ -282,11 +281,7 @@ export default function Auth() {
{(['phone', 'email'] as const).map((type) => {
const isActive = type === loginType
return (
- setLoginType(type)}
- >
+ setLoginType(type)}>
+
@@ -347,7 +342,9 @@ export default function Auth() {
onClick={countdown > 0 ? undefined : handleSendCode}
className={`border-2 border-black px-[6px] py-[4px] ${canSendCode && countdown === 0 ? 'bg-black' : 'bg-gray-200'}`}
>
-
+
{countdown > 0 ? `${countdown}秒` : '获取验证码'}
@@ -433,14 +430,15 @@ export default function Auth() {
-
- {renderAgreementCheckbox()}
-
- router.push('/forgotPassword')}>
+ {renderAgreementCheckbox()}
+ router.push('/forgotPassword')}
+ >
忘记密码
-
+
{renderLoginButton('登录')}
>
)}
@@ -452,7 +450,7 @@ export default function Auth() {
© 2025 LOOMART. All rights reserved.
- 插件当前版本号: {APP_VERSION}
+ 当前版本号: {APP_VERSION}
diff --git a/app/profile.tsx b/app/profile.tsx
index f9fcafa..24e9ea2 100644
--- a/app/profile.tsx
+++ b/app/profile.tsx
@@ -1,6 +1,6 @@
-import * as ImagePicker from 'expo-image-picker'
import { Ionicons } from '@expo/vector-icons'
import { Block, ConfirmModal, Img, Input, Text, Toast } from '@share/components'
+import * as ImagePicker from 'expo-image-picker'
import { router, Stack } from 'expo-router'
import { observer } from 'mobx-react-lite'
import React, { useEffect, useState } from 'react'
@@ -199,11 +199,7 @@ export default observer(function ProfilePage() {
const renderHeader = () => (
- router.back()}
- >
+ router.back()}>
个人信息
@@ -216,17 +212,13 @@ export default observer(function ProfilePage() {
{user?.image ? (
-
+
) : (
)}
@@ -237,25 +229,19 @@ export default observer(function ProfilePage() {
)
const renderInfoList = () => (
-
+
{infoItems.map((item) => (
-
+
{item.label}
{item.value}
- {item.id !== 'phone' && item.id !== 'email' && (
-
- )}
+ {item.id !== 'phone' && item.id !== 'email' && }
))}
diff --git a/app/settings.tsx b/app/settings.tsx
index c02623a..811c241 100644
--- a/app/settings.tsx
+++ b/app/settings.tsx
@@ -1,11 +1,10 @@
import { Ionicons } from '@expo/vector-icons'
-import { Block, Img, Text } from '@share/components'
+import { Block, ConfirmModal, Img, Text, Toast } from '@share/components'
import { router, Stack } from 'expo-router'
import { observer } from 'mobx-react-lite'
import React from 'react'
import { ScrollView } from 'react-native'
-import { ConfirmModal, Toast } from '@share/components'
import { userStore } from '@/stores'
type MenuItem = {
@@ -24,7 +23,6 @@ export default observer(function SettingsPage() {
title="退出登录"
content="确定要退出登录吗?"
onCancel={Toast.hideModal}
-
onConfirm={async () => {
await signOut()
Toast.show({ title: '已退出登录' })
@@ -45,6 +43,7 @@ export default observer(function SettingsPage() {
router.push({
pathname: '/webview',
params: { url: 'https://mixvideo.bowong.cc/terms', title: '服务条款' },
+ // params: { url: 'https://google.com', title: '服务条款' },
})
},
},
@@ -78,9 +77,7 @@ export default observer(function SettingsPage() {
}
const renderHeader = () => (
-
+
router.back()}>
@@ -90,17 +87,10 @@ export default observer(function SettingsPage() {
)
const renderUserSection = () => (
-
+
{user?.image ? (
-
+
) : (
)}
@@ -118,13 +108,10 @@ export default observer(function SettingsPage() {
const renderMenuSection = () => (
使用相关
-
+
{menuItems.map((item) => (
-
+
{item.label}
@@ -137,17 +124,14 @@ export default observer(function SettingsPage() {
const renderLogoutButton = () => (
-
- 退出登录
-
+
+ 退出登录
+
)
return (
-
+
{renderHeader()}
diff --git a/components/ChangePasswordModal.tsx b/components/ChangePasswordModal.tsx
index cfd689c..63b15f3 100644
--- a/components/ChangePasswordModal.tsx
+++ b/components/ChangePasswordModal.tsx
@@ -196,11 +196,7 @@ export default function ChangePasswordModal({ onConfirm, onCancel }: ChangePassw
className="absolute right-[12px] top-1/2 -translate-y-1/2"
onClick={() => setShowCurrentPassword(!showCurrentPassword)}
>
-
+
{errors.currentPassword && (
@@ -230,16 +226,10 @@ export default function ChangePasswordModal({ onConfirm, onCancel }: ChangePassw
className="absolute right-[12px] top-1/2 -translate-y-1/2"
onClick={() => setShowNewPassword(!showNewPassword)}
>
-
+
- {errors.newPassword && (
- {errors.newPassword}
- )}
+ {errors.newPassword && {errors.newPassword}}
确认新密码
@@ -264,11 +254,7 @@ export default function ChangePasswordModal({ onConfirm, onCancel }: ChangePassw
className="absolute right-[12px] top-1/2 -translate-y-1/2"
onClick={() => setShowConfirmPassword(!showConfirmPassword)}
>
-
+
{errors.confirmPassword && (
diff --git a/lib/auth.ts b/lib/auth.ts
index fa0c76f..6f2cd36 100644
--- a/lib/auth.ts
+++ b/lib/auth.ts
@@ -128,5 +128,4 @@ export const {
phoneNumber,
} = authClient
-
export const subscription: ISubscription = Reflect.get(authClient, 'subscription')