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