8d9389d9 by lttnew

申请考点提示

1 parent 4eb1ea9e
......@@ -191,20 +191,24 @@ function register() {
return
}
groupMemberRegister(registerForm.value)
.then((res) => {
showModal({
title: '提示',
content: `恭喜你,您的账号 ${registerForm.value.telNo} 注册成功!`,
groupMemberRegister(registerForm.value)
.then((res) => {
showModal({
title: '提示',
content: `恭喜你,您的账号 ${registerForm.value.telNo} 注册成功!`,
cancelText: '取消',
confirmText: '去登录',
onConfirm: () => {
registerForm.value = {}
goLogin()
}
})
})
}
goLogin()
}
})
}).catch((err) => {
if (isServer500(err)) {
getCode()
}
})
}
// 密码校验:8~18位大小写字母加数字加特殊符号组合
function validPassword(pwd) {
......@@ -278,15 +282,23 @@ function goLogin() {
});
}
function getCode() {
getCodeImg().then((res) => {
codeUrl.value = 'data:image/gif;base64,' + res.data.img
registerForm.value.uuid = res.data.uuid
})
}
// 发送短信验证码
function getCaptchaSms() {
function getCode() {
getCodeImg().then((res) => {
codeUrl.value = 'data:image/gif;base64,' + res.data.img
registerForm.value.uuid = res.data.uuid
})
}
function isServer500(err) {
const message = String(err?.message || err?.errMsg || '')
return err?.statusCode === 500 ||
err?.code === 500 ||
err?.data?.code === 500 ||
message.includes('HTTP 500')
}
// 发送短信验证码
function getCaptchaSms() {
if (!registerForm.value.telNo) {
uni.showToast({
title: '手机号不能为空',
......@@ -443,4 +455,4 @@ function timeup() {
width: 100vw;
justify-content: center;
}
</style>
\ No newline at end of file
</style>
......
......@@ -405,11 +405,14 @@ function checkDialogs() {
async function checkExamPointDialog() {
console.log('checkExamPointDialog', app.globalData.userInfo.hintFlag )
// const [err, res] = await to(api.getMyRecentExam())
// if (err || !res?.data) return
// const status = res.data?.auditStatus
const [err, res] = await to(api.getMyRecentExam())
if (err) return
const examData = res?.data
const status = examData?.auditStatus
const canShowByExamStatus = examData == null || status == 0 || status == 3
// (status == 0 || status == 3) &&
if (
console.log('122', app.globalData.memberInfo?.activeStatus,app.globalData.authenticationStatus,app.globalData.deptType,app.globalData.userInfo.hintFlag, app.globalData.memberInfo?.isPoints)
if (canShowByExamStatus &&
app.globalData.memberInfo?.activeStatus == 1 &&
app.globalData.authenticationStatus == 2 &&
app.globalData.deptType == 6 &&
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!