hot-consult.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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(https://wuye.nxzhsq.cn/oss/group1/M00/00/01/iwlnq1-_2IiAFB-HAAAQn95tidI930.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}}</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. methods: {
  36. onTap() {
  37. this.$emit('onTap');
  38. },
  39. detailTap(item) {
  40. this.$emit('detailTap',item);
  41. }
  42. }
  43. }
  44. </script>
  45. <style lang="scss" scoped>
  46. .container {
  47. background-color: #ffffff;
  48. height: 110rpx;
  49. }
  50. .swiper {
  51. height: 90rpx;
  52. }
  53. .swiper-item {
  54. font-size: 24rpx;
  55. color: #323232;
  56. text-overflow: ellipsis;
  57. white-space: nowrap;
  58. overflow: hidden;
  59. height: 40rpx;
  60. margin: 6rpx 0rpx;
  61. }
  62. .text-font {
  63. width: 100rpx;
  64. height: 100rpx;
  65. margin: 10rpx 10rpx 10rpx 20rpx;
  66. }
  67. </style>