friendTree.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <view class="sub-base-container">
  3. <member-level></member-level>
  4. <view class="tree-cont">
  5. <image class="drone-icon" :src="`${config.BASIC_IMG}img/treePage/drone-icon.png`"></image>
  6. <view class="tool-wrap">
  7. <view class="tool-left">
  8. <view :class="['tool-item',item.className]" v-for="(item,index) in toolList" :key="index">
  9. <image class="icon" :src="`${config.BASIC_IMG}img/treePage/${item.icon}.png`"></image>
  10. <view class="name">{{item.name}}</view>
  11. </view>
  12. </view>
  13. </view>
  14. </view>
  15. <view class="tree-footer">
  16. <view class="blessing" @click="handleBlessing">
  17. <image class="icon" :src="`${config.BASIC_IMG}img/treePage/b-tree-icon-2.png`"></image>
  18. <text>送ta祝福</text>
  19. </view>
  20. <view class="button">去看看我的树</view>
  21. </view>
  22. </view>
  23. <!-- 编辑树名称 -->
  24. <editNamePopup></editNamePopup>
  25. <!-- 祝福弹窗 -->
  26. <blessingsPopup :show="showBlessingsPopup"></blessingsPopup>
  27. </template>
  28. <script setup>
  29. import config from "@/api/config.js"
  30. import memberLevel from "../components/memberLevel.vue"
  31. import blessingsPopup from "../components/blessingsPopup.vue"
  32. import {
  33. ref,
  34. reactive,
  35. onMounted
  36. } from 'vue';
  37. const showBlessingsPopup = ref(false)
  38. const handleBlessing = () => {
  39. showBlessingsPopup.value = !showBlessingsPopup.value
  40. }
  41. const toolList = [{
  42. name: "相册",
  43. icon:'l-tree-icon-1'
  44. },
  45. {
  46. name: "日记",
  47. icon:'l-tree-icon-2'
  48. },
  49. {
  50. name: "果园",
  51. icon:'r-tree-icon-3'
  52. }
  53. ]
  54. const handleToolItem = ({
  55. path
  56. }) => {
  57. uni.navigateTo({
  58. url: `/pages/tabBar/tree/subPages/${path}`
  59. });
  60. }
  61. </script>
  62. <style lang="scss" scoped>
  63. @import "@/static/style/mixin.scss";
  64. .sub-base-container {
  65. @include ossBg("tree-bg.png");
  66. padding: 22rpx 0;
  67. .tree-cont {
  68. width: 100%;
  69. margin-top: 10rpx;
  70. .drone-icon {
  71. width: 376rpx;
  72. height: 384rpx;
  73. margin-left: 26rpx;
  74. }
  75. .tool-wrap {
  76. width: 100%;
  77. padding: 14rpx;
  78. box-sizing: border-box;
  79. position: absolute;
  80. bottom: calc(50% - 350rpx);
  81. display: flex;
  82. justify-content: space-between;
  83. .tool-left{
  84. .tool-item {
  85. color: #fff;
  86. font-size: 24rpx;
  87. font-weight: 500;
  88. text-align: center;
  89. width: 100rpx;
  90. margin-bottom: 16rpx;
  91. text-shadow:
  92. 0 0 3rpx #D7660A,
  93. 0 0 3rpx #D7660A,
  94. 0 0 3rpx #D7660A,
  95. 0 0 3rpx #D7660A;
  96. .icon {
  97. width: 100%;
  98. height: 82rpx;
  99. position: relative;
  100. }
  101. .name {
  102. margin-top: -24rpx;
  103. position: relative;
  104. z-index: 2;
  105. }
  106. }
  107. }
  108. }
  109. }
  110. .tree-footer {
  111. position: absolute;
  112. left: 0;
  113. bottom: 130rpx;
  114. width: 100%;
  115. display: flex;
  116. flex-direction: column;
  117. align-items: center;
  118. color: #fff;
  119. .blessing{
  120. display: flex;
  121. align-items: center;
  122. background: rgba(0, 0, 0, 0.3);
  123. border-radius: 50rpx;
  124. padding: 6rpx 60rpx;
  125. border: 1rpx solid rgba(255, 255, 255, 0.6);
  126. .icon{
  127. width: 86rpx;
  128. height: 86rpx;
  129. margin-right: 10rpx;
  130. }
  131. }
  132. .button{
  133. padding: 26rpx 80rpx;
  134. border-radius: 50rpx;
  135. border: 2rpx solid #fff;
  136. background-image: linear-gradient(120deg,#FFD887,#ED9E1E);
  137. margin-top: 20rpx;
  138. }
  139. }
  140. }
  141. </style>