hot-consult.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <view>
  3. <view class="container">
  4. <view class="flex justify-between" >
  5. <block>
  6. <view class="cu-avatar text-font" style="background-image:url(http://139.9.103.171:1888/miniofile/app/notice.png);"></view>
  7. <view class="margin-top-xs" style="width: 680rpx">
  8. <swiper :circular="true" class="swiper" autoplay="true" vertical="true" interval="5000" next-margin="46rpx">
  9. <swiper-item v-for="(item, index) in swiperTexts" :key="index" @click="detailTap(item)">
  10. <view class="swiper-item" >
  11. <text class="text-orange cuIcon-title padding-right-sm"></text>
  12. <text>{{item.title}} : {{item.notice | formatHtml}}</text>
  13. </view>
  14. </swiper-item>
  15. </swiper>
  16. </view>
  17. </block>
  18. <view class="flex align-center justify-center" style="width: 100rpx;" @click="onTap">
  19. <text class="cuIcon-right"></text>
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. props: {
  28. swiperTexts: {
  29. type: Array,
  30. default: () => {
  31. return []
  32. }
  33. },
  34. },
  35. filters: {
  36. formatHtml (str) {
  37. return str.replace(/<[^>]+>/g, "");
  38. }
  39. },
  40. methods: {
  41. onTap() {
  42. this.$emit('onTap');
  43. },
  44. detailTap(item) {
  45. this.$emit('detailTap',item);
  46. }
  47. }
  48. }
  49. </script>
  50. <style lang="scss" scoped>
  51. .container {
  52. background-color: #ffffff;
  53. height: 110rpx;
  54. }
  55. .swiper {
  56. height: 90rpx;
  57. }
  58. .swiper-item {
  59. font-size: 24rpx;
  60. color: #323232;
  61. text-overflow: ellipsis;
  62. white-space: nowrap;
  63. overflow: hidden;
  64. height: 40rpx;
  65. margin: 6rpx 0rpx;
  66. }
  67. .text-font {
  68. width: 100rpx;
  69. height: 100rpx;
  70. margin: 10rpx 10rpx 10rpx 20rpx;
  71. }
  72. </style>