吉光研途前端代码仓库
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.

70 lines
1.5 KiB

1 month ago
  1. <template>
  2. <view class="flex card" @click="jumpToList(data.id, data.title)">
  3. <image class="card-icon" :src="data.icon" mode="aspectFit"></image>
  4. <view class="flex card-title">
  5. <view>{{ data.title }}</view>
  6. <image class="card-title-icon" src="@/static/image/serve-second-icon.png" mode="widthFix"></image>
  7. </view>
  8. <image class="card-bg" src="@/static/image/card-bg-icon.png" mode="widthFix"></image>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. props: {
  14. data: {
  15. type: Object,
  16. default() {
  17. return {}
  18. }
  19. }
  20. },
  21. methods: {
  22. jumpToList(categoryId, title) {
  23. uni.navigateTo({
  24. url: `/pages_order/serve/search?categoryId=${categoryId}&title=${title}`
  25. })
  26. },
  27. },
  28. }
  29. </script>
  30. <style scoped lang="scss">
  31. .card {
  32. justify-content: flex-start;
  33. column-gap: 78rpx;
  34. position: relative;
  35. width: 100%;
  36. height: 200rpx;
  37. padding: 0 28rpx;
  38. box-sizing: border-box;
  39. background: linear-gradient(to right, rgba($color: #C8C3FD, $alpha: 0.22), #FFFFFF);
  40. border-radius: 10rpx;
  41. box-shadow: 4rpx 4rpx 6rpx 0rpx rgba(0,0,0,0.15);
  42. &-icon {
  43. width: 180rpx;
  44. height: 230rpx;
  45. }
  46. &-title {
  47. column-gap: 14rpx;
  48. font-size: 32rpx;
  49. font-weight: 600;
  50. color: #9082D8;
  51. &-icon {
  52. width: 24rpx;
  53. height: auto;
  54. }
  55. }
  56. &-bg {
  57. width: 142rpx;
  58. height: auto;
  59. position: absolute;
  60. bottom: 0;
  61. right: 8rpx;
  62. }
  63. }
  64. </style>