diff options
author | cyuamber <xuranyjy@chinamobile.com> | 2019-08-22 16:55:57 +0800 |
---|---|---|
committer | cyuamber <xuranyjy@chinamobile.com> | 2019-08-22 16:56:09 +0800 |
commit | d0f5347dc16b5aa9fc95eb520fbc9a1c7b672b09 (patch) | |
tree | b3891d8de290d755d7f0f00d35bb77d3b89ad747 /usecaseui-portal/src/app/mock/fakedata.js | |
parent | 56923755c761897cc86ca2457667fcc3e6a0e43f (diff) |
feat: change the project structure and add mock data function
Change-Id: I381845bff5eb37d1fab3eba8cf1ae7838df523b7
Issue-ID: USECASEUI-307
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/mock/fakedata.js')
-rw-r--r-- | usecaseui-portal/src/app/mock/fakedata.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/usecaseui-portal/src/app/mock/fakedata.js b/usecaseui-portal/src/app/mock/fakedata.js new file mode 100644 index 00000000..a008c14a --- /dev/null +++ b/usecaseui-portal/src/app/mock/fakedata.js @@ -0,0 +1,24 @@ +const faker = require("faker"); +const _ = require("lodash"); +faker.locale = "en"; + +module.exports = { + customer: _.times(20, function (n) { + return { + id: n, + name: faker.name.findName(), + phone: faker.phone.phoneNumber(), + address: faker.address.streetAddress(), + avatar: faker.internet.avatar() + } + }), + home: _.times(10, function (n) { + return { + id: n, + name: faker.name.findName(), + phone: faker.phone.phoneNumber(), + address: faker.address.streetAddress(), + avatar: faker.internet.avatar() + } + }), +}
\ No newline at end of file |