notice.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <view v-if="noticelist.length">
  3. <view class="hswip flexc" >
  4. <image :src="tztip"></image>
  5. <swiper class="swiper" 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. noticelist:{
  28. type: Array,
  29. default () {
  30. return []
  31. }
  32. }
  33. },
  34. data(){
  35. return{
  36. tztip:require('@/static/images/home/tztip.png'),
  37. interval: 2000,
  38. duration: 500
  39. }
  40. },
  41. methods:{
  42. getRoad(){
  43. console.log(1)
  44. },
  45. getDetail(e){
  46. this.$emit('getNoticeDet',e)
  47. }
  48. },
  49. onLoad: function() {
  50. }
  51. }
  52. </script>
  53. <style lang="scss" scoped>
  54. .hswip{width: 100%;background: #F7F7FF;border-radius: 10rpx;height: 92rpx;padding: 0 26rpx 0 28rpx;box-sizing: border-box;
  55. image{width: 64rpx;height: 46rpx;flex: 0 0 auto;margin-right: 24rpx;}
  56. .swiper{flex: 1;height: 92rpx;
  57. .swipers{height: 92rpx;}
  58. .tit{flex: 1;font-weight: bold;font-size: 26rpx;color: #222327;}
  59. .time{font-weight: 500;font-size: 22rpx;color: #878787;flex: 0 0 auto;margin-left: 40rpx;}
  60. }
  61. }
  62. </style>