index.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <template>
  2. <view class="circle-box">
  3. <view class="circle-title" :style="[{ 'margin-top': statusBarH + 'px'}]">
  4. <view class="title-left">
  5. <view class="title-text sys-height-44 sys-color-gray-9 sys-weight-400" @click="setTitleTag(0)"
  6. :class="{'title-text-default':tagNum===0}">好友</view>
  7. <view class="title-text sys-height-44 sys-color-gray-9 sys-weight-400" @click="setTitleTag(1)"
  8. :class="{'title-text-default':tagNum===1}">附近</view>
  9. <view class="title-text sys-height-44 sys-color-gray-9 sys-weight-400" @click="setTitleTag(2)"
  10. :class="{'title-text-default':tagNum===2}">推荐</view>
  11. </view>
  12. <view class="title-right">
  13. <view class="title-icon">
  14. <image class="title-img" src="/static/img/circle/Group-100345@2x.png"></image>
  15. </view>
  16. <view class="title-icon">
  17. <image class="title-img" src="/static/img/circle/Group-100344@2x.png"></image>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="circle-content">
  22. <scroll-view :scroll-y="true" :style="{'height':'calc(100vh - '+navHeight+'rpx - var(--window-bottom))'}">
  23. <my-praise :tagNum="tagNum"></my-praise>
  24. </scroll-view>
  25. </view>
  26. <view class="circle-add sys-background-yellow">
  27. <image class="circle-add-img" src="/static/img/circle/cancel-icon-2@2x.png"></image>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. import EnNav from "@/components/en-utils/en-nav/en-nav";
  33. import MyPraise from "@/pages/my/model/my-praise";
  34. export default {
  35. components: {
  36. MyPraise,
  37. EnNav
  38. },
  39. data() {
  40. return {
  41. statusBarH: 0,
  42. tagNum: 0,
  43. navHeight: 44
  44. }
  45. },
  46. methods: {
  47. setTitleTag(num) {
  48. if (num !== this.tagNum) {
  49. this.tagNum = num
  50. }
  51. }
  52. },
  53. created() {
  54. uni.getSystemInfo({
  55. success: (e) => {
  56. this.statusBarH = e.statusBarHeight
  57. this.navHeight = (50 + this.statusBarH) * 2
  58. //e.safeArea.bottom 底部安全距离
  59. }
  60. })
  61. }
  62. }
  63. </script>
  64. <style scoped lang="scss">
  65. .circle-box {
  66. .circle-title {
  67. display: flex;
  68. justify-content: space-between;
  69. padding: 22rpx 36rpx;
  70. .title-left {
  71. display: flex;
  72. justify-content: flex-start;
  73. .title-text {
  74. font-size: 32rpx;
  75. margin-right: 56rpx;
  76. }
  77. .title-text-default {
  78. font-weight: 600;
  79. color: #141414;
  80. }
  81. }
  82. .title-right {
  83. display: flex;
  84. justify-content: flex-end;
  85. .title-img {
  86. width: 44rpx;
  87. height: 44rpx;
  88. margin-left: 40rpx;
  89. }
  90. }
  91. }
  92. .circle-content {
  93. // padding: 0 32rpx;
  94. .circle-item {
  95. margin-top: 32rpx;
  96. margin-bottom: 8rpx;
  97. display: flex;
  98. justify-content: space-between;
  99. .item-left {
  100. width: 80rpx;
  101. height: 80rpx;
  102. position: relative;
  103. .item-head {
  104. width: 80rpx;
  105. height: 80rpx;
  106. border-radius: 50%;
  107. }
  108. .item-auth {
  109. width: 18rpx;
  110. height: 18rpx;
  111. position: absolute;
  112. bottom: 0;
  113. right: 8rpx;
  114. z-index: 10;
  115. }
  116. }
  117. .item-right {
  118. padding-left: 20rpx;
  119. width: calc(100vw - 144rpx);
  120. .circle-top-data {
  121. display: flex;
  122. justify-content: space-between;
  123. .circle-top-left {
  124. .circle-top-left-title {
  125. display: flex;
  126. justify-content: flex-start;
  127. align-items: center;
  128. .left-title-text {
  129. font-size: 32rpx;
  130. margin-right: 8rpx;
  131. }
  132. .left-title-vip-img {
  133. height: 28rpx;
  134. }
  135. }
  136. .left-title-time {
  137. margin-top: 8rpx;
  138. line-height: 34rpx;
  139. font-size: 24rpx;
  140. }
  141. }
  142. .circle-top-right {
  143. height: 40rpx;
  144. border-radius: 200rpx;
  145. border: 2rpx solid #141414;
  146. padding: 8rpx 16rpx;
  147. display: flex;
  148. justify-content: space-between;
  149. .circle-top-right-img {
  150. width: 40rpx;
  151. height: 40rpx;
  152. margin-right: 8rpx;
  153. }
  154. .circle-top-right-text {
  155. font-size: 28rpx;
  156. line-height: 40rpx;
  157. }
  158. }
  159. }
  160. }
  161. }
  162. }
  163. .circle-add {
  164. position: fixed;
  165. bottom: 162rpx;
  166. // bottom: 64rpx;
  167. right: 28rpx;
  168. border-radius: 50%;
  169. width: 88rpx;
  170. height: 88rpx;
  171. display: flex;
  172. justify-content: center;
  173. align-items: center;
  174. .circle-add-img {
  175. width: 40rpx;
  176. height: 40rpx;
  177. }
  178. }
  179. }
  180. </style>