poster.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <template>
  2. <view class="slot">
  3. <!-- {{JSON.stringify(data)}} -->
  4. <view class="purchase">
  5. <view class="pur_left">
  6. <view class="left_img" @click="goDetail(data[0])" v-if="data[0]">
  7. <image :src="data[0].target_image"></image>
  8. <view style="position: absolute;bottom: 44rpx;left: 28rpx;">
  9. <view class="left_head">{{item.target_name}}</view>
  10. <!-- <view class="left_foot">立即抢购</view> -->
  11. </view>
  12. </view>
  13. </view>
  14. <view class="pur_right">
  15. <view class="right_top">
  16. <view class="top_img" @click="goDetail(data[1])" v-if="data[1]">
  17. <image :src="data[1].target_image"></image>
  18. <view style="position: absolute;top: 30rpx; left: 24rpx;">
  19. <view class="top_title">{{item.target_name}}</view>
  20. <!-- <view class="top_pur">立即抢购</view> -->
  21. </view>
  22. </view>
  23. </view>
  24. <view class="right_bottom">
  25. <view class="bottom_img" @click="goDetail(data[2])" v-if="data[2]">
  26. <image :src="data[2].target_image"></image>
  27. <view style="position: absolute;top: 30rpx; left: 24rpx;">
  28. <view class="bottom_title">{{item.target_name}}</view>
  29. <!-- <view class="bottom_pur">立即抢购</view> -->
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. import { goType } from '@/utils/pub';
  39. export default {
  40. name: 'poster',
  41. props:{
  42. data:{
  43. type:Array,
  44. default:()=>{
  45. return []
  46. }
  47. }
  48. },
  49. data() {
  50. return {};
  51. },
  52. methods: {
  53. goDetail(e) {
  54. goType(e);
  55. }
  56. }
  57. };
  58. </script>
  59. <style lang="scss" scoped>
  60. .purchase {
  61. margin: 30rpx 30rpx 28rpx 30rpx;
  62. display: flex;
  63. .pur_left {
  64. .left_img {
  65. position: relative;
  66. width: 304rpx;
  67. height: 394rpx;
  68. border-radius: 15rpx;
  69. overflow: hidden;
  70. image {
  71. width: 304rpx;
  72. height: 394rpx;
  73. // background-image: url("../../static/img/product_one.png");
  74. }
  75. }
  76. .left_head {
  77. font-size: 24rpx;
  78. font-family: PingFangSC-Semibold, PingFang SC;
  79. font-weight: 600;
  80. color: #ffe7d3;
  81. line-height: 34rpx;
  82. margin-bottom: 10rpx;
  83. }
  84. .left_foot {
  85. font-size: 16rpx;
  86. font-family: PingFangSC-Regular, PingFang SC;
  87. font-weight: 400;
  88. text-align: center;
  89. color: #9d724e;
  90. line-height: 32rpx;
  91. width: 116rpx;
  92. height: 32rpx;
  93. background: linear-gradient(90deg, #fdefe0 0%, #fbdabe 100%);
  94. border-radius: 14rpx;
  95. }
  96. }
  97. .pur_right {
  98. margin-left: 22rpx;
  99. .right_top {
  100. margin-bottom: 22rpx;
  101. border-radius: 15rpx;
  102. overflow: hidden;
  103. .top_img {
  104. position: relative;
  105. width: 364rpx;
  106. height: 186rpx;
  107. image {
  108. width: 364rpx;
  109. height: 186rpx;
  110. }
  111. }
  112. .top_title {
  113. font-size: 24rpx;
  114. font-family: PingFangSC-Semibold, PingFang SC;
  115. font-weight: 600;
  116. color: #2f3438;
  117. line-height: 34rpx;
  118. margin-bottom: 10rpx;
  119. }
  120. .top_pur {
  121. font-size: 16rpx;
  122. font-family: PingFangSC-Regular, PingFang SC;
  123. font-weight: 400;
  124. text-align: center;
  125. color: #ffffff;
  126. line-height: 32rpx;
  127. width: 116rpx;
  128. height: 32rpx;
  129. background: #1eb7cf;
  130. border-radius: 14rpx;
  131. }
  132. }
  133. .right_bottom {
  134. .bottom_img {
  135. position: relative;
  136. width: 364rpx;
  137. height: 186rpx;
  138. border-radius: 15rpx;
  139. overflow: hidden;
  140. image {
  141. width: 364rpx;
  142. height: 186rpx;
  143. }
  144. }
  145. .bottom_title {
  146. font-size: 24rpx;
  147. font-family: PingFangSC-Semibold, PingFang SC;
  148. font-weight: 600;
  149. color: #2f3438;
  150. line-height: 34rpx;
  151. margin-bottom: 10rpx;
  152. }
  153. .bottom_pur {
  154. font-size: 16rpx;
  155. font-family: PingFangSC-Regular, PingFang SC;
  156. font-weight: 400;
  157. text-align: center;
  158. color: #ffffff;
  159. line-height: 32rpx;
  160. width: 116rpx;
  161. height: 32rpx;
  162. background: #e28843;
  163. border-radius: 14rpx;
  164. }
  165. }
  166. }
  167. }
  168. </style>