app-detail-top.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <template>
  2. <view class="app-detail-top dir-left-nowrap">
  3. <image class="app-image" :src="cover_pic"></image>
  4. <view class="app-content dir-top-nowrap">
  5. <text class="app-name">{{name}}</text>
  6. <view class="app-price">
  7. <text class="app-group-min-price" :class="theme +'-m-text ' + theme">{{price}}</text>
  8. <text class="app-origin-price">{{original_price}}</text>
  9. </view>
  10. <view class="app-attr">
  11. <text class="app-people-num" :class="theme +'-m-text ' + theme + '-m-back-o ' + theme">{{people_num}}人团</text>
  12. <text :class="theme +'-m-text '+ theme + '-m-back-o ' + theme">拼团省{{group_economize_price}}</text>
  13. </view>
  14. <image class="app-icon" v-if="status === 2" src="/plugins/pt/image/pt-success.png"></image>
  15. <image class="app-icon" v-else-if="status === 3 || status === 4" src="/plugins/pt/image/pt-fail.png"></image>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. name: "app-detail-top",
  22. props: {
  23. cover_pic: String,
  24. name: String,
  25. original_price: String,
  26. price: String,
  27. people_num: String,
  28. status: Number,
  29. group_economize_price: String,
  30. theme: String
  31. }
  32. }
  33. </script>
  34. <style scoped lang="scss">
  35. .app-detail-top {
  36. width: #{750rpx};
  37. height: #{260+24rpx};
  38. background-color: white;
  39. padding: #{24rpx} #{24rpx} 0 #{24rpx};
  40. box-sizing: border-box;
  41. .app-image {
  42. width: #{260rpx};
  43. height: #{260rpx};
  44. margin-right: #{24rpx};
  45. background-color: pink;
  46. }
  47. .app-content {
  48. width: #{750-48-260-24rpx};
  49. height: #{260rpx};
  50. background-color: white;
  51. padding-top: #{8rpx};
  52. box-sizing: border-box;
  53. .app-name {
  54. font-size: #{26rpx};
  55. color: #353535;
  56. line-height: #{29rpx};
  57. word-break: break-all;
  58. text-overflow: ellipsis;
  59. display: -webkit-box;
  60. -webkit-box-orient: vertical;
  61. -webkit-line-clamp: 3;
  62. overflow: hidden;
  63. }
  64. .app-price {
  65. margin-top: #{28rpx};
  66. >text:before {
  67. content: '¥';
  68. font-size: #{26rpx};
  69. }
  70. .app-group-min-price {
  71. font-size: #{48rpx};
  72. }
  73. .app-origin-price {
  74. font-size: #{24rpx};
  75. color: #999999;
  76. margin-left: #{16rpx};
  77. text-decoration: line-through;
  78. }
  79. }
  80. .app-attr {
  81. margin-top: #{16rpx};
  82. >text {
  83. display: inline-block;
  84. height: #{44rpx};
  85. line-height: #{44rpx};
  86. font-size: #{24rpx};
  87. padding: 0 #{12rpx};
  88. box-sizing: border-box;
  89. }
  90. .app-people-num {
  91. margin-right: #{6rpx};
  92. }
  93. }
  94. .app-icon {
  95. position: absolute;
  96. top: #{112rpx};
  97. right: #{24rpx};
  98. width: #{140rpx};
  99. height: #{140rpx};
  100. }
  101. }
  102. }
  103. </style>