小程序端工程代码
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.

101 lines
2.0 KiB

  1. <template>
  2. <view class="activity-goods-box x-bc" @tap="jump('/pages/activity/GroupDetails/index', { id: cid })">
  3. <view class="img-box">
  4. <slot name="tag"></slot>
  5. <image class="img" :src="img" mode="aspectFill"></image>
  6. </view>
  7. <view class="goods-right y-bc">
  8. <view class="title one-t">{{ title }}</view>
  9. <view class="tip one-t">{{ info }}</view>
  10. <view class="slod-end"><slot name="sell"></slot></view>
  11. <view class=" price-box">
  12. <view class="x-f">
  13. <view class="current">{{ price }}</view>
  14. <view class="original">{{ productPrice }}</view>
  15. </view>
  16. </view>
  17. <slot name="btn"></slot>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. name: 'activityCard',
  24. components: {},
  25. data() {
  26. return {};
  27. },
  28. props: {
  29. cid: 0,
  30. img: '',
  31. title: '',
  32. info: '',
  33. price: '',
  34. productPrice: ''
  35. },
  36. computed: {},
  37. created() {},
  38. methods: {
  39. // 路由跳转
  40. jump(path, parmas) {
  41. this.$yrouter.push({ path: path, query: parmas });
  42. }
  43. }
  44. };
  45. </script>
  46. <style lang="scss">
  47. .activity-goods-box {
  48. padding: 40rpx 20rpx;
  49. background: #fff;
  50. .img-box {
  51. margin-right: 20rpx;
  52. width: 200rpx;
  53. height: 200rpx;
  54. overflow: hidden;
  55. position: relative;
  56. .img {
  57. width: 200rpx;
  58. height: 200rpx;
  59. background-color: #ccc;
  60. }
  61. }
  62. .goods-right {
  63. width: 450rpx;
  64. min-height: 200rpx;
  65. align-items: flex-start;
  66. position: relative;
  67. .title {
  68. font-size: 28rpx;
  69. line-height: 28rpx;
  70. width: 450rpx;
  71. }
  72. .tip {
  73. font-size: 22rpx;
  74. color: #a8700d;
  75. width: 500rpx;
  76. }
  77. .price-box {
  78. .current {
  79. font-size: 28rpx;
  80. font-weight: 500;
  81. color: rgba(225, 33, 43, 1);
  82. }
  83. .original {
  84. font-size: 22rpx;
  85. font-weight: 400;
  86. text-decoration: line-through;
  87. color: rgba(153, 153, 153, 1);
  88. margin-left: 14rpx;
  89. }
  90. }
  91. }
  92. }
  93. </style>