rollMessage.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <view class="roll-box">
  3. <image class="roll-icon" src="../../static/logo.png" mode="aspectFit"></image>
  4. <view class="roll-list hide_1">
  5. <u-notice-bar icon='' bgColor="" duration="3000" direction="column" @click="lookDetails" :text="rollMsg.map(el => {
  6. return el.title || ''
  7. })">
  8. </u-notice-bar>
  9. <!-- <view class="roll-item hide_1">
  10. 币王BiKing合约交易所代理签约邀您加入币王BiKing合约交易所代理签约邀您加入
  11. </view> -->
  12. </view>
  13. <image class="roll-more" src="../../static/logo.png" mode="aspectFit"></image>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. name: "rollMessage",
  19. props: {
  20. rollMsg: {
  21. type: Array,
  22. default: () => []
  23. }
  24. },
  25. data() {
  26. return {
  27. list: [
  28. '币王BiKing合约交易所代理签约邀您加入币王BiKing合约交易所代理签约邀您加入',
  29. '币王BiKing合约交易所代理签约邀您加入币王BiKing合约交易所代理签约邀您加入',
  30. '币王BiKing合约交易所代理签约邀您加入币王BiKing合约交易所代理签约邀您加入',
  31. '币王BiKing合约交易所代理签约邀您加入币王BiKing合约交易所代理签约邀您加入',
  32. '币王BiKing合约交易所代理签约邀您加入币王BiKing合约交易所代理签约邀您加入',
  33. '币王BiKing合约交易所代理签约邀您加入币王BiKing合约交易所代理签约邀您加入',
  34. '币王BiKing合约交易所代理签约邀您加入币王BiKing合约交易所代理签约邀您加入',
  35. '币王BiKing合约交易所代理签约邀您加入币王BiKing合约交易所代理签约邀您加入'
  36. ]
  37. };
  38. },
  39. methods:{
  40. lookDetails(index){
  41. const id = this.rollMsg[index]?.id;
  42. uni.navigateTo({
  43. url: `/pages/content/article-details?id=${id}`
  44. })
  45. }
  46. }
  47. }
  48. </script>
  49. <style lang="scss" scoped>
  50. .roll-box {
  51. width: 100%;
  52. height: 76rpx;
  53. background-color: $modules-box-bg;
  54. padding: 0 $pages-padding;
  55. display: flex;
  56. justify-content: space-between;
  57. align-items: center;
  58. .roll-icon,
  59. .roll-more {
  60. width: 30rpx;
  61. height: 30rpx;
  62. flex-shrink: 0;
  63. }
  64. .roll-list {
  65. width: calc(100% - 60rpx);
  66. height: 100%;
  67. flex-shrink: 0;
  68. padding: 0 20rpx;
  69. display: flex;
  70. align-items: center;
  71. // .roll-item{
  72. // width: 100%;
  73. // font-size: 26rpx;
  74. // font-family: PingFang SC, PingFang SC-Regular;
  75. // font-weight: 400;
  76. // text-align: left;
  77. // color: #1a1a1a;
  78. // letter-spacing: 0.52px;
  79. // }
  80. ::v-deep .u-notice-bar {
  81. // width: 100%;
  82. padding-left: 0;
  83. padding-right: 0;
  84. .u-notice__swiper__item__text {
  85. font-size: 26rpx !important;
  86. font-family: PingFang SC, PingFang SC-Regular !important;
  87. font-weight: 400 !important;
  88. color: #1a1a1a !important;
  89. letter-spacing: 0.52px !important;
  90. overflow: hidden;
  91. text-overflow: ellipsis;
  92. white-space: nowrap;
  93. word-wrap: break-word;
  94. }
  95. }
  96. }
  97. }
  98. </style>