卢春龙
2026-06-15 6635e387a01de776a001876e6beb605bf601ec3a
Merge branch 'feature_v1.0_static_adjust' into 'feature_v1.0'

调整空调功能样式,恢复隐私弹窗’暂不同意‘按钮

See merge request robotaxi1/xp-robotaxi-miniprogram!71
3个文件已修改
84 ■■■■■ 已修改文件
src/pages/robotaxi/home/components/privacy-popup/index.tsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/components/calling-car-modules/temperature-control.tsx 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/components/css-folder/calling-car.less 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/robotaxi/home/components/privacy-popup/index.tsx
@@ -172,7 +172,7 @@
          同意并进入
        </View>
        {/* <View className='rt-close-txt' onClick={handleClose}>暂不同意</View> */}
        <View className='rt-close-txt' onClick={handleClose}>暂不同意</View>
      </View>
    </View>
  )
src/robotaxi/pages/begin-route/components/calling-car-modules/temperature-control.tsx
@@ -21,6 +21,8 @@
const AC_SWITCH_LOADING_ICON = 'https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/T-switch-loading-v3.png';
const AC_TOGGLE_FAIL_TEXT = '空调开关操作失败,请重试';
const AC_TEMP_FAIL_TEXT = '温度设置失败,请重试';
const AC_TEMP_MIN_TIP_TEXT = '已到空调最低设定温度';
const AC_TEMP_MAX_TIP_TEXT = '已到空调最高设定温度';
type Props = {
    tripStatus: TripStatus;
@@ -48,7 +50,12 @@
    const canToggleSwitch = tripStatus === TripStatus.VehicleApproaching && !isTogglingAc;
    const canAdjustTemperature = canToggleSwitch && acStatusLoaded && acSwitchOn && typeof tempStatus === 'number';
    const tempButtonIconSuffix = acSwitchOn ? '' : '-no';
    const isAtMinTemperature = typeof tempStatus === 'number' && tempStatus <= TEMP_MIN;
    const isAtMaxTemperature = typeof tempStatus === 'number' && tempStatus >= TEMP_MAX;
    const decreaseButtonDisabled = !canAdjustTemperature || isAtMinTemperature;
    const increaseButtonDisabled = !canAdjustTemperature || isAtMaxTemperature;
    const decreaseButtonIconSuffix = decreaseButtonDisabled ? '-no' : '';
    const increaseButtonIconSuffix = increaseButtonDisabled ? '-no' : '';
    const tempTextDisabledClassName = acSwitchOn ? '' : 'color-000-25';
    useEffect(() => {
@@ -266,6 +273,28 @@
        });
    };
    const handleDecreaseTemperature = () => {
        if (!canAdjustTemperature) {
            return;
        }
        if (isAtMinTemperature) {
            Taro.showToast({ title: AC_TEMP_MIN_TIP_TEXT, icon: 'none' });
            return;
        }
        handleTempChange(-0.5);
    };
    const handleIncreaseTemperature = () => {
        if (!canAdjustTemperature) {
            return;
        }
        if (isAtMaxTemperature) {
            Taro.showToast({ title: AC_TEMP_MAX_TIP_TEXT, icon: 'none' });
            return;
        }
        handleTempChange(0.5);
    };
    const handleToggleAcSwitch = async () => {
        if (!canToggleSwitch) {
            return;
@@ -320,9 +349,9 @@
                    <View className="car-card-temp-num-btn">
                        {
                            canAdjustTemperature ?
                                <Image className="car-card-temp-num-btn-img" src={`https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/T-down${tempButtonIconSuffix}.png`} onClick={() => handleTempChange(-0.5)} />
                                <Image className="car-card-temp-num-btn-img" src={`https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/T-down${decreaseButtonIconSuffix}.png`} onClick={handleDecreaseTemperature} />
                                :
                                <Image className="car-card-temp-num-btn-img" src={`https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/T-down${tempButtonIconSuffix}.png`} />
                                <Image className="car-card-temp-num-btn-img" src={`https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/T-down${decreaseButtonIconSuffix}.png`} />
                        }
                    </View>
                    <View className="car-card-temp-num-text">
@@ -332,25 +361,32 @@
                    <View className="car-card-temp-num-btn">
                        {
                            canAdjustTemperature ?
                                <Image className="car-card-temp-num-btn-img" src={`https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/T-up${tempButtonIconSuffix}.png`} onClick={() => handleTempChange(0.5)} />
                                <Image className="car-card-temp-num-btn-img" src={`https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/T-up${increaseButtonIconSuffix}.png`} onClick={handleIncreaseTemperature} />
                                :
                                <Image className="car-card-temp-num-btn-img" src={`https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/T-up${tempButtonIconSuffix}.png`} />
                                <Image className="car-card-temp-num-btn-img" src={`https://s.xiaopeng.com/xp-fe/robot-taxi/imgs/T-up${increaseButtonIconSuffix}.png`} />
                        }
                    </View>
                </View>
                <View className={`car-card-temp-switch ${acSwitchOn ? 'car-card-temp-switch-open' : ''}`.trim()} onClick={handleToggleAcSwitch}>
                    {
                        isTogglingAc ?
                            <Image className="car-card-temp-switch-img" style={{ visibility: 'hidden' }} src={AC_SWITCH_OPEN_ICON} />
                            :
                            acSwitchOn ?
                                <Image className="car-card-temp-switch-img" src={AC_SWITCH_CLOSE_ICON} />
                    <View className="car-card-temp-switch-icon">
                        {
                            isTogglingAc ?
                                <>
                                    <Image className="car-card-temp-switch-img" style={{ visibility: 'hidden' }} src={AC_SWITCH_OPEN_ICON} />
                                    <Image
                                        className="car-card-temp-switch-img car-card-temp-switch-img-spinning"
                                        style={{ position: 'absolute', left: 0, top: 0 }}
                                        src={AC_SWITCH_LOADING_ICON}
                                    />
                                </>
                                :
                                <Image className="car-card-temp-switch-img" src={AC_SWITCH_OPEN_ICON} />
                    }
                    {!isTogglingAc && <View className="car-card-temp-switch-text">空调开关</View>}
                    {isTogglingAc && <View className="car-card-temp-switch-text" style={{ visibility: 'hidden' }}>空调开关</View>}
                    {isTogglingAc && <Image className="car-card-temp-switch-img car-card-temp-switch-img-spinning" style={{ position: 'absolute' }} src={AC_SWITCH_LOADING_ICON} />}
                                acSwitchOn ?
                                    <Image className="car-card-temp-switch-img" src={AC_SWITCH_CLOSE_ICON} />
                                    :
                                    <Image className="car-card-temp-switch-img" src={AC_SWITCH_OPEN_ICON} />
                        }
                    </View>
                    <View className="car-card-temp-switch-text">空调开关</View>
                </View>
            </View>
        </View>
src/robotaxi/pages/begin-route/components/css-folder/calling-car.less
@@ -161,7 +161,7 @@
          flex-direction: column;
          align-items: center;
          justify-content: center;
          gap: 16px;
          gap: 20px;
          &-temp {
            font-size: 52px;
@@ -171,7 +171,7 @@
            color: rgba(0, 0, 0, 0.9);
          }
          &-desc {
          &-desc {/*  */
            font-size: 24px;
            font-weight: normal;
            line-height: 24px;
@@ -195,6 +195,14 @@
        align-items: center;
        justify-content: center;
        &-icon {
          position: relative;
          width: 68px;
          height: 68px;
          line-height: 0;
          flex-shrink: 0;
        }
        &-img {
          width: 68px;
          height: 68px;
@@ -208,7 +216,7 @@
        &-text {
          font-size: 24px;
          font-weight: normal;
          line-height: 40px;
          line-height: 35px;
          letter-spacing: normal;
          color: rgba(0, 0, 0, 0.9);
        }