pro-item.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <template>
  2. <view class="flex-row section_2 view_6" @tap="navTo('/pages/mang/detail',{id:info.id},{isCheckLogin:true})">
  3. <image
  4. :src="info.goods_img"
  5. class="group_11"
  6. mode="aspectFill"
  7. />
  8. <view class="flex-col text_21 view_7">
  9. <text class="text_25 clamp">{{info.goods_name}}</text>
  10. <view class="stars align-center">
  11. <image
  12. src="/static/mang_star.png"
  13. class="image_14"
  14. v-for="(item,idx) in info.rank"
  15. :key="idx"
  16. />
  17. </view>
  18. <text class="text_26">随机搭配</text>
  19. <view class="flex-row group_16">
  20. <view class="group_17">
  21. <text class="text_27">¥</text>
  22. <text class="text_28">{{info.shop_price}}</text>
  23. </view>
  24. <text class="text_29">¥{{info.market_price}}</text>
  25. </view>
  26. </view>
  27. <text class="text_30" v-if="info.distance">{{info.distance}}</text>
  28. <view class="flex-col text-wrapper_2"><text class="text_23 text_31 clamp">仅剩{{info.num}}份</text></view>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. data() {
  34. return {};
  35. },
  36. props: {
  37. //请求数据
  38. info:{
  39. type:Object,
  40. default:()=>({})
  41. },
  42. },
  43. methods: {
  44. }
  45. };
  46. </script>
  47. <style lang="scss" scoped>
  48. .section_2 {
  49. width: 690rpx;
  50. margin:0 auto 24rpx;
  51. padding: 24rpx 14rpx 24rpx 24rpx;
  52. background-color: #ffffff;
  53. box-shadow: 0px 6rpx 10rpx #2a2a2a14;
  54. border-radius: 20rpx;
  55. position: relative;
  56. .text-wrapper_2 {
  57. padding: 8rpx 0 16rpx;
  58. background-image: url('/static/mang-listbg.png');
  59. background-size: 100% 100%;
  60. background-repeat: no-repeat;
  61. position: absolute;
  62. right: -10rpx;
  63. top: 26rpx;
  64. width: 120rpx;
  65. }
  66. .text_23 {
  67. margin-left: 12rpx;
  68. margin-right: 6rpx;
  69. color: #ffffff;
  70. font-size: 24rpx;
  71. font-family: PingFang;
  72. max-width: 120rpx;
  73. }
  74. // .text_31 {
  75. // margin-left: 12rpx;
  76. // margin-right: 6rpx;
  77. // }
  78. }
  79. .view_6 {
  80. padding: 24rpx 18rpx 24rpx 24rpx;
  81. }
  82. .group_11 {
  83. flex-shrink: 0;
  84. width: 200rpx;
  85. height: 200rpx;
  86. border-radius: 20rpx;
  87. }
  88. .text_21 {
  89. margin-top: 100rpx;
  90. color: #999999;
  91. font-size: 24rpx;
  92. font-family: PingFang;
  93. line-height: 18rpx;
  94. }
  95. .view_7 {
  96. margin-top: initial;
  97. color: initial;
  98. font-size: initial;
  99. font-family: initial;
  100. line-height: initial;
  101. margin-left: 19rpx;
  102. flex: 1 1 auto;
  103. align-self: center;
  104. }
  105. .text_25 {
  106. color: #333333;
  107. font-size: 30rpx;
  108. font-family: PingFang;
  109. max-width: 360rpx;
  110. }
  111. .stars{
  112. margin-top: 12rpx;
  113. .image_14 {
  114. width: 28rpx;
  115. height: 28rpx;
  116. margin-right: 4rpx;
  117. }
  118. }
  119. .text_26 {
  120. margin-top: 20rpx;
  121. align-self: flex-start;
  122. color: #999999;
  123. font-size: 24rpx;
  124. font-family: PingFang;
  125. line-height: 23rpx;
  126. }
  127. .group_16 {
  128. margin-top: 37rpx;
  129. padding: 0 2rpx;
  130. }
  131. .group_17 {
  132. line-height: 28rpx;
  133. height: 29rpx;
  134. }
  135. .text_27 {
  136. color: #ff3e3e;
  137. font-size: 24rpx;
  138. font-family: PingFang;
  139. line-height: 19rpx;
  140. }
  141. .text_28 {
  142. color: #ff3e3e;
  143. font-size: 36rpx;
  144. font-family: PingFang;
  145. line-height: 28rpx;
  146. }
  147. .text_29 {
  148. margin-left: 10rpx;
  149. margin-top: 9rpx;
  150. color: #999999;
  151. font-size: 24rpx;
  152. font-family: PingFang;
  153. line-height: 20rpx;
  154. text-decoration: line-through;
  155. }
  156. .text_30 {
  157. z-index: 2;
  158. position: absolute;
  159. top: 130rpx;
  160. right: 20rpx;
  161. color: #999999;
  162. font-size: 24rpx;
  163. font-family: PingFang;
  164. }
  165. </style>