notice.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <template>
  2. <view v-if="noticelist.length">
  3. <view class="hswip" >
  4. <image :src="tips" class="tipimg"></image>
  5. <image :src="voice" class="voiceimg"></image>
  6. <!-- -->
  7. <swiper class="swiper" indicator-dots="true" :indicator-color="nactiveColor" :indicator-active-color="activeColor" circular :autoplay="autoplay" :interval="interval" :duration="duration" vertical='true'>
  8. <swiper-item v-for="(ite,idx) in noticelist" :key="">
  9. <view class="flexc swipers" @click="getDetail(ite.communityId)">
  10. <!-- <view class="tit over">{{ite.noticeTitle}}</view> -->
  11. <view class="tit over">{{ite.communityTitle}}</view>
  12. <!-- <view class="num flexcc">{{ite.num}}</view> -->
  13. <!-- <image :src="rimg" class="rimg"></image> -->
  14. <view class="time">{{ite.publishTime}}</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. tips:require("@/static/images/home/tips.png"),
  54. voice:require("@/static/images/home/voice.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:156rpx;padding: 32rpx 28rpx 0 24rpx;box-sizing: border-box;box-shadow: 0px 0px 6rpx 0px #DEDEDE;position: relative;
  75. .tipimg{width: 168rpx;height: 32rpx;flex: 0 0 auto;margin-right: 22rpx;margin-bottom: 2rpx;}
  76. .voiceimg{width: 96rpx;height: 82rpx;position: absolute;right: 26rpx;top: 12rpx;}
  77. .swiper{flex: 1;height: 72rpx;z-index: 1;
  78. .swipers{height: 72rpx;padding-right: 60rpx;}
  79. .tit{flex: 1;font-weight: 500;font-size: 26rpx;color: #272707;}
  80. .time{font-weight: 500;font-size: 22rpx;color: #AAAAAA;}
  81. .num{font-weight: bold;
  82. 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;}
  83. .rimg{width: 14rpx;height: 24rpx;margin-left: 14rpx;}
  84. }
  85. }
  86. </style>