my-product.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <template>
  2. <view class="my-product">
  3. <view class="header">
  4. <view class="title">
  5. 我的商品
  6. </view>
  7. <view style="position: relative;">
  8. <view class="sub-title">全部商品</view>
  9. <view class="release">
  10. <navigator url="/pages/product/product-edit">发布商品</navigator>
  11. </view>
  12. </view>
  13. </view>
  14. <view class="product-list">
  15. <view class="product-item">
  16. <view class="product-image">
  17. <image class="image" :src="image" mode="scaleToFill"></image>
  18. </view>
  19. <view>
  20. <view class="row row-1">
  21. <text class="title"><text class="sxzg-icon">省心直供</text>{{title}}</text>
  22. </view>
  23. <view class="row row-2">
  24. <text class="org-price">¥{{orgPrice}}</text>
  25. </view>
  26. <view class="row row-3">
  27. <text class="sxj-icon">省心价</text>
  28. <text class="price">¥{{price}}</text>
  29. </view>
  30. <view class="row row-4">
  31. <text>发布日期:</text>
  32. <text class="time">2021-02-25 13:12:41</text>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. export default {
  41. data() {
  42. return {
  43. title: "商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称",
  44. orgPrice: "102.20",
  45. price: "100.20"
  46. }
  47. },
  48. methods: {
  49. }
  50. }
  51. </script>
  52. <style lang="scss" scoped>
  53. .my-product {
  54. overflow: hidden;
  55. }
  56. .header {
  57. margin: 20upx;
  58. background: white;
  59. text-align: center;
  60. border-radius: 20upx;
  61. padding-bottom: 10upx;
  62. .title {
  63. height: 100upx;
  64. font-size: 32upx;
  65. line-height: 100upx;
  66. // font-weight: bold;
  67. }
  68. .sub-title {
  69. font-size: 28upx;
  70. color: #999999;
  71. }
  72. .release {
  73. position: absolute;
  74. right: 20upx;
  75. font-size: 24upx;
  76. bottom: 4upx;
  77. }
  78. }
  79. .product-list {
  80. .product-item {
  81. display: flex;
  82. background: white;
  83. margin: 20upx;
  84. padding: 20upx;
  85. .product-image {
  86. width: 180upx;
  87. height: 180upx;
  88. margin-right: 20upx;
  89. }
  90. .image {
  91. width: 180upx;
  92. height: 180upx;
  93. background: #EEEEEE;
  94. }
  95. }
  96. .sxzg-icon {
  97. color: $primary-color;
  98. font-size: 16rpx;
  99. width: 80rpx;
  100. text-align: center;
  101. line-height: normal;
  102. border: 2rpx solid $primary-color;
  103. border-radius: 20rpx;
  104. display: inline-block;
  105. position: relative;
  106. top: -4rpx;
  107. margin-right: 10upx;
  108. // transform: scale(0.9);
  109. }
  110. .title {
  111. font-size: 24rpx;
  112. display: inline-block;
  113. white-space: normal;
  114. display: -webkit-box;
  115. -webkit-box-orient: vertical;
  116. -webkit-line-clamp: 2;
  117. overflow: hidden;
  118. height: 68upx;
  119. }
  120. .row {
  121. // padding: 0 10upx;
  122. }
  123. .row-2 {
  124. display: flex;
  125. justify-content: space-between;
  126. }
  127. .org-price {
  128. font-size: 26rpx;
  129. color: #cccccc;
  130. }
  131. .org-price {
  132. text-decoration: line-through;
  133. }
  134. .sxj-icon {
  135. background: $primary-color;
  136. color: white;
  137. font-size: 20upx;
  138. padding: 0 5upx;
  139. border-radius: 5upx;
  140. vertical-align: middle;
  141. }
  142. .price {
  143. font-size: 26rpx;
  144. color: $primary-color;
  145. font-weight: bold;
  146. }
  147. .row-4 {
  148. font-size: 24upx;
  149. color: #999999;
  150. }
  151. }
  152. </style>