tree.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <view class="base-container">
  3. <view class="tree-head">
  4. <view class="user-info">
  5. <up-image class="avatar" :fade="false" src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png" width="96rpx" height="96rpx" shape="circle"></up-image>
  6. <view class="level-wrap">
  7. <text class="name">V1 青铜守护</text>
  8. </view>
  9. </view>
  10. <view class="toogle">切换</view>
  11. </view>
  12. <view class="tree-cont">
  13. </view>
  14. <view class="tree-footer">
  15. <view class="footer-item" v-for="(item,index) in footerList" :key="index">
  16. <image class="icon" :src="`${config.BASIC_IMG}img/treePage/b-tree-icon-${index+1}.png`"></image>
  17. <view class="name">{{item}}</view>
  18. </view>
  19. </view>
  20. </view>
  21. </template>
  22. <script setup>
  23. import config from "@/api/config.js"
  24. const footerList = ["每日阳光","送ta祝福","分享转发","水果订购"]
  25. </script>
  26. <style lang="scss" scoped>
  27. @import "@/static/style/mixin.scss";
  28. .base-container {
  29. @include ossBg("tree-bg.png");
  30. padding: 22rpx 0;
  31. .tree-head{
  32. display: flex;
  33. border-radius: 60rpx 0 0 60rpx;
  34. padding: 16rpx 20rpx;
  35. position: relative;
  36. background-image: linear-gradient(90deg,rgba(255, 255, 255, 0.4), transparent);
  37. .user-info{
  38. display: flex;
  39. .avatar{
  40. border: 2rpx solid #fff;
  41. border-radius: 50%;
  42. margin-right: 20rpx;
  43. }
  44. .level-wrap{
  45. .name{
  46. // color: #fff;
  47. font-family: 'PangMenZhengDao';
  48. }
  49. }
  50. }
  51. .toogle{
  52. position: absolute;
  53. right: 0;
  54. }
  55. }
  56. .tree-footer{
  57. position: absolute;
  58. left: 0;
  59. bottom: 76rpx;
  60. width: 100%;
  61. display: flex;
  62. justify-content: center;
  63. .footer-item{
  64. width: 18%;
  65. text-align: center;
  66. .icon{
  67. width: 96rpx;
  68. height: 96rpx;
  69. }
  70. .name{
  71. font-size: 24rpx;
  72. font-weight: 500;
  73. padding: 2rpx 16rpx;
  74. background-image: linear-gradient(0deg,#FFFFFF,#FFE079);
  75. border-radius: 50rpx;
  76. border: 2rpx solid #fff;
  77. }
  78. }
  79. .footer-item + .footer-item{
  80. margin-left: 30rpx;
  81. }
  82. }
  83. }
  84. </style>