coolc-coupon.vue 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view class="coupon-item" style="background:#F0F7F7">
  3. <view class="coupon-money">
  4. <view class="nick" v-if="!types">{{item.seller_name}}使用</view>
  5. <view class="layof" :style="{color:theme}">¥{{item.money}}</view>
  6. <view class="end_time">{{item.end_time}}前使用</view>
  7. <view v-if="!types">
  8. <view class="tit">券号:{{item.ticket}}</view>
  9. <view class="demand">{{item.title}}</view>
  10. </view>
  11. </view>
  12. <view class="get-btn" v-if="types" :style="{color:color, borderColor:color, background:solid}">选择使用</view>
  13. <navigator class="get-btn" v-if="!types" :style="{color:color, borderColor:color, background:'#F0F7F7'}" :url='item.url'>立即使用</navigator>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. components:{
  19. },
  20. data() {
  21. return {
  22. }
  23. },
  24. props:{
  25. item:{
  26. type: Object
  27. },
  28. types:{
  29. type: String,
  30. default: ''
  31. },
  32. theme:{
  33. type: String,
  34. default: '#ff9000'
  35. },
  36. solid:{
  37. type: String,
  38. default: '#ffffff'
  39. },
  40. color:{
  41. type: String,
  42. default: '#ff9000'
  43. },
  44. },
  45. methods: {
  46. }
  47. }
  48. </script>
  49. <style lang='scss'>
  50. .coupon-item {
  51. width:100%; height:auto;
  52. display:table;
  53. border-radius:10upx;
  54. padding:0 20upx;
  55. margin-top:22upx;
  56. border:1px solid #eeeeee;
  57. position:relative;
  58. box-sizing: border-box;
  59. .coupon-money {
  60. width:465upx;
  61. height:auto;
  62. display:table;
  63. float:left; padding:26upx 0;
  64. border-style:none dotted none none;
  65. border-color:#eeeeee;
  66. .nick { width:100%; height:50upx; line-height:30upx; font-size:24upx; color:#999; }
  67. .tit { width:100%; height:50upx; line-height:50upx; font-size:24upx; color:#999; }
  68. .demand { width:100%; height:30upx; line-height:30upx; font-size:24upx; color:#999; }
  69. .layof { width:100%; height:48upx; line-height:30upx; font-size:44upx; color:#ff9000; font-weight:bold; }
  70. .end_time { width:100%; height:30upx; line-height:30upx; font-size:24upx; color:#999; }
  71. }
  72. .get-btn { width:146upx; height:52upx; line-height:50upx; position:absolute; top:50%; right:26upx; margin-top:-26upx; text-align:center; border-radius:60upx; color:#ff9000; border:1px solid #ff9000; font-size:24upx; float:right; }
  73. }
  74. .coupon-item:after { width:40upx; height:20upx; position:absolute; left:460upx; top:-1px; border-radius:0 0 40upx 40upx; content:""; display:block; background:white; border:1px solid #eeeeee; border-top:0px; }
  75. .coupon-item:before { width:40upx; height:20upx; position:absolute; left:460upx; bottom:-1px; border-radius:40upx 40upx 0 0; content:""; display:block; background:white; border:1px solid #eeeeee; border-bottom:0px; }
  76. </style>