CollectionInfo.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <template>
  2. <router-link
  3. :to="{
  4. path: '/collectionDetail',
  5. query: {
  6. id: info.id
  7. }
  8. }"
  9. class="content"
  10. >
  11. <el-image class="imgBox" :src="getImg(changeImgs(info.pics))" fit="cover"></el-image>
  12. <div class="introduce">{{ info.name }}</div>
  13. <div class="price">
  14. <img class="img1" src="../assets/img/icon_jiage@3x.png" alt="" />
  15. <div class="num">{{ info.price }}</div>
  16. <!-- <div class="time" >
  17. <div class="time1">抢购倒计时<span>1天 01:35:06</span></div>
  18. </div> -->
  19. </div>
  20. <div class="border"></div>
  21. <div class="fans">
  22. <div class="text">
  23. <div class="text1 name1">
  24. <img class="text2" :src="info.minterAvatar" alt="" />
  25. <div class="text3">{{ info.minter }}</div>
  26. </div>
  27. <div class="text1" v-if="info.ownerId">
  28. <img class="text2" :src="info.ownerAvatar" alt="" />
  29. <div class="text3">{{ info.owner }}</div>
  30. </div>
  31. </div>
  32. <div class="text">
  33. <div class="text1">
  34. <img class="text2 text4" src="../assets/img/icon-dianzan@3x.png" alt="" />
  35. <div class="text3">16</div>
  36. </div>
  37. <!-- <div class="text1" v-else>
  38. <img class="text2 text4" src="../assets/img/icon-yuyue@3x.png" alt="" />
  39. <div class="text3">预约</div>
  40. </div> -->
  41. </div>
  42. </div>
  43. </router-link>
  44. </template>
  45. <script>
  46. import product from '../mixins/product';
  47. export default {
  48. props: {
  49. info: {
  50. type: Object,
  51. default: () => {
  52. return {};
  53. }
  54. }
  55. },
  56. mixins: [product]
  57. };
  58. </script>
  59. <style lang="less" scoped>
  60. .content {
  61. .line();
  62. width: 276px;
  63. height: 416px;
  64. display: inline-block;
  65. .imgBox {
  66. height: 266px;
  67. width: 100%;
  68. border-radius: 8px 8px 0px 0px;
  69. }
  70. &:hover {
  71. .imgBox {
  72. position: relative;
  73. &::before {
  74. content: '';
  75. position: absolute;
  76. left: 0;
  77. top: 0;
  78. right: 0;
  79. bottom: 0;
  80. background-color: fade(@warn, 70%);
  81. }
  82. &::after {
  83. padding: 0 22px;
  84. content: '立即购买';
  85. line-height: 30px;
  86. font-size: 16px;
  87. color: #1a1a1a;
  88. background: #ffffff;
  89. border-radius: 16px;
  90. border: 1px solid #ffffff;
  91. position: absolute;
  92. top: 50%;
  93. left: 50%;
  94. transform: translate(-50%, -50%);
  95. }
  96. }
  97. }
  98. .introduce {
  99. padding: 10px 16px 6px;
  100. font-size: 14px;
  101. font-weight: 400;
  102. color: #939599;
  103. line-height: 20px;
  104. }
  105. .price {
  106. display: flex;
  107. align-items: center;
  108. // justify-content: space-between;
  109. padding: 0 16px 16px;
  110. .img1 {
  111. width: 10px;
  112. height: 11px;
  113. margin-top: 10px;
  114. }
  115. .num {
  116. font-size: 30px;
  117. font-family: OSP-DIN, OSP;
  118. font-weight: normal;
  119. color: #00ffcb;
  120. line-height: 30px;
  121. }
  122. .time {
  123. display: flex;
  124. margin-left: 24px;
  125. .time1 {
  126. font-size: 14px;
  127. font-weight: 400;
  128. color: #939599;
  129. line-height: 24px;
  130. }
  131. span {
  132. font-size: 14px;
  133. font-weight: 400;
  134. color: #00ffcb;
  135. line-height: 24px;
  136. margin-left: 6px;
  137. }
  138. }
  139. }
  140. .border {
  141. height: 1px;
  142. background: #494a4d;
  143. border-radius: 1px;
  144. margin: 0 16px;
  145. }
  146. .fans {
  147. display: flex;
  148. align-items: center;
  149. justify-content: space-between;
  150. padding: 19px 16px 20px;
  151. .text {
  152. display: flex;
  153. align-items: center;
  154. .text1 {
  155. display: flex;
  156. align-items: center;
  157. max-width: 70px;
  158. overflow: hidden;
  159. &.name1 {
  160. margin-right: 22px;
  161. }
  162. .text2 {
  163. width: 20px;
  164. height: 20px;
  165. border-radius: 50%;
  166. margin-right: 4px;
  167. flex-shrink: 0;
  168. &.text4 {
  169. width: 18px;
  170. height: 18px;
  171. }
  172. }
  173. .text3 {
  174. font-size: 14px;
  175. font-weight: 400;
  176. .ellipsis();
  177. color: #939599;
  178. line-height: 24px;
  179. }
  180. }
  181. }
  182. }
  183. }
  184. </style>