notice.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <view class="notice">
  3. <view class="content">
  4. <image src="../../static/images/origin/notice.png" mode=""></image>
  5. <swiper class="swiper" :circular="true" :autoplay="true" :vertical="true" :interval="3000" :duration="500">
  6. <swiper-item v-for="(item, index) in list" :key="item.noticeId">
  7. <view class="swiper-item uni-bg-red fs26 font-color-333 overflow" @tap="goToMesDetail(item)">
  8. {{ item.noticeTitle
  9. }}
  10. </view>
  11. </swiper-item>
  12. </swiper>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. props: {
  19. list: {
  20. type: Array
  21. }
  22. },
  23. data() {
  24. return {
  25. }
  26. },
  27. methods: {
  28. goToMesDetail(item) {
  29. uni.navigateTo({
  30. url: '/pages_category_page2/userModule/messageDetail?noticeId=' + item.noticeId,
  31. success: (res) => { },
  32. fail: (err) => { console.log(err, '1') },
  33. complete: () => { }
  34. })
  35. }
  36. }
  37. }
  38. </script>
  39. <style lang="scss">
  40. .notice {
  41. width: 100%;
  42. height: 60rpx;
  43. padding: 0 5%;
  44. box-sizing: border-box;
  45. margin-top: 20rpx;
  46. .content {
  47. width: 100%;
  48. height: 100%;
  49. border-radius: 30rpx;
  50. background: #F5F7FA;
  51. display: flex;
  52. align-items: center;
  53. padding: 0 30rpx;
  54. image {
  55. width: 38rpx;
  56. height: 38rpx;
  57. margin-right: 20rpx;
  58. }
  59. .swiper {
  60. flex: 1;
  61. height: 60rpx;
  62. .swiper-item {
  63. line-height: 60rpx;
  64. }
  65. }
  66. }
  67. }
  68. </style>