notice.vue 2.6 KB

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