coupon.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <template>
  2. <view class="coupon_box">
  3. <view class="other_type">
  4. <view class="text"><span>全面型消费券</span></view>
  5. </view>
  6. <coupon v-for="(item, index) in coupon[0].list" :key="index" v-bind:item="item" theme="#ff0000"></coupon>
  7. <!-- <view class="other_type">
  8. <view class="text"><span>简洁型消费券</span></view>
  9. </view>
  10. <coupon v-for="(item, index) in coupon[0].list" :key="index" v-bind:item="item" types="carts" theme="#ff6c00" color="#ffffff" solid="#ff6c00"></coupon> -->
  11. </view>
  12. </template>
  13. <script>
  14. import coupon from '@/components/modules/tools/coupon/coolc-coupon';
  15. export default {
  16. components: {
  17. coupon
  18. },
  19. data(){
  20. return {
  21. coupon:[{
  22. list: [{
  23. url: "/pages/brand/index/id/1",
  24. money: "150",
  25. title: "满2000减150元",
  26. ticket: "YMC_5c929fbf47235",
  27. seller_name: "太原政府消费券",
  28. end_time: "2019-04-20 01:51:20",
  29. state: "1"
  30. },
  31. {
  32. url: "/pages/brand/index/id/1",
  33. money: "50",
  34. title: "满1000减50元",
  35. ticket: "YMC_5c929fbf47235",
  36. seller_name: "太原政府消费券",
  37. end_time: "2019-04-20 01:51:20",
  38. state: "1"
  39. }]
  40. }]
  41. }
  42. },
  43. onLoad() {
  44. },
  45. methods:{
  46. }
  47. }
  48. </script>
  49. <style lang='scss'>
  50. page { background:white; }
  51. .coupon_box {
  52. height:auto;
  53. display:table;
  54. padding:6upx 26upx 26upx 26upx;
  55. width:100%;
  56. box-sizing: border-box;
  57. }
  58. .other_type {
  59. width:100%;
  60. height:90upx;
  61. padding-top:50upx;
  62. box-sizing: border-box;
  63. .text {
  64. width:100%;
  65. border-top:1px solid #eeeeee;
  66. display:block;
  67. text-align:center;
  68. position:relative;
  69. box-sizing: border-box;
  70. }
  71. .text span {
  72. width:180upx;
  73. height:40upx;
  74. line-height:40upx;
  75. color:#999999;
  76. display:block;
  77. background:#ffffff;
  78. position:absolute;
  79. left:50%; top:50%;
  80. margin-left:-90upx;
  81. margin-top:-20upx;
  82. font-size:24upx;
  83. }
  84. }
  85. </style>