notice.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <template>
  2. <view v-if="noticelist.length">
  3. <view class="hswip flexc" >
  4. <image :src="tztip" class="tipimg"></image>
  5. <!-- :indicator-color="nactiveColor" :indicator-active-color="activeColor" -->
  6. <swiper class="swiper" circular :autoplay="autoplay" :interval="interval" :duration="duration" vertical='true'>
  7. <swiper-item v-for="(ite,idx) in noticelist" :key="">
  8. <view class="flexc swipers" @click="getDetail(ite.repairId)">
  9. <!-- <view class="tit over">{{ite.noticeTitle}}</view>
  10. <view class="num flexcc">{{ite.num}}</view> -->
  11. <view class="tit over">您有1条报修信息,请及时查看处理!</view>
  12. <view class="num flexcc">{{noticelist.length}}</view>
  13. <image :src="rimg" class="rimg"></image>
  14. <!-- <view class="time">{{ite.issuerTime}}</view> -->
  15. <!-- <view class="time" v-if="ite.createTime">{{ite.createTime.substring(0,10)}}</view> -->
  16. </view>
  17. </swiper-item>
  18. </swiper>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. props:{
  25. autoplay: {
  26. type: Boolean,
  27. default () {
  28. return false
  29. }
  30. },
  31. confdat:{},
  32. activeColor:{
  33. type:String,
  34. default () {
  35. return '#000000'
  36. }
  37. },
  38. nactiveColor:{
  39. type:String,
  40. default () {
  41. return 'rgba(0, 0, 0, .3)'
  42. }
  43. },
  44. noticelist:{
  45. type: Array,
  46. default () {
  47. return []
  48. }
  49. }
  50. },
  51. data(){
  52. return{
  53. tztip:require('@/static/images/home/tips.png'),
  54. rimg:require('@/static/images/home/rimg.png'),
  55. interval: 2000,
  56. duration: 500
  57. }
  58. },
  59. methods:{
  60. getRoad(){
  61. console.log(1)
  62. },
  63. getDetail(e){
  64. this.$emit('getNoticeDet',e)
  65. }
  66. },
  67. onLoad: function() {
  68. }
  69. }
  70. </script>
  71. <style lang="scss" scoped>
  72. .hswip /deep/ .uni-swiper-dots-vertical{right: 0;}
  73. .hswip /deep/ .uni-swiper-dot{width: 10rpx; height: 10rpx;}
  74. .hswip{width: 100%;background: #ffffff;border-radius: 20rpx;height: 100rpx;padding: 0 24rpx 0 26rpx;box-sizing: border-box;box-shadow: 0px 0px 3px 0px #DEDEDE;
  75. .tipimg{width: 38rpx;height: 40rpx;flex: 0 0 auto;margin-right: 22rpx;}
  76. .swiper{flex: 1;height: 100rpx;
  77. .swipers{height: 100rpx;}
  78. .tit{flex: 1;font-weight: 500;font-size: 26rpx;color: #272707;}
  79. .num{font-weight: bold;
  80. font-size: 22rpx;min-width: 30rpx;height: 30rpx;padding: 0 4rpx;box-sizing: border-box;background: #D32C26;border-radius: 30rpx;color: #FFFFFF;margin-left: 14rpx;}
  81. .rimg{width: 14rpx;height: 24rpx;margin-left: 14rpx;}
  82. }
  83. }
  84. </style>