graceCoupons.vue 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <view class="grace-coupons" :style="{background:coupon.color}">
  3. <view class="left" :style="{background:coupon.ltBg, height:coupon.height}">
  4. <view class="number">
  5. <view class="show" :style="{color:coupon.color}"><text>{{coupon.unit}}</text>{{coupon.number}}</view>
  6. <view class="txt" :style="{color:coupon.color}">{{coupon.txt}}</view>
  7. </view>
  8. <view class="body">
  9. <view class="title">{{coupon.title}}</view>
  10. <view class="desc">{{coupon.desc}}</view>
  11. </view>
  12. <view class="status" v-if="coupon.drawed" :style="{background:coupon.color}">{{coupon.drawed}}</view>
  13. </view>
  14. <view class="right" :style="{height:coupon.height}">{{coupon.btn}}</view>
  15. <view class="sawtooth" :style="{height:coupon.height}">
  16. <view class="circular" v-for="(item, index) in '1234567890'" :key="index"></view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. props: {
  23. coupon : {
  24. type : Object,
  25. default : function () {
  26. return {}
  27. }
  28. }
  29. }
  30. }
  31. </script>
  32. <style scoped>
  33. .grace-coupons{display:flex; flex-wrap:nowrap; border-top-left-radius:10rpx; border-bottom-left-radius:10rpx;}
  34. .grace-coupons .left{width:100%; height:150rpx; padding-right:10rpx; display:flex; justify-content:space-between; align-items:center; border-radius:8rpx; position:relative;}
  35. .grace-coupons .left .number{width:32%; display:flex; flex-wrap:wrap; border-right:1px dashed #D2D2D2;}
  36. .grace-coupons .left .number .show{font-size:50rpx; font-weight:700; line-height:66rpx; text-align:center; width:100%;}
  37. .grace-coupons .left .number text{color:#828282; font-weight:400; font-size:50rpx;}
  38. .grace-coupons .left .number .txt{line-height:26rpx; font-size:22rpx; text-align:center; width:100%;}
  39. .grace-coupons .left .body{width:62%; margin-left:4%; display:flex; flex-wrap:wrap; position:relative;}
  40. .grace-coupons .left .status{display:inline-block; color:#FFFFFF; padding:0 10px; height:36rpx; line-height:36rpx; font-size:20rpx; position:absolute; z-index:1; right:6px; top:8px; border-radius:36rpx;}
  41. .grace-coupons .left .body .title{width:100%; font-size:30rpx; line-height:46rpx;}
  42. .grace-coupons .left .body .desc{color:#999999; margin-top:3px; font-size:24rpx; line-height:36rpx;}
  43. .grace-coupons .right{width:150rpx; height:150rpx; flex-shrink:0; font-size:30rpx; display:flex; align-items:center; justify-content:center; color:#FFF;}
  44. .grace-coupons .sawtooth{width:8px; height:150rpx; overflow:hidden; position:relative; flex-shrink:0;}
  45. .grace-coupons .sawtooth .circular{width:10px; margin:5px; height:10px; border-radius:10px; background:#F9F9F9;}
  46. </style>