notice.vue 2.0 KB

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