coupon-description.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <template>
  2. <view class="coupon-description" :class="'entry-' + entryType">
  3. <view class="title" v-text="description.title"></view>
  4. <view class="description">
  5. <view class="tip" v-text="description.tip"></view>
  6. <view class="content" v-text="description.content"></view>
  7. </view>
  8. </view>
  9. </template>
  10. <script>
  11. import description from './config/description.js'
  12. export default {
  13. data() {
  14. return {
  15. entryType: 1,
  16. descriptionList: description
  17. }
  18. },
  19. computed: {
  20. description() {
  21. return this.descriptionList[this.entryType - 1]
  22. }
  23. },
  24. onLoad(options) {
  25. this.entryType = options.entryType
  26. }
  27. }
  28. </script>
  29. <style lang="scss" scoped>
  30. $bg-coupon-desc-01: url('https://static.caimei365.com/app/mini-hehe/icon/bg-coupon-desc-01.png');
  31. $bg-coupon-desc-02: url('https://static.caimei365.com/app/mini-hehe/icon/bg-coupon-desc-02.png');
  32. $bg-coupon-desc-03: url('https://static.caimei365.com/app/mini-hehe/icon/bg-coupon-desc-03.png');
  33. .coupon-description {
  34. background-size: 750rpx 497rpx;
  35. .title {
  36. font-size: 60rpx;
  37. font-weight: bold;
  38. padding-top: 68rpx;
  39. text-align: center;
  40. @include ellipsis(1);
  41. }
  42. .description {
  43. @extend .cm-flex-center;
  44. flex-direction: column;
  45. justify-content: flex-start;
  46. width: 702rpx;
  47. margin: 0 24rpx;
  48. background-position: center;
  49. background-repeat: no-repeat;
  50. background-size: 702rpx 610rpx;
  51. .tip {
  52. width: 360rpx;
  53. height: 64rpx;
  54. font-size: 34rpx;
  55. font-weight: bold;
  56. line-height: 60rpx;
  57. text-align: center;
  58. @include ellipsis(1);
  59. }
  60. .content {
  61. width: 622rpx;
  62. margin-top: 48rpx;
  63. box-sizing: border-box;
  64. padding: 24rpx;
  65. background: #fef8f3;
  66. border-radius: 24rpx;
  67. font-size: 28rpx;
  68. font-weight: 400;
  69. line-height: 64rpx;
  70. text-align: justify;
  71. text-indent: 2em;
  72. }
  73. }
  74. &.entry-1 {
  75. background: linear-gradient(180deg, #f9ddc2 0%, rgba(255, 255, 255, 0) 100%) no-repeat;
  76. .title {
  77. color: #ee6531;
  78. }
  79. .description {
  80. background-image: $bg-coupon-desc-01;
  81. height: 610rpx;
  82. .tip {
  83. margin-top: 126rpx;
  84. color: #765334;
  85. }
  86. .content {
  87. height: 333rpx;
  88. color: #ee6531;
  89. }
  90. }
  91. }
  92. &.entry-2 {
  93. background: linear-gradient(180deg, #d9f2fd 0%, rgba(255, 255, 255, 0) 100%) no-repeat;
  94. .title {
  95. color: #4197ef;
  96. }
  97. .description {
  98. background-image: $bg-coupon-desc-02;
  99. height: 628rpx;
  100. .tip {
  101. margin-top: 114rpx;
  102. color: #fff;
  103. }
  104. .content {
  105. height: 376rpx;
  106. color: #4197ef;
  107. }
  108. }
  109. }
  110. &.entry-3 {
  111. background: linear-gradient(180deg, #ffd1d1 0%, rgba(255, 255, 255, 0) 100%) no-repeat;
  112. .title {
  113. color: #FF445E;
  114. }
  115. .description {
  116. height: 611rpx;
  117. background-image: $bg-coupon-desc-03;
  118. .tip {
  119. margin-top: 126rpx;
  120. color: #765334;
  121. }
  122. .content {
  123. height: 333rpx;
  124. color: #fd314d;
  125. }
  126. }
  127. }
  128. }
  129. </style>