增加运营区和停车区检查
This commit is contained in:
parent
b81eb55cb5
commit
f6bb048cde
@ -477,6 +477,33 @@
|
||||
|
||||
//结束用车
|
||||
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 {
|
||||
userId
|
||||
} = oUser;
|
||||
@ -500,7 +527,6 @@
|
||||
completeRiding();
|
||||
openOrderPay();
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
//继续骑行 需要开锁
|
||||
|
||||
@ -64,6 +64,7 @@
|
||||
const showWorn = ref(false);
|
||||
const oUser = uni.getStorageSync("wechat_user");
|
||||
let type = null;
|
||||
let errdata=null;
|
||||
|
||||
onLoad((options) => {
|
||||
type = options["type"];
|
||||
@ -80,6 +81,8 @@
|
||||
result
|
||||
} = res.detail;
|
||||
if (!result || result.indexOf("number") == -1) {
|
||||
if(errdata==result) return;
|
||||
errdata=result;
|
||||
showModelMessage("无效的车辆二维码");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
const config = {
|
||||
apiUrl: "http://192.168.2.151:10010/",
|
||||
apiUrl: "http://192.168.2.239:10010/",
|
||||
//apiUrl: "https://www.cdzhuojing.cn/",
|
||||
cdnPath: "/",
|
||||
ERR_OK: 200,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user