鸿宇研学生前端代码
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.

96 lines
1.8 KiB

  1. <template>
  2. <view class="flex card">
  3. <view class="flex price">
  4. ¥<view class="highlight">{{ data.price }}</view>
  5. </view>
  6. <view class="flex flex-column info">
  7. <view class="title">{{ data.label }}</view>
  8. <view class="desc">{{ `有效期至 ${data.validTime}` }}</view>
  9. <button class="btn" @click="jumpToCategory">去使用</button>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. props: {
  16. data: {
  17. type: Object,
  18. default() {
  19. return {}
  20. }
  21. },
  22. value: {
  23. type: String,
  24. default: null,
  25. }
  26. },
  27. data() {
  28. return {
  29. }
  30. },
  31. methods: {
  32. jumpToCategory() {
  33. this.$utils.navigateTo(`/pages/index/category`)
  34. },
  35. },
  36. }
  37. </script>
  38. <style scoped lang="scss">
  39. .card {
  40. column-gap: 24rpx;
  41. padding: 8rpx;
  42. font-family: PingFang SC;
  43. font-weight: 400;
  44. line-height: 1.4;
  45. background: #FFFFFF;
  46. border-radius: 24rpx;
  47. }
  48. .price {
  49. width: 164rpx;
  50. height: 224rpx;
  51. font-size: 24rpx;
  52. font-weight: 500;
  53. color: #FF4800;
  54. background: #FFF2F2;
  55. border-radius: 16rpx;
  56. .highlight {
  57. font-size: 48rpx;
  58. }
  59. }
  60. .info {
  61. flex: 1;
  62. align-items: flex-start;
  63. row-gap: 16rpx;
  64. height: 224rpx;
  65. padding-left: 24rpx;
  66. border-left: 2rpx dashed #DADADA;
  67. .title {
  68. font-size: 32rpx;
  69. font-weight: 500;
  70. color: #181818;
  71. }
  72. .desc {
  73. font-size: 28rpx;
  74. color: #9B9B9B;
  75. }
  76. .btn {
  77. padding: 6rpx 34rpx;
  78. font-family: PingFang SC;
  79. font-size: 30rpx;
  80. font-weight: 500;
  81. line-height: 1.4;
  82. background: linear-gradient(to right, #21FEEC, #019AF9);
  83. border: 2rpx solid #00A9FF;
  84. border-radius: 28rpx;
  85. }
  86. }
  87. </style>