notice.vue 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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.noticeId)">
  9. <view class="tit over">{{ite.noticeTitle}}</view>
  10. <view class="num flexcc">{{ite.num}}</view>
  11. <image :src="rimg" class="rimg"></image>
  12. <!-- <view class="time">{{ite.issuerTime}}</view> -->
  13. <!-- <view class="time" v-if="ite.createTime">{{ite.createTime.substring(0,10)}}</view> -->
  14. </view>
  15. </swiper-item>
  16. </swiper>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. props:{
  23. autoplay: {
  24. type: Boolean,
  25. default () {
  26. return false
  27. }
  28. },
  29. confdat:{},
  30. activeColor:{
  31. type:String,
  32. default () {
  33. return '#000000'
  34. }
  35. },
  36. nactiveColor:{
  37. type:String,
  38. default () {
  39. return 'rgba(0, 0, 0, .3)'
  40. }
  41. },
  42. noticelist:{
  43. type: Array,
  44. default () {
  45. return []
  46. }
  47. }
  48. },
  49. data(){
  50. return{
  51. tztip:require('@/static/images/home/tips.png'),
  52. rimg:require('@/static/images/home/rimg.png'),
  53. interval: 2000,
  54. duration: 500
  55. }
  56. },
  57. methods:{
  58. getRoad(){
  59. console.log(1)
  60. },
  61. getDetail(e){
  62. this.$emit('getNoticeDet',e)
  63. }
  64. },
  65. onLoad: function() {
  66. }
  67. }
  68. </script>
  69. <style lang="scss" scoped>
  70. .hswip /deep/ .uni-swiper-dots-vertical{right: 0;}
  71. .hswip /deep/ .uni-swiper-dot{width: 10rpx; height: 10rpx;}
  72. .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;
  73. .tipimg{width: 38rpx;height: 40rpx;flex: 0 0 auto;margin-right: 22rpx;}
  74. .swiper{flex: 1;height: 100rpx;
  75. .swipers{height: 100rpx;}
  76. .tit{flex: 1;font-weight: 500;font-size: 26rpx;color: #272707;}
  77. .num{font-weight: bold;
  78. 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;}
  79. .rimg{width: 14rpx;height: 24rpx;margin-left: 14rpx;}
  80. }
  81. }
  82. </style>