放心行(约客多 2026/6/22 最新版本改版)
hejianhao
2026-07-13 1e6a104e5f8561f9c7fdf9387639c056fb87df5e
fix(miniprogram): 修复支付组件弹窗状态并优化选址页面搜索逻辑

1. 修复pal-pay组件订单类型为2时错误设置isShowClose为true的问题,新增跳转至等待页并传递完整订单参数的逻辑
2. 为setLocation页面添加搜索状态标记,重构页面模板以分离历史记录与搜索结果展示,修复重复wx:if问题
3个文件已修改
56 ■■■■■ 已修改文件
miniprogram/components/pal-pay/pal-pay.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
miniprogram/pages/setLocation/setLocation.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
miniprogram/pages/setLocation/setLocation.wxml 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
miniprogram/components/pal-pay/pal-pay.js
@@ -208,9 +208,27 @@
            if (Number(payPayData.orderType) === 2) {
                currentPage.setData({
                    showPayVan: false,
                    isShowClose: true,
                    isShowClose: false,
                    closeDialogSource: 'taxiPay'
                })
                wx.navigateTo({
                        url: "../../pages/waiting/waiting?startAddress=" +
                        this.data.payPayData.startAddress +
                            "&startLat=" +
                            this.data.payPayData.startLat +
                            "&startLon=" +
                            this.data.payPayData.startLon +
                            "&endAddress=" +
                            this.data.payPayData.endAddress +
                            "&endLat=" +
                            this.data.payPayData.endLat +
                            "&endLon=" +
                            this.data.payPayData.endLon +
                            "&time=" +
                            this.data.payPayData.travelTime +
                            "&orderType=" +
                            this.data.payPayData.orderType,
                    });
                return
            }
            if (Number(payPayData.cancelType) !== 1) {
miniprogram/pages/setLocation/setLocation.js
@@ -273,6 +273,9 @@
    getInputValue(e) {
        console.log(e)
        let inputValue = e.detail.value
        this.setData({
            isSearching: !!inputValue
        })
        this.getLocation(inputValue)
        // if(){}
    },
miniprogram/pages/setLocation/setLocation.wxml
@@ -38,6 +38,24 @@
    </view>
    <!--接入历史的数据-->
    <scroll-view class="history_box" scroll-y>
        <block wx:if="{{!isSearching && historyAddressList && historyAddressList.length > 0}}">
            <view class="history_search" wx:key="index" wx:if="{{!item.location.length==0}}" wx:for="{{historyAddressList}}" data-self="{{item}}" catchtap="historyUpdatePlace" data-index="{{index}}">
                <view class="img_icon" >
                    <image src="../../img/icon_history.png" class="history_icon"></image>
                </view>
                <!--搜索的内容-->
                <view class="history_text" >
                    <view class="history_text_name">{{item.name}}</view>
                    <view class="history_text_address">{{item.address||'无'}}</view>
                </view>
            </view>
            <!--清空历史记录-->
            <!--<view class="clear_history" catchtap="clearEnd">
                <image src="../../img/icon_empty.png" class="clear_icon"></image>
                <view>清空历史记录</view>
            </view>-->
        </block>
        <view class="history_search" wx:for="{{addressList}}" wx:key="index" wx:if="{{!item.location.length==0}}" data-self="{{item}}" catchtap="updatePlace" data-index="{{index}}">
            <view class="img_icon" >
                <image src="../../img/icon_history.png" class="history_icon"></image>
@@ -47,21 +65,6 @@
                <view class="history_text_name">{{item.name}}</view>
                <view class="history_text_address">{{item.address||'无'}}</view>
            </view>
        </view>
        <view class="history_search" wx:if="{{addressList.length==0}}" wx:key="index" wx:if="{{!item.location.length==0}}" wx:for="{{historyAddressList}}" data-self="{{item}}" catchtap="historyUpdatePlace" data-index="{{index}}">
            <view class="img_icon" >
                <image src="../../img/icon_history.png" class="history_icon"></image>
            </view>
            <!--搜索的内容-->
            <view class="history_text" >
                <view class="history_text_name">{{item.name}}</view>
                <view class="history_text_address">{{item.address||'无'}}</view>
            </view>
        </view>
        <!--清空历史记录-->
        <view class="clear_history" wx:if="{{addressList.length == 0 && historyAddressList.length !== 0}}" catchtap="clearEnd">
            <image src="../../img/icon_empty.png" class="clear_icon"></image>
            <view>清空历史记录</view>
        </view>
    </scroll-view>
</view>