user-content.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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 ></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. export default {
  48. name: "user-content",
  49. components: {DynamicItem, ImgThree, ImgTwo, ImgOne},
  50. props: {},
  51. data() {
  52. return {
  53. giftList:[
  54. {'num':1,'url':'/static/img/temporary/gift1.png'},
  55. {'num':0,'url':'/static/img/temporary/gift2.png'},
  56. {'num':0,'url':'/static/img/temporary/gift3.png'},
  57. {'num':1,'url':'/static/img/temporary/gift1.png'},
  58. {'num':0,'url':'/static/img/temporary/gift2.png'},
  59. {'num':0,'url':'/static/img/temporary/gift3.png'},
  60. ],
  61. }
  62. },
  63. watch: {},
  64. mounted() {
  65. },
  66. methods: {
  67. stopTouche(){
  68. // console.log('滑动事件阻止触发')
  69. return false
  70. },
  71. }
  72. }
  73. </script>
  74. <style scoped lang="scss">
  75. .user-content-box{
  76. background: #333333;
  77. padding: 40rpx 28rpx;
  78. .content-top{
  79. display: flex;
  80. justify-content: space-between;
  81. .top-left{
  82. font-size: 48rpx;
  83. color: rgba(255,255,255,0.3);
  84. }
  85. .top-right{
  86. display: flex;
  87. justify-content: center;
  88. .right-img{
  89. width: 36rpx;
  90. height: 36rpx;
  91. margin-right: 6rpx;
  92. }
  93. .right-text{
  94. font-size:26rpx ;
  95. }
  96. }
  97. }
  98. .user-signature{
  99. font-size: 32rpx;
  100. }
  101. .user-tag{
  102. display: flex;
  103. flex-wrap: wrap;
  104. margin-bottom: 62rpx;
  105. .tag-item{
  106. margin-top: 26rpx;
  107. margin-right: 20rpx;
  108. border-radius: 200rpx;
  109. background: rgba(255,255,255,0.4);
  110. display: flex;
  111. justify-content: center;
  112. padding: 6rpx 12rpx;
  113. .tag-img{
  114. width: 32rpx;
  115. height: 32rpx;
  116. margin-right: 8rpx;
  117. }
  118. .tag-text{
  119. font-size: 28rpx;
  120. height: 32rpx;
  121. line-height: 32rpx;
  122. }
  123. }
  124. }
  125. .user-wire{
  126. height: 2rpx;
  127. border-radius: 200rpx;
  128. opacity: 0.2;
  129. background-color: #4D4C4C;
  130. }
  131. .gift-box{
  132. margin-top: 64rpx;
  133. .gift-title{
  134. height: 56rpx;
  135. display: flex;
  136. justify-content: space-between;
  137. .gift-title-left{
  138. font-size: 40rpx;
  139. line-height: 56rpx;
  140. height: 56rpx;
  141. color: rgba(255,255,255,0.4);
  142. }
  143. .gift-title-right{
  144. display: flex;
  145. justify-content: center;
  146. .gift-right-text{
  147. font-size: 24rpx;
  148. margin-right: 8rpx;
  149. }
  150. .gift-right-img{
  151. margin-top: 4rpx;
  152. height: 24rpx;
  153. width: 24rpx;
  154. }
  155. }
  156. }
  157. .gift-list{
  158. margin-top: 32rpx;
  159. display: flex;
  160. justify-content: flex-start;
  161. overflow-y: scroll;
  162. .gift-item{
  163. border-radius: 16rpx;
  164. background: #3D3D3D;
  165. width: 198rpx;
  166. height: 232rpx;
  167. margin-right: 14rpx;
  168. .gift-but{
  169. margin-left: 43rpx;
  170. width: 112rpx;
  171. height: 44rpx;
  172. line-height: 44rpx;
  173. font-size:28rpx ;
  174. border-radius: 200rpx;
  175. text-align: center;
  176. }
  177. .gift-num{
  178. text-align: center;
  179. font-size: 20rpx;
  180. height: 28rpx;
  181. line-height: 28rpx;
  182. text:first-child{
  183. font-size: 16rpx;
  184. }
  185. text:last-child{
  186. font-size: 30rpx;
  187. }
  188. }
  189. .gift-item-img{
  190. margin: 32rpx 49rpx 28rpx 49rpx;
  191. width: 100rpx;
  192. height: 100rpx;
  193. }
  194. .gift-item-img-gray{
  195. filter: grayscale(100%);
  196. }
  197. }
  198. .gift-item:last-child{
  199. margin-right: 0;
  200. }
  201. }
  202. }
  203. .dynamic-list{
  204. margin-top: 44rpx;
  205. }
  206. }
  207. </style>