feat: 添加归还成功页面及相关功能
在 `pages.json` 中新增归还成功页面的配置,并在 `order/success.vue` 中实现设备状态提示和加载动画。同时,更新了订单支付逻辑,确保在支付成功后能够正确弹出充电宝。优化了订单状态查询和处理逻辑,提升用户体验。
This commit is contained in:
+19
-9
@@ -36,16 +36,11 @@ const getDeviceInfo = (deviceNo) => {
|
||||
});
|
||||
};
|
||||
const queryById = (id) => {
|
||||
common_vendor.index.__f__("log", "at config/user.js:59", `查询订单详情, orderId: ${id}`);
|
||||
return config_http.request({
|
||||
url: `/app/order/${id}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
const overOrderById = (orderId) => {
|
||||
common_vendor.index.__f__("log", "at config/user.js:78", `调用结束订单API, orderId: ${orderId}`);
|
||||
return config_http.request({
|
||||
url: `/app/order/close/${orderId}`,
|
||||
method: "get"
|
||||
method: "get",
|
||||
hideLoading: true
|
||||
});
|
||||
};
|
||||
const rentPowerBank = (deviceNo, phone) => {
|
||||
@@ -55,12 +50,27 @@ const rentPowerBank = (deviceNo, phone) => {
|
||||
data: { deviceNo, phone }
|
||||
});
|
||||
};
|
||||
const confirmPaymentAndRent = (orderId) => {
|
||||
common_vendor.index.__f__("log", "at config/user.js:98", `确认支付并弹出充电宝, orderId: ${orderId}`);
|
||||
return config_http.request({
|
||||
url: `/app/device/confirmPaymentAndRent?orderId=${orderId}`,
|
||||
method: "post"
|
||||
});
|
||||
};
|
||||
const sendRentCommand = (orderId) => {
|
||||
common_vendor.index.__f__("log", "at config/user.js:107", `直接发送租借指令, orderId: ${orderId}`);
|
||||
return config_http.request({
|
||||
url: `/app/device/sendRentCommand?orderId=${orderId}`,
|
||||
method: "post"
|
||||
});
|
||||
};
|
||||
exports.confirmPaymentAndRent = confirmPaymentAndRent;
|
||||
exports.getDeviceInfo = getDeviceInfo;
|
||||
exports.getMyIndexInfo = getMyIndexInfo;
|
||||
exports.getOrderList = getOrderList;
|
||||
exports.login = login;
|
||||
exports.overOrderById = overOrderById;
|
||||
exports.queryById = queryById;
|
||||
exports.queryHasOrder = queryHasOrder;
|
||||
exports.rentPowerBank = rentPowerBank;
|
||||
exports.sendRentCommand = sendRentCommand;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/config/user.js.map
|
||||
|
||||
Reference in New Issue
Block a user