个人绑定失败
Showing
2 changed files
with
49 additions
and
47 deletions
| ... | @@ -969,7 +969,7 @@ function handleDelete(row) { | ... | @@ -969,7 +969,7 @@ function handleDelete(row) { |
| 969 | box-sizing: border-box; | 969 | box-sizing: border-box; |
| 970 | 970 | ||
| 971 | &.dropdown-open-page { | 971 | &.dropdown-open-page { |
| 972 | padding-bottom: calc(420rpx + env(safe-area-inset-bottom)); | 972 | padding-bottom: calc(490rpx + env(safe-area-inset-bottom)); |
| 973 | } | 973 | } |
| 974 | } | 974 | } |
| 975 | 975 | ||
| ... | @@ -1428,7 +1428,7 @@ function handleDelete(row) { | ... | @@ -1428,7 +1428,7 @@ function handleDelete(row) { |
| 1428 | justify-content: space-around; | 1428 | justify-content: space-around; |
| 1429 | align-items: center; | 1429 | align-items: center; |
| 1430 | padding-top: 60rpx; | 1430 | padding-top: 60rpx; |
| 1431 | padding-bottom: calc(20rpx + env(safe-area-inset-bottom)); | 1431 | padding-bottom: calc(10rpx + env(safe-area-inset-bottom)); |
| 1432 | background: #fff; | 1432 | background: #fff; |
| 1433 | border-top: 1rpx solid #f0f0f0; | 1433 | border-top: 1rpx solid #f0f0f0; |
| 1434 | 1434 | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <view class="page-container"> | 2 | <view class="page-container"> |
| 3 | <!-- 会员卡区域 --> | 3 | <!-- 会员卡区域 --> |
| 4 | <view class="member-card"> | 4 | <view class="member-card"> |
| ... | @@ -221,11 +221,11 @@ const perInfo = computed(() => userStore.perInfo ?? {}) | ... | @@ -221,11 +221,11 @@ const perInfo = computed(() => userStore.perInfo ?? {}) |
| 221 | console.log(222, userInfo.value) | 221 | console.log(222, userInfo.value) |
| 222 | console.log(333, perInfo.value) | 222 | console.log(333, perInfo.value) |
| 223 | 223 | ||
| 224 | // 是否已绑定学员:绑定非会员时只有姓名,没有会员卡号,也应视为已绑定,避免反复弹绑定框。 | 224 | // 是否已绑定学员:绑定非会员时只有姓名,没有会员卡号,也应视为已绑定,避免反复弹绑定框。 |
| 225 | const isBound = computed(() => { | 225 | const isBound = computed(() => { |
| 226 | const perName = perInfo.value?.perName | 226 | const perName = perInfo.value?.perName |
| 227 | return perName !== undefined && perName !== null && perName !== '' | 227 | return perName !== undefined && perName !== null && perName !== '' |
| 228 | }) | 228 | }) |
| 229 | 229 | ||
| 230 | const bindPopup = ref(null) | 230 | const bindPopup = ref(null) |
| 231 | const bindForm = ref({ | 231 | const bindForm = ref({ |
| ... | @@ -236,8 +236,8 @@ const showConfirm = ref(false) | ... | @@ -236,8 +236,8 @@ const showConfirm = ref(false) |
| 236 | // 标记是否已经弹出过绑定框(避免重复弹出) | 236 | // 标记是否已经弹出过绑定框(避免重复弹出) |
| 237 | let hasOpenedBindPopup = false | 237 | let hasOpenedBindPopup = false |
| 238 | 238 | ||
| 239 | onShow(() => { | 239 | onShow(() => { |
| 240 | let webUserName = uni.getStorageSync('webUserName') | 240 | let webUserName = uni.getStorageSync('webUserName') |
| 241 | if (!webUserName) { | 241 | if (!webUserName) { |
| 242 | // 登录后需要等待数据加载完成 | 242 | // 登录后需要等待数据加载完成 |
| 243 | wxLogin().then(res => { | 243 | wxLogin().then(res => { |
| ... | @@ -259,14 +259,14 @@ onShow(() => { | ... | @@ -259,14 +259,14 @@ onShow(() => { |
| 259 | }) | 259 | }) |
| 260 | 260 | ||
| 261 | // 检查是否需要弹出绑定框 | 261 | // 检查是否需要弹出绑定框 |
| 262 | const checkAndOpenBindPopup = () => { | 262 | const checkAndOpenBindPopup = () => { |
| 263 | // 确保 userStore 数据已更新 | 263 | // 确保 userStore 数据已更新 |
| 264 | const currentPerInfo = userStore.perInfo | 264 | const currentPerInfo = userStore.perInfo |
| 265 | const hasBoundName = currentPerInfo?.perName | 265 | const hasBoundName = currentPerInfo?.perName |
| 266 | if (currentPerInfo && !hasBoundName && !hasOpenedBindPopup) { | 266 | if (currentPerInfo && !hasBoundName && !hasOpenedBindPopup) { |
| 267 | hasOpenedBindPopup = true | 267 | hasOpenedBindPopup = true |
| 268 | nextTick(() => { | 268 | nextTick(() => { |
| 269 | openBindPopup() | 269 | openBindPopup() |
| 270 | }) | 270 | }) |
| 271 | } | 271 | } |
| 272 | } | 272 | } |
| ... | @@ -365,16 +365,18 @@ const confirmBind = async () => { | ... | @@ -365,16 +365,18 @@ const confirmBind = async () => { |
| 365 | idcCode: bindForm.value.idcCode | 365 | idcCode: bindForm.value.idcCode |
| 366 | })) | 366 | })) |
| 367 | uni.hideLoading() | 367 | uni.hideLoading() |
| 368 | // if (res.data != 1) { | 368 | if(res?.data == '1'){ |
| 369 | // // handelGo() | ||
| 370 | // closeBindPopup() | ||
| 371 | // } else { | ||
| 372 | uni.showToast({ | ||
| 373 | title: '绑定成功', | ||
| 374 | icon: 'success' | ||
| 375 | }) | ||
| 376 | closeBindPopup() | 369 | closeBindPopup() |
| 377 | await getWebInfo() | 370 | await getWebInfo() |
| 371 | }else{ | ||
| 372 | uni.showToast({ | ||
| 373 | title: res?.data || '绑定失败', | ||
| 374 | icon: null, | ||
| 375 | duration: 3000 | ||
| 376 | }) | ||
| 377 | } | ||
| 378 | |||
| 379 | |||
| 378 | // } | 380 | // } |
| 379 | if (err) { | 381 | if (err) { |
| 380 | console.log(err) | 382 | console.log(err) |
| ... | @@ -437,18 +439,18 @@ const goToAuth = () => { | ... | @@ -437,18 +439,18 @@ const goToAuth = () => { |
| 437 | }); | 439 | }); |
| 438 | }; | 440 | }; |
| 439 | 441 | ||
| 440 | const goToScore = () => { | 442 | const goToScore = () => { |
| 441 | if (!isBound.value) { | 443 | if (!isBound.value) { |
| 442 | uni.showToast({title: '请先绑定学员', icon: 'none'}) | 444 | uni.showToast({title: '请先绑定学员', icon: 'none'}) |
| 443 | return | 445 | return |
| 444 | } | 446 | } |
| 445 | const perId = userInfo.value.perId ?? '' | 447 | const perId = userInfo.value.perId ?? '' |
| 446 | const name = perInfo.value?.perName ? encodeURIComponent(perInfo.value.perName) : '' | 448 | const name = perInfo.value?.perName ? encodeURIComponent(perInfo.value.perName) : '' |
| 447 | const idcCode = perInfo.value?.perIdcCode ? encodeURIComponent(perInfo.value.perIdcCode) : '' | 449 | const idcCode = perInfo.value?.perIdcCode ? encodeURIComponent(perInfo.value.perIdcCode) : '' |
| 448 | uni.navigateTo({ | 450 | uni.navigateTo({ |
| 449 | url: `/personal/memberInfo?perId=${perId}&name=${name}&idcCode=${idcCode}` | 451 | url: `/personal/memberInfo?perId=${perId}&name=${name}&idcCode=${idcCode}` |
| 450 | }); | 452 | }); |
| 451 | }; | 453 | }; |
| 452 | 454 | ||
| 453 | const goToWebView = (type) => { | 455 | const goToWebView = (type) => { |
| 454 | // const url = "https://member.taekwondo.org.cn/#/authAccurate?type=" + type | 456 | // const url = "https://member.taekwondo.org.cn/#/authAccurate?type=" + type |
| ... | @@ -480,15 +482,15 @@ const goToOrder = () => { | ... | @@ -480,15 +482,15 @@ const goToOrder = () => { |
| 480 | }); | 482 | }); |
| 481 | }; | 483 | }; |
| 482 | 484 | ||
| 483 | // 导航到缴费 | 485 | // 导航到缴费 |
| 484 | const goToPay = () => { | 486 | const goToPay = () => { |
| 485 | const perId = userInfo.value.perId ?? '' | 487 | const perId = userInfo.value.perId ?? '' |
| 486 | const name = perInfo.value?.perName ? encodeURIComponent(perInfo.value.perName) : '' | 488 | const name = perInfo.value?.perName ? encodeURIComponent(perInfo.value.perName) : '' |
| 487 | const idcCode = perInfo.value?.perIdcCode ? encodeURIComponent(perInfo.value.perIdcCode) : '' | 489 | const idcCode = perInfo.value?.perIdcCode ? encodeURIComponent(perInfo.value.perIdcCode) : '' |
| 488 | uni.navigateTo({ | 490 | uni.navigateTo({ |
| 489 | url: `/personal/addVip_per?perId=${perId}&name=${name}&idcCode=${idcCode}` | 491 | url: `/personal/addVip_per?perId=${perId}&name=${name}&idcCode=${idcCode}` |
| 490 | }); | 492 | }); |
| 491 | }; | 493 | }; |
| 492 | 494 | ||
| 493 | // 下载电子会员证 | 495 | // 下载电子会员证 |
| 494 | const downCert = async () => { | 496 | const downCert = async () => { | ... | ... |
-
Please register or sign in to post a comment