coupon_details.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <view style="width: 100%;height: 100%;background-color: #0B73B9;">
  3. <view class="v">
  4. <view class="" style="font-size: 28rpx;color: #666;">
  5. {{datainfo.title}}
  6. </view>
  7. <view class="" style="font-size: 56rpx;margin-top: 28rpx;margin-bottom: 10rpx;" v-if="datainfo.type == 1">
  8. ¥{{datainfo.money/100}}
  9. </view>
  10. <view class="" style="font-size: 56rpx;margin-top: 28rpx;margin-bottom: 10rpx;" v-else>
  11. {{datainfo.discount}}折
  12. </view>
  13. <view class="">
  14. {{datainfo.name}}
  15. </view>
  16. <view class="buttomstyle">
  17. {{datainfo.status==1?'未使用':datainfo.status==2?'已使用':'已过期'}}
  18. </view>
  19. </view>
  20. <view class="details">
  21. <view class="title">
  22. 有效期
  23. </view>
  24. <view class="">
  25. {{formatDate(datainfo.start_time*1000)}} - {{formatDate(datainfo.end_time*1000)}}
  26. </view>
  27. <view class="title">
  28. 使用规则
  29. </view>
  30. <view class="">
  31. {{datainfo.rules||'暂无使用规则'}}
  32. </view>
  33. <view class="title">
  34. 使用说明
  35. </view>
  36. <view class="">
  37. {{datainfo.desc||'暂无使用说明'}}
  38. </view>
  39. </view>
  40. </view>
  41. </template>
  42. <script>
  43. export default {
  44. onLoad(op) {
  45. this.datainfo = op.data
  46. console.log(this.datainfo)
  47. this.datainfo = JSON.parse(this.datainfo)
  48. },
  49. data() {
  50. return {
  51. datainfo: '',
  52. }
  53. },
  54. methods: {
  55. },
  56. }
  57. </script>
  58. <style>
  59. Page {
  60. height: 100%;
  61. }
  62. .v {
  63. background-color: #fff;
  64. margin: 0 25rpx;
  65. text-align: center;
  66. padding-top: 60rpx;
  67. border-top-left-radius: 25rpx;
  68. border-top-right-radius: 25rpx;
  69. color: #353535;
  70. font-size: 32rpx;
  71. position: relative;
  72. top: 25rpx;
  73. }
  74. .details {
  75. background-color: #fff;
  76. margin: -2rpx 25rpx 0;
  77. font-size: 28rpx;
  78. padding: 25rpx 40rpx 65rpx;
  79. border-bottom-left-radius: 25rpx;
  80. border-bottom-right-radius: 25rpx;
  81. }
  82. .details>.title {
  83. color: #b0b0b0;
  84. font-size: 26rpx;
  85. margin-bottom: 25rpx;
  86. margin-top: 50rpx;
  87. }
  88. .buttomstyle {
  89. background-color: #fff;
  90. color: #0B73B9;
  91. /* border: 0.5px solid #ff4544; */
  92. height: 56rpx;
  93. line-height: 52rpx;
  94. width: 240rpx;
  95. margin: 35rpx auto 0;
  96. font-size: 30rpx;
  97. border-radius: 28rpx;
  98. }
  99. </style>