hejianhao
2026-03-15 32a981f64d3c3980de33339018978410ceef5e4c
fix: 修复优惠券描述显示和车辆温度查询逻辑

- 修复优惠券页面使用说明字段错误显示问题
- 修复费用明细页面距离字段名错误问题
- 修复复位按钮和乘车须知弹窗的显示条件
- 恢复车辆温度查询功能并修复温度设置响应处理
5个文件已修改
60 ■■■■■ 已修改文件
src/robotaxi/api/coupon.ts 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/components/calling-car.tsx 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/index.tsx 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/coupon/index.tsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/expense-description/index.tsx 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/api/coupon.ts
@@ -17,6 +17,7 @@
    applicableCities: string[];
    usageInstructions: string;
    couponDesc: string;
    decodeURIComponent: any;
}
export interface GetCouponListPayload {
src/robotaxi/pages/begin-route/components/calling-car.tsx
@@ -151,15 +151,15 @@
            const targetOrderId = orderId || Taro.getStorageSync('orderId');
            if (targetOrderId) {
                // 暂时不调用车辆温度
                setTempStatus(26);
                lastConfirmedTempRef.current = 26;
                // queryTemperatureByOrderId({ orderId: targetOrderId }).then((res: any) => {
                //     const currentTemperature = Number(res?.currentTemperature ?? res?.temperature);
                //     if (!Number.isNaN(currentTemperature)) {
                //         setTempStatus(currentTemperature);
                //         lastConfirmedTempRef.current = currentTemperature;
                //     }
                // }).catch(() => { });
                // setTempStatus(26);
                // lastConfirmedTempRef.current = 26;
                queryTemperatureByOrderId({ orderId: targetOrderId }).then((res: any) => {
                    const currentTemperature = Number(res?.currentTemperature ?? res?.temperature);
                    if (!Number.isNaN(currentTemperature)) {
                        setTempStatus(currentTemperature);
                        lastConfirmedTempRef.current = currentTemperature;
                    }
                }).catch(() => { });
            }
        } else if (tripStatus === 5) {
            // 已到达上车点:根据限停时间启动倒计时并处理超时
@@ -329,20 +329,19 @@
                orderId: targetOrderId,
                targetTemperature
            }).then((res: any) => {
                const isFailure = res?.success === false || (typeof res?.code === 'number' && res.code !== 0);
                if (isFailure) {
                if (res) {
                    lastConfirmedTempRef.current = targetTemperature;
                    Taro.showToast({
                        title: '设置成功',
                        icon: 'none'
                    });
                } else {
                    setTempStatus(lastConfirmedTempRef.current);
                    Taro.showToast({
                        title: res?.msg || '网络连接不稳定,设置失败,请重试',
                        icon: 'none'
                    });
                    return;
                }
                lastConfirmedTempRef.current = targetTemperature;
                Taro.showToast({
                    title: '设置成功',
                    icon: 'none'
                });
            }).catch(() => {
                setTempStatus(lastConfirmedTempRef.current);
                Taro.showToast({
src/robotaxi/pages/begin-route/index.tsx
@@ -1747,9 +1747,12 @@
        <View className="container">
          <View className="container-inner">
            {/* 复位按钮 */}
            <View className="origin-box" style={{ opacity: originBoxHidden ? 0 : originOpacity, transition: 'opacity 0.2s ease-out', pointerEvents: originBoxHidden ? 'none' : 'auto' }}>
              <Image onClick={toOrigin} className="origin-icon" src={originIcon} />
            </View>
            {
              [7, 8, 9].includes(tripStatus) &&
              <View className="origin-box" style={{ opacity: originBoxHidden ? 0 : originOpacity, transition: 'opacity 0.2s ease-out', pointerEvents: originBoxHidden ? 'none' : 'auto' }}>
                <Image onClick={toOrigin} className="origin-icon" src={originIcon} />
              </View>
            }
            <View catchMove onClick={(e) => e.stopPropagation()}>
              {/* 发布路线 */}
              {
@@ -1834,10 +1837,13 @@
        tipType={tipType}
      />
      {/* 乘车需知弹窗 */}
      <PassengerNotice
        show={showPassengerNotice}
        onClose={handleClosePassengerNotice}
      />
      {
        !showCancelPopup &&
        <PassengerNotice
          show={showPassengerNotice}
          onClose={handleClosePassengerNotice}
        />
      }
      {/* 评价弹窗 */}
      <EvaluatePopup
        show={showEvaluatePopup}
src/robotaxi/pages/coupon/index.tsx
@@ -190,7 +190,7 @@
          </View>
          <View className='remark-card'>
            <Text className='remark-label'>使用说明</Text>
            <Text className='remark-value'><RichText nodes={currentCoupon.couponDesc} /></Text>
            <Text className='remark-value'><RichText nodes={currentCoupon.decodeURIComponent} /></Text>
          </View>
        </View>
src/robotaxi/pages/expense-description/index.tsx
@@ -116,7 +116,7 @@
          {fareData.start?.map((item, index) => (
            <View className='flex-between-card mb-16' key={index}>
              <View className='price-notice-label'>
                {item.startTime}-{item.endTime}({item.distance}公里,{item.duration}分钟)
                {item.startTime}-{item.endTime}({item.mileage}公里,{item.duration}分钟)
              </View>
              <View className='price-notice-value'>{formatMoney(item.money)}元</View>
            </View>
@@ -129,7 +129,7 @@
          </View>
          {fareData.mileage?.map((item, index) => (
            <View className='flex-between-card mb-16' key={index}>
              <View className='price-notice-label'>{getTimeLabel(item.type)}({item.distance}公里)</View>
              <View className='price-notice-label'>{getTimeLabel(item.type)}({item.mileage}公里)</View>
              <View className='price-notice-value'>{formatMoney(item.money)}元</View>
            </View>
          ))}