增加运营区和停车区检查
This commit is contained in:
parent
b81eb55cb5
commit
f6bb048cde
@ -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();
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//继续骑行 需要开锁
|
//继续骑行 需要开锁
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user