messages1.js 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. import ContactsData from "./contacts";
  2. import UserData from "./user";
  3. const generateRandId = () => {
  4. return Math.random()
  5. .toString(36)
  6. .substr(-8);
  7. };
  8. const getContact = id => {
  9. const data = ContactsData.find(contact => contact.id == id);
  10. return { id: data.id, avatar: data.avatar, displayName: data.displayName };
  11. };
  12. export default {
  13. 1: [
  14. {
  15. id: generateRandId(),
  16. status: "succeed",
  17. type: "text",
  18. sendTime: 1566047865417,
  19. content: "问你件事",
  20. toContactId: 1,
  21. fromUser: UserData,
  22. },
  23. {
  24. id: generateRandId(),
  25. status: "succeed",
  26. type: "text",
  27. sendTime: 1566047865417,
  28. content: "啥子。",
  29. toContactId: 1,
  30. fromUser: getContact(7881300287915556),
  31. },
  32. {
  33. id: generateRandId(),
  34. status: "succeed",
  35. type: "text",
  36. sendTime: 1566047865417,
  37. content: "为什么",
  38. toContactId: 1,
  39. fromUser: UserData,
  40. },
  41. {
  42. id: generateRandId(),
  43. status: "succeed",
  44. type: "text",
  45. sendTime: 1566047865417,
  46. content: "你穿了高跟鞋还这么矮",
  47. toContactId: 1,
  48. fromUser: UserData,
  49. },
  50. {
  51. id: generateRandId(),
  52. status: "succeed",
  53. type: "text",
  54. sendTime: 1566047865417,
  55. content: "因为我矮啊。[!1f600][!1f600][!1f600]",
  56. toContactId: 1,
  57. fromUser: getContact(7881300287915556),
  58. },
  59. {
  60. id: generateRandId(),
  61. status: "succeed",
  62. type: "text",
  63. sendTime: 1566047865417,
  64. content: "你开心吗",
  65. toContactId: 1,
  66. fromUser: getContact(7881300287915556),
  67. },
  68. ],
  69. // 2: [],
  70. // 3: [],
  71. // 4: [],
  72. // 5: [],
  73. // 6: [],
  74. // 7: [],
  75. // 8: [],
  76. // 9: [],
  77. // 10: [],
  78. // 11: [],
  79. // 12: [],
  80. // 13: [
  81. // {
  82. // id: generateRandId(),
  83. // status: "succeed",
  84. // type: "text",
  85. // sendTime: 1670481209000,
  86. // content: "我是测试时候看到的",
  87. // toContactId: 1,
  88. // fromUser: getContact(4),
  89. // },
  90. // {
  91. // id: generateRandId(),
  92. // status: "succeed",
  93. // type: "text",
  94. // sendTime: 1670541395000,
  95. // content: "上新版本了,玩玩",
  96. // toContactId: 1,
  97. // fromUser: getContact(4),
  98. // },
  99. // {
  100. // id: generateRandId(),
  101. // status: "succeed",
  102. // type: "text",
  103. // sendTime: 1670544995000,
  104. // content: "项目内没有搞这个",
  105. // toContactId: 1,
  106. // fromUser: getContact(4),
  107. // },
  108. // {
  109. // id: generateRandId(),
  110. // status: "succeed",
  111. // type: "text",
  112. // sendTime: 1670545175000,
  113. // content: "@awesome 最新的,不然哪有这功能",
  114. // toContactId: 1,
  115. // fromUser: getContact(5),
  116. // },
  117. // {
  118. // id: generateRandId(),
  119. // status: "succeed",
  120. // type: "text",
  121. // sendTime: 1670631575000,
  122. // content: "其实是跟你的遮罩层有冲突",
  123. // toContactId: 1,
  124. // fromUser: getContact(4),
  125. // },
  126. // {
  127. // id: generateRandId(),
  128. // status: "succeed",
  129. // type: "text",
  130. // sendTime: 1670804375000,
  131. // content: "自己修改index哈",
  132. // toContactId: 1,
  133. // fromUser: UserData,
  134. // },
  135. // {
  136. // id: generateRandId(),
  137. // status: "succeed",
  138. // type: "text",
  139. // sendTime: 1670977175000,
  140. // content: "你们升级到最近版了吗?",
  141. // toContactId: 1,
  142. // fromUser: getContact(6),
  143. // },
  144. // {
  145. // id: generateRandId(),
  146. // status: "succeed",
  147. // type: "text",
  148. // sendTime: 1670980775000,
  149. // content: "wo 现在用的142",
  150. // toContactId: 1,
  151. // fromUser: getContact(7),
  152. // },
  153. // {
  154. // id: generateRandId(),
  155. // status: "succeed",
  156. // type: "text",
  157. // sendTime: 1671247175000,
  158. // content: "问你件事",
  159. // toContactId: 1,
  160. // fromUser: UserData,
  161. // },
  162. // {
  163. // id: generateRandId(),
  164. // status: "failed",
  165. // type: "text",
  166. // sendTime: 1671340182000,
  167. // content: "啥子。",
  168. // toContactId: 1,
  169. // fromUser: getContact(1),
  170. // },
  171. // {
  172. // id: generateRandId(),
  173. // status: "succeed",
  174. // type: "text",
  175. // sendTime: 1696907382000,
  176. // content: "为什么",
  177. // toContactId: 1,
  178. // fromUser: UserData,
  179. // },
  180. // {
  181. // id: generateRandId(),
  182. // status: "succeed",
  183. // type: "text",
  184. // sendTime: 1696920042000,
  185. // content: "你穿了高跟鞋还这么矮[!1f62c][!1f601][!1f602]",
  186. // toContactId: 1,
  187. // fromUser: UserData,
  188. // },
  189. // {
  190. // id: generateRandId(),
  191. // status: "succeed",
  192. // type: "text",
  193. // sendTime: 1696995642000,
  194. // content: "因为我矮啊。[!1f600][!1f600][!1f600]",
  195. // toContactId: 1,
  196. // fromUser: getContact(1),
  197. // },
  198. // {
  199. // id: generateRandId(),
  200. // status: "succeed",
  201. // type: "text",
  202. // sendTime: 1696995642000,
  203. // content: "你有意见吗。[!1f643][!1f643][!1f643]",
  204. // toContactId: 1,
  205. // fromUser: getContact(1),
  206. // },
  207. // {
  208. // id: generateRandId(),
  209. // status: "succeed",
  210. // type: "text",
  211. // sendTime: 1696995942000,
  212. // content: "你开心吗",
  213. // toContactId: 1,
  214. // fromUser: getContact(1),
  215. // },
  216. // ],
  217. // 14: [],
  218. // 15: [],
  219. };