| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- import ContactsData from "./contacts";
- import UserData from "./user";
- const generateRandId = () => {
- return Math.random()
- .toString(36)
- .substr(-8);
- };
- const getContact = id => {
- const data = ContactsData.find(contact => contact.id == id);
- return { id: data.id, avatar: data.avatar, displayName: data.displayName };
- };
- export default {
- 1: [
- {
- id: generateRandId(),
- status: "succeed",
- type: "text",
- sendTime: 1566047865417,
- content: "问你件事",
- toContactId: 1,
- fromUser: UserData,
- },
- {
- id: generateRandId(),
- status: "succeed",
- type: "text",
- sendTime: 1566047865417,
- content: "啥子。",
- toContactId: 1,
- fromUser: getContact(1),
- },
- {
- id: generateRandId(),
- status: "succeed",
- type: "text",
- sendTime: 1566047865417,
- content: "为什么",
- toContactId: 1,
- fromUser: UserData,
- },
- {
- id: generateRandId(),
- status: "succeed",
- type: "text",
- sendTime: 1566047865417,
- content: "你穿了高跟鞋还这么矮",
- toContactId: 1,
- fromUser: UserData,
- },
- {
- id: generateRandId(),
- status: "succeed",
- type: "text",
- sendTime: 1566047865417,
- content: "因为我矮啊。[!1f600][!1f600][!1f600]",
- toContactId: 1,
- fromUser: getContact(1),
- },
- {
- id: generateRandId(),
- status: "succeed",
- type: "text",
- sendTime: 1566047865417,
- content: "你开心吗",
- toContactId: 1,
- fromUser: getContact(1),
- },
- ],
- 2: [],
- 3: [],
- 4: [],
- 5: [],
- 6: [],
- 7: [],
- 8: [],
- 9: [],
- 10: [],
- 11: [],
- 12: [],
- 13: [
- {
- id: generateRandId(),
- status: "succeed",
- type: "text",
- sendTime: 1566047865417,
- content: "我是测试时候看到的",
- toContactId: 1,
- fromUser: getContact(4),
- },
- {
- id: generateRandId(),
- status: "succeed",
- type: "text",
- sendTime: 1566047865417,
- content: "上新版本了,玩玩",
- toContactId: 1,
- fromUser: getContact(4),
- },
- {
- id: generateRandId(),
- status: "succeed",
- type: "text",
- sendTime: 1566047865417,
- content: "项目内没有搞这个",
- toContactId: 1,
- fromUser: getContact(4),
- },
- {
- id: generateRandId(),
- status: "succeed",
- type: "text",
- sendTime: 1566047865417,
- content: "@awesome 最新的,不然哪有这功能",
- toContactId: 1,
- fromUser: getContact(5),
- },
- {
- id: generateRandId(),
- status: "succeed",
- type: "text",
- sendTime: 1566047865417,
- content: "其实是跟你的遮罩层有冲突",
- toContactId: 1,
- fromUser: getContact(4),
- },
- {
- id: generateRandId(),
- status: "succeed",
- type: "text",
- sendTime: 1566047865417,
- content: "自己修改index哈",
- toContactId: 1,
- fromUser: UserData,
- },
- {
- id: generateRandId(),
- status: "succeed",
- type: "text",
- sendTime: 1566047865417,
- content: "你们升级到最近版了吗?",
- toContactId: 1,
- fromUser: getContact(6),
- },
- {
- id: generateRandId(),
- status: "succeed",
- type: "text",
- sendTime: 1566047865417,
- content: "wo 现在用的142",
- toContactId: 1,
- fromUser: getContact(7),
- },
- ],
- 14: [],
- 15: [],
- };
|