chat.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <template>
  2. <view class="content">
  3. <view class="w h-88 flex ai_center jc_center mgt-88 p-rel">
  4. <image
  5. @click="$navBack()"
  6. class="w-48 h-48 abs_left"
  7. style="left: 32rpx"
  8. src="/static/image/common/left_arrow_icon.png"
  9. mode="scaleToFill"
  10. />
  11. <view class="text-36 text-500 text-070202">用户昵称123</view>
  12. </view>
  13. <view class="message-box pdx-32">
  14. <view class="w flex fd_c ai_center" v-for="item in 5" :key="item">
  15. <view class="text-20 text-500 text-B9B9B9 mgt-32 mgb-32">
  16. 2025/08/8 16:00
  17. </view>
  18. <view class="ims_item w flex ai_center mgb-24">
  19. <view class="ims_head">
  20. <image
  21. class="w-80 h-80 radio-circle"
  22. src="/static/image/my/my_default_avatar.png"
  23. mode="scaleToFill"
  24. />
  25. </view>
  26. <view class="ims_conten ims_conten_left mgl-16"
  27. >这是一条消息内容</view
  28. >
  29. </view>
  30. <view class="ims_item w flex ai_center jc_end mgb-24">
  31. <view class="ims_conten ims_conten_right mgl-16"
  32. >这是一条消息内容</view
  33. >
  34. <view class="ims_head">
  35. <image
  36. class="w-80 h-80 radio-circle"
  37. src="/static/image/my/user_avatar_80.png"
  38. mode="scaleToFill"
  39. />
  40. </view>
  41. </view>
  42. <view class="text-20 text-500 text-B9B9B9 mgt-32 mgb-32"> 16:00 </view>
  43. <view class="ims_item w flex ai_center mgb-24">
  44. <view class="ims_head">
  45. <image
  46. class="w-80 h-80 radio-circle"
  47. src="/static/image/my/my_default_avatar.png"
  48. mode="scaleToFill"
  49. />
  50. </view>
  51. <view class="ims_conten ims_conten_left mgl-16"
  52. >这是最新一条消息内容</view
  53. >
  54. </view>
  55. </view>
  56. </view>
  57. <view class="input_box">
  58. <u--input class="input" placeholder="请输入消息内容">
  59. <template slot="suffix">
  60. <image
  61. class="w-48 h-48 radio-circle"
  62. src="/static/image/my/emoji_icon.png"
  63. mode="scaleToFill"
  64. />
  65. </template>
  66. </u--input>
  67. </view>
  68. </view>
  69. </template>
  70. <script>
  71. export default {
  72. data() {
  73. return {};
  74. },
  75. onLoad() {},
  76. methods: {},
  77. };
  78. </script>
  79. <style scoped lang="scss">
  80. .content {
  81. width: 100vw;
  82. height: 100vh;
  83. display: flex;
  84. flex-direction: column;
  85. .message-box {
  86. flex: 1;
  87. // background-color: #d2d1d1;
  88. display: flex;
  89. flex-direction: column;
  90. align-items: center;
  91. overflow-y: auto;
  92. padding-bottom: 800rpx;
  93. }
  94. }
  95. .ims_conten {
  96. display: inline-flex;
  97. height: 80rpx;
  98. padding: 20rpx 24rpx;
  99. justify-content: center;
  100. align-items: center;
  101. gap: 20rpx;
  102. flex-shrink: 0;
  103. border-radius: 0 24rpx 24rpx 24rpx;
  104. text-align: center;
  105. font-family: "MiSans VF";
  106. font-size: 32rpx;
  107. font-style: normal;
  108. font-weight: 400;
  109. line-height: normal;
  110. letter-spacing: -0.66rpx;
  111. }
  112. .ims_conten_left {
  113. color: #070202;
  114. background: #f3f4f4;
  115. }
  116. .ims_conten_right {
  117. color: #ffffff;
  118. background: #fe6505;
  119. }
  120. .input_box {
  121. width: 100vw;
  122. padding: 0 32rpx;
  123. padding-top: 16rpx;
  124. padding-bottom: 84rpx;
  125. background-color: #fff;
  126. box-shadow: 0 -12rpx 24rpx 0 #0000000a;
  127. .input {
  128. width: 100%;
  129. height: 80rpx;
  130. flex-shrink: 0;
  131. border-radius: 64rpx;
  132. background: #f6f6f6;
  133. font-family: "MiSans VF";
  134. font-size: 28rpx;
  135. font-style: normal;
  136. font-weight: 400;
  137. line-height: 40rpx;
  138. letter-spacing: 0.66rpx;
  139. }
  140. }
  141. </style>