home.vue 23.6 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965
<template>
  <view class="page-container">
    <!-- 会员卡区域 -->
    <view class="member-card">
      <image :src="config.baseUrl_api + '/fs/static/user_01@2x.png'" class="card-bg" mode="aspectFill">
      </image>
      
      
      <!--      &lt;!&ndash; 绑定/解绑学员 &ndash;&gt;-->
      <!--      <view class="bind-student" @click="handleBindAction">-->
      <!--        <text>{{ isBound ? '切换学员' : '绑定学员' }}</text>-->
      <!--        <image :src="config.baseUrl_api + '/fs/static/bd@2x.png'" class="bind-icon" mode="aspectFit"></image>-->
      <!--      </view>-->
      
      <!-- 用户信息 -->
      <view class="user-section">
        <view class="member-title">
          <view class="member-id">{{ userInfo?.userName }}</view>
          <view class="bind-student" @click="handleBindAction">
            <text>{{ isBound ? '切换学员' : '绑定学员' }}</text>
            <image :src="config.baseUrl_api + '/fs/static/bd@2x.png'" class="bind-icon" mode="aspectFit"></image>
          </view>
        </view>
        
        <view class="user-top">
          <view class="avatar-wrap" @click="showLogoutConfirm">
            <!-- <image class="avatar" v-if="perInfo.photo" :src="config.baseUrl_api + perInfo.photo"
              mode="aspectFill">
            </image> -->
            <image :src="config.baseUrl_api + '/fs/static/tx@2x.png'" class="avatar"
                   mode="aspectFill">
            </image>
          </view>
          <!--          <view class="member-id">{{ userInfo?.userName }}</view>-->
          <view class="user-name">{{ perInfo?.perName }}</view>
        </view>
        
        <view class="user-bottom">
          <!--          <view class="user-name">{{ perInfo?.perName }}</view>-->
          <view class="card-info">
            <view class="info-row">
              <text>会员卡号</text>
              <text>{{ perInfo?.perCode }}</text>
            </view>
            <view class="info-row">
              <text>会员有效期</text>
              <text>{{ perInfo?.perValidDate }}</text>
            </view>
          </view>
        </view>
      </view>
      
      <!-- 已过期印章 -->
      <image v-if="perInfo?.perValidDateFlag == 0" :src="config.baseUrl_api + '/fs/static/end@2x.png'"
             class="expired-stamp" mode="aspectFit">
      </image>
      
      <!-- 卡片右下角按钮 -->
      <view class="card-btns">
        <view class="card-btn" @click="goToPay">
          <text>认证缴费</text>
        </view>
        <view class="card-btn" @click="downCert">
          <text>电子会员证</text>
        </view>
      </view>
    </view>
    
    <!-- 功能按钮卡片 -->
    <view class="func-card">
      <view class="func-list">
        <view class="func-item" @click="goToAuth">
          <view class="func-icon">
            <image :src="config.baseUrl_api + '/fs/static/btn01@2x.png'"></image>
            <!-- <uni-icons type="contact" size="40" color="#1E88E5"></uni-icons> -->
          </view>
          <text class="func-text">人员信息</text>
        </view>
        <view class="func-item" @click="goToScore">
          <view class="func-icon">
            <image :src="config.baseUrl_api + '/fs/static/btn02@2x.png'"></image>
            <!-- <uni-icons type="person" size="40" color="#1E88E5"></uni-icons> -->
          </view>
          <text class="func-text">个人会员</text>
        </view>
        <view class="func-item" @click="goToRecord(0)">
          <view class="func-icon">
            <image :src="config.baseUrl_api + '/fs/static/btn03@2x.png'"></image>
            <!-- <uni-icons type="list" size="40" color="#1E88E5"></uni-icons> -->
          </view>
          <text class="func-text">级位记录</text>
        </view>
      </view>
    </view>
    
    <!-- 查询功能区域 -->
    <view class="query-section">
      <view class="query-item" @click="goToOrder">
        <view class="query-item-left">
          <image :src="config.baseUrl_api + '/fs/static/user_icon01@2x.png'" class="query-item-icon"></image>
          <text class="query-item-text">我的订单</text>
        </view>
        <uni-icons color="#999" size="20" type="arrowright"></uni-icons>
      </view>
      <!-- <view class="query-item" @click="goToWebView(1)">
        <view class="query-item-left">
          <image :src="config.baseUrl_api + '/fs/static/user_icon03@2x.png'" class="query-item-icon"></image>
          <text class="query-item-text">单位会员查询</text>
        </view>
        <uni-icons type="arrowright" size="20" color="#999"></uni-icons>
      </view>
      <view class="query-item" @click="goToWebView(2)">
        <view class="query-item-left">
          <image :src="config.baseUrl_api + '/fs/static/user_icon03@2x.png'" class="query-item-icon"></image>
          <text class="query-item-text">个人会员查询</text>
        </view>
        <uni-icons type="arrowright" size="20" color="#999"></uni-icons>
      </view>
      <view class="query-item" @click="goToWebView(3)">
        <view class="query-item-left">
          <image :src="config.baseUrl_api + '/fs/static/user_icon02@2x.png'" class="query-item-icon"></image>
          <text class="query-item-text">旧版级位证书查询</text>
        </view>
        <uni-icons type="arrowright" size="20" color="#999"></uni-icons>
      </view> -->
      <!-- <view class="query-item" @click="goToWebView(4)">
        <view class="query-item-left">
          <image :src="config.baseUrl_api + '/fs/static/user_icon02@2x.png'" class="query-item-icon"></image>
          <text class="query-item-text">新版级位证书查询</text>
        </view>
        <uni-icons type="arrowright" size="20" color="#999"></uni-icons>
      </view> -->
      <!-- <view class="query-item" @click="goToWebView(5)">
        <view class="query-item-left">
          <image :src="config.baseUrl_api + '/fs/static/user_icon02@2x.png'" class="query-item-icon"></image>
          <text class="query-item-text">级位记录查询</text>
        </view>
        <uni-icons type="arrowright" size="20" color="#999"></uni-icons>
      </view> -->
      <!-- <view class="query-item" @click="goToWebView(6)">
        <view class="query-item-left">
          <image :src="config.baseUrl_api + '/fs/static/user_icon02@2x.png'" class="query-item-icon"></image>
          <text class="query-item-text">国际段位证书查询</text>
        </view>
        <uni-icons type="arrowright" size="20" color="#999"></uni-icons>
      </view> -->
      <view class="query-item" @click="goToRecord(1)">
        <view class="query-item-left">
          <image :src="config.baseUrl_api + '/fs/static/user_icon02@2x.png'" class="query-item-icon"></image>
          <text class="query-item-text">我的段位</text>
        </view>
        <uni-icons color="#999" size="20" type="arrowright"></uni-icons>
      </view>
      <view class="query-item" @click="goToWebView(8)">
        <view class="query-item-left">
          <image :src="config.baseUrl_api + '/fs/static/user_icon03@2x.png'" class="query-item-icon"></image>
          <text class="query-item-text">级位考官</text>
        </view>
        <uni-icons color="#999" size="20" type="arrowright"></uni-icons>
      </view>
      <view class="query-item" @click="goToWebView(9)">
        <view class="query-item-left">
          <image :src="config.baseUrl_api + '/fs/static/user_icon03@2x.png'" class="query-item-icon"></image>
          <text class="query-item-text">段位考官</text>
        </view>
        <uni-icons color="#999" size="20" type="arrowright"></uni-icons>
      </view>
      <view class="query-item" @click="goToWebView(10)">
        <view class="query-item-left">
          <image :src="config.baseUrl_api + '/fs/static/user_icon03@2x.png'" class="query-item-icon"></image>
          <text class="query-item-text">大众教练员</text>
        </view>
        <uni-icons color="#999" size="20" type="arrowright"></uni-icons>
      </view>
      <view class="query-item" @click="goToWebView(11)">
        <view class="query-item-left">
          <image :src="config.baseUrl_api + '/fs/static/user_icon03@2x.png'" class="query-item-icon"></image>
          <text class="query-item-text">大众裁判员</text>
        </view>
        <uni-icons color="#999" size="20" type="arrowright"></uni-icons>
      </view>
      <view class="query-item" @click="goToWebView(12)">
        <view class="query-item-left">
          <image :src="config.baseUrl_api + '/fs/static/user_icon03@2x.png'" class="query-item-icon"></image>
          <text class="query-item-text">培训讲师</text>
        </view>
        <uni-icons color="#999" size="20" type="arrowright"></uni-icons>
      </view>
    </view>
    
    <!--    退出-->
    <view class="logOut">
      <view class="logOutBtn" @click="showLogoutConfirm">退出登录</view>
    </view>
    
    <!-- 绑定学员弹框 -->
    <uni-popup ref="bindPopup" :mask-click="false" type="center">
      <view class="bind-popup">
        <view class="popup-title">绑定学员</view>
        <view class="popup-content">
          <view class="form-item">
            <view class="form-label">姓名</view>
            <view class="form-input">
              <input v-model="bindForm.name" placeholder="请输入姓名" placeholder-class="placeholder-class"/>
            </view>
          </view>
          <view class="form-item">
            <view class="form-label">证件号</view>
            <view class="form-input">
              <input v-model="bindForm.idcCode" placeholder="请输入证件号"
                     placeholder-class="placeholder-class"/>
            </view>
          </view>
        </view>
        <view class="popup-btns">
          <view class="popup-btn cancel" @click="closeBindPopup">取消</view>
          <view class="popup-btn confirm" @click="confirmBind">确定</view>
        </view>
      </view>
    </uni-popup>
    
    <!-- 退出登录确认框 -->
    <view v-if="showConfirm" class="confirm-mask" @click.stop="cancelLogout">
      <view class="confirm-box" @click.stop>
        <view class="confirm-content">
          <view class="confirm-title">退出登录</view>
          <view class="confirm-text">确定要退出登录吗?</view>
        </view>
        <view class="confirm-buttons">
          <view class="confirm-btn cancel" @click="cancelLogout">取消</view>
          <view class="confirm-btn confirm" @click="confirmLogout">确定</view>
        </view>
      </view>
    </view>
  </view>
