diff options
author | cyuamber <xuranyjy@chinamobile.com> | 2019-08-26 19:34:22 +0800 |
---|---|---|
committer | xu ran <xuranyjy@chinamobile.com> | 2019-08-27 02:22:40 +0000 |
commit | 5d38fbfc424c6b0a1803175989241a7cfd6ce5ff (patch) | |
tree | 3ef4fa58243066806247fb20bd5777c224657bf9 /usecaseui-portal/src/app/mock/fake | |
parent | 53dc95156c32bb4e2a97a0b852a0c491f297889d (diff) |
feat: add mock data routers config
Change-Id: I155f6957499cfb6da2462671083fa0622de6463a
Issue-ID: USECASEUI-307
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/mock/fake')
-rw-r--r-- | usecaseui-portal/src/app/mock/fake/fakedata.js | 24 | ||||
-rw-r--r-- | usecaseui-portal/src/app/mock/fake/mock.js | 7 |
2 files changed, 31 insertions, 0 deletions
diff --git a/usecaseui-portal/src/app/mock/fake/fakedata.js b/usecaseui-portal/src/app/mock/fake/fakedata.js new file mode 100644 index 00000000..a008c14a --- /dev/null +++ b/usecaseui-portal/src/app/mock/fake/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 diff --git a/usecaseui-portal/src/app/mock/fake/mock.js b/usecaseui-portal/src/app/mock/fake/mock.js new file mode 100644 index 00000000..2864d4c5 --- /dev/null +++ b/usecaseui-portal/src/app/mock/fake/mock.js @@ -0,0 +1,7 @@ +const fakeData = require('./fakedata.js'); +module.exports = { + //Mock json + 'customer_info': fakeData.customer, + 'alarm_formdata_multiple': fakeData, + 'home': fakeData.home, +}
\ No newline at end of file |