coupon-description.vue 3.7 KB

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