|
|
@@ -7,12 +7,14 @@ import { cn } from '@/utils/cn'
|
|
|
import { Button } from '@/components/ui/button'
|
|
|
import { Navbar } from '@/components/ui/navbar'
|
|
|
import { AvatarUpload } from '@/components/ui/avatar-upload'
|
|
|
+import { FAQDialog } from '@/components/FAQDialog'
|
|
|
import { type UploadResult } from '@/utils/minio'
|
|
|
import './index.css'
|
|
|
|
|
|
const ProfilePage: React.FC = () => {
|
|
|
const { user: userProfile, logout, isLoading: loading, updateUser } = useAuth()
|
|
|
const [updatingAvatar, setUpdatingAvatar] = useState(false)
|
|
|
+ const [faqDialogOpen, setFaqDialogOpen] = useState(false)
|
|
|
|
|
|
const handleLogout = async () => {
|
|
|
try {
|
|
|
@@ -320,7 +322,7 @@ const ProfilePage: React.FC = () => {
|
|
|
<View className="bg-white rounded-[20rpx] shadow-[0_4rpx_20rpx_rgba(0,0,0,0.08)] border border-[#E5E5EA] overflow-hidden">
|
|
|
{[
|
|
|
{ title: '联系客服', desc: '7x24小时在线客服', icon: 'i-heroicons-phone-20-solid', color: 'text-blue-500', onClick: handleCustomerService, testId: 'customer-service-button' },
|
|
|
- { title: '常见问题', desc: '查看常见问题解答', icon: 'i-heroicons-question-mark-circle-20-solid', color: 'text-green-500', onClick: () => Taro.showToast({ title: '常见问题功能开发中...', icon: 'none' }), testId: 'faq-button' },
|
|
|
+ { title: '常见问题', desc: '查看常见问题解答', icon: 'i-heroicons-question-mark-circle-20-solid', color: 'text-green-500', onClick: () => setFaqDialogOpen(true), testId: 'faq-button' },
|
|
|
{ title: '意见反馈', desc: '提出宝贵意见', icon: 'i-heroicons-chat-bubble-left-ellipsis-20-solid', color: 'text-orange-500', onClick: () => Taro.showToast({ title: '意见反馈功能开发中...', icon: 'none' }), testId: 'feedback-button' }
|
|
|
].map((item, index) => (
|
|
|
<View
|
|
|
@@ -358,6 +360,9 @@ const ProfilePage: React.FC = () => {
|
|
|
<Text className="text-[22rpx] text-[#999]">去看出行 v1.0.0</Text>
|
|
|
</View>
|
|
|
</ScrollView>
|
|
|
+
|
|
|
+ {/* 常见问题弹窗 */}
|
|
|
+ <FAQDialog open={faqDialogOpen} onOpenChange={setFaqDialogOpen} />
|
|
|
</TabBarLayout>
|
|
|
)
|
|
|
}
|