notice.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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.zxNoticeId)">
  8. <view class="tit over">{{ite.noticeTitle}}</view>
  9. <view class="time">{{ite.issuerTime}}</view>
  10. </view>
  11. </swiper-item>
  12. </swiper>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. props:{
  19. autoplay: {
  20. type: Boolean,
  21. default () {
  22. return false
  23. }
  24. },
  25. confdat:{},
  26. noticelist:{
  27. type: Array,
  28. default () {
  29. return []
  30. }
  31. }
  32. },
  33. data(){
  34. return{
  35. tztip:require('@/static/images/home/tztip.png'),
  36. interval: 2000,
  37. duration: 500
  38. }
  39. },
  40. methods:{
  41. getRoad(){
  42. console.log(1)
  43. },
  44. getDetail(e){
  45. this.$emit('getNoticeDet',e)
  46. }
  47. },
  48. onLoad: function() {
  49. }
  50. }
  51. </script>
  52. <style lang="scss" scoped>
  53. .hswip{width: 100%;background: #F7F7FF;border-radius: 10rpx;height: 92rpx;padding: 0 26rpx 0 28rpx;box-sizing: border-box;
  54. image{width: 64rpx;height: 46rpx;flex: 0 0 auto;margin-right: 24rpx;}
  55. .swiper{flex: 1;height: 92rpx;
  56. .swipers{height: 92rpx;}
  57. .tit{flex: 1;font-weight: bold;font-size: 26rpx;color: #222327;}
  58. .time{font-weight: 500;font-size: 22rpx;color: #878787;flex: 0 0 auto;margin-left: 40rpx;}
  59. }
  60. }
  61. </style>