</template>

<script setup>
import {
  computed,
  onMounted,
  ref,
  watch,
  nextTick
} from "vue";
import config from "/config.js";
import {
  wxLogin,
  logout,
  getWebInfo
} from '@/common/login.js';
import {useUserStore} from "@/store/modules/user.js";
import to from 'await-to-js'
import {
  bindUser,
  unbindUser,
  downStuCertSingle
} from '@/common/api.js'

const userStore = useUserStore()
const userInfo = computed(() => userStore.user ?? {})
const perInfo = computed(() => userStore.perInfo ?? {})
console.log(222, userInfo.value)
console.log(333, perInfo.value)

// 是否已绑定学员(根据会员卡号判断)
const isBound = computed(() => {
  const perCode = perInfo.value?.perCode
  return perCode !== undefined && perCode !== null && perCode !== ''
})

const bindPopup = ref(null)
const bindForm = ref({
  name: '',
  idcCode: ''
})
const showConfirm = ref(false)

onMounted(() => {
  let webUserName = uni.getStorageSync('webUserName')
  if (!webUserName) {
    wxLogin().then(getWebInfo)
  }
})

// 标记是否已经弹出过绑定框(避免重复弹出)
let hasOpenedBindPopup = false

watch(() => perInfo.value, (newVal, oldVal) => {
  console.log(444, newVal?.perCode)
  
  // 只有当 perInfo 数据存在且 perCode 为空时才弹出
  if (newVal && !newVal.perCode && !hasOpenedBindPopup) {
    hasOpenedBindPopup = true
    nextTick(() => {
      openBindPopup()
    })
  }
}, {
  immediate: true
})

