chat.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <view>
  3. <cu-custom bgColor="bg-luohu" :isBack="true">
  4. <block slot="backText">返回</block>
  5. <block slot="content">聊天</block>
  6. </cu-custom>
  7. <view class="cu-chat">
  8. <view class="cu-item self">
  9. <view class="main">
  10. <view class="content bg-green shadow">
  11. <text>喵喵喵!喵喵喵!喵喵喵!喵喵!喵喵!!喵!喵喵喵!</text>
  12. </view>
  13. </view>
  14. <view class="cu-avatar radius"
  15. style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big107000.jpg);">
  16. </view>
  17. <view class="date">2018年3月23日 13:23</view>
  18. </view>
  19. <view class="cu-info round">对方撤回一条消息!</view>
  20. <view class="cu-item">
  21. <view class="cu-avatar radius"
  22. style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big143004.jpg);">
  23. </view>
  24. <view class="main">
  25. <view class="content shadow">
  26. <text>喵喵喵!喵喵喵!</text>
  27. </view>
  28. </view>
  29. <view class="date "> 13:23</view>
  30. </view>
  31. <view class="cu-info">
  32. <text class="cuIcon-roundclosefill text-red "></text> 对方拒绝了你的消息
  33. </view>
  34. <view class="cu-info">
  35. 对方开启了好友验证,你还不是他(她)的好友。请先发送好友验证请求,对方验证通过后,才能聊天。
  36. <text class="text-blue">发送好友验证</text>
  37. </view>
  38. <view class="cu-item self">
  39. <view class="main">
  40. <image src="https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg" class="radius"
  41. mode="widthFix"></image>
  42. </view>
  43. <view class="cu-avatar radius"
  44. style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big107000.jpg);">
  45. </view>
  46. <view class="date"> 13:23</view>
  47. </view>
  48. <view class="cu-item self">
  49. <view class="main">
  50. <view class="action text-bold text-grey">
  51. 3"
  52. </view>
  53. <view class="content shadow">
  54. <text class="cuIcon-sound text-xxl padding-right-xl"> </text>
  55. </view>
  56. </view>
  57. <view class="cu-avatar radius"
  58. style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big107000.jpg);">
  59. </view>
  60. <view class="date">13:23</view>
  61. </view>
  62. <view class="cu-item self">
  63. <view class="main">
  64. <view class="action">
  65. <text class="cuIcon-locationfill text-orange text-xxl"></text>
  66. </view>
  67. <view class="content shadow">
  68. 喵星球,喵喵市
  69. </view>
  70. </view>
  71. <view class="cu-avatar radius"
  72. style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big107000.jpg);">
  73. </view>
  74. <view class="date">13:23</view>
  75. </view>
  76. <view class="cu-item">
  77. <view class="cu-avatar radius"
  78. style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big143004.jpg);">
  79. </view>
  80. <view class="main">
  81. <view class="content shadow">
  82. @#$^&**
  83. </view>
  84. <view class="action text-grey">
  85. <text class="cuIcon-warnfill text-red text-xxl"></text> <text
  86. class="text-sm margin-left-sm">翻译错误</text>
  87. </view>
  88. </view>
  89. <view class="date">13:23</view>
  90. </view>
  91. </view>
  92. <view class="cu-bar foot input" :style="[{bottom:InputBottom+'px'}]">
  93. <view class="action">
  94. <text class="cuIcon-sound text-grey"></text>
  95. </view>
  96. <input class="solid-bottom" :adjust-position="false" :focus="false" maxlength="300" cursor-spacing="10"
  97. @focus="InputFocus" @blur="InputBlur"></input>
  98. <view class="action">
  99. <text class="cuIcon-emojifill text-grey"></text>
  100. </view>
  101. <button class="cu-btn bg-green shadow">发送</button>
  102. </view>
  103. </view>
  104. </template>
  105. <script>
  106. export default {
  107. data() {
  108. return {
  109. InputBottom: 0
  110. };
  111. },
  112. methods: {
  113. InputFocus(e) {
  114. this.InputBottom = e.detail.height
  115. },
  116. InputBlur(e) {
  117. this.InputBottom = 0
  118. }
  119. }
  120. }
  121. </script>
  122. <style>
  123. page {
  124. padding-bottom: 100upx;
  125. }
  126. </style>