From 13c960a2b6bb54797bdbd03aa3184af507d94a9b Mon Sep 17 00:00:00 2001
From: 卢春龙 <lucl@xiaopeng.com>
Date: 星期一, 20 四月 2026 10:42:28 +0800
Subject: [PATCH] Merge branch 'feature_pr_fix' into 'develop'

---
 src/robotaxi/pages/begin-route/components/evaluate-popup.tsx |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/src/robotaxi/pages/begin-route/components/evaluate-popup.tsx b/src/robotaxi/pages/begin-route/components/evaluate-popup.tsx
index c277d6d..98a96ab 100644
--- a/src/robotaxi/pages/begin-route/components/evaluate-popup.tsx
+++ b/src/robotaxi/pages/begin-route/components/evaluate-popup.tsx
@@ -15,18 +15,19 @@
 }
 
 export default function EvaluatePopup({ show = false, onClose, onConfirm, orderId, orderRating, submitMode = 'comment' }: Props) {
-    const [visible, setVisible] = useState(false);
-    const [animationData, setAnimationData] = useState<any>();
-    const [selectedTypeId, setSelectedTypeId] = useState<number | null>(null);
-    const [feedbackContent, setFeedbackContent] = useState('');
-    const [typeOptions, setTypeOptions] = useState<any[]>([]);
-    const [isSubmitting, setIsSubmitting] = useState(false);
+    const [visible, setVisible] = useState(false); // 弹窗显示状态
+    const [animationData, setAnimationData] = useState<any>(); // 弹窗进出场动画
+    const [selectedTypeId, setSelectedTypeId] = useState<number | null>(null); // 当前选择的问题类型
+    const [feedbackContent, setFeedbackContent] = useState(''); // 反馈文本内容
+    const [typeOptions, setTypeOptions] = useState<any[]>([]); // 问题类型选项
+    const [isSubmitting, setIsSubmitting] = useState(false); // 提交中状态
     const [pictures, setPictures] = useState<Array<{
         localUrl: string;
         server?: { id: string; name: string; url: string } | null;
         status: 'uploading' | 'success' | 'failed';
-    }>>([]);
+    }>>([]); // 图片上传队列
 
+    // 控制弹窗开合动画
     useEffect(() => {
         if (show && !visible) {
             setVisible(true);
@@ -50,6 +51,7 @@
         }
     }, [show]);
 
+    // 提交反馈(评价/投诉)
     const submit = () => {
         if (isSubmitting) {
             return;
@@ -114,6 +116,7 @@
         });
     }
 
+    // 压缩图片到可上传大小
     const ensureSizeUnderLimit = async (path: string): Promise<string> => {
         try {
             const fs = Taro.getFileSystemManager();
@@ -149,6 +152,7 @@
         }
     };
 
+    // 上传单张图片并写回状态
     const uploadSingle = async (index: number, filePath: string) => {
         setPictures(prev => {
             const next = [...prev];
@@ -192,6 +196,7 @@
         }
     };
 
+    // 选择图片并触发上传
     const handleChooseImages = async () => {
         const remain = Math.max(0, 3 - pictures.length);
         if (remain <= 0) {
@@ -218,12 +223,14 @@
         }
     };
 
+    // 重试上传失败图片
     const handleRetry = async (index: number) => {
         const item = pictures[index];
         if (!item) return;
         uploadSingle(index, item.localUrl);
     };
 
+    // 删除已选图片
     const handleDelete = (index: number) => {
         setPictures(prev => {
             const next = [...prev];
@@ -232,6 +239,7 @@
         });
     };
 
+    // 拉取问题类型并重置本次填写内容
     useEffect(() => {
         if (!show) {
             return;

--
Gitblit v1.7.1