增加运营区和停车区检查

This commit is contained in:
小小 2025-05-07 16:02:37 +08:00
parent b81eb55cb5
commit f6bb048cde
3 changed files with 31 additions and 2 deletions

View File

@ -477,6 +477,33 @@
// //
function endRiding() { function endRiding() {
checkBikeEnding();
}
function checkBikeEnding(callback){
const {
bikeCode
} = orderData;
const params={bikeCode}
//
const arrMethod=[callOrdereApi("userOrders/checkBikeInOperation", params, "get")
,callOrdereApi("userOrders/checkBikeInParking", params, "get")]
Promise.all(arrMethod).then(([res1,res2])=>{
if(res1.code!=200){
showModelMessage(res1.message);
return;
}
if(res2.code!=200){
showModelMessage(res2.message);
return;
}
doneRide();
});
}
//
function doneRide(){
const { const {
userId userId
} = oUser; } = oUser;
@ -500,7 +527,6 @@
completeRiding(); completeRiding();
openOrderPay(); openOrderPay();
}) })
} }
// //

View File

@ -64,6 +64,7 @@
const showWorn = ref(false); const showWorn = ref(false);
const oUser = uni.getStorageSync("wechat_user"); const oUser = uni.getStorageSync("wechat_user");
let type = null; let type = null;
let errdata=null;
onLoad((options) => { onLoad((options) => {
type = options["type"]; type = options["type"];
@ -80,6 +81,8 @@
result result
} = res.detail; } = res.detail;
if (!result || result.indexOf("number") == -1) { if (!result || result.indexOf("number") == -1) {
if(errdata==result) return;
errdata=result;
showModelMessage("无效的车辆二维码"); showModelMessage("无效的车辆二维码");
return; return;
} }

View File

@ -1,5 +1,5 @@
const config = { const config = {
apiUrl: "http://192.168.2.151:10010/", apiUrl: "http://192.168.2.239:10010/",
//apiUrl: "https://www.cdzhuojing.cn/", //apiUrl: "https://www.cdzhuojing.cn/",
cdnPath: "/", cdnPath: "/",
ERR_OK: 200, ERR_OK: 200,