index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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" @click="publish">
  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. publish() {
  53. uni.navigateTo({
  54. url: 'pages/circle/publishCircle'
  55. });
  56. }
  57. },
  58. created() {
  59. uni.getSystemInfo({
  60. success: (e) => {
  61. this.statusBarH = e.statusBarHeight
  62. this.navHeight = (50 + this.statusBarH) * 2
  63. //e.safeArea.bottom 底部安全距离
  64. }
  65. })
  66. }
  67. }
  68. </script>
  69. <style scoped lang="scss">
  70. .circle-box {
  71. .circle-title {
  72. display: flex;
  73. justify-content: space-between;
  74. padding: 22rpx 36rpx;
  75. .title-left {
  76. display: flex;
  77. justify-content: flex-start;
  78. .title-text {
  79. font-size: 32rpx;
  80. margin-right: 56rpx;
  81. }
  82. .title-text-default {
  83. font-weight: 600;
  84. color: #141414;
  85. }
  86. }
  87. .title-right {
  88. display: flex;
  89. justify-content: flex-end;
  90. .title-img {
  91. width: 44rpx;
  92. height: 44rpx;
  93. margin-left: 40rpx;
  94. }
  95. }
  96. }
  97. .circle-content {
  98. // padding: 0 32rpx;
  99. .circle-item {
  100. margin-top: 32rpx;
  101. margin-bottom: 8rpx;
  102. display: flex;
  103. justify-content: space-between;
  104. .item-left {
  105. width: 80rpx;
  106. height: 80rpx;
  107. position: relative;
  108. .item-head {
  109. width: 80rpx;
  110. height: 80rpx;
  111. border-radius: 50%;
  112. }
  113. .item-auth {
  114. width: 18rpx;
  115. height: 18rpx;
  116. position: absolute;
  117. bottom: 0;
  118. right: 8rpx;
  119. z-index: 10;
  120. }
  121. }
  122. .item-right {
  123. padding-left: 20rpx;
  124. width: calc(100vw - 144rpx);
  125. .circle-top-data {
  126. display: flex;
  127. justify-content: space-between;
  128. .circle-top-left {
  129. .circle-top-left-title {
  130. display: flex;
  131. justify-content: flex-start;
  132. align-items: center;
  133. .left-title-text {
  134. font-size: 32rpx;
  135. margin-right: 8rpx;
  136. }
  137. .left-title-vip-img {
  138. height: 28rpx;
  139. }
  140. }
  141. .left-title-time {
  142. margin-top: 8rpx;
  143. line-height: 34rpx;
  144. font-size: 24rpx;
  145. }
  146. }
  147. .circle-top-right {
  148. height: 40rpx;
  149. border-radius: 200rpx;
  150. border: 2rpx solid #141414;
  151. padding: 8rpx 16rpx;
  152. display: flex;
  153. justify-content: space-between;
  154. .circle-top-right-img {
  155. width: 40rpx;
  156. height: 40rpx;
  157. margin-right: 8rpx;
  158. }
  159. .circle-top-right-text {
  160. font-size: 28rpx;
  161. line-height: 40rpx;
  162. }
  163. }
  164. }
  165. }
  166. }
  167. }
  168. .circle-add {
  169. position: fixed;
  170. bottom: 162rpx;
  171. // bottom: 64rpx;
  172. right: 28rpx;
  173. border-radius: 50%;
  174. width: 88rpx;
  175. height: 88rpx;
  176. display: flex;
  177. justify-content: center;
  178. align-items: center;
  179. .circle-add-img {
  180. width: 40rpx;
  181. height: 40rpx;
  182. }
  183. }
  184. }
  185. </style>