会员过期提醒
Showing
3 changed files
with
45 additions
and
31 deletions
| ... | @@ -507,7 +507,7 @@ function payTheFees() { | ... | @@ -507,7 +507,7 @@ function payTheFees() { |
| 507 | height: 100%; | 507 | height: 100%; |
| 508 | top: 0; | 508 | top: 0; |
| 509 | left: 0; | 509 | left: 0; |
| 510 | background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7)); | 510 | // background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7)); |
| 511 | } | 511 | } |
| 512 | 512 | ||
| 513 | text { | 513 | text { | ... | ... |
| ... | @@ -234,43 +234,62 @@ function checkImgExist() { | ... | @@ -234,43 +234,62 @@ function checkImgExist() { |
| 234 | } | 234 | } |
| 235 | 235 | ||
| 236 | function handleAccountStatus() { | 236 | function handleAccountStatus() { |
| 237 | console.log('handleAccountStatus22',userType.value , app.globalData.authenticationStatus) | 237 | const authStatus = String(app.globalData.authenticationStatus) |
| 238 | if (userType.value != '1' && app.globalData.authenticationStatus != '2' && app.globalData.authenticationStatus != '4') { | 238 | const memberInfoData = app.globalData.memberInfo || {} |
| 239 | const activeStatus = memberInfoData.activeStatus | ||
| 240 | |||
| 241 | if (!app.globalData.authenticationStatus || authStatus === 'undefined' || authStatus === '0' || authStatus === '3') { | ||
| 239 | uni.navigateTo({ url: '/pages/index/perfect' }) | 242 | uni.navigateTo({ url: '/pages/index/perfect' }) |
| 240 | return | 243 | return |
| 241 | } | 244 | } |
| 242 | 245 | ||
| 243 | if (app.globalData.authenticationStatus == '5') { | 246 | if (authStatus === '1') { |
| 244 | const content = app.globalData.genFlag == 1 ? '您的会员已过期' : '会员已过期,请及时续费' | 247 | if (!memberInfoData.memCode) { |
| 245 | uni.showModal({ | 248 | uni.navigateTo({ url: '/pages/index/perfect' }) |
| 246 | title: '提示', | ||
| 247 | content, | ||
| 248 | success: (res) => { | ||
| 249 | if (res.confirm && app.globalData.genFlag != 1) { | ||
| 250 | uni.navigateTo({ url: '/myCenter/auth' }) | ||
| 251 | } | 249 | } |
| 250 | return | ||
| 251 | } | ||
| 252 | |||
| 253 | if (authStatus === '2') { | ||
| 254 | if (activeStatus == 0) { | ||
| 255 | showMemberStatusDialog('你的会员未激活,请前去激活!', true) | ||
| 252 | } | 256 | } |
| 253 | }) | ||
| 254 | return | 257 | return |
| 255 | } | 258 | } |
| 256 | 259 | ||
| 257 | if (app.globalData.authenticationStatus == '4') { | 260 | if (authStatus === '4') { |
| 258 | uni.showModal({ | 261 | if (activeStatus == 0) { |
| 259 | title: '提示', | 262 | showMemberStatusDialog('你的会员未激活,请前去激活!', true) |
| 260 | content: '你的会员即将过期,将会影响你的业务,请及时续费' | 263 | return |
| 261 | }) | 264 | } |
| 265 | showMemberStatusDialog('你的会员即将过期,将会影响你的业务,请及时续费!', false) | ||
| 266 | return | ||
| 262 | } | 267 | } |
| 263 | 268 | ||
| 264 | if (app.globalData.memberInfo?.activeStatus == 0) { | 269 | if (authStatus === '5') { |
| 265 | uni.showModal({ | 270 | if (activeStatus == 0) { |
| 266 | content: '账号未激活,请前去激活', | 271 | showMemberStatusDialog('你的会员未激活,请前去激活!', true) |
| 267 | success: (res) => { | 272 | return |
| 268 | if (res.confirm) { | 273 | } |
| 274 | const content = app.globalData.genFlag != 1 | ||
| 275 | ? '您的会员已过期,将会影响你的业务办理,请及时续费!' | ||
| 276 | : '您的会员已过期!' | ||
| 277 | showMemberStatusDialog(content, app.globalData.genFlag != 1) | ||
| 278 | } | ||
| 279 | } | ||
| 280 | |||
| 281 | function showMemberStatusDialog(content, shouldGoAuth) { | ||
| 282 | showModal({ | ||
| 283 | title: '提示', | ||
| 284 | content, | ||
| 285 | showCancel: false, | ||
| 286 | confirmText: '确定', | ||
| 287 | onConfirm: () => { | ||
| 288 | if (shouldGoAuth) { | ||
| 269 | uni.navigateTo({ url: '/myCenter/auth' }) | 289 | uni.navigateTo({ url: '/myCenter/auth' }) |
| 270 | } | 290 | } |
| 271 | } | 291 | } |
| 272 | }) | 292 | }) |
| 273 | } | ||
| 274 | } | 293 | } |
| 275 | 294 | ||
| 276 | function goPath(path) { | 295 | function goPath(path) { |
| ... | @@ -404,14 +423,11 @@ function checkDialogs() { | ... | @@ -404,14 +423,11 @@ function checkDialogs() { |
| 404 | } | 423 | } |
| 405 | 424 | ||
| 406 | async function checkExamPointDialog() { | 425 | async function checkExamPointDialog() { |
| 407 | console.log('checkExamPointDialog', app.globalData.userInfo.hintFlag ) | ||
| 408 | const [err, res] = await to(api.getMyRecentExam()) | 426 | const [err, res] = await to(api.getMyRecentExam()) |
| 409 | if (err) return | 427 | if (err) return |
| 410 | const examData = res?.data | 428 | const examData = res?.data |
| 411 | const status = examData?.auditStatus | 429 | const status = examData?.auditStatus |
| 412 | const canShowByExamStatus = examData == null || status == 0 || status == 3 | 430 | const canShowByExamStatus = examData == null || status == 0 || status == 3 |
| 413 | // (status == 0 || status == 3) && | ||
| 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 && | 431 | if (canShowByExamStatus && |
| 416 | app.globalData.memberInfo?.activeStatus == 1 && | 432 | app.globalData.memberInfo?.activeStatus == 1 && |
| 417 | app.globalData.authenticationStatus == 2 && | 433 | app.globalData.authenticationStatus == 2 && | ... | ... |
| ... | @@ -592,12 +592,10 @@ onUnmounted(() => { | ... | @@ -592,12 +592,10 @@ onUnmounted(() => { |
| 592 | align-items: center; | 592 | align-items: center; |
| 593 | margin-top: 14rpx; | 593 | margin-top: 14rpx; |
| 594 | padding: 16rpx 0 0; | 594 | padding: 16rpx 0 0; |
| 595 | // border-top: 1rpx dashed #f0f0f0; | ||
| 596 | margin-bottom: 10rpx; | 595 | margin-bottom: 10rpx; |
| 597 | padding-bottom: 14rpx; | 596 | padding-bottom: 14rpx; |
| 598 | // border-bottom: 1rpx dashed #f0f0f0; | ||
| 599 | border: 20rpx; | 597 | border: 20rpx; |
| 600 | background-color: #f0f0f0; | 598 | background-color: #f4f9fd; |
| 601 | } | 599 | } |
| 602 | 600 | ||
| 603 | .summary-item { | 601 | .summary-item { |
| ... | @@ -631,10 +629,10 @@ onUnmounted(() => { | ... | @@ -631,10 +629,10 @@ onUnmounted(() => { |
| 631 | .btn { | 629 | .btn { |
| 632 | width: 108rpx; | 630 | width: 108rpx; |
| 633 | height: 48rpx; | 631 | height: 48rpx; |
| 634 | line-height: 48rpx; | 632 | line-height: 46rpx; |
| 635 | padding: 0; | 633 | padding: 0; |
| 636 | border-radius: 10rpx; | 634 | border-radius: 10rpx; |
| 637 | font-size: 24rpx; | 635 | font-size: 22rpx; |
| 638 | white-space: nowrap; | 636 | white-space: nowrap; |
| 639 | font-weight: bold; | 637 | font-weight: bold; |
| 640 | border: none; | 638 | border: none; | ... | ... |
-
Please register or sign in to post a comment