fix: 添加加载状态并优化页面跳转逻辑
在订单处理流程中添加加载状态提示,避免用户误操作 统一处理成功和失败情况下的页面跳转,增加1-2秒延迟 移除washing页面中未使用的客服电话组件
This commit is contained in:
@@ -98,18 +98,30 @@ Page({
|
|||||||
orderid: orderid,
|
orderid: orderid,
|
||||||
method: "POST"
|
method: "POST"
|
||||||
}, !0).then(function () {
|
}, !0).then(function () {
|
||||||
|
wx.showLoading({ title: "" });
|
||||||
|
setTimeout(function () {
|
||||||
|
wx.hideLoading();
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: "/pages/washing/washing"
|
url: "/pages/washing/washing"
|
||||||
});
|
});
|
||||||
|
}, 2000);
|
||||||
}).catch(function () {
|
}).catch(function () {
|
||||||
|
wx.showLoading({ title: "" });
|
||||||
|
setTimeout(function () {
|
||||||
|
wx.hideLoading();
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: "/pages/washing/washing"
|
url: "/pages/washing/washing"
|
||||||
});
|
});
|
||||||
|
}, 1000);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
wx.showLoading({ title: "" });
|
||||||
|
setTimeout(function () {
|
||||||
|
wx.hideLoading();
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: "/pages/washing/washing"
|
url: "/pages/washing/washing"
|
||||||
});
|
});
|
||||||
|
}, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -39,4 +39,3 @@
|
|||||||
<view class="btn">
|
<view class="btn">
|
||||||
<button type="primary" bindtap="handleSettlement">结 算 洗 车</button>
|
<button type="primary" bindtap="handleSettlement">结 算 洗 车</button>
|
||||||
</view>
|
</view>
|
||||||
<service-tel></service-tel>
|
|
||||||
Reference in New Issue
Block a user