user-content.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. <template>
  2. <view class="user-content-box">
  3. <view class="content-top">
  4. <view class="top-left">“</view>
  5. <view class="top-right">
  6. <image class="right-img" mode="aspectFill" src="/static/img/index/like.png" ></image>
  7. <view class="right-text sys-color-white sys-weight-400">108喜欢</view>
  8. </view>
  9. </view>
  10. <view class="user-signature sys-color-white sys-weight-400">崇尚自由,热爱生活,足以!</view>
  11. <view class="user-tag">
  12. <view class="tag-item" v-for="i in 5">
  13. <image class="tag-img" mode="aspectFill" src="/static/img/index/tag-img.png" ></image>
  14. <view class="tag-text sys-color-gray-3 sys-weight-400">认识朋友</view>
  15. </view>
  16. </view>
  17. <view class="user-wire"></view>
  18. <view class="gift-box" @touchmove.stop="stopTouche" @touchend.stop="stopTouche" @touchstart.stop="stopTouche">
  19. <view class="gift-title">
  20. <view class="gift-title-left sys-weight-600">心动礼物</view>
  21. <view class="gift-title-right">
  22. <view class="gift-right-text sys-color-white sys-weight-400">全部</view>
  23. <image class="gift-right-img" mode="aspectFill" src="/static/img/index/right.png" ></image>
  24. </view>
  25. </view>
  26. <view class="gift-list" id="gift-list" >
  27. <view class="gift-item" v-for="giftItem in giftList">
  28. <image class="gift-item-img" :class="{'gift-item-img-gray':giftItem.num<=0}" mode="aspectFill" :src="giftItem.url" ></image>
  29. <view class="gift-num sys-color-white" v-if="giftItem.num>0">
  30. <text>X</text>
  31. <text>{{giftItem.num}}</text>
  32. </view>
  33. <view class="gift-but sys-background-yellow sys-color-black sys-weight-500" v-else>点亮</view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="dynamic-list">
  38. <dynamic-item :user-id="userId"></dynamic-item>
  39. </view>
  40. </view>
  41. </template>
  42. <script>
  43. import ImgOne from "@/pages/common/img/img-one";
  44. import ImgTwo from "@/pages/common/img/img-two";
  45. import ImgThree from "@/pages/common/img/img-three";
  46. import DynamicItem from "@/pages/common/dynamic/dynamic-items";
  47. import {getMoments} from "@/api/discovery";
  48. export default {
  49. name: "user-content",
  50. components: {DynamicItem, ImgThree, ImgTwo, ImgOne},
  51. props: {
  52. 'userId':{
  53. default:0
  54. }
  55. },
  56. data() {
  57. return {
  58. giftList:[
  59. {'num':1,'url':'/static/img/temporary/gift1.png'},
  60. {'num':0,'url':'/static/img/temporary/gift2.png'},
  61. {'num':0,'url':'/static/img/temporary/gift3.png'},
  62. {'num':1,'url':'/static/img/temporary/gift1.png'},
  63. {'num':0,'url':'/static/img/temporary/gift2.png'},
  64. {'num':0,'url':'/static/img/temporary/gift3.png'},
  65. ],
  66. }
  67. },
  68. watch: {
  69. 'userId':function () {
  70. }
  71. },
  72. mounted() {
  73. },
  74. methods: {
  75. stopTouche(){
  76. // console.log('滑动事件阻止触发')
  77. return false
  78. },
  79. }
  80. }
  81. </script>
  82. <style scoped lang="scss">
  83. .user-content-box{
  84. background: #333333;
  85. padding: 40rpx 28rpx;
  86. .content-top{
  87. display: flex;
  88. justify-content: space-between;
  89. .top-left{
  90. font-size: 48rpx;
  91. color: rgba(255,255,255,0.3);
  92. }
  93. .top-right{
  94. display: flex;
  95. justify-content: center;
  96. .right-img{
  97. width: 36rpx;
  98. height: 36rpx;
  99. margin-right: 6rpx;
  100. }
  101. .right-text{
  102. font-size:26rpx ;
  103. }
  104. }
  105. }
  106. .user-signature{
  107. font-size: 32rpx;
  108. }
  109. .user-tag{
  110. display: flex;
  111. flex-wrap: wrap;
  112. margin-bottom: 62rpx;
  113. .tag-item{
  114. margin-top: 26rpx;
  115. margin-right: 20rpx;
  116. border-radius: 200rpx;
  117. background: rgba(255,255,255,0.4);
  118. display: flex;
  119. justify-content: center;
  120. padding: 6rpx 12rpx;
  121. .tag-img{
  122. width: 32rpx;
  123. height: 32rpx;
  124. margin-right: 8rpx;
  125. }
  126. .tag-text{
  127. font-size: 28rpx;
  128. height: 32rpx;
  129. line-height: 32rpx;
  130. }
  131. }
  132. }
  133. .user-wire{
  134. height: 2rpx;
  135. border-radius: 200rpx;
  136. opacity: 0.2;
  137. background-color: #4D4C4C;
  138. }
  139. .gift-box{
  140. margin-top: 64rpx;
  141. .gift-title{
  142. height: 56rpx;
  143. display: flex;
  144. justify-content: space-between;
  145. .gift-title-left{
  146. font-size: 40rpx;
  147. line-height: 56rpx;
  148. height: 56rpx;
  149. color: rgba(255,255,255,0.4);
  150. }
  151. .gift-title-right{
  152. display: flex;
  153. justify-content: center;
  154. .gift-right-text{
  155. font-size: 24rpx;
  156. margin-right: 8rpx;
  157. }
  158. .gift-right-img{
  159. margin-top: 4rpx;
  160. height: 24rpx;
  161. width: 24rpx;
  162. }
  163. }
  164. }
  165. .gift-list{
  166. margin-top: 32rpx;
  167. display: flex;
  168. justify-content: flex-start;
  169. overflow-y: scroll;
  170. .gift-item{
  171. border-radius: 16rpx;
  172. background: #3D3D3D;
  173. width: 198rpx;
  174. height: 232rpx;
  175. margin-right: 14rpx;
  176. .gift-but{
  177. margin-left: 43rpx;
  178. width: 112rpx;
  179. height: 44rpx;
  180. line-height: 44rpx;
  181. font-size:28rpx ;
  182. border-radius: 200rpx;
  183. text-align: center;
  184. }
  185. .gift-num{
  186. text-align: center;
  187. font-size: 20rpx;
  188. height: 28rpx;
  189. line-height: 28rpx;
  190. text:first-child{
  191. font-size: 16rpx;
  192. }
  193. text:last-child{
  194. font-size: 30rpx;
  195. }
  196. }
  197. .gift-item-img{
  198. margin: 32rpx 49rpx 28rpx 49rpx;
  199. width: 100rpx;
  200. height: 100rpx;
  201. }
  202. .gift-item-img-gray{
  203. filter: grayscale(100%);
  204. }
  205. }
  206. .gift-item:last-child{
  207. margin-right: 0;
  208. }
  209. }
  210. }
  211. .dynamic-list{
  212. margin-top: 44rpx;
  213. }
  214. }
  215. </style>