// 打开绑定弹框
const openBindPopup = () => {
  if (bindPopup.value) {
    bindForm.value = {
      name: '',
      idcCode: ''
    }
    bindPopup.value.open()
  } else {
    nextTick(() => {
      openBindPopup()
    })
  }
}

// 关闭绑定弹框
const closeBindPopup = () => {
  bindPopup.value?.close()
}

// 处理绑定/切换操作
const handleBindAction = async () => {
  // if (isBound.value) {
  //   // 已绑定,先解绑再打开绑定弹框
  //   uni.showLoading({
  //     title: '解绑中...',
  //     mask: true
  //   })
  //   const [err] = await to(unbindUser())
  //   uni.hideLoading()
  //   if (err) return
  //   getWebInfo()
  //   openBindPopup()
  // } else {
  //   // 未绑定,打开绑定弹框
  //   openBindPopup()
  // }
  openBindPopup()
}

// 确认绑定
const confirmBind = async () => {
  if (!bindForm.value.name) {
    uni.showToast({
      title: '请输入姓名',
      icon: 'none'
    })
    return
  }
  if (!bindForm.value.idcCode) {
    uni.showToast({
      title: '请输入证件号',
      icon: 'none'
    })
    return
  }
  
  if (isBound.value) {
    // 已绑定,先解绑再打开绑定弹框
    uni.showLoading({
      title: '解绑中...',
      mask: true
    })
    const [err] = await to(unbindUser())
    uni.hideLoading()
    if (err) return
    await getWebInfo()
  }
  
  uni.showLoading({
    title: '绑定中...',
    mask: true
  })
  
  const [err, res] = await to(bindUser({
    name: bindForm.value.name,
    idcCode: bindForm.value.idcCode
  }))
  uni.hideLoading()
  
  if (err) {
    console.log(err)
    // uni.showToast({
    //   title: err?.data?.msg || err?.message || '绑定失败,请稍后重试',
    //   icon: 'none',
    //   duration: 3000
    // })
    // return
    handelGo()
    closeBindPopup()
  } else {
    uni.showToast({
      title: '绑定成功',
      icon: 'success'
    })
    closeBindPopup()
    await getWebInfo()
  }
  
  // uni.showToast({
  // 	title: '绑定成功',
  // 	icon: 'success'
  // })
  
}

