goodsItem.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view class="goods-item">
  3. <image src="@/static/image/home1/logo.png" mode="aspectFill"></image>
  4. <view class="goods-info">
  5. <view class="goods-name">史士昊老师四神汤健脾消食疗法史士昊老师四神汤健脾消食疗法</view>
  6. <view class="price-box">
  7. <text class="price-box-unit">¥</text>
  8. <text class="price-box-integer">300</text>
  9. <text class="price-box-decimal">.00</text>
  10. <text class="price-box-text">/日</text>
  11. <text class="buynum">5920 人已购</text>
  12. </view>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. name: "goodsItem",
  19. data() {
  20. return {
  21. };
  22. }
  23. }
  24. </script>
  25. <style lang="scss" scoped>
  26. .goods-item {
  27. width: 342rpx;
  28. background: #FFFFFF;
  29. border-radius: 16rpx 16rpx 16rpx 16rpx;
  30. overflow: hidden;
  31. font-family: PingFang SC, PingFang SC;
  32. font-weight: 400;
  33. font-size: 28rpx;
  34. color: #000000;
  35. image {
  36. width: 342rpx;
  37. height: 342rpx;
  38. }
  39. .goods-info {
  40. padding: 12rpx 20rpx 32rpx 20rpx;
  41. }
  42. .goods-name {
  43. overflow: hidden;
  44. text-overflow: ellipsis;
  45. display: -webkit-box;
  46. -webkit-line-clamp: 2;
  47. -webkit-box-orient: vertical;
  48. }
  49. .price-box {
  50. font-family: Roboto, Roboto;
  51. font-weight: bold;
  52. font-size: 36rpx;
  53. color: #FF5C03;
  54. margin: 22rpx 0;
  55. &-unit {
  56. font-weight: 600;
  57. font-size: 20rpx;
  58. }
  59. &-integer {
  60. font-size: 26rpx;
  61. }
  62. &-decimal {
  63. font-weight: 600;
  64. font-size: 20rpx;
  65. }
  66. &-text {
  67. font-family: PingFang SC, PingFang SC;
  68. font-weight: 500;
  69. font-size: 22rpx;
  70. }
  71. .buynum {
  72. font-weight: 400;
  73. font-size: 22rpx;
  74. color: #757575;
  75. line-height: 22rpx;
  76. margin-left: 16rpx;
  77. }
  78. }
  79. }
  80. </style>