实名认证
This commit is contained in:
parent
87f8ad3649
commit
e75f49b926
@ -219,7 +219,20 @@
|
|||||||
tologin()
|
tologin()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (!oUser['realNameStatus']) {
|
}
|
||||||
|
checkRealName((res)=>{
|
||||||
|
if(!res) return;
|
||||||
|
getOrder((flag) => {
|
||||||
|
if (flag) {
|
||||||
|
map.addOrder(onLoadData.value["number"], false, (res) => {
|
||||||
|
if (res) {
|
||||||
|
getOrder();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},nLoadData.value["number"],onLoadData.value['_tbScancodeApproach_']);
|
||||||
|
/* else if (!oUser['realNameStatus']) {
|
||||||
showModelMessage("请进行实名认证后骑行", "实名认证", true, "去认证").then(res => {
|
showModelMessage("请进行实名认证后骑行", "实名认证", true, "去认证").then(res => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@ -239,7 +252,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
} */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -317,18 +330,26 @@
|
|||||||
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"
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
checkRealName((res)=>{
|
||||||
|
if(!res) return;
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/user/login/TroubleReportUser"
|
url: "/pages/user/login/TroubleReportUser"
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
// else if (!oUser['realNameStatus']) {
|
||||||
|
|
||||||
|
// showModelMessage("请进行实名认证后骑行", "实名认证", true, "去认证").then(res => {
|
||||||
|
// if (res.confirm) {
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: "/pages/user/views/IdentityVerification"
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: "/pages/user/login/TroubleReportUser"
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
|
|
||||||
//申请站点
|
//申请站点
|
||||||
@ -336,7 +357,14 @@
|
|||||||
if (!oUser) {
|
if (!oUser) {
|
||||||
tologin();
|
tologin();
|
||||||
return;
|
return;
|
||||||
} else if (!oUser['realNameStatus']) {
|
}
|
||||||
|
checkRealName((res)=>{
|
||||||
|
if(!res) return;
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/user/scan/applysite"
|
||||||
|
})
|
||||||
|
})
|
||||||
|
/* else if (!oUser['realNameStatus']) {
|
||||||
showModelMessage("请进行实名认证后骑行", "实名认证", true, "去认证").then(res => {
|
showModelMessage("请进行实名认证后骑行", "实名认证", true, "去认证").then(res => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@ -347,7 +375,7 @@
|
|||||||
}
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/user/scan/applysite"
|
url: "/pages/user/scan/applysite"
|
||||||
})
|
}) */
|
||||||
}
|
}
|
||||||
|
|
||||||
//个人中心
|
//个人中心
|
||||||
@ -355,7 +383,14 @@
|
|||||||
if (!oUser) {
|
if (!oUser) {
|
||||||
tologin();
|
tologin();
|
||||||
return;
|
return;
|
||||||
} else if (!oUser['realNameStatus']) {
|
}
|
||||||
|
checkRealName((res)=>{
|
||||||
|
if(!res) return;
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/user/mine/MePage"
|
||||||
|
})
|
||||||
|
})
|
||||||
|
/* else if (!oUser['realNameStatus']) {
|
||||||
showModelMessage("请进行实名认证后骑行", "实名认证", true, "去认证").then(res => {
|
showModelMessage("请进行实名认证后骑行", "实名认证", true, "去认证").then(res => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@ -366,7 +401,7 @@
|
|||||||
}
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/user/mine/MePage"
|
url: "/pages/user/mine/MePage"
|
||||||
})
|
}) */
|
||||||
}
|
}
|
||||||
|
|
||||||
//扫描
|
//扫描
|
||||||
@ -374,7 +409,18 @@
|
|||||||
if (!oUser) {
|
if (!oUser) {
|
||||||
tologin();
|
tologin();
|
||||||
return;
|
return;
|
||||||
} else if (!oUser['realNameStatus']) {
|
}
|
||||||
|
checkRealName((res)=>{
|
||||||
|
if(!res) return;
|
||||||
|
const {
|
||||||
|
userId
|
||||||
|
} = oUser;
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/user/scan/scancode?type=ride"
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
/* else if (!oUser['realNameStatus']) {
|
||||||
showModelMessage("请进行实名认证后骑行", "实名认证", true, "去认证").then(res => {
|
showModelMessage("请进行实名认证后骑行", "实名认证", true, "去认证").then(res => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@ -388,7 +434,7 @@
|
|||||||
} = oUser;
|
} = oUser;
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/user/scan/scancode?type=ride"
|
url: "/pages/user/scan/scancode?type=ride"
|
||||||
})
|
}) */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -715,6 +761,7 @@
|
|||||||
getOrder();
|
getOrder();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log("999999999999999999",ismount);
|
||||||
if (ismount) getLoalcationData();
|
if (ismount) getLoalcationData();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -778,6 +825,26 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function checkRealName(callBack,number,_tbScancodeApproach_){
|
||||||
|
if (!oUser['realNameStatus']) {
|
||||||
|
showModelMessage("请先完成实名认证,再继续。", "实名认证", true, "去认证").then(res => {
|
||||||
|
if (res.confirm) {
|
||||||
|
let url="/pages/user/views/IdentityVerification";
|
||||||
|
if(number){
|
||||||
|
url=`${url}?number=${number}&_tbScancodeApproach_=${_tbScancodeApproach_}`;
|
||||||
|
}
|
||||||
|
uni.navigateTo({url});
|
||||||
|
callBack(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
callBack(false);
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
callBack(true);
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@ -146,10 +146,7 @@
|
|||||||
const updateUserProfile = () => {
|
const updateUserProfile = () => {
|
||||||
wx.getUserInfo({
|
wx.getUserInfo({
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
console.log(res.userInfo.nickName); // 昵称
|
|
||||||
console.log(res.userInfo.avatarUrl); // 头像URL
|
|
||||||
let wechat_user = JSON.parse(jkcBaseDecode(uni.getStorageSync("wechat_user")));
|
let wechat_user = JSON.parse(jkcBaseDecode(uni.getStorageSync("wechat_user")));
|
||||||
debugger
|
|
||||||
const params = {
|
const params = {
|
||||||
"userId": wechat_user.userId,
|
"userId": wechat_user.userId,
|
||||||
"nickname": res.userInfo.nickName,
|
"nickname": res.userInfo.nickName,
|
||||||
|
|||||||
@ -33,25 +33,29 @@
|
|||||||
} from 'vue';
|
} from 'vue';
|
||||||
import * as api from '@/utils/api.js';
|
import * as api from '@/utils/api.js';
|
||||||
import {
|
import {
|
||||||
showModelMessage
|
showModelMessage,jkcBaseDecode,jkcBaseEncode
|
||||||
} from '@/utils/tools.js';
|
} from '@/utils/tools.js';
|
||||||
import config from '@/utils/config';
|
import config from '@/utils/config';
|
||||||
import {
|
import {
|
||||||
onLoad
|
onLoad
|
||||||
} from '@dcloudio/uni-app';
|
} from '@dcloudio/uni-app';
|
||||||
|
|
||||||
const imgPath = config.imgPath;
|
const imgPath = config.imgPath;
|
||||||
|
|
||||||
const isloading = ref(false);
|
const isloading = ref(false);
|
||||||
const name = ref(''); // 用于存储姓名
|
const name = ref(''); // 用于存储姓名
|
||||||
const idCard = ref(''); // 用于存储身份证号
|
const idCard = ref(''); // 用于存储身份证号
|
||||||
const countdown = ref(60); // 设置倒计时时间为60秒
|
const countdown = ref(60); // 设置倒计时时间为60秒
|
||||||
const onLoadData = ref({})
|
const onLoadData = ref({});
|
||||||
|
|
||||||
|
const oUser = JSON.parse(jkcBaseDecode(uni.getStorageSync("wechat_user")));
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
if (options['number']) {
|
if (options['number']) {
|
||||||
onLoadData.value['number'] = options['number']
|
onLoadData.value['number'] = options['number']
|
||||||
onLoadData.value['_tbScancodeApproach_'] = options['_tbScancodeApproach_']
|
onLoadData.value['_tbScancodeApproach_'] = options['_tbScancodeApproach_']
|
||||||
}
|
};
|
||||||
|
|
||||||
})
|
})
|
||||||
const phonelogin = async () => {
|
const phonelogin = async () => {
|
||||||
if (!name.value || !idCard.value) {
|
if (!name.value || !idCard.value) {
|
||||||
@ -66,15 +70,34 @@
|
|||||||
}
|
}
|
||||||
// 如果验证通过,发起认证请求
|
// 如果验证通过,发起认证请求
|
||||||
isloading.value = true;
|
isloading.value = true;
|
||||||
setTimeout(() => {
|
const {
|
||||||
|
userId
|
||||||
|
} = oUser;
|
||||||
|
const params = {
|
||||||
|
userId,
|
||||||
|
name: name.value,
|
||||||
|
idCard: idCard.value
|
||||||
|
}
|
||||||
|
api.callOrdereApi("ebikeUser/verifyRealName",params,"post").then(res=>{
|
||||||
|
const{message,code,data}=res;
|
||||||
|
if(code!=200){
|
||||||
|
showModelMessage(message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
showModelMessage("认证成功!");
|
||||||
|
}
|
||||||
isloading.value = false;
|
isloading.value = false;
|
||||||
|
oUser.realNameStatus=true;
|
||||||
|
uni.setStorageSync('wechat_user', jkcBaseEncode(JSON
|
||||||
|
.stringify(oUser)));
|
||||||
// 假设成功认证后跳转
|
// 假设成功认证后跳转
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/user/home/home?number=" + onLoadData.value['number'] +
|
url: "/pages/user/home/home?number=" + onLoadData.value['number'] +
|
||||||
"&_tbScancodeApproach_=" + onLoadData.value[
|
"&_tbScancodeApproach_=" + onLoadData.value[
|
||||||
'_tbScancodeApproach_']
|
'_tbScancodeApproach_']
|
||||||
});
|
});
|
||||||
}, 1000);
|
})
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user