liaofang
2026-06-27 a0164074905f4e714d5bc2087d7e8a659e3fa414
feat: 评价弹窗点击modal也可以关闭,订单列表页拉取接口增加loading态
3个文件已修改
38 ■■■■■ 已修改文件
src/robotaxi/pages/begin-route/components/evaluate-popup.tsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/order/index.less 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/order/index.tsx 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/components/evaluate-popup.tsx
@@ -189,7 +189,7 @@
    return (
        <View className='evaluate-popup' catchMove onClick={(e) => e.stopPropagation()}>
            <View className='evaluate-mask'></View>
            <View className='evaluate-mask' onClick={onClose}></View>
            <View className='evaluate-content' animation={animationData}>
                <View className='evaluate-content-close'>
                    <Image onClick={onClose} src="https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/close-icon.png" />
src/robotaxi/pages/order/index.less
@@ -155,4 +155,12 @@
    width: 480px;
    height: 400px;
  }
  .loading-box {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: rgba(0, 0, 0, 0.6);
  }
}
src/robotaxi/pages/order/index.tsx
@@ -1,6 +1,6 @@
import Taro, { useRouter, useReachBottom, useDidShow } from '@tarojs/taro';
import { useState } from 'react';
import { View, Image } from '@tarojs/components';
import { View, Image, Text } from '@tarojs/components';
import './index.less';
import { getOrderHistoryList, OrderHistoryGroup } from '../../../robotaxi/api/order';
import { _INVOICE_CHARGE_URL } from '../../../constants/api';
@@ -32,6 +32,7 @@
  const [activeFilter, setActiveFilter] = useState<OrderFilterKey>(filter || 'all')
  const [pageNum, setPageNum] = useState(1)
  const [hasMore, setHasMore] = useState(true)
  const [loading, setLoading] = useState(false)
  const pageSize = 10
  const formatTime = (t?: string, fallback?: string) => {
@@ -48,6 +49,9 @@
    isRefresh = false,
    filterKey: OrderFilterKey = activeFilter
  ) => {
    if (isRefresh) {
      setLoading(true);
    }
    try {
      const res = await getOrderHistoryList({
        pageNum: page,
@@ -64,6 +68,10 @@
      setHasMore(count >= pageSize);
    } catch (e) {
      if (isRefresh) setGroups([]);
    } finally {
      if (isRefresh) {
        setLoading(false);
      }
    }
  }
@@ -229,10 +237,20 @@
        </View>)
      })}
      {
        !groups.length && <View className='no-data-box'>
          <Image className='no-data-image' src={'https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/no-data-city.png'} />
          <View>暂无订单</View>
        </View>
        !groups.length && (
          <View className='no-data-box'>
            {loading ? (
              <View className='loading-box'>
                <Text>加载中...</Text>
              </View>
            ) : (
              <>
                <Image className='no-data-image' src={'https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/no-data-city.png'} />
                <View>暂无订单</View>
              </>
            )}
          </View>
        )
      }
    </View>
  )