chat.vue 3.8 KB

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