const handelGo = () => {
  uni.showModal({
    title: "提示",
    content: "当前账号非中国跆拳道协会有效会员。请先完成认证缴费,即可正常登录使用。",
    success: function (res) {
      if (res.confirm) {
        // closeBindPopup()
        uni.navigateTo({
          url: `/personal/addVip_per?name=${bindForm.value.name}&idcCode=${bindForm.value.idcCode}`
        });
      } else if (res.cancel) {
        // closeBindPopup()
      }
      
    },
    
  })
}

// 返回上一页
const goBack = () => {
  uni.navigateBack()
}

const goToAuth = () => {
  if (!isBound.value) {
    uni.showToast({title: '请先绑定学员', icon: 'none'})
    return
  }
  uni.navigateTo({
    url: '/personal/personInfo'
  });
};

const goToScore = () => {
  if (!isBound.value) {
    uni.showToast({title: '请先绑定学员', icon: 'none'})
    return
  }
  uni.navigateTo({
    url: '/personal/memberInfo'
  });
};

const goToWebView = (type) => {
  // const url = "https://member.taekwondo.org.cn/#/authAccurate?type=" + type
  const url = "https://tk001.wxjylt.com/pc.html#/authAccurate?type=" + type
  uni.navigateTo({
    url: "/pages/webview/webview?url=" + encodeURIComponent(url)
  });
};

// 导航到级位记录
const goToRecord = (type) => {
  if (!isBound.value) {
    uni.showToast({title: '请先绑定学员', icon: 'none'})
    return
  }
  uni.navigateTo({
    url: '/personal/levelRecord?type=' + type
  });
};

// 导航到我的订单
const goToOrder = () => {
  if (!isBound.value) {
    uni.showToast({title: '请先绑定学员', icon: 'none'})
    return
  }
  uni.navigateTo({
    url: '/personal/order'
  });
};

// 导航到缴费
const goToPay = () => {
  const perId = userInfo.value.perId ?? ''
  uni.navigateTo({
    url: `/personal/addVip_per?perId=${perId}`
  });
};

