cm-special.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <view class="special" @click="activeProduct">
  3. <view class="img">
  4. <image :src="activeImage.image" mode="aspectFill" style="width: 100%;height: 100%;"></image>
  5. </view>
  6. <view class="special_title">
  7. <view class="title">
  8. {{activeImage.topic}}
  9. </view>
  10. <button class="special_btn">查看详情</button>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. props: {
  17. activeImage: {
  18. type: Object,
  19. default: () => {}
  20. }
  21. },
  22. data() {
  23. return {}
  24. },
  25. methods: {
  26. activeProduct() {
  27. uni.navigateTo({
  28. url: '/pages/goods/active-product?activeImageId=' + this.activeImage.id
  29. })
  30. },
  31. }
  32. }
  33. </script>
  34. <style lang="scss" scoped>
  35. .special {
  36. border-radius: 8rpx;
  37. margin-bottom: 24rpx;
  38. height: 432rpx;
  39. width: 100%;
  40. box-sizing: border-box;
  41. overflow: hidden;
  42. }
  43. .img {
  44. width: 100%;
  45. height: 360rpx;
  46. box-sizing: border-box;
  47. }
  48. .special_title {
  49. height: 72rpx;
  50. box-sizing: border-box;
  51. padding: 12rpx 24rpx;
  52. background-color: #FFF8EF;
  53. display: flex;
  54. justify-content: space-between;
  55. align-items: center;
  56. }
  57. .special_title .title {
  58. color: #F3B574;
  59. font-size: 26rpx;
  60. }
  61. .special_btn {
  62. border-radius: 8rpx;
  63. padding: 8rpx 16rpx;
  64. box-sizing: border-box;
  65. background-color: #F3B574;
  66. color: #FFFFFF;
  67. font-size: 24rpx;
  68. }
  69. </style>