兼兼街公众号代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

167 lines
3.2 KiB

  1. <template>
  2. <view class="active-card">
  3. <view >
  4. <u--image :showLoading="true" :src="item.image" ></u--image>
  5. </view>
  6. <view class="active-title">{{item.title}}</view>
  7. <view class="active-time flex align-center">
  8. <text>{{item.longTitle}}</text>
  9. </view>
  10. <view class="active-time2 flex align-center">
  11. <text >
  12. 库存{{item.num}}
  13. </text>
  14. </view>
  15. <view class="active-time2 flex align-center">
  16. <text>
  17. 浏览量{{item.clickNum}}
  18. </text>
  19. </view>
  20. <view class="active-time2 flex align-center">
  21. <text>
  22. 价格{{item.price}}
  23. </text>
  24. </view>
  25. <view class="active-menu flex align-center justify-between">
  26. <view class="menu-price">
  27. <text class="price">积分: {{item.intgerPrice}}</text>
  28. </view>
  29. <view class="menu-btn" @click="seeDetail">{{text}}</view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default{
  35. props:{
  36. text:{
  37. type:String,
  38. default:'查看详情'
  39. },
  40. item:{
  41. type:Object,
  42. },
  43. i:{
  44. type:Number,
  45. }
  46. },
  47. data(){
  48. return{
  49. }
  50. },
  51. methods:{
  52. seeDetail(){
  53. this.$emit('seeDetail',this.item)
  54. }
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. .active-card {
  60. background: #ffffff;
  61. border-radius: 24rpx;
  62. box-shadow: 13rpx 13rpx 16rpx 15rpx rgba(0,0,0,0.16);
  63. overflow: hidden;
  64. padding-bottom: 10rpx;
  65. margin-bottom: 20rpx;
  66. font-size: 28rpx;
  67. padding: 16rpx 16rpx;
  68. .active-title {
  69. word-wrap:break-word;
  70. word-break:break-all;
  71. font-size: 32rpx;
  72. color: #000;
  73. font-weight: 700;
  74. margin-top: 20rpx;
  75. line-height: 60rpx;
  76. /* 文本不会换行显示 */
  77. white-space: nowrap;
  78. /* 超出盒子部分隐藏 */
  79. overflow: hidden;
  80. /* 文本超出的部分打点显示 */
  81. text-overflow: ellipsis;
  82. }
  83. .active-time {
  84. word-wrap:break-word;
  85. word-break:break-all;
  86. color: #707070;
  87. font-size: 28rpx;
  88. margin: 20rpx 0;
  89. image {
  90. width: 33rpx;
  91. height: 33rpx;
  92. margin-right: 27rpx;
  93. }
  94. /* 文本不会换行显示 */
  95. white-space: nowrap;
  96. /* 超出盒子部分隐藏 */
  97. overflow: hidden;
  98. /* 文本超出的部分打点显示 */
  99. text-overflow: ellipsis;
  100. }
  101. .active-add {
  102. color: #707070;
  103. font-size: 28rpx;
  104. word-wrap:break-word;
  105. word-break:break-all;
  106. /* 文本不会换行显示 */
  107. white-space: nowrap;
  108. /* 超出盒子部分隐藏 */
  109. overflow: hidden;
  110. /* 文本超出的部分打点显示 */
  111. text-overflow: ellipsis;
  112. // overflow: hidden;/*这个参数根据需求来决定要不要*/
  113. image {
  114. width: 30rpx;
  115. height: 35rpx;
  116. margin-right: 27rpx;
  117. }
  118. }
  119. .active-time2 {
  120. color: #707070;
  121. font-size: 28rpx;
  122. margin: 20rpx 0;
  123. image {
  124. width: 33rpx;
  125. height: 33rpx;
  126. margin-right: 27rpx;
  127. }
  128. }
  129. .active-menu {
  130. margin-top: 21rpx;
  131. padding: 0 10rpx;
  132. .menu-price {
  133. font-size: 32rpx;
  134. .price {
  135. color: #D33D3E;
  136. font-size: 40rpx;
  137. }
  138. }
  139. .menu-btn {
  140. width: 213rpx;
  141. height: 79rpx;
  142. display: flex;
  143. align-items: center;
  144. justify-content: center;
  145. //background-color: #00CCCC;
  146. //border-radius: 40rpx;
  147. color: #00CCCC;
  148. font-size: 32rpx;
  149. }
  150. }
  151. }
  152. </style>