申请考点提示
Showing
2 changed files
with
39 additions
and
24 deletions
| ... | @@ -191,20 +191,24 @@ function register() { | ... | @@ -191,20 +191,24 @@ function register() { |
| 191 | return | 191 | return |
| 192 | } | 192 | } |
| 193 | 193 | ||
| 194 | groupMemberRegister(registerForm.value) | 194 | groupMemberRegister(registerForm.value) |
| 195 | .then((res) => { | 195 | .then((res) => { |
| 196 | showModal({ | 196 | showModal({ |
| 197 | title: '提示', | 197 | title: '提示', |
| 198 | content: `恭喜你,您的账号 ${registerForm.value.telNo} 注册成功!`, | 198 | content: `恭喜你,您的账号 ${registerForm.value.telNo} 注册成功!`, |
| 199 | cancelText: '取消', | 199 | cancelText: '取消', |
| 200 | confirmText: '去登录', | 200 | confirmText: '去登录', |
| 201 | onConfirm: () => { | 201 | onConfirm: () => { |
| 202 | registerForm.value = {} | 202 | registerForm.value = {} |
| 203 | goLogin() | 203 | goLogin() |
| 204 | } | 204 | } |
| 205 | }) | 205 | }) |
| 206 | }) | 206 | }).catch((err) => { |
| 207 | } | 207 | if (isServer500(err)) { |
| 208 | getCode() | ||
| 209 | } | ||
| 210 | }) | ||
| 211 | } | ||
| 208 | 212 | ||
| 209 | // 密码校验:8~18位大小写字母加数字加特殊符号组合 | 213 | // 密码校验:8~18位大小写字母加数字加特殊符号组合 |
| 210 | function validPassword(pwd) { | 214 | function validPassword(pwd) { |
| ... | @@ -278,15 +282,23 @@ function goLogin() { | ... | @@ -278,15 +282,23 @@ function goLogin() { |
| 278 | }); | 282 | }); |
| 279 | } | 283 | } |
| 280 | 284 | ||
| 281 | function getCode() { | 285 | function getCode() { |
| 282 | getCodeImg().then((res) => { | 286 | getCodeImg().then((res) => { |
| 283 | codeUrl.value = 'data:image/gif;base64,' + res.data.img | 287 | codeUrl.value = 'data:image/gif;base64,' + res.data.img |
| 284 | registerForm.value.uuid = res.data.uuid | 288 | registerForm.value.uuid = res.data.uuid |
| 285 | }) | 289 | }) |
| 286 | } | 290 | } |
| 287 | 291 | ||
| 288 | // 发送短信验证码 | 292 | function isServer500(err) { |
| 289 | function getCaptchaSms() { | 293 | const message = String(err?.message || err?.errMsg || '') |
| 294 | return err?.statusCode === 500 || | ||
| 295 | err?.code === 500 || | ||
| 296 | err?.data?.code === 500 || | ||
| 297 | message.includes('HTTP 500') | ||
| 298 | } | ||
| 299 | |||
| 300 | // 发送短信验证码 | ||
| 301 | function getCaptchaSms() { | ||
| 290 | if (!registerForm.value.telNo) { | 302 | if (!registerForm.value.telNo) { |
| 291 | uni.showToast({ | 303 | uni.showToast({ |
| 292 | title: '手机号不能为空', | 304 | title: '手机号不能为空', |
| ... | @@ -443,4 +455,4 @@ function timeup() { | ... | @@ -443,4 +455,4 @@ function timeup() { |
| 443 | width: 100vw; | 455 | width: 100vw; |
| 444 | justify-content: center; | 456 | justify-content: center; |
| 445 | } | 457 | } |
| 446 | </style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 458 | </style> | ... | ... |
| ... | @@ -405,11 +405,14 @@ function checkDialogs() { | ... | @@ -405,11 +405,14 @@ function checkDialogs() { |
| 405 | 405 | ||
| 406 | async function checkExamPointDialog() { | 406 | async function checkExamPointDialog() { |
| 407 | console.log('checkExamPointDialog', app.globalData.userInfo.hintFlag ) | 407 | console.log('checkExamPointDialog', app.globalData.userInfo.hintFlag ) |
| 408 | // const [err, res] = await to(api.getMyRecentExam()) | 408 | const [err, res] = await to(api.getMyRecentExam()) |
| 409 | // if (err || !res?.data) return | 409 | if (err) return |
| 410 | // const status = res.data?.auditStatus | 410 | const examData = res?.data |
| 411 | const status = examData?.auditStatus | ||
| 412 | const canShowByExamStatus = examData == null || status == 0 || status == 3 | ||
| 411 | // (status == 0 || status == 3) && | 413 | // (status == 0 || status == 3) && |
| 412 | if ( | 414 | console.log('122', app.globalData.memberInfo?.activeStatus,app.globalData.authenticationStatus,app.globalData.deptType,app.globalData.userInfo.hintFlag, app.globalData.memberInfo?.isPoints) |
| 415 | if (canShowByExamStatus && | ||
| 413 | app.globalData.memberInfo?.activeStatus == 1 && | 416 | app.globalData.memberInfo?.activeStatus == 1 && |
| 414 | app.globalData.authenticationStatus == 2 && | 417 | app.globalData.authenticationStatus == 2 && |
| 415 | app.globalData.deptType == 6 && | 418 | app.globalData.deptType == 6 && | ... | ... |
-
Please register or sign in to post a comment