index.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <template>
  2. <view class="container">
  3. <view class="topBox">
  4. <view class="topTitle">在线咨询</view>
  5. <view class="search-box flex" @click="clickSearch()">
  6. <image class="search" src="/static/image/search01.png" mode=""></image>
  7. <view class="search-font">搜索</view>
  8. </view>
  9. </view>
  10. <view class="listBox">
  11. <view class="list flex_item" v-for="item,index in list" :key="index" @click="toChat(item)">
  12. <image class="avatar" src="https://cdn.uviewui.com/uview/album/1.jpg"></image>
  13. <view class="listInfo">
  14. <view class="infoTpl flex">
  15. <view class="nameBox flex_item">
  16. <view class="name">{{item.name || '张教授'}}</view>
  17. <view class="nameTip" v-if="item.tip">{{item.tip}}</view>
  18. </view>
  19. <view class="time">2023.12.09 12:00:00</view>
  20. </view>
  21. <view class="chat line1">现在过去方便吗</view>
  22. </view>
  23. </view>
  24. </view>
  25. <pageFooter @newDataStatus="newDataStatus"></pageFooter>
  26. </view>
  27. </template>
  28. <script>
  29. import pageFooter from "../components/pageFooter/index.vue";
  30. import { mapGetters } from "vuex";
  31. export default {
  32. components: {
  33. pageFooter,
  34. },
  35. computed: mapGetters(["isLogin", "uid"]),
  36. data() {
  37. return {
  38. isFooter: false,
  39. list:[{tip:'3T健康台州店',name:"李教授"},{},{},{},{},{}]
  40. };
  41. },
  42. onReachBottom: function () {},
  43. onLoad(options) {},
  44. onUnload() {},
  45. onReady() {},
  46. onShow() {},
  47. methods: {
  48. //搜索
  49. clickSearch(){},
  50. //跳转聊天页面
  51. toChat(item){
  52. uni.navigateTo({
  53. url:'/pageExpert/chat/details?name='+item.name
  54. })
  55. },
  56. newDataStatus(val) {
  57. this.isFooter = val;
  58. },
  59. },
  60. };
  61. </script>
  62. <style scoped lang="scss">
  63. .topBox{
  64. padding: 25rpx 25rpx;
  65. width: 100%;
  66. background: linear-gradient(90deg, #50EAD2, #08C4E6);
  67. .topTitle{
  68. text-align: center;
  69. font-size: 34rpx;
  70. font-weight: 500;
  71. color: #FFFFFF;
  72. padding-bottom: 33rpx;
  73. }
  74. }
  75. .search-box {
  76. justify-content: center;
  77. height: 70rpx;
  78. border-radius: 12rpx;
  79. background-color: #FFFFFF;
  80. .search {
  81. width: 34rpx;
  82. height: 34rpx;
  83. }
  84. .search-font {
  85. margin-left: 14rpx;
  86. font-size: 28rpx;
  87. font-family: PingFang SC;
  88. font-weight: 500;
  89. color: #cbcbcb;
  90. }
  91. }
  92. .listBox{
  93. background-color: #FFFFFF;
  94. padding: 25rpx 28rpx;
  95. .list{
  96. border-bottom: 1rpx solid #F0F0F0;
  97. padding: 25rpx 0rpx;
  98. &:last-child{
  99. border-bottom: none;
  100. }
  101. .avatar{
  102. width: 133rpx;
  103. height: 133rpx;
  104. border-radius: 12rpx;
  105. }
  106. .listInfo{
  107. width: calc(100% - 80rpx);
  108. padding-left: 20rpx;
  109. .infoTpl{
  110. .nameBox{
  111. .name{
  112. font-size: 32rpx;
  113. font-weight: 500;
  114. color: #333333;
  115. padding-right: 12rpx;
  116. }
  117. .nameTip{
  118. border: 1px solid #54B8C8;
  119. border-radius: 5rpx;
  120. font-size: 22rpx;
  121. font-weight: 500;
  122. color: #0BC5E5;
  123. padding: 2rpx 10rpx;
  124. }
  125. }
  126. .time{
  127. font-size: 24rpx;
  128. font-weight: 500;
  129. color: #999999;
  130. }
  131. }
  132. .chat{
  133. font-size: 28rpx;
  134. font-weight: 500;
  135. color: #999999;
  136. padding-top: 18rpx;
  137. }
  138. }
  139. }
  140. }
  141. </style>