coupon.vue 2.1 KB

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