cm-product-info.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <view class="cm-product-info">
  3. <view class="title tui-ellipsis-2">{{ productInfo.name }}</view>
  4. <view class="row tags">
  5. <template v-if="productInfo.tagsList.length > 0">
  6. <view class="tag" v-for="(tag, index) in productInfo.tagsList" :key="index">{{ tag }}</view>
  7. </template>
  8. </view>
  9. <button open-type="share" class="share-btn">
  10. <text class="iconfont icon-fenxiang"></text> <view class="name">分享</view>
  11. </button>
  12. <view class="remark" v-if="false">
  13. <text class="name">备注:</text>
  14. <text class="content">这里是备注名称这里是备注名称这里是备注名称名称称名...</text>
  15. </view>
  16. <view class="line"></view>
  17. <view class="service">
  18. <view class="iconfont icon-wuyoushouhou"><text>无忧退货</text></view>
  19. <view class="iconfont icon-wuyoushouhou"><text>快速退款</text></view>
  20. <view class="iconfont icon-wuyoushouhou"><text>正品保证</text></view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. props: {
  27. productInfo: {
  28. type: Object,
  29. default: () => {}
  30. }
  31. }
  32. }
  33. </script>
  34. <style lang="scss" scoped>
  35. .cm-product-info {
  36. position: relative;
  37. padding: 24rpx 0;
  38. .share-btn {
  39. position: absolute;
  40. right: 24rpx;
  41. top: 24rpx;
  42. display: flex;
  43. justify-content: center;
  44. align-items: center;
  45. flex-direction: column;
  46. color: #999;
  47. .name {
  48. font-size: 22rpx;
  49. }
  50. }
  51. .title {
  52. width: 544rpx;
  53. font-size: 32rpx;
  54. line-height: 48rpx;
  55. text-align: justify;
  56. color: #333333;
  57. }
  58. .tags {
  59. display: flex;
  60. justify-content: flex-start;
  61. align-items: center;
  62. flex-wrap: wrap;
  63. margin-top: 16rpx;
  64. min-height: 36rpx;
  65. .tag {
  66. margin-right: 20rpx;
  67. margin-top: 4rpx;
  68. padding: 0 4rpx;
  69. line-height: 34rpx;
  70. font-size: 20rpx;
  71. color: #ff457b;
  72. background: #fff3f7;
  73. border-radius: 8rpx;
  74. }
  75. }
  76. .remark {
  77. width: 100%;
  78. font-size: 24rpx;
  79. line-height: 24rpx;
  80. margin-top: 42rpx;
  81. overflow: hidden;
  82. text-overflow: ellipsis;
  83. white-space: nowrap;
  84. .name {
  85. color: #999999;
  86. }
  87. .content {
  88. color: #3f3f3f;
  89. }
  90. }
  91. .line {
  92. width: 100%;
  93. height: 1rpx;
  94. margin: 24rpx 0;
  95. background: #e1e1e1;
  96. }
  97. .service {
  98. display: flex;
  99. justify-content: flex-start;
  100. align-items: center;
  101. color: #ff457b;
  102. .iconfont {
  103. margin-right: 60rpx;
  104. font-size: 22rpx;
  105. line-height: 24rpx;
  106. text {
  107. color: #999999;
  108. margin-left: 4rpx;
  109. }
  110. }
  111. }
  112. }
  113. </style>