// 下载电子会员证
const downCert = async () => {
  if (!isBound.value) {
    uni.showToast({title: '请先绑定学员', icon: 'none'})
    return
  }
  const perId = userInfo.value?.perId
  if (!perId) return
  
  uni.showLoading({title: '加载中...', mask: true})
  const [err, res] = await to(downStuCertSingle(perId))
  uni.hideLoading()
  
  if (err) {
    uni.showToast({title: err?.data?.msg || '获取会员证失败', icon: 'none'})
    return
  }
  const pdfUrl = res?.data
  if (pdfUrl) {
    uni.navigateTo({
      url: `/personal/certPreview?url=${encodeURIComponent(pdfUrl)}`
    })
  }
};


// 显示退出登录确认框
const showLogoutConfirm = () => {
  showConfirm.value = true;
};

// 取消退出登录
const cancelLogout = () => {
  showConfirm.value = false;
};

// 确认退出登录
const confirmLogout = () => {
  // 调用退出登录接口
  logout().then(() => {
    // 跳转到登录页
    uni.reLaunch({
      url: '/login/login'
    })
  });
};
</script>

<style lang="scss" scoped>
.page-container {
  min-height: 100vh;
  background: #f5f5f5;
}

/* 导航栏 */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88rpx;
  background: #ffffff;
  padding: 0 30rpx;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-left {
  width: 44rpx;
  height: 44rpx;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-title {
  font-size: 32rpx;
  font-weight: 500;
  color: #333;
}

.nav-right {
  width: 44rpx;
}

/* 会员卡 */
.member-card {
  position: relative;
  height: 450rpx;
  border-radius: 0;
  overflow: hidden;
}

.member-title {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eff2f8;
  padding-bottom: 20rpx;
  margin-bottom: 20rpx;
  
  .member-id {
    font-size: 30rpx;
    
  }
}

.card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.bind-student {
  //position: absolute;
  //top: 30rpx;
  //right: 30rpx;
  display: flex;
  align-items: center;
  //gap: 8rpx;
  z-index: 10;
  padding: 5rpx 16rpx;
  border-radius: 30rpx;
  //border: 1px solid #fff;
  background: #dbbf79;
}

.bind-student text {
  font-size: 26rpx;
  color: #5c4b37;
}

.bind-icon {
  width: 45rpx;
  height: 45rpx;
}

.user-section {
  position: relative;
  z-index: 1;
  padding: 30rpx 30rpx 0;
}

.user-top {
  display: flex;
  align-items: center;
  gap: 20rpx;
  margin-bottom: 10rpx;
}

.avatar-wrap {
  flex-shrink: 0;
}

.avatar {
  width: 110rpx;
  height: 110rpx;
  border-radius: 50%;
  border: 3rpx solid rgba(255, 255, 255, 0.6);
}

.member-id {
  font-size: 26rpx;
  color: #503000;
}

.user-bottom {
  //padding-left: 0;
  padding: 0 30rpx;
}

.user-name {
  font-size: 50rpx;
  font-weight: bold;
  color: #5c4b37;
  margin-bottom: 16rpx;
  margin-left: 16rpx;
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 10rpx;
}

.info-row {
  font-size: 30rpx;
  color: #503000;
  display: flex;
  justify-content: space-between;
}

/* 已过期印章 */
.expired-stamp {
  position: absolute;
  right: 30rpx;
  bottom: 150rpx;
  width: 150rpx;
  height: 150rpx;
  z-index: 1;
}

/* 卡片右下角按钮 */
.card-btns {
  position: absolute;
  left: 50rpx;
  bottom: 37rpx;
  z-index: 10;
  display: flex;
  gap: 16rpx;
}

.card-btn {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 30rpx;
  padding: 0 30rpx 5rpx 30rpx;
  border: 1px solid #e0c36c;
}

.card-btn text {
  height: 24rpx;
  line-height: 24rpx;
  font-size: 24rpx;
  color: #c7990f;
}

/* 功能按钮卡片 */
.func-card {
  margin: -23rpx 30rpx 30rpx;
  background: #ffffff;
  border-radius: 20rpx;
  padding: 36rpx 0;
  box-shadow: 0 2rpx 16rpx rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 2;
}

.func-list {
  display: flex;
  justify-content: space-around;
  padding: 0 20rpx;
}

.func-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12rpx;
}

