fix: 添加加载状态并优化页面跳转逻辑

在订单处理流程中添加加载状态提示,避免用户误操作
统一处理成功和失败情况下的页面跳转,增加1-2秒延迟
移除washing页面中未使用的客服电话组件
This commit is contained in:
2026-01-05 12:38:23 +08:00
parent 350bb5a86b
commit dd4f2cea4a
2 changed files with 22 additions and 11 deletions

View File

@@ -98,18 +98,30 @@ Page({
orderid: orderid, orderid: orderid,
method: "POST" method: "POST"
}, !0).then(function () { }, !0).then(function () {
wx.redirectTo({ wx.showLoading({ title: "" });
url: "/pages/washing/washing" setTimeout(function () {
}); wx.hideLoading();
wx.redirectTo({
url: "/pages/washing/washing"
});
}, 2000);
}).catch(function () { }).catch(function () {
wx.redirectTo({ wx.showLoading({ title: "" });
url: "/pages/washing/washing" setTimeout(function () {
}); wx.hideLoading();
wx.redirectTo({
url: "/pages/washing/washing"
});
}, 1000);
}); });
} else { } else {
wx.redirectTo({ wx.showLoading({ title: "" });
url: "/pages/washing/washing" setTimeout(function () {
}); wx.hideLoading();
wx.redirectTo({
url: "/pages/washing/washing"
});
}, 1000);
} }
} }
}); });

View File

@@ -38,5 +38,4 @@
</view> </view>
<view class="btn"> <view class="btn">
<button type="primary" bindtap="handleSettlement">结 算 洗 车</button> <button type="primary" bindtap="handleSettlement">结 算 洗 车</button>
</view> </view>
<service-tel></service-tel>