index.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <!-- vip权益 -->
  2. <template>
  3. <view class="box">
  4. <!-- vip信息 -->
  5. <view class="vipBox">
  6. <view class="avatar">
  7. <img :src="getUserAvatar(baseInfo?.avatar, baseInfo?.sex)" alt="" class="img-box">
  8. <image src="/static/svg/vip.svg" class="vipIcon"></image>
  9. </view>
  10. <view class="nameBox">
  11. <view class="name font-weight-bold font-size-16">{{ baseInfo?.name || userInfo?.phone }}</view>
  12. </view>
  13. </view>
  14. <view style="height: 20rpx; background-color: #f8f8fa;"></view>
  15. <view class="card">
  16. <uni-list>
  17. <uni-list-item
  18. v-for="item in list"
  19. :clickable="true"
  20. :key="item.title"
  21. :title="item.title"
  22. showArrow
  23. :rightText="item.rightTex || ''"
  24. @click="handleToLink(item)"
  25. >
  26. </uni-list-item>
  27. </uni-list>
  28. </view>
  29. </view>
  30. </template>
  31. <script setup>
  32. import { userStore } from '@/store/user'
  33. import { ref, computed, watch } from 'vue'
  34. import { getUserAvatar } from '@/utils/avatar'
  35. const useUserStore = userStore()
  36. const baseInfo = computed(() => useUserStore?.baseInfo)
  37. const userInfo = computed(() => useUserStore?.userInfo)
  38. const list = ref([
  39. { title: '简历模板', path: '/pagesA/vip/template/index' },
  40. { title: '屏蔽企业', path: '/pagesA/vip/blockEnt/index' },
  41. ])
  42. // 列表跳转
  43. const handleToLink = (item) => {
  44. uni.navigateTo({
  45. url: item.path
  46. })
  47. }
  48. </script>
  49. <style lang="scss" scoped>
  50. .vipBox {
  51. // color: #a18a0f;
  52. padding: 80rpx 50rpx;
  53. display: flex;
  54. background: linear-gradient(121deg,#fde2c2 29.02%,#c19164 104.03%);
  55. .avatar{
  56. position: relative;
  57. width: 100rpx;
  58. height: 100rpx;
  59. margin: 0;
  60. .img-box {
  61. width: 100%;
  62. height: 100%;
  63. border: 2rpx solid #ccc;
  64. border-radius: 50%;
  65. border: 1px solid gold;
  66. }
  67. .vipIcon {
  68. position: absolute;
  69. width: 50%;
  70. height: 50%;
  71. bottom: 0;
  72. right: 0;
  73. transform: translate(0, 30%);
  74. }
  75. }
  76. .nameBox {
  77. margin-left: 30rpx;
  78. .name {
  79. color: #724d2b;
  80. }
  81. }
  82. }
  83. :deep(.uni-list-item) {
  84. height: 120rpx !important;
  85. line-height: 120rpx !important;
  86. }
  87. :deep(.uni-list-item__content-title) {
  88. font-size: 32rpx !important;
  89. font-weight: 500;
  90. }
  91. </style>