.func-icon {
  width: 72rpx;
  height: 72rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  // background: #f0f7ff;
  // border-radius: 16rpx;
  image {
    width: 72rpx;
    height: 72rpx;
  }
}

.func-text {
  font-size: 24rpx;
  color: #333;
}

/* 查询功能区域 */
.query-section {
  margin: 0 30rpx;
  background: #ffffff;
  border-radius: 20rpx;
  box-shadow: 0 2rpx 16rpx rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.query-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32rpx 30rpx;
  border-bottom: 1rpx solid #f5f5f5;
}

.query-item:last-child {
  border-bottom: none;
}

.query-item-left {
  display: flex;
  align-items: center;
  gap: 16rpx;
}

.query-item-icon {
  width: 44rpx;
  height: 48rpx;
}

.query-item-text {
  font-size: 28rpx;
  color: #333;
}

/* 绑定学员弹框 */
.bind-popup {
  width: 600rpx;
  background: #ffffff;
  border-radius: 24rpx;
  overflow: hidden;
}

.popup-title {
  font-size: 32rpx;
  font-weight: 500;
  color: #333;
  text-align: center;
  padding: 40rpx 30rpx 20rpx;
}

.popup-content {
  padding: 20rpx 30rpx 40rpx;
}

.form-item {
  display: flex;
  align-items: center;
  margin-bottom: 24rpx;
}

.form-item:last-child {
  margin-bottom: 0;
}

.form-label {
  width: 120rpx;
  font-size: 28rpx;
  color: #333;
  flex-shrink: 0;
}

.form-input {
  flex: 1;
  background: #f5f5f5;
  border-radius: 12rpx;
  padding: 20rpx 24rpx;
}

.form-input input {
  font-size: 28rpx;
  color: #333;
  width: 100%;
}

.placeholder-class {
  color: #999;
}

.popup-btns {
  display: flex;
  border-top: 1rpx solid #eee;
}

.popup-btn {
  flex: 1;
  height: 100rpx;
  line-height: 100rpx;
  text-align: center;
  font-size: 30rpx;
}

.popup-btn.cancel {
  color: #666;
  border-right: 1rpx solid #eee;
}

.popup-btn.confirm {
  color: #C40F18;
  font-weight: 500;
}

/* 退出登录确认框 */
.confirm-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.confirm-box {
  width: 600rpx;
  background: #ffffff;
  border-radius: 20rpx;
  overflow: hidden;
}

.confirm-content {
  padding: 40rpx;
  text-align: center;
}

.confirm-title {
  font-size: 32rpx;
  font-weight: 500;
  color: #333;
  margin-bottom: 20rpx;
}

.confirm-text {
  font-size: 28rpx;
  color: #666;
  margin-top: 30rpx;
  color: #C40F18;
  color: #dbbb69;
  
}

.confirm-buttons {
  display: flex;
  border-top: 1rpx solid #eee;
}

.confirm-btn {
  flex: 1;
  height: 100rpx;
  line-height: 100rpx;
  text-align: center;
  font-size: 30rpx;
}

.confirm-btn.cancel {
  color: #666;
  border-right: 1rpx solid #eee;
}

.confirm-btn.confirm {
  color: #C40F18;
  font-weight: 500;
  color: #dbbb69;
}

.logOut {
  display: flex;
  justify-content: center;
  margin-top: 16px;
  padding-bottom: 20rpx;
  
  .logOutBtn {
    background-image: linear-gradient(135deg, #dbbb69 10%, #f0deb0 100%);;
    backdrop-filter: blur(4px);
    width: 80%;
    border: 1px solid #dadada;
    padding: 20rpx 50rpx;
    border-radius: 50rpx;
    font-weight: 600;
    font-size: 30rpx;
    color: #fff;
    text-align: center;
    cursor: pointer;
  }
}
</style>