扫码校验登录实名认证

This commit is contained in:
dzl 2025-05-30 13:53:37 +08:00
parent a8a2f969b3
commit b21681991d

View File

@ -177,8 +177,6 @@
const orderState = ref(0); const orderState = ref(0);
const showOrderPay = ref(false); const showOrderPay = ref(false);
// //
let arrBikeData = []; let arrBikeData = [];
const showBikeInfo = ref(false); const showBikeInfo = ref(false);
@ -188,6 +186,7 @@
let arrSiteData = [] let arrSiteData = []
onLoad((query) => { onLoad((query) => {
if (query.q) { if (query.q) {
const q = decodeURIComponent(query.q) // const q = decodeURIComponent(query.q) //
const scancode_time = parseInt(query.scancode_time) // UNIX const scancode_time = parseInt(query.scancode_time) // UNIX
@ -198,10 +197,8 @@
const [key, value] = param.split('='); const [key, value] = param.split('=');
p[key] = value; p[key] = value;
}); });
console.log("p===>" + JSON.stringify(p))
onLoadData.value = p; onLoadData.value = p;
} else if (query.number) { } else if (query.number) {
console.log("query" + JSON.stringify(query))
onLoadData.value['number'] = query.number; onLoadData.value['number'] = query.number;
onLoadData.value['_tbScancodeApproach_'] = query._tbScancodeApproach_; onLoadData.value['_tbScancodeApproach_'] = query._tbScancodeApproach_;
} }
@ -214,19 +211,36 @@
}); });
ismount = true; ismount = true;
getLoalcationData(); getLoalcationData();
console.log("loadValue===>" + JSON.stringify(onLoadData.value))
if (onLoadData.value) { if (onLoadData.value) {
if (onLoadData.value['_tbScancodeApproach_'] == 'scan') { if (onLoadData.value['_tbScancodeApproach_'] == 'scan') {
if (!oUser) { if (!oUser) {
tologin(); showModelMessage("登录后开始骑行", "登录提醒", true, "去登录").then(res => {
if (res.confirm) {
tologin()
} }
})
} else if (!oUser['realNameStatus']) {
showModelMessage("请进行实名认证后骑行", "实名认证", true, "去认证").then(res => {
if (res.confirm) {
uni.navigateTo({
url: "/pages/user/views/IdentityVerification?number=" + onLoadData
.value["number"] + "&_tbScancodeApproach_=" + onLoadData.value[
'_tbScancodeApproach_']
})
}
})
} else {
getOrder((flag) => {
if (flag) {
map.addOrder(onLoadData.value["number"], false, (res) => { map.addOrder(onLoadData.value["number"], false, (res) => {
console.log("00000000000000000000", res);
if (res) { if (res) {
getOrder(); getOrder();
} }
}) })
} }
});
}
}
} }
}) })
@ -303,6 +317,14 @@
if (!oUser) { if (!oUser) {
tologin(); tologin();
return; return;
} else if (!oUser['realNameStatus']) {
showModelMessage("请进行实名认证后骑行", "实名认证", true, "去认证").then(res => {
if (res.confirm) {
uni.navigateTo({
url: "/pages/user/views/IdentityVerification"
})
}
})
} }
uni.navigateTo({ uni.navigateTo({
url: "/pages/user/login/TroubleReportUser" url: "/pages/user/login/TroubleReportUser"
@ -314,6 +336,14 @@
if (!oUser) { if (!oUser) {
tologin(); tologin();
return; return;
} else if (!oUser['realNameStatus']) {
showModelMessage("请进行实名认证后骑行", "实名认证", true, "去认证").then(res => {
if (res.confirm) {
uni.navigateTo({
url: "/pages/user/views/IdentityVerification"
})
}
})
} }
uni.navigateTo({ uni.navigateTo({
url: "/pages/user/scan/applysite" url: "/pages/user/scan/applysite"
@ -325,6 +355,14 @@
if (!oUser) { if (!oUser) {
tologin(); tologin();
return; return;
} else if (!oUser['realNameStatus']) {
showModelMessage("请进行实名认证后骑行", "实名认证", true, "去认证").then(res => {
if (res.confirm) {
uni.navigateTo({
url: "/pages/user/views/IdentityVerification"
})
}
})
} }
uni.navigateTo({ uni.navigateTo({
url: "/pages/user/mine/MePage" url: "/pages/user/mine/MePage"
@ -336,20 +374,24 @@
if (!oUser) { if (!oUser) {
tologin(); tologin();
return; return;
} else if (!oUser['realNameStatus']) {
showModelMessage("请进行实名认证后骑行", "实名认证", true, "去认证").then(res => {
if (res.confirm) {
uni.navigateTo({
url: "/pages/user/views/IdentityVerification"
})
}
})
} }
const { const {
userId userId
} = oUser; } = oUser;
console.log("11111" + getCurrentPages());
uni.navigateTo({ uni.navigateTo({
url: "/pages/user/scan/scancode?type=ride" url: "/pages/user/scan/scancode?type=ride"
}) })
} }
// //
function openOrderPay() { function openOrderPay() {
showTools.value = false; showTools.value = false;
@ -357,7 +399,7 @@
} }
// //
function getOrder() { function getOrder(callBack) {
const { const {
userId userId
} = oUser; } = oUser;
@ -371,10 +413,12 @@
} = res; } = res;
if (code != 200) { if (code != 200) {
showModelMessage(message); showModelMessage(message);
if (callBack) callBack(true)
return; return;
} }
if (!data) { // if (!data) { //
completeRiding(); completeRiding();
if (callBack) callBack(true)
return; return;
} }
const { const {
@ -424,6 +468,7 @@
// } // }
}) })
} }
const getOrderInfo = (bikeCode) => { const getOrderInfo = (bikeCode) => {
const params = { const params = {
"userId": oUser.userId, "userId": oUser.userId,
@ -670,7 +715,6 @@
getOrder(); getOrder();
} }
} }
if (ismount) getLoalcationData(); if (ismount) getLoalcationData();
}); });