From 569ad51531d3728e8449e71b97e2b9103f77eb4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=84=9A=E9=81=93?= Date: Thu, 13 Dec 2018 13:58:00 +0800 Subject: [PATCH] remove old block convert config\ --- mock/api.js | 336 ---- mock/chart.js | 196 --- mock/geographic.js | 15 - mock/geographic/city.json | 1784 --------------------- mock/geographic/province.json | 138 -- mock/profile.js | 158 -- mock/rule.js | 131 -- scripts/account-center.json | 10 - scripts/account-setting-base.json | 13 - scripts/account-setting-binding.json | 12 - scripts/account-setting-notification.json | 12 - scripts/account-setting-security.json | 12 - scripts/account-setting.json | 9 - scripts/advanced-form.json | 12 - scripts/advanced-profile.json | 9 - scripts/analysis.json | 9 - scripts/basic-form.json | 12 - scripts/basic-list.json | 10 - scripts/basic-profile.json | 9 - scripts/card-list.json | 10 - scripts/exception-403.json | 11 - scripts/exception-404.json | 11 - scripts/exception-500.json | 11 - scripts/monitor.json | 9 - scripts/result-error.json | 10 - scripts/result-success.json | 7 - scripts/search-list-applications.json | 10 - scripts/search-list-articles.json | 10 - scripts/search-list-projects.json | 10 - scripts/search-list.json | 7 - scripts/step-form-confirm.json | 12 - scripts/step-form-info.json | 12 - scripts/step-form-result.json | 12 - scripts/step-form.json | 11 - scripts/table-list.json | 10 - scripts/user-login.json | 12 - scripts/user-register-result.json | 12 - scripts/user-register.json | 12 - scripts/workplace.json | 12 - src/models/global.js | 2 +- src/models/login.js | 78 - src/models/project.js | 28 - src/services/api.js | 126 -- src/services/error.js | 5 - src/services/geographic.js | 9 - src/services/user.js | 4 + 46 files changed, 5 insertions(+), 3345 deletions(-) delete mode 100644 mock/api.js delete mode 100644 mock/chart.js delete mode 100644 mock/geographic.js delete mode 100644 mock/geographic/city.json delete mode 100644 mock/geographic/province.json delete mode 100644 mock/profile.js delete mode 100644 mock/rule.js delete mode 100644 scripts/account-center.json delete mode 100644 scripts/account-setting-base.json delete mode 100644 scripts/account-setting-binding.json delete mode 100644 scripts/account-setting-notification.json delete mode 100644 scripts/account-setting-security.json delete mode 100644 scripts/account-setting.json delete mode 100644 scripts/advanced-form.json delete mode 100644 scripts/advanced-profile.json delete mode 100644 scripts/analysis.json delete mode 100644 scripts/basic-form.json delete mode 100644 scripts/basic-list.json delete mode 100644 scripts/basic-profile.json delete mode 100644 scripts/card-list.json delete mode 100644 scripts/exception-403.json delete mode 100644 scripts/exception-404.json delete mode 100644 scripts/exception-500.json delete mode 100644 scripts/monitor.json delete mode 100644 scripts/result-error.json delete mode 100644 scripts/result-success.json delete mode 100644 scripts/search-list-applications.json delete mode 100644 scripts/search-list-articles.json delete mode 100644 scripts/search-list-projects.json delete mode 100644 scripts/search-list.json delete mode 100644 scripts/step-form-confirm.json delete mode 100644 scripts/step-form-info.json delete mode 100644 scripts/step-form-result.json delete mode 100644 scripts/step-form.json delete mode 100644 scripts/table-list.json delete mode 100644 scripts/user-login.json delete mode 100644 scripts/user-register-result.json delete mode 100644 scripts/user-register.json delete mode 100644 scripts/workplace.json delete mode 100644 src/models/login.js delete mode 100644 src/models/project.js delete mode 100644 src/services/api.js delete mode 100644 src/services/error.js delete mode 100644 src/services/geographic.js diff --git a/mock/api.js b/mock/api.js deleted file mode 100644 index f1173bba..00000000 --- a/mock/api.js +++ /dev/null @@ -1,336 +0,0 @@ -import mockjs from 'mockjs'; - -const titles = [ - 'Alipay', - 'Angular', - 'Ant Design', - 'Ant Design Pro', - 'Bootstrap', - 'React', - 'Vue', - 'Webpack', -]; -const avatars = [ - 'https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png', // Alipay - 'https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png', // Angular - 'https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png', // Ant Design - 'https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png', // Ant Design Pro - 'https://gw.alipayobjects.com/zos/rmsportal/siCrBXXhmvTQGWPNLBow.png', // Bootstrap - 'https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png', // React - 'https://gw.alipayobjects.com/zos/rmsportal/ComBAopevLwENQdKWiIn.png', // Vue - 'https://gw.alipayobjects.com/zos/rmsportal/nxkuOJlFJuAUhzlMTCEe.png', // Webpack -]; - -const avatars2 = [ - 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png', - 'https://gw.alipayobjects.com/zos/rmsportal/cnrhVkzwxjPwAaCfPbdc.png', - 'https://gw.alipayobjects.com/zos/rmsportal/gaOngJwsRYRaVAuXXcmB.png', - 'https://gw.alipayobjects.com/zos/rmsportal/ubnKSIfAJTxIgXOKlciN.png', - 'https://gw.alipayobjects.com/zos/rmsportal/WhxKECPNujWoWEFNdnJE.png', - 'https://gw.alipayobjects.com/zos/rmsportal/jZUIxmJycoymBprLOUbT.png', - 'https://gw.alipayobjects.com/zos/rmsportal/psOgztMplJMGpVEqfcgF.png', - 'https://gw.alipayobjects.com/zos/rmsportal/ZpBqSxLxVEXfcUNoPKrz.png', - 'https://gw.alipayobjects.com/zos/rmsportal/laiEnJdGHVOhJrUShBaJ.png', - 'https://gw.alipayobjects.com/zos/rmsportal/UrQsqscbKEpNuJcvBZBu.png', -]; - -const covers = [ - 'https://gw.alipayobjects.com/zos/rmsportal/uMfMFlvUuceEyPpotzlq.png', - 'https://gw.alipayobjects.com/zos/rmsportal/iZBVOIhGJiAnhplqjvZW.png', - 'https://gw.alipayobjects.com/zos/rmsportal/iXjVmWVHbCJAyqvDxdtx.png', - 'https://gw.alipayobjects.com/zos/rmsportal/gLaIAoVWTtLbBWZNYEMg.png', -]; -const desc = [ - '那是一种内在的东西, 他们到达不了,也无法触及的', - '希望是一个好东西,也许是最好的,好东西是不会消亡的', - '生命就像一盒巧克力,结果往往出人意料', - '城镇中有那么多的酒馆,她却偏偏走进了我的酒馆', - '那时候我只会想自己想要什么,从不想自己拥有什么', -]; - -const user = [ - '付小小', - '曲丽丽', - '林东东', - '周星星', - '吴加好', - '朱偏右', - '鱼酱', - '乐哥', - '谭小仪', - '仲尼', -]; - -function fakeList(count) { - const list = []; - for (let i = 0; i < count; i += 1) { - list.push({ - id: `fake-list-${i}`, - owner: user[i % 10], - title: titles[i % 8], - avatar: avatars[i % 8], - cover: parseInt(i / 4, 10) % 2 === 0 ? covers[i % 4] : covers[3 - (i % 4)], - status: ['active', 'exception', 'normal'][i % 3], - percent: Math.ceil(Math.random() * 50) + 50, - logo: avatars[i % 8], - href: 'https://ant.design', - updatedAt: new Date(new Date().getTime() - 1000 * 60 * 60 * 2 * i), - createdAt: new Date(new Date().getTime() - 1000 * 60 * 60 * 2 * i), - subDescription: desc[i % 5], - description: - '在中台产品的研发过程中,会出现不同的设计规范和实现方式,但其中往往存在很多类似的页面和组件,这些类似的组件会被抽离成一套标准规范。', - activeUser: Math.ceil(Math.random() * 100000) + 100000, - newUser: Math.ceil(Math.random() * 1000) + 1000, - star: Math.ceil(Math.random() * 100) + 100, - like: Math.ceil(Math.random() * 100) + 100, - message: Math.ceil(Math.random() * 10) + 10, - content: - '段落示意:蚂蚁金服设计平台 ant.design,用最小的工作量,无缝接入蚂蚁金服生态,提供跨越设计与开发的体验解决方案。蚂蚁金服设计平台 ant.design,用最小的工作量,无缝接入蚂蚁金服生态,提供跨越设计与开发的体验解决方案。', - members: [ - { - avatar: 'https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png', - name: '曲丽丽', - id: 'member1', - }, - { - avatar: 'https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png', - name: '王昭君', - id: 'member2', - }, - { - avatar: 'https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png', - name: '董娜娜', - id: 'member3', - }, - ], - }); - } - - return list; -} - -let sourceData; - -function getFakeList(req, res) { - const params = req.query; - - const count = params.count * 1 || 20; - - const result = fakeList(count); - sourceData = result; - return res.json(result); -} - -function postFakeList(req, res) { - const { /* url = '', */ body } = req; - // const params = getUrlParams(url); - const { method, id } = body; - // const count = (params.count * 1) || 20; - let result = sourceData; - - switch (method) { - case 'delete': - result = result.filter(item => item.id !== id); - break; - case 'update': - result.forEach((item, i) => { - if (item.id === id) { - result[i] = Object.assign(item, body); - } - }); - break; - case 'post': - result.unshift({ - body, - id: `fake-list-${result.length}`, - createdAt: new Date().getTime(), - }); - break; - default: - break; - } - - return res.json(result); -} - -const getNotice = [ - { - id: 'xxx1', - title: titles[0], - logo: avatars[0], - description: '那是一种内在的东西,他们到达不了,也无法触及的', - updatedAt: new Date(), - member: '科学搬砖组', - href: '', - memberLink: '', - }, - { - id: 'xxx2', - title: titles[1], - logo: avatars[1], - description: '希望是一个好东西,也许是最好的,好东西是不会消亡的', - updatedAt: new Date('2017-07-24'), - member: '全组都是吴彦祖', - href: '', - memberLink: '', - }, - { - id: 'xxx3', - title: titles[2], - logo: avatars[2], - description: '城镇中有那么多的酒馆,她却偏偏走进了我的酒馆', - updatedAt: new Date(), - member: '中二少女团', - href: '', - memberLink: '', - }, - { - id: 'xxx4', - title: titles[3], - logo: avatars[3], - description: '那时候我只会想自己想要什么,从不想自己拥有什么', - updatedAt: new Date('2017-07-23'), - member: '程序员日常', - href: '', - memberLink: '', - }, - { - id: 'xxx5', - title: titles[4], - logo: avatars[4], - description: '凛冬将至', - updatedAt: new Date('2017-07-23'), - member: '高逼格设计天团', - href: '', - memberLink: '', - }, - { - id: 'xxx6', - title: titles[5], - logo: avatars[5], - description: '生命就像一盒巧克力,结果往往出人意料', - updatedAt: new Date('2017-07-23'), - member: '骗你来学计算机', - href: '', - memberLink: '', - }, -]; - -const getActivities = [ - { - id: 'trend-1', - updatedAt: new Date(), - user: { - name: '曲丽丽', - avatar: avatars2[0], - }, - group: { - name: '高逼格设计天团', - link: 'http://github.com/', - }, - project: { - name: '六月迭代', - link: 'http://github.com/', - }, - template: '在 @{group} 新建项目 @{project}', - }, - { - id: 'trend-2', - updatedAt: new Date(), - user: { - name: '付小小', - avatar: avatars2[1], - }, - group: { - name: '高逼格设计天团', - link: 'http://github.com/', - }, - project: { - name: '六月迭代', - link: 'http://github.com/', - }, - template: '在 @{group} 新建项目 @{project}', - }, - { - id: 'trend-3', - updatedAt: new Date(), - user: { - name: '林东东', - avatar: avatars2[2], - }, - group: { - name: '中二少女团', - link: 'http://github.com/', - }, - project: { - name: '六月迭代', - link: 'http://github.com/', - }, - template: '在 @{group} 新建项目 @{project}', - }, - { - id: 'trend-4', - updatedAt: new Date(), - user: { - name: '周星星', - avatar: avatars2[4], - }, - project: { - name: '5 月日常迭代', - link: 'http://github.com/', - }, - template: '将 @{project} 更新至已发布状态', - }, - { - id: 'trend-5', - updatedAt: new Date(), - user: { - name: '朱偏右', - avatar: avatars2[3], - }, - project: { - name: '工程效能', - link: 'http://github.com/', - }, - comment: { - name: '留言', - link: 'http://github.com/', - }, - template: '在 @{project} 发布了 @{comment}', - }, - { - id: 'trend-6', - updatedAt: new Date(), - user: { - name: '乐哥', - avatar: avatars2[5], - }, - group: { - name: '程序员日常', - link: 'http://github.com/', - }, - project: { - name: '品牌迭代', - link: 'http://github.com/', - }, - template: '在 @{group} 新建项目 @{project}', - }, -]; - -function getFakeCaptcha(req, res) { - return res.json('captcha-xxx'); -} - -export default { - 'GET /api/project/notice': getNotice, - 'GET /api/activities': getActivities, - 'POST /api/forms': (req, res) => { - res.send({ message: 'Ok' }); - }, - 'GET /api/tags': mockjs.mock({ - 'list|100': [{ name: '@city', 'value|1-100': 150, 'type|0-2': 1 }], - }), - 'GET /api/fake_list': getFakeList, - 'POST /api/fake_list': postFakeList, - 'GET /api/captcha': getFakeCaptcha, -}; diff --git a/mock/chart.js b/mock/chart.js deleted file mode 100644 index 65037758..00000000 --- a/mock/chart.js +++ /dev/null @@ -1,196 +0,0 @@ -import moment from 'moment'; - -// mock data -const visitData = []; -const beginDay = new Date().getTime(); - -const fakeY = [7, 5, 4, 2, 4, 7, 5, 6, 5, 9, 6, 3, 1, 5, 3, 6, 5]; -for (let i = 0; i < fakeY.length; i += 1) { - visitData.push({ - x: moment(new Date(beginDay + 1000 * 60 * 60 * 24 * i)).format('YYYY-MM-DD'), - y: fakeY[i], - }); -} - -const visitData2 = []; -const fakeY2 = [1, 6, 4, 8, 3, 7, 2]; -for (let i = 0; i < fakeY2.length; i += 1) { - visitData2.push({ - x: moment(new Date(beginDay + 1000 * 60 * 60 * 24 * i)).format('YYYY-MM-DD'), - y: fakeY2[i], - }); -} - -const salesData = []; -for (let i = 0; i < 12; i += 1) { - salesData.push({ - x: `${i + 1}月`, - y: Math.floor(Math.random() * 1000) + 200, - }); -} -const searchData = []; -for (let i = 0; i < 50; i += 1) { - searchData.push({ - index: i + 1, - keyword: `搜索关键词-${i}`, - count: Math.floor(Math.random() * 1000), - range: Math.floor(Math.random() * 100), - status: Math.floor((Math.random() * 10) % 2), - }); -} -const salesTypeData = [ - { - x: '家用电器', - y: 4544, - }, - { - x: '食用酒水', - y: 3321, - }, - { - x: '个护健康', - y: 3113, - }, - { - x: '服饰箱包', - y: 2341, - }, - { - x: '母婴产品', - y: 1231, - }, - { - x: '其他', - y: 1231, - }, -]; - -const salesTypeDataOnline = [ - { - x: '家用电器', - y: 244, - }, - { - x: '食用酒水', - y: 321, - }, - { - x: '个护健康', - y: 311, - }, - { - x: '服饰箱包', - y: 41, - }, - { - x: '母婴产品', - y: 121, - }, - { - x: '其他', - y: 111, - }, -]; - -const salesTypeDataOffline = [ - { - x: '家用电器', - y: 99, - }, - { - x: '食用酒水', - y: 188, - }, - { - x: '个护健康', - y: 344, - }, - { - x: '服饰箱包', - y: 255, - }, - { - x: '其他', - y: 65, - }, -]; - -const offlineData = []; -for (let i = 0; i < 10; i += 1) { - offlineData.push({ - name: `Stores ${i}`, - cvr: Math.ceil(Math.random() * 9) / 10, - }); -} -const offlineChartData = []; -for (let i = 0; i < 20; i += 1) { - offlineChartData.push({ - x: new Date().getTime() + 1000 * 60 * 30 * i, - y1: Math.floor(Math.random() * 100) + 10, - y2: Math.floor(Math.random() * 100) + 10, - }); -} - -const radarOriginData = [ - { - name: '个人', - ref: 10, - koubei: 8, - output: 4, - contribute: 5, - hot: 7, - }, - { - name: '团队', - ref: 3, - koubei: 9, - output: 6, - contribute: 3, - hot: 1, - }, - { - name: '部门', - ref: 4, - koubei: 1, - output: 6, - contribute: 5, - hot: 7, - }, -]; - -const radarData = []; -const radarTitleMap = { - ref: '引用', - koubei: '口碑', - output: '产量', - contribute: '贡献', - hot: '热度', -}; -radarOriginData.forEach(item => { - Object.keys(item).forEach(key => { - if (key !== 'name') { - radarData.push({ - name: item.name, - label: radarTitleMap[key], - value: item[key], - }); - } - }); -}); - -const getFakeChartData = { - visitData, - visitData2, - salesData, - searchData, - offlineData, - offlineChartData, - salesTypeData, - salesTypeDataOnline, - salesTypeDataOffline, - radarData, -}; - -export default { - 'GET /api/fake_chart_data': getFakeChartData, -}; diff --git a/mock/geographic.js b/mock/geographic.js deleted file mode 100644 index e7772e8d..00000000 --- a/mock/geographic.js +++ /dev/null @@ -1,15 +0,0 @@ -import city from './geographic/city.json'; -import province from './geographic/province.json'; - -function getProvince(req, res) { - return res.json(province); -} - -function getCity(req, res) { - return res.json(city[req.params.province]); -} - -export default { - 'GET /api/geographic/province': getProvince, - 'GET /api/geographic/city/:province': getCity, -}; diff --git a/mock/geographic/city.json b/mock/geographic/city.json deleted file mode 100644 index 29783747..00000000 --- a/mock/geographic/city.json +++ /dev/null @@ -1,1784 +0,0 @@ -{ - "110000": [ - { - "province": "北京市", - "name": "市辖区", - "id": "110100" - } - ], - "120000": [ - { - "province": "天津市", - "name": "市辖区", - "id": "120100" - } - ], - "130000": [ - { - "province": "河北省", - "name": "石家庄市", - "id": "130100" - }, - { - "province": "河北省", - "name": "唐山市", - "id": "130200" - }, - { - "province": "河北省", - "name": "秦皇岛市", - "id": "130300" - }, - { - "province": "河北省", - "name": "邯郸市", - "id": "130400" - }, - { - "province": "河北省", - "name": "邢台市", - "id": "130500" - }, - { - "province": "河北省", - "name": "保定市", - "id": "130600" - }, - { - "province": "河北省", - "name": "张家口市", - "id": "130700" - }, - { - "province": "河北省", - "name": "承德市", - "id": "130800" - }, - { - "province": "河北省", - "name": "沧州市", - "id": "130900" - }, - { - "province": "河北省", - "name": "廊坊市", - "id": "131000" - }, - { - "province": "河北省", - "name": "衡水市", - "id": "131100" - }, - { - "province": "河北省", - "name": "省直辖县级行政区划", - "id": "139000" - } - ], - "140000": [ - { - "province": "山西省", - "name": "太原市", - "id": "140100" - }, - { - "province": "山西省", - "name": "大同市", - "id": "140200" - }, - { - "province": "山西省", - "name": "阳泉市", - "id": "140300" - }, - { - "province": "山西省", - "name": "长治市", - "id": "140400" - }, - { - "province": "山西省", - "name": "晋城市", - "id": "140500" - }, - { - "province": "山西省", - "name": "朔州市", - "id": "140600" - }, - { - "province": "山西省", - "name": "晋中市", - "id": "140700" - }, - { - "province": "山西省", - "name": "运城市", - "id": "140800" - }, - { - "province": "山西省", - "name": "忻州市", - "id": "140900" - }, - { - "province": "山西省", - "name": "临汾市", - "id": "141000" - }, - { - "province": "山西省", - "name": "吕梁市", - "id": "141100" - } - ], - "150000": [ - { - "province": "内蒙古自治区", - "name": "呼和浩特市", - "id": "150100" - }, - { - "province": "内蒙古自治区", - "name": "包头市", - "id": "150200" - }, - { - "province": "内蒙古自治区", - "name": "乌海市", - "id": "150300" - }, - { - "province": "内蒙古自治区", - "name": "赤峰市", - "id": "150400" - }, - { - "province": "内蒙古自治区", - "name": "通辽市", - "id": "150500" - }, - { - "province": "内蒙古自治区", - "name": "鄂尔多斯市", - "id": "150600" - }, - { - "province": "内蒙古自治区", - "name": "呼伦贝尔市", - "id": "150700" - }, - { - "province": "内蒙古自治区", - "name": "巴彦淖尔市", - "id": "150800" - }, - { - "province": "内蒙古自治区", - "name": "乌兰察布市", - "id": "150900" - }, - { - "province": "内蒙古自治区", - "name": "兴安盟", - "id": "152200" - }, - { - "province": "内蒙古自治区", - "name": "锡林郭勒盟", - "id": "152500" - }, - { - "province": "内蒙古自治区", - "name": "阿拉善盟", - "id": "152900" - } - ], - "210000": [ - { - "province": "辽宁省", - "name": "沈阳市", - "id": "210100" - }, - { - "province": "辽宁省", - "name": "大连市", - "id": "210200" - }, - { - "province": "辽宁省", - "name": "鞍山市", - "id": "210300" - }, - { - "province": "辽宁省", - "name": "抚顺市", - "id": "210400" - }, - { - "province": "辽宁省", - "name": "本溪市", - "id": "210500" - }, - { - "province": "辽宁省", - "name": "丹东市", - "id": "210600" - }, - { - "province": "辽宁省", - "name": "锦州市", - "id": "210700" - }, - { - "province": "辽宁省", - "name": "营口市", - "id": "210800" - }, - { - "province": "辽宁省", - "name": "阜新市", - "id": "210900" - }, - { - "province": "辽宁省", - "name": "辽阳市", - "id": "211000" - }, - { - "province": "辽宁省", - "name": "盘锦市", - "id": "211100" - }, - { - "province": "辽宁省", - "name": "铁岭市", - "id": "211200" - }, - { - "province": "辽宁省", - "name": "朝阳市", - "id": "211300" - }, - { - "province": "辽宁省", - "name": "葫芦岛市", - "id": "211400" - } - ], - "220000": [ - { - "province": "吉林省", - "name": "长春市", - "id": "220100" - }, - { - "province": "吉林省", - "name": "吉林市", - "id": "220200" - }, - { - "province": "吉林省", - "name": "四平市", - "id": "220300" - }, - { - "province": "吉林省", - "name": "辽源市", - "id": "220400" - }, - { - "province": "吉林省", - "name": "通化市", - "id": "220500" - }, - { - "province": "吉林省", - "name": "白山市", - "id": "220600" - }, - { - "province": "吉林省", - "name": "松原市", - "id": "220700" - }, - { - "province": "吉林省", - "name": "白城市", - "id": "220800" - }, - { - "province": "吉林省", - "name": "延边朝鲜族自治州", - "id": "222400" - } - ], - "230000": [ - { - "province": "黑龙江省", - "name": "哈尔滨市", - "id": "230100" - }, - { - "province": "黑龙江省", - "name": "齐齐哈尔市", - "id": "230200" - }, - { - "province": "黑龙江省", - "name": "鸡西市", - "id": "230300" - }, - { - "province": "黑龙江省", - "name": "鹤岗市", - "id": "230400" - }, - { - "province": "黑龙江省", - "name": "双鸭山市", - "id": "230500" - }, - { - "province": "黑龙江省", - "name": "大庆市", - "id": "230600" - }, - { - "province": "黑龙江省", - "name": "伊春市", - "id": "230700" - }, - { - "province": "黑龙江省", - "name": "佳木斯市", - "id": "230800" - }, - { - "province": "黑龙江省", - "name": "七台河市", - "id": "230900" - }, - { - "province": "黑龙江省", - "name": "牡丹江市", - "id": "231000" - }, - { - "province": "黑龙江省", - "name": "黑河市", - "id": "231100" - }, - { - "province": "黑龙江省", - "name": "绥化市", - "id": "231200" - }, - { - "province": "黑龙江省", - "name": "大兴安岭地区", - "id": "232700" - } - ], - "310000": [ - { - "province": "上海市", - "name": "市辖区", - "id": "310100" - } - ], - "320000": [ - { - "province": "江苏省", - "name": "南京市", - "id": "320100" - }, - { - "province": "江苏省", - "name": "无锡市", - "id": "320200" - }, - { - "province": "江苏省", - "name": "徐州市", - "id": "320300" - }, - { - "province": "江苏省", - "name": "常州市", - "id": "320400" - }, - { - "province": "江苏省", - "name": "苏州市", - "id": "320500" - }, - { - "province": "江苏省", - "name": "南通市", - "id": "320600" - }, - { - "province": "江苏省", - "name": "连云港市", - "id": "320700" - }, - { - "province": "江苏省", - "name": "淮安市", - "id": "320800" - }, - { - "province": "江苏省", - "name": "盐城市", - "id": "320900" - }, - { - "province": "江苏省", - "name": "扬州市", - "id": "321000" - }, - { - "province": "江苏省", - "name": "镇江市", - "id": "321100" - }, - { - "province": "江苏省", - "name": "泰州市", - "id": "321200" - }, - { - "province": "江苏省", - "name": "宿迁市", - "id": "321300" - } - ], - "330000": [ - { - "province": "浙江省", - "name": "杭州市", - "id": "330100" - }, - { - "province": "浙江省", - "name": "宁波市", - "id": "330200" - }, - { - "province": "浙江省", - "name": "温州市", - "id": "330300" - }, - { - "province": "浙江省", - "name": "嘉兴市", - "id": "330400" - }, - { - "province": "浙江省", - "name": "湖州市", - "id": "330500" - }, - { - "province": "浙江省", - "name": "绍兴市", - "id": "330600" - }, - { - "province": "浙江省", - "name": "金华市", - "id": "330700" - }, - { - "province": "浙江省", - "name": "衢州市", - "id": "330800" - }, - { - "province": "浙江省", - "name": "舟山市", - "id": "330900" - }, - { - "province": "浙江省", - "name": "台州市", - "id": "331000" - }, - { - "province": "浙江省", - "name": "丽水市", - "id": "331100" - } - ], - "340000": [ - { - "province": "安徽省", - "name": "合肥市", - "id": "340100" - }, - { - "province": "安徽省", - "name": "芜湖市", - "id": "340200" - }, - { - "province": "安徽省", - "name": "蚌埠市", - "id": "340300" - }, - { - "province": "安徽省", - "name": "淮南市", - "id": "340400" - }, - { - "province": "安徽省", - "name": "马鞍山市", - "id": "340500" - }, - { - "province": "安徽省", - "name": "淮北市", - "id": "340600" - }, - { - "province": "安徽省", - "name": "铜陵市", - "id": "340700" - }, - { - "province": "安徽省", - "name": "安庆市", - "id": "340800" - }, - { - "province": "安徽省", - "name": "黄山市", - "id": "341000" - }, - { - "province": "安徽省", - "name": "滁州市", - "id": "341100" - }, - { - "province": "安徽省", - "name": "阜阳市", - "id": "341200" - }, - { - "province": "安徽省", - "name": "宿州市", - "id": "341300" - }, - { - "province": "安徽省", - "name": "六安市", - "id": "341500" - }, - { - "province": "安徽省", - "name": "亳州市", - "id": "341600" - }, - { - "province": "安徽省", - "name": "池州市", - "id": "341700" - }, - { - "province": "安徽省", - "name": "宣城市", - "id": "341800" - } - ], - "350000": [ - { - "province": "福建省", - "name": "福州市", - "id": "350100" - }, - { - "province": "福建省", - "name": "厦门市", - "id": "350200" - }, - { - "province": "福建省", - "name": "莆田市", - "id": "350300" - }, - { - "province": "福建省", - "name": "三明市", - "id": "350400" - }, - { - "province": "福建省", - "name": "泉州市", - "id": "350500" - }, - { - "province": "福建省", - "name": "漳州市", - "id": "350600" - }, - { - "province": "福建省", - "name": "南平市", - "id": "350700" - }, - { - "province": "福建省", - "name": "龙岩市", - "id": "350800" - }, - { - "province": "福建省", - "name": "宁德市", - "id": "350900" - } - ], - "360000": [ - { - "province": "江西省", - "name": "南昌市", - "id": "360100" - }, - { - "province": "江西省", - "name": "景德镇市", - "id": "360200" - }, - { - "province": "江西省", - "name": "萍乡市", - "id": "360300" - }, - { - "province": "江西省", - "name": "九江市", - "id": "360400" - }, - { - "province": "江西省", - "name": "新余市", - "id": "360500" - }, - { - "province": "江西省", - "name": "鹰潭市", - "id": "360600" - }, - { - "province": "江西省", - "name": "赣州市", - "id": "360700" - }, - { - "province": "江西省", - "name": "吉安市", - "id": "360800" - }, - { - "province": "江西省", - "name": "宜春市", - "id": "360900" - }, - { - "province": "江西省", - "name": "抚州市", - "id": "361000" - }, - { - "province": "江西省", - "name": "上饶市", - "id": "361100" - } - ], - "370000": [ - { - "province": "山东省", - "name": "济南市", - "id": "370100" - }, - { - "province": "山东省", - "name": "青岛市", - "id": "370200" - }, - { - "province": "山东省", - "name": "淄博市", - "id": "370300" - }, - { - "province": "山东省", - "name": "枣庄市", - "id": "370400" - }, - { - "province": "山东省", - "name": "东营市", - "id": "370500" - }, - { - "province": "山东省", - "name": "烟台市", - "id": "370600" - }, - { - "province": "山东省", - "name": "潍坊市", - "id": "370700" - }, - { - "province": "山东省", - "name": "济宁市", - "id": "370800" - }, - { - "province": "山东省", - "name": "泰安市", - "id": "370900" - }, - { - "province": "山东省", - "name": "威海市", - "id": "371000" - }, - { - "province": "山东省", - "name": "日照市", - "id": "371100" - }, - { - "province": "山东省", - "name": "莱芜市", - "id": "371200" - }, - { - "province": "山东省", - "name": "临沂市", - "id": "371300" - }, - { - "province": "山东省", - "name": "德州市", - "id": "371400" - }, - { - "province": "山东省", - "name": "聊城市", - "id": "371500" - }, - { - "province": "山东省", - "name": "滨州市", - "id": "371600" - }, - { - "province": "山东省", - "name": "菏泽市", - "id": "371700" - } - ], - "410000": [ - { - "province": "河南省", - "name": "郑州市", - "id": "410100" - }, - { - "province": "河南省", - "name": "开封市", - "id": "410200" - }, - { - "province": "河南省", - "name": "洛阳市", - "id": "410300" - }, - { - "province": "河南省", - "name": "平顶山市", - "id": "410400" - }, - { - "province": "河南省", - "name": "安阳市", - "id": "410500" - }, - { - "province": "河南省", - "name": "鹤壁市", - "id": "410600" - }, - { - "province": "河南省", - "name": "新乡市", - "id": "410700" - }, - { - "province": "河南省", - "name": "焦作市", - "id": "410800" - }, - { - "province": "河南省", - "name": "濮阳市", - "id": "410900" - }, - { - "province": "河南省", - "name": "许昌市", - "id": "411000" - }, - { - "province": "河南省", - "name": "漯河市", - "id": "411100" - }, - { - "province": "河南省", - "name": "三门峡市", - "id": "411200" - }, - { - "province": "河南省", - "name": "南阳市", - "id": "411300" - }, - { - "province": "河南省", - "name": "商丘市", - "id": "411400" - }, - { - "province": "河南省", - "name": "信阳市", - "id": "411500" - }, - { - "province": "河南省", - "name": "周口市", - "id": "411600" - }, - { - "province": "河南省", - "name": "驻马店市", - "id": "411700" - }, - { - "province": "河南省", - "name": "省直辖县级行政区划", - "id": "419000" - } - ], - "420000": [ - { - "province": "湖北省", - "name": "武汉市", - "id": "420100" - }, - { - "province": "湖北省", - "name": "黄石市", - "id": "420200" - }, - { - "province": "湖北省", - "name": "十堰市", - "id": "420300" - }, - { - "province": "湖北省", - "name": "宜昌市", - "id": "420500" - }, - { - "province": "湖北省", - "name": "襄阳市", - "id": "420600" - }, - { - "province": "湖北省", - "name": "鄂州市", - "id": "420700" - }, - { - "province": "湖北省", - "name": "荆门市", - "id": "420800" - }, - { - "province": "湖北省", - "name": "孝感市", - "id": "420900" - }, - { - "province": "湖北省", - "name": "荆州市", - "id": "421000" - }, - { - "province": "湖北省", - "name": "黄冈市", - "id": "421100" - }, - { - "province": "湖北省", - "name": "咸宁市", - "id": "421200" - }, - { - "province": "湖北省", - "name": "随州市", - "id": "421300" - }, - { - "province": "湖北省", - "name": "恩施土家族苗族自治州", - "id": "422800" - }, - { - "province": "湖北省", - "name": "省直辖县级行政区划", - "id": "429000" - } - ], - "430000": [ - { - "province": "湖南省", - "name": "长沙市", - "id": "430100" - }, - { - "province": "湖南省", - "name": "株洲市", - "id": "430200" - }, - { - "province": "湖南省", - "name": "湘潭市", - "id": "430300" - }, - { - "province": "湖南省", - "name": "衡阳市", - "id": "430400" - }, - { - "province": "湖南省", - "name": "邵阳市", - "id": "430500" - }, - { - "province": "湖南省", - "name": "岳阳市", - "id": "430600" - }, - { - "province": "湖南省", - "name": "常德市", - "id": "430700" - }, - { - "province": "湖南省", - "name": "张家界市", - "id": "430800" - }, - { - "province": "湖南省", - "name": "益阳市", - "id": "430900" - }, - { - "province": "湖南省", - "name": "郴州市", - "id": "431000" - }, - { - "province": "湖南省", - "name": "永州市", - "id": "431100" - }, - { - "province": "湖南省", - "name": "怀化市", - "id": "431200" - }, - { - "province": "湖南省", - "name": "娄底市", - "id": "431300" - }, - { - "province": "湖南省", - "name": "湘西土家族苗族自治州", - "id": "433100" - } - ], - "440000": [ - { - "province": "广东省", - "name": "广州市", - "id": "440100" - }, - { - "province": "广东省", - "name": "韶关市", - "id": "440200" - }, - { - "province": "广东省", - "name": "深圳市", - "id": "440300" - }, - { - "province": "广东省", - "name": "珠海市", - "id": "440400" - }, - { - "province": "广东省", - "name": "汕头市", - "id": "440500" - }, - { - "province": "广东省", - "name": "佛山市", - "id": "440600" - }, - { - "province": "广东省", - "name": "江门市", - "id": "440700" - }, - { - "province": "广东省", - "name": "湛江市", - "id": "440800" - }, - { - "province": "广东省", - "name": "茂名市", - "id": "440900" - }, - { - "province": "广东省", - "name": "肇庆市", - "id": "441200" - }, - { - "province": "广东省", - "name": "惠州市", - "id": "441300" - }, - { - "province": "广东省", - "name": "梅州市", - "id": "441400" - }, - { - "province": "广东省", - "name": "汕尾市", - "id": "441500" - }, - { - "province": "广东省", - "name": "河源市", - "id": "441600" - }, - { - "province": "广东省", - "name": "阳江市", - "id": "441700" - }, - { - "province": "广东省", - "name": "清远市", - "id": "441800" - }, - { - "province": "广东省", - "name": "东莞市", - "id": "441900" - }, - { - "province": "广东省", - "name": "中山市", - "id": "442000" - }, - { - "province": "广东省", - "name": "潮州市", - "id": "445100" - }, - { - "province": "广东省", - "name": "揭阳市", - "id": "445200" - }, - { - "province": "广东省", - "name": "云浮市", - "id": "445300" - } - ], - "450000": [ - { - "province": "广西壮族自治区", - "name": "南宁市", - "id": "450100" - }, - { - "province": "广西壮族自治区", - "name": "柳州市", - "id": "450200" - }, - { - "province": "广西壮族自治区", - "name": "桂林市", - "id": "450300" - }, - { - "province": "广西壮族自治区", - "name": "梧州市", - "id": "450400" - }, - { - "province": "广西壮族自治区", - "name": "北海市", - "id": "450500" - }, - { - "province": "广西壮族自治区", - "name": "防城港市", - "id": "450600" - }, - { - "province": "广西壮族自治区", - "name": "钦州市", - "id": "450700" - }, - { - "province": "广西壮族自治区", - "name": "贵港市", - "id": "450800" - }, - { - "province": "广西壮族自治区", - "name": "玉林市", - "id": "450900" - }, - { - "province": "广西壮族自治区", - "name": "百色市", - "id": "451000" - }, - { - "province": "广西壮族自治区", - "name": "贺州市", - "id": "451100" - }, - { - "province": "广西壮族自治区", - "name": "河池市", - "id": "451200" - }, - { - "province": "广西壮族自治区", - "name": "来宾市", - "id": "451300" - }, - { - "province": "广西壮族自治区", - "name": "崇左市", - "id": "451400" - } - ], - "460000": [ - { - "province": "海南省", - "name": "海口市", - "id": "460100" - }, - { - "province": "海南省", - "name": "三亚市", - "id": "460200" - }, - { - "province": "海南省", - "name": "三沙市", - "id": "460300" - }, - { - "province": "海南省", - "name": "儋州市", - "id": "460400" - }, - { - "province": "海南省", - "name": "省直辖县级行政区划", - "id": "469000" - } - ], - "500000": [ - { - "province": "重庆市", - "name": "市辖区", - "id": "500100" - }, - { - "province": "重庆市", - "name": "县", - "id": "500200" - } - ], - "510000": [ - { - "province": "四川省", - "name": "成都市", - "id": "510100" - }, - { - "province": "四川省", - "name": "自贡市", - "id": "510300" - }, - { - "province": "四川省", - "name": "攀枝花市", - "id": "510400" - }, - { - "province": "四川省", - "name": "泸州市", - "id": "510500" - }, - { - "province": "四川省", - "name": "德阳市", - "id": "510600" - }, - { - "province": "四川省", - "name": "绵阳市", - "id": "510700" - }, - { - "province": "四川省", - "name": "广元市", - "id": "510800" - }, - { - "province": "四川省", - "name": "遂宁市", - "id": "510900" - }, - { - "province": "四川省", - "name": "内江市", - "id": "511000" - }, - { - "province": "四川省", - "name": "乐山市", - "id": "511100" - }, - { - "province": "四川省", - "name": "南充市", - "id": "511300" - }, - { - "province": "四川省", - "name": "眉山市", - "id": "511400" - }, - { - "province": "四川省", - "name": "宜宾市", - "id": "511500" - }, - { - "province": "四川省", - "name": "广安市", - "id": "511600" - }, - { - "province": "四川省", - "name": "达州市", - "id": "511700" - }, - { - "province": "四川省", - "name": "雅安市", - "id": "511800" - }, - { - "province": "四川省", - "name": "巴中市", - "id": "511900" - }, - { - "province": "四川省", - "name": "资阳市", - "id": "512000" - }, - { - "province": "四川省", - "name": "阿坝藏族羌族自治州", - "id": "513200" - }, - { - "province": "四川省", - "name": "甘孜藏族自治州", - "id": "513300" - }, - { - "province": "四川省", - "name": "凉山彝族自治州", - "id": "513400" - } - ], - "520000": [ - { - "province": "贵州省", - "name": "贵阳市", - "id": "520100" - }, - { - "province": "贵州省", - "name": "六盘水市", - "id": "520200" - }, - { - "province": "贵州省", - "name": "遵义市", - "id": "520300" - }, - { - "province": "贵州省", - "name": "安顺市", - "id": "520400" - }, - { - "province": "贵州省", - "name": "毕节市", - "id": "520500" - }, - { - "province": "贵州省", - "name": "铜仁市", - "id": "520600" - }, - { - "province": "贵州省", - "name": "黔西南布依族苗族自治州", - "id": "522300" - }, - { - "province": "贵州省", - "name": "黔东南苗族侗族自治州", - "id": "522600" - }, - { - "province": "贵州省", - "name": "黔南布依族苗族自治州", - "id": "522700" - } - ], - "530000": [ - { - "province": "云南省", - "name": "昆明市", - "id": "530100" - }, - { - "province": "云南省", - "name": "曲靖市", - "id": "530300" - }, - { - "province": "云南省", - "name": "玉溪市", - "id": "530400" - }, - { - "province": "云南省", - "name": "保山市", - "id": "530500" - }, - { - "province": "云南省", - "name": "昭通市", - "id": "530600" - }, - { - "province": "云南省", - "name": "丽江市", - "id": "530700" - }, - { - "province": "云南省", - "name": "普洱市", - "id": "530800" - }, - { - "province": "云南省", - "name": "临沧市", - "id": "530900" - }, - { - "province": "云南省", - "name": "楚雄彝族自治州", - "id": "532300" - }, - { - "province": "云南省", - "name": "红河哈尼族彝族自治州", - "id": "532500" - }, - { - "province": "云南省", - "name": "文山壮族苗族自治州", - "id": "532600" - }, - { - "province": "云南省", - "name": "西双版纳傣族自治州", - "id": "532800" - }, - { - "province": "云南省", - "name": "大理白族自治州", - "id": "532900" - }, - { - "province": "云南省", - "name": "德宏傣族景颇族自治州", - "id": "533100" - }, - { - "province": "云南省", - "name": "怒江傈僳族自治州", - "id": "533300" - }, - { - "province": "云南省", - "name": "迪庆藏族自治州", - "id": "533400" - } - ], - "540000": [ - { - "province": "西藏自治区", - "name": "拉萨市", - "id": "540100" - }, - { - "province": "西藏自治区", - "name": "日喀则市", - "id": "540200" - }, - { - "province": "西藏自治区", - "name": "昌都市", - "id": "540300" - }, - { - "province": "西藏自治区", - "name": "林芝市", - "id": "540400" - }, - { - "province": "西藏自治区", - "name": "山南市", - "id": "540500" - }, - { - "province": "西藏自治区", - "name": "那曲地区", - "id": "542400" - }, - { - "province": "西藏自治区", - "name": "阿里地区", - "id": "542500" - } - ], - "610000": [ - { - "province": "陕西省", - "name": "西安市", - "id": "610100" - }, - { - "province": "陕西省", - "name": "铜川市", - "id": "610200" - }, - { - "province": "陕西省", - "name": "宝鸡市", - "id": "610300" - }, - { - "province": "陕西省", - "name": "咸阳市", - "id": "610400" - }, - { - "province": "陕西省", - "name": "渭南市", - "id": "610500" - }, - { - "province": "陕西省", - "name": "延安市", - "id": "610600" - }, - { - "province": "陕西省", - "name": "汉中市", - "id": "610700" - }, - { - "province": "陕西省", - "name": "榆林市", - "id": "610800" - }, - { - "province": "陕西省", - "name": "安康市", - "id": "610900" - }, - { - "province": "陕西省", - "name": "商洛市", - "id": "611000" - } - ], - "620000": [ - { - "province": "甘肃省", - "name": "兰州市", - "id": "620100" - }, - { - "province": "甘肃省", - "name": "嘉峪关市", - "id": "620200" - }, - { - "province": "甘肃省", - "name": "金昌市", - "id": "620300" - }, - { - "province": "甘肃省", - "name": "白银市", - "id": "620400" - }, - { - "province": "甘肃省", - "name": "天水市", - "id": "620500" - }, - { - "province": "甘肃省", - "name": "武威市", - "id": "620600" - }, - { - "province": "甘肃省", - "name": "张掖市", - "id": "620700" - }, - { - "province": "甘肃省", - "name": "平凉市", - "id": "620800" - }, - { - "province": "甘肃省", - "name": "酒泉市", - "id": "620900" - }, - { - "province": "甘肃省", - "name": "庆阳市", - "id": "621000" - }, - { - "province": "甘肃省", - "name": "定西市", - "id": "621100" - }, - { - "province": "甘肃省", - "name": "陇南市", - "id": "621200" - }, - { - "province": "甘肃省", - "name": "临夏回族自治州", - "id": "622900" - }, - { - "province": "甘肃省", - "name": "甘南藏族自治州", - "id": "623000" - } - ], - "630000": [ - { - "province": "青海省", - "name": "西宁市", - "id": "630100" - }, - { - "province": "青海省", - "name": "海东市", - "id": "630200" - }, - { - "province": "青海省", - "name": "海北藏族自治州", - "id": "632200" - }, - { - "province": "青海省", - "name": "黄南藏族自治州", - "id": "632300" - }, - { - "province": "青海省", - "name": "海南藏族自治州", - "id": "632500" - }, - { - "province": "青海省", - "name": "果洛藏族自治州", - "id": "632600" - }, - { - "province": "青海省", - "name": "玉树藏族自治州", - "id": "632700" - }, - { - "province": "青海省", - "name": "海西蒙古族藏族自治州", - "id": "632800" - } - ], - "640000": [ - { - "province": "宁夏回族自治区", - "name": "银川市", - "id": "640100" - }, - { - "province": "宁夏回族自治区", - "name": "石嘴山市", - "id": "640200" - }, - { - "province": "宁夏回族自治区", - "name": "吴忠市", - "id": "640300" - }, - { - "province": "宁夏回族自治区", - "name": "固原市", - "id": "640400" - }, - { - "province": "宁夏回族自治区", - "name": "中卫市", - "id": "640500" - } - ], - "650000": [ - { - "province": "新疆维吾尔自治区", - "name": "乌鲁木齐市", - "id": "650100" - }, - { - "province": "新疆维吾尔自治区", - "name": "克拉玛依市", - "id": "650200" - }, - { - "province": "新疆维吾尔自治区", - "name": "吐鲁番市", - "id": "650400" - }, - { - "province": "新疆维吾尔自治区", - "name": "哈密市", - "id": "650500" - }, - { - "province": "新疆维吾尔自治区", - "name": "昌吉回族自治州", - "id": "652300" - }, - { - "province": "新疆维吾尔自治区", - "name": "博尔塔拉蒙古自治州", - "id": "652700" - }, - { - "province": "新疆维吾尔自治区", - "name": "巴音郭楞蒙古自治州", - "id": "652800" - }, - { - "province": "新疆维吾尔自治区", - "name": "阿克苏地区", - "id": "652900" - }, - { - "province": "新疆维吾尔自治区", - "name": "克孜勒苏柯尔克孜自治州", - "id": "653000" - }, - { - "province": "新疆维吾尔自治区", - "name": "喀什地区", - "id": "653100" - }, - { - "province": "新疆维吾尔自治区", - "name": "和田地区", - "id": "653200" - }, - { - "province": "新疆维吾尔自治区", - "name": "伊犁哈萨克自治州", - "id": "654000" - }, - { - "province": "新疆维吾尔自治区", - "name": "塔城地区", - "id": "654200" - }, - { - "province": "新疆维吾尔自治区", - "name": "阿勒泰地区", - "id": "654300" - }, - { - "province": "新疆维吾尔自治区", - "name": "自治区直辖县级行政区划", - "id": "659000" - } - ] -} diff --git a/mock/geographic/province.json b/mock/geographic/province.json deleted file mode 100644 index 910c83f0..00000000 --- a/mock/geographic/province.json +++ /dev/null @@ -1,138 +0,0 @@ -[ - { - "name": "北京市", - "id": "110000" - }, - { - "name": "天津市", - "id": "120000" - }, - { - "name": "河北省", - "id": "130000" - }, - { - "name": "山西省", - "id": "140000" - }, - { - "name": "内蒙古自治区", - "id": "150000" - }, - { - "name": "辽宁省", - "id": "210000" - }, - { - "name": "吉林省", - "id": "220000" - }, - { - "name": "黑龙江省", - "id": "230000" - }, - { - "name": "上海市", - "id": "310000" - }, - { - "name": "江苏省", - "id": "320000" - }, - { - "name": "浙江省", - "id": "330000" - }, - { - "name": "安徽省", - "id": "340000" - }, - { - "name": "福建省", - "id": "350000" - }, - { - "name": "江西省", - "id": "360000" - }, - { - "name": "山东省", - "id": "370000" - }, - { - "name": "河南省", - "id": "410000" - }, - { - "name": "湖北省", - "id": "420000" - }, - { - "name": "湖南省", - "id": "430000" - }, - { - "name": "广东省", - "id": "440000" - }, - { - "name": "广西壮族自治区", - "id": "450000" - }, - { - "name": "海南省", - "id": "460000" - }, - { - "name": "重庆市", - "id": "500000" - }, - { - "name": "四川省", - "id": "510000" - }, - { - "name": "贵州省", - "id": "520000" - }, - { - "name": "云南省", - "id": "530000" - }, - { - "name": "西藏自治区", - "id": "540000" - }, - { - "name": "陕西省", - "id": "610000" - }, - { - "name": "甘肃省", - "id": "620000" - }, - { - "name": "青海省", - "id": "630000" - }, - { - "name": "宁夏回族自治区", - "id": "640000" - }, - { - "name": "新疆维吾尔自治区", - "id": "650000" - }, - { - "name": "台湾省", - "id": "710000" - }, - { - "name": "香港特别行政区", - "id": "810000" - }, - { - "name": "澳门特别行政区", - "id": "820000" - } -] diff --git a/mock/profile.js b/mock/profile.js deleted file mode 100644 index 03aecc56..00000000 --- a/mock/profile.js +++ /dev/null @@ -1,158 +0,0 @@ -const basicGoods = [ - { - id: '1234561', - name: '矿泉水 550ml', - barcode: '12421432143214321', - price: '2.00', - num: '1', - amount: '2.00', - }, - { - id: '1234562', - name: '凉茶 300ml', - barcode: '12421432143214322', - price: '3.00', - num: '2', - amount: '6.00', - }, - { - id: '1234563', - name: '好吃的薯片', - barcode: '12421432143214323', - price: '7.00', - num: '4', - amount: '28.00', - }, - { - id: '1234564', - name: '特别好吃的蛋卷', - barcode: '12421432143214324', - price: '8.50', - num: '3', - amount: '25.50', - }, -]; - -const basicProgress = [ - { - key: '1', - time: '2017-10-01 14:10', - rate: '联系客户', - status: 'processing', - operator: '取货员 ID1234', - cost: '5mins', - }, - { - key: '2', - time: '2017-10-01 14:05', - rate: '取货员出发', - status: 'success', - operator: '取货员 ID1234', - cost: '1h', - }, - { - key: '3', - time: '2017-10-01 13:05', - rate: '取货员接单', - status: 'success', - operator: '取货员 ID1234', - cost: '5mins', - }, - { - key: '4', - time: '2017-10-01 13:00', - rate: '申请审批通过', - status: 'success', - operator: '系统', - cost: '1h', - }, - { - key: '5', - time: '2017-10-01 12:00', - rate: '发起退货申请', - status: 'success', - operator: '用户', - cost: '5mins', - }, -]; - -const advancedOperation1 = [ - { - key: 'op1', - type: '订购关系生效', - name: '曲丽丽', - status: 'agree', - updatedAt: '2017-10-03 19:23:12', - memo: '-', - }, - { - key: 'op2', - type: '财务复审', - name: '付小小', - status: 'reject', - updatedAt: '2017-10-03 19:23:12', - memo: '不通过原因', - }, - { - key: 'op3', - type: '部门初审', - name: '周毛毛', - status: 'agree', - updatedAt: '2017-10-03 19:23:12', - memo: '-', - }, - { - key: 'op4', - type: '提交订单', - name: '林东东', - status: 'agree', - updatedAt: '2017-10-03 19:23:12', - memo: '很棒', - }, - { - key: 'op5', - type: '创建订单', - name: '汗牙牙', - status: 'agree', - updatedAt: '2017-10-03 19:23:12', - memo: '-', - }, -]; - -const advancedOperation2 = [ - { - key: 'op1', - type: '订购关系生效', - name: '曲丽丽', - status: 'agree', - updatedAt: '2017-10-03 19:23:12', - memo: '-', - }, -]; - -const advancedOperation3 = [ - { - key: 'op1', - type: '创建订单', - name: '汗牙牙', - status: 'agree', - updatedAt: '2017-10-03 19:23:12', - memo: '-', - }, -]; - -const getProfileBasicData = { - basicGoods, - basicProgress, -}; - -const getProfileAdvancedData = { - advancedOperation1, - advancedOperation2, - advancedOperation3, -}; - -export default { - 'GET /api/profile/advanced': getProfileAdvancedData, - 'GET /api/profile/basic': getProfileBasicData, -}; diff --git a/mock/rule.js b/mock/rule.js deleted file mode 100644 index 87d235b0..00000000 --- a/mock/rule.js +++ /dev/null @@ -1,131 +0,0 @@ -import { parse } from 'url'; - -// mock tableListDataSource -let tableListDataSource = []; -for (let i = 0; i < 46; i += 1) { - tableListDataSource.push({ - key: i, - disabled: i % 6 === 0, - href: 'https://ant.design', - avatar: [ - 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png', - 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png', - ][i % 2], - name: `TradeCode ${i}`, - title: `一个任务名称 ${i}`, - owner: '曲丽丽', - desc: '这是一段描述', - callNo: Math.floor(Math.random() * 1000), - status: Math.floor(Math.random() * 10) % 4, - updatedAt: new Date(`2017-07-${Math.floor(i / 2) + 1}`), - createdAt: new Date(`2017-07-${Math.floor(i / 2) + 1}`), - progress: Math.ceil(Math.random() * 100), - }); -} - -function getRule(req, res, u) { - let url = u; - if (!url || Object.prototype.toString.call(url) !== '[object String]') { - url = req.url; // eslint-disable-line - } - - const params = parse(url, true).query; - - let dataSource = tableListDataSource; - - if (params.sorter) { - const s = params.sorter.split('_'); - dataSource = dataSource.sort((prev, next) => { - if (s[1] === 'descend') { - return next[s[0]] - prev[s[0]]; - } - return prev[s[0]] - next[s[0]]; - }); - } - - if (params.status) { - const status = params.status.split(','); - let filterDataSource = []; - status.forEach(s => { - filterDataSource = filterDataSource.concat( - dataSource.filter(data => parseInt(data.status, 10) === parseInt(s[0], 10)) - ); - }); - dataSource = filterDataSource; - } - - if (params.name) { - dataSource = dataSource.filter(data => data.name.indexOf(params.name) > -1); - } - - let pageSize = 10; - if (params.pageSize) { - pageSize = params.pageSize * 1; - } - - const result = { - list: dataSource, - pagination: { - total: dataSource.length, - pageSize, - current: parseInt(params.currentPage, 10) || 1, - }, - }; - - return res.json(result); -} - -function postRule(req, res, u, b) { - let url = u; - if (!url || Object.prototype.toString.call(url) !== '[object String]') { - url = req.url; // eslint-disable-line - } - - const body = (b && b.body) || req.body; - const { method, name, desc, key } = body; - - switch (method) { - /* eslint no-case-declarations:0 */ - case 'delete': - tableListDataSource = tableListDataSource.filter(item => key.indexOf(item.key) === -1); - break; - case 'post': - const i = Math.ceil(Math.random() * 10000); - tableListDataSource.unshift({ - key: i, - href: 'https://ant.design', - avatar: [ - 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png', - 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png', - ][i % 2], - name: `TradeCode ${i}`, - title: `一个任务名称 ${i}`, - owner: '曲丽丽', - desc, - callNo: Math.floor(Math.random() * 1000), - status: Math.floor(Math.random() * 10) % 2, - updatedAt: new Date(), - createdAt: new Date(), - progress: Math.ceil(Math.random() * 100), - }); - break; - case 'update': - tableListDataSource = tableListDataSource.map(item => { - if (item.key === key) { - Object.assign(item, { desc, name }); - return item; - } - return item; - }); - break; - default: - break; - } - - return getRule(req, res, u); -} - -export default { - 'GET /api/rule': getRule, - 'POST /api/rule': postRule, -}; diff --git a/scripts/account-center.json b/scripts/account-center.json deleted file mode 100644 index 2323a6cb..00000000 --- a/scripts/account-center.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "source": "src/pages/Account/Center/Center.js", - "target": "../umi-blocks/ant-design-pro/AccountCenter", - "extFiles": [ - ["src/models/setting.js", "src/models/setting.js"], - ["src/models/project.js", "src/models/project.js"], - ["src/models/user.js", "src/models/user.js"], - ["mock/api.js", "src/_mock.js"] - ] -} diff --git a/scripts/account-setting-base.json b/scripts/account-setting-base.json deleted file mode 100644 index b99a2443..00000000 --- a/scripts/account-setting-base.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "source": "src/pages/Account/Settings/BaseView.js", - "target": "../umi-blocks/ant-design-pro/AccountSettingsBase", - "extFiles": [ - ["src/pages/Account/Settings/models/geographic.js", "src/models/geographic.js"], - ["src/models/user.js", "src/models/user.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["mock/geographic.js", "src/_mock.js"], - ["src/locales/zh-CN/settings.js", "src/locales/zh-CN.js"], - ["src/locales/zh-TW/settings.js", "src/locales/zh-TW.js"], - ["src/locales/en-US/settings.js", "src/locales/en-US.js"] - ] -} diff --git a/scripts/account-setting-binding.json b/scripts/account-setting-binding.json deleted file mode 100644 index 926daea2..00000000 --- a/scripts/account-setting-binding.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "source": "src/pages/Account/Settings/BindingView.js", - "target": "../umi-blocks/ant-design-pro/AccountSettingsBinding", - "extFiles": [ - ["src/models/user.js", "src/models/user.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["mock/user.js", "src/_mock.js"], - ["src/locales/zh-CN/settings.js", "src/locales/zh-CN.js"], - ["src/locales/zh-TW/settings.js", "src/locales/zh-TW.js"], - ["src/locales/en-US/settings.js", "src/locales/en-US.js"] - ] -} diff --git a/scripts/account-setting-notification.json b/scripts/account-setting-notification.json deleted file mode 100644 index 3fa27bd6..00000000 --- a/scripts/account-setting-notification.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "source": "src/pages/Account/Settings/NotificationView.js", - "target": "../umi-blocks/ant-design-pro/AccountSettingsNotification", - "extFiles": [ - ["src/models/user.js", "src/models/user.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["mock/user.js", "src/_mock.js"], - ["src/locales/zh-CN/settings.js", "src/locales/zh-CN.js"], - ["src/locales/zh-TW/settings.js", "src/locales/zh-TW.js"], - ["src/locales/en-US/settings.js", "src/locales/en-US.js"] - ] -} diff --git a/scripts/account-setting-security.json b/scripts/account-setting-security.json deleted file mode 100644 index 6e81bfa9..00000000 --- a/scripts/account-setting-security.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "source": "src/pages/Account/Settings/SecurityView.js", - "target": "../umi-blocks/ant-design-pro/AccountSettingsSecurity", - "extFiles": [ - ["src/models/user.js", "src/models/user.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["mock/user.js", "src/_mock.js"], - ["src/locales/zh-CN/settings.js", "src/locales/zh-CN.js"], - ["src/locales/zh-TW/settings.js", "src/locales/zh-TW.js"], - ["src/locales/en-US/settings.js", "src/locales/en-US.js"] - ] -} diff --git a/scripts/account-setting.json b/scripts/account-setting.json deleted file mode 100644 index 2b1a7e4a..00000000 --- a/scripts/account-setting.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "source": "src/pages/Account/Settings/Info.js", - "target": "../umi-blocks/ant-design-pro/AccountSettings", - "extFiles": [ - ["src/models/user.js", "src/models/user.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["mock/user.js", "src/_mock.js"] - ] -} diff --git a/scripts/advanced-form.json b/scripts/advanced-form.json deleted file mode 100644 index e6589590..00000000 --- a/scripts/advanced-form.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "source": "src/pages/Forms/AdvancedForm.js", - "target": "../umi-blocks/ant-design-pro/AdvancedForm", - "extFiles": [ - ["src/pages/Forms/models/form.js", "src/models/form.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["mock/api.js", "src/_mock.js"], - ["src/locales/zh-CN/form.js", "src/locales/zh-CN.js"], - ["src/locales/zh-TW/form.js", "src/locales/zh-TW.js"], - ["src/locales/en-US/form.js", "src/locales/en-US.js"] - ] -} diff --git a/scripts/advanced-profile.json b/scripts/advanced-profile.json deleted file mode 100644 index 9df3b708..00000000 --- a/scripts/advanced-profile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "source": "src/pages/Profile/AdvancedProfile.js", - "target": "../umi-blocks/ant-design-pro/AdvancedProfile", - "extFiles": [ - ["src/pages/Profile/models/profile.js", "src/models/profile.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["mock/profile.js", "src/_mock.js"] - ] -} diff --git a/scripts/analysis.json b/scripts/analysis.json deleted file mode 100644 index 5460450f..00000000 --- a/scripts/analysis.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "source": "src/pages/Dashboard/Analysis.js", - "target": "../umi-blocks/ant-design-pro/Analysis", - "extFiles": [ - ["src/pages/Dashboard/models/chart.js", "src/models/chart.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["mock/chart.js", "src/_mock.js"] - ] -} diff --git a/scripts/basic-form.json b/scripts/basic-form.json deleted file mode 100644 index d394efba..00000000 --- a/scripts/basic-form.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "source": "src/pages/Forms/BasicForm.js", - "target": "../umi-blocks/ant-design-pro/BasicForm", - "extFiles": [ - ["src/pages/Dashboard/models/form.js", "src/models/form.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["mock/api.js", "src/_mock.js"], - ["src/locales/zh-CN/form.js", "src/locales/zh-CN.js"], - ["src/locales/zh-TW/form.js", "src/locales/zh-TW.js"], - ["src/locales/en-US/form.js", "src/locales/en-US.js"] - ] -} diff --git a/scripts/basic-list.json b/scripts/basic-list.json deleted file mode 100644 index 56870a2d..00000000 --- a/scripts/basic-list.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "source": "src/pages/List/BasicList.js", - "target": "../umi-blocks/ant-design-pro/BasicList", - "extFiles": [ - ["src/models/list.js", "src/models/list.js"], - ["src/pages/List/models/rule.js", "src/models/rule.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["mock/api.js", "src/_mock.js"] - ] -} diff --git a/scripts/basic-profile.json b/scripts/basic-profile.json deleted file mode 100644 index 2f69c1a0..00000000 --- a/scripts/basic-profile.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "source": "src/pages/Profile/BasicProfile.js", - "target": "../umi-blocks/ant-design-pro/BasicProfile", - "extFiles": [ - ["src/pages/Profile/models/profile.js", "src/models/profile.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["mock/profile.js", "src/_mock.js"] - ] -} diff --git a/scripts/card-list.json b/scripts/card-list.json deleted file mode 100644 index 4d0b5fdc..00000000 --- a/scripts/card-list.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "source": "src/pages/List/CardList.js", - "target": "../umi-blocks/ant-design-pro/CardList", - "extFiles": [ - ["src/models/list.js", "src/models/list.js"], - ["src/pages/List/models/rule.js", "src/models/rule.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["mock/api.js", "src/_mock.js"] - ] -} diff --git a/scripts/exception-403.json b/scripts/exception-403.json deleted file mode 100644 index 37024733..00000000 --- a/scripts/exception-403.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "source": "src/pages/Exception/403.js", - "target": "../umi-blocks/ant-design-pro/Exception403", - "extFiles": [ - ["src/pages/Exception/models/error.js", "src/models/error.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["src/locales/zh-CN/exception.js", "src/locales/zh-CN.js"], - ["src/locales/zh-TW/exception.js", "src/locales/zh-TW.js"], - ["src/locales/en-US/exception.js", "src/locales/en-US.js"] - ] -} diff --git a/scripts/exception-404.json b/scripts/exception-404.json deleted file mode 100644 index 86e39a39..00000000 --- a/scripts/exception-404.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "source": "src/pages/Exception/404.js", - "target": "../umi-blocks/ant-design-pro/Exception404", - "extFiles": [ - ["src/pages/Exception/models/error.js", "src/models/error.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["src/locales/zh-CN/exception.js", "src/locales/zh-CN.js"], - ["src/locales/zh-TW/exception.js", "src/locales/zh-TW.js"], - ["src/locales/en-US/exception.js", "src/locales/en-US.js"] - ] -} diff --git a/scripts/exception-500.json b/scripts/exception-500.json deleted file mode 100644 index 741d2ff5..00000000 --- a/scripts/exception-500.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "source": "src/pages/Exception/500.js", - "target": "../umi-blocks/ant-design-pro/Exception500", - "extFiles": [ - ["src/pages/Exception/models/error.js", "src/models/error.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["src/locales/zh-CN/exception.js", "src/locales/zh-CN.js"], - ["src/locales/zh-TW/exception.js", "src/locales/zh-TW.js"], - ["src/locales/en-US/exception.js", "src/locales/en-US.js"] - ] -} diff --git a/scripts/monitor.json b/scripts/monitor.json deleted file mode 100644 index 1685e120..00000000 --- a/scripts/monitor.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "source": "src/pages/Dashboard/Monitor.js", - "target": "../umi-blocks/ant-design-pro/Monitor", - "extFiles": [ - ["src/pages/Dashboard/models/monitor.js", "src/models/monitor.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["mock/chart.js", "src/_mock.js"] - ] -} diff --git a/scripts/result-error.json b/scripts/result-error.json deleted file mode 100644 index 2bb52f9d..00000000 --- a/scripts/result-error.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "source": "src/pages/Result/Error.js", - "target": "../umi-blocks/ant-design-pro/ResultError", - "extFiles": [ - ["src/models/setting.js", "src/models/setting.js"], - ["src/locales/zh-CN/result.js", "src/locales/zh-CN.js"], - ["src/locales/zh-TW/result.js", "src/locales/zh-TW.js"], - ["src/locales/en-US/result.js", "src/locales/en-US.js"] - ] -} diff --git a/scripts/result-success.json b/scripts/result-success.json deleted file mode 100644 index 071808fb..00000000 --- a/scripts/result-success.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "source": "src/pages/Result/Success.js", - "target": "../umi-blocks/ant-design-pro/ResultSuccess", - "extFiles": [ - ["src/models/setting.js", "src/models/setting.js"] - ] -} diff --git a/scripts/search-list-applications.json b/scripts/search-list-applications.json deleted file mode 100644 index d5fbd7fa..00000000 --- a/scripts/search-list-applications.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "source": "src/pages/List/Applications.js", - "target": "../umi-blocks/ant-design-pro/SearchListApplications", - "extFiles": [ - ["src/models/list.js", "src/models/list.js"], - ["src/pages/List/models/rule.js", "src/models/rule.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["mock/api.js", "src/_mock.js"] - ] -} diff --git a/scripts/search-list-articles.json b/scripts/search-list-articles.json deleted file mode 100644 index c57ccf3b..00000000 --- a/scripts/search-list-articles.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "source": "src/pages/List/Articles.js", - "target": "../umi-blocks/ant-design-pro/SearchListArticles", - "extFiles": [ - ["src/models/list.js", "src/models/list.js"], - ["src/pages/List/models/rule.js", "src/models/rule.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["mock/api.js", "src/_mock.js"] - ] -} diff --git a/scripts/search-list-projects.json b/scripts/search-list-projects.json deleted file mode 100644 index 6096940b..00000000 --- a/scripts/search-list-projects.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "source": "src/pages/List/Projects.js", - "target": "../umi-blocks/ant-design-pro/SearchListProjects", - "extFiles": [ - ["src/models/list.js", "src/models/list.js"], - ["src/pages/List/models/rule.js", "src/models/rule.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["mock/api.js", "src/_mock.js"] - ] -} diff --git a/scripts/search-list.json b/scripts/search-list.json deleted file mode 100644 index dd1ff1a9..00000000 --- a/scripts/search-list.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "source": "src/pages/List/List.js", - "target": "../umi-blocks/ant-design-pro/SearchList", - "extFiles": [ - ["src/models/setting.js", "src/models/setting.js"] - ] -} diff --git a/scripts/step-form-confirm.json b/scripts/step-form-confirm.json deleted file mode 100644 index 53ed5af1..00000000 --- a/scripts/step-form-confirm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "source": "src/pages/Forms/StepForm/Step2.js", - "target": "../umi-blocks/ant-design-pro/StepFormConfirm", - "extFiles": [ - ["src/pages/Forms/models/form.js", "src/models/form.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["mock/api.js", "src/_mock.js"], - ["src/locales/zh-CN/form.js", "src/locales/zh-CN.js"], - ["src/locales/zh-TW/form.js", "src/locales/zh-TW.js"], - ["src/locales/en-US/form.js", "src/locales/en-US.js"] - ] -} diff --git a/scripts/step-form-info.json b/scripts/step-form-info.json deleted file mode 100644 index 1d17be9a..00000000 --- a/scripts/step-form-info.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "source": "src/pages/Forms/StepForm/Step1.js", - "target": "../umi-blocks/ant-design-pro/StepFormInfo", - "extFiles": [ - ["src/pages/Forms/models/form.js", "src/models/form.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["mock/api.js", "src/_mock.js"], - ["src/locales/zh-CN/form.js", "src/locales/zh-CN.js"], - ["src/locales/zh-TW/form.js", "src/locales/zh-TW.js"], - ["src/locales/en-US/form.js", "src/locales/en-US.js"] - ] -} diff --git a/scripts/step-form-result.json b/scripts/step-form-result.json deleted file mode 100644 index c04a45c1..00000000 --- a/scripts/step-form-result.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "source": "src/pages/Forms/StepForm/Step3.js", - "target": "../umi-blocks/ant-design-pro/StepFormResult", - "extFiles": [ - ["src/pages/Forms/models/form.js", "src/models/form.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["mock/api.js", "src/_mock.js"], - ["src/locales/zh-CN/form.js", "src/locales/zh-CN.js"], - ["src/locales/zh-TW/form.js", "src/locales/zh-TW.js"], - ["src/locales/en-US/form.js", "src/locales/en-US.js"] - ] -} diff --git a/scripts/step-form.json b/scripts/step-form.json deleted file mode 100644 index 7a792677..00000000 --- a/scripts/step-form.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "source": "src/pages/Forms/StepForm/index.js", - "target": "../umi-blocks/ant-design-pro/StepForm", - "extFiles": [ - ["src/models/setting.js", "src/models/setting.js"], - ["mock/api.js", "src/_mock.js"], - ["src/locales/zh-CN/form.js", "src/locales/zh-CN.js"], - ["src/locales/zh-TW/form.js", "src/locales/zh-TW.js"], - ["src/locales/en-US/form.js", "src/locales/en-US.js"] - ] -} diff --git a/scripts/table-list.json b/scripts/table-list.json deleted file mode 100644 index 9cbf3fd9..00000000 --- a/scripts/table-list.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "source": "src/pages/List/TableList.js", - "target": "../umi-blocks/ant-design-pro/TableList", - "extFiles": [ - ["src/models/list.js", "src/models/list.js"], - ["src/pages/List/models/rule.js", "src/models/rule.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["mock/api.js", "src/_mock.js"] - ] -} diff --git a/scripts/user-login.json b/scripts/user-login.json deleted file mode 100644 index d7c74f29..00000000 --- a/scripts/user-login.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "source": "src/pages/User/Login.js", - "target": "../umi-blocks/ant-design-pro/UserLogin", - "extFiles": [ - ["src/models/setting.js", "src/models/setting.js"], - ["src/models/login.js", "src/models/login.js"], - ["mock/user.js", "src/_mock.js"], - ["src/locales/zh-CN/login.js", "src/locales/zh-CN.js"], - ["src/locales/zh-TW/login.js", "src/locales/zh-TW.js"], - ["src/locales/en-US/login.js", "src/locales/en-US.js"] - ] -} diff --git a/scripts/user-register-result.json b/scripts/user-register-result.json deleted file mode 100644 index b8ace7f2..00000000 --- a/scripts/user-register-result.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "source": "src/pages/User/RegisterResult.js", - "target": "../umi-blocks/ant-design-pro/UserRegisterResult", - "extFiles": [ - ["src/models/setting.js", "src/models/setting.js"], - ["src/models/login.js", "src/models/login.js"], - ["mock/user.js", "src/_mock.js"], - ["src/locales/zh-CN/login.js", "src/locales/zh-CN.js"], - ["src/locales/zh-TW/login.js", "src/locales/zh-TW.js"], - ["src/locales/en-US/login.js", "src/locales/en-US.js"] - ] -} diff --git a/scripts/user-register.json b/scripts/user-register.json deleted file mode 100644 index 2ab26d36..00000000 --- a/scripts/user-register.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "source": "src/pages/User/Register.js", - "target": "../umi-blocks/ant-design-pro/UserRegister", - "extFiles": [ - ["src/models/setting.js", "src/models/setting.js"], - ["src/models/login.js", "src/models/login.js"], - ["mock/user.js", "src/_mock.js"], - ["src/locales/zh-CN/login.js", "src/locales/zh-CN.js"], - ["src/locales/zh-TW/login.js", "src/locales/zh-TW.js"], - ["src/locales/en-US/login.js", "src/locales/en-US.js"] - ] -} diff --git a/scripts/workplace.json b/scripts/workplace.json deleted file mode 100644 index 5e133338..00000000 --- a/scripts/workplace.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "source": "src/pages/Dashboard/Workplace.js", - "target": "../umi-blocks/ant-design-pro/Workplace", - "extFiles": [ - ["src/pages/Dashboard/models/activities.js", "src/models/activities.js"], - ["src/pages/Dashboard/models/chart.js", "src/models/chart.js"], - ["src/models/user.js", "src/models/user.js"], - ["src/models/project.js", "src/models/project.js"], - ["src/models/setting.js", "src/models/setting.js"], - ["mock/api.js", "src/_mock.js"] - ] -} diff --git a/src/models/global.js b/src/models/global.js index 42895b59..a27ce5ac 100644 --- a/src/models/global.js +++ b/src/models/global.js @@ -1,4 +1,4 @@ -import { queryNotices } from '@/services/api'; +import { queryNotices } from '@/services/user'; export default { namespace: 'global', diff --git a/src/models/login.js b/src/models/login.js deleted file mode 100644 index 82fc4249..00000000 --- a/src/models/login.js +++ /dev/null @@ -1,78 +0,0 @@ -import { routerRedux } from 'dva/router'; -import { stringify } from 'qs'; -import { fakeAccountLogin, getFakeCaptcha } from '@/services/api'; -import { setAuthority } from '@/utils/authority'; -import { getPageQuery } from '@/utils/utils'; -import { reloadAuthorized } from '@/utils/Authorized'; - -export default { - namespace: 'login', - - state: { - status: undefined, - }, - - effects: { - *login({ payload }, { call, put }) { - const response = yield call(fakeAccountLogin, payload); - yield put({ - type: 'changeLoginStatus', - payload: response, - }); - // Login successfully - if (response.status === 'ok') { - reloadAuthorized(); - const urlParams = new URL(window.location.href); - const params = getPageQuery(); - let { redirect } = params; - if (redirect) { - const redirectUrlParams = new URL(redirect); - if (redirectUrlParams.origin === urlParams.origin) { - redirect = redirect.substr(urlParams.origin.length); - if (redirect.match(/^\/.*#/)) { - redirect = redirect.substr(redirect.indexOf('#') + 1); - } - } else { - window.location.href = redirect; - return; - } - } - yield put(routerRedux.replace(redirect || '/')); - } - }, - - *getCaptcha({ payload }, { call }) { - yield call(getFakeCaptcha, payload); - }, - - *logout(_, { put }) { - yield put({ - type: 'changeLoginStatus', - payload: { - status: false, - currentAuthority: 'guest', - }, - }); - reloadAuthorized(); - yield put( - routerRedux.push({ - pathname: '/user/login', - search: stringify({ - redirect: window.location.href, - }), - }) - ); - }, - }, - - reducers: { - changeLoginStatus(state, { payload }) { - setAuthority(payload.currentAuthority); - return { - ...state, - status: payload.status, - type: payload.type, - }; - }, - }, -}; diff --git a/src/models/project.js b/src/models/project.js deleted file mode 100644 index cf894125..00000000 --- a/src/models/project.js +++ /dev/null @@ -1,28 +0,0 @@ -import { queryProjectNotice } from '@/services/api'; - -export default { - namespace: 'project', - - state: { - notice: [], - }, - - effects: { - *fetchNotice(_, { call, put }) { - const response = yield call(queryProjectNotice); - yield put({ - type: 'saveNotice', - payload: Array.isArray(response) ? response : [], - }); - }, - }, - - reducers: { - saveNotice(state, action) { - return { - ...state, - notice: action.payload, - }; - }, - }, -}; diff --git a/src/services/api.js b/src/services/api.js deleted file mode 100644 index f79cefff..00000000 --- a/src/services/api.js +++ /dev/null @@ -1,126 +0,0 @@ -import { stringify } from 'qs'; -import request from '@/utils/request'; - -export async function queryProjectNotice() { - return request('/api/project/notice'); -} - -export async function queryActivities() { - return request('/api/activities'); -} - -export async function queryRule(params) { - return request(`/api/rule?${stringify(params)}`); -} - -export async function removeRule(params) { - return request('/api/rule', { - method: 'POST', - body: { - ...params, - method: 'delete', - }, - }); -} - -export async function addRule(params) { - return request('/api/rule', { - method: 'POST', - body: { - ...params, - method: 'post', - }, - }); -} - -export async function updateRule(params = {}) { - return request(`/api/rule?${stringify(params.query)}`, { - method: 'POST', - body: { - ...params.body, - method: 'update', - }, - }); -} - -export async function fakeSubmitForm(params) { - return request('/api/forms', { - method: 'POST', - body: params, - }); -} - -export async function fakeChartData() { - return request('/api/fake_chart_data'); -} - -export async function queryTags() { - return request('/api/tags'); -} - -export async function queryBasicProfile() { - return request('/api/profile/basic'); -} - -export async function queryAdvancedProfile() { - return request('/api/profile/advanced'); -} - -export async function queryFakeList(params) { - return request(`/api/fake_list?${stringify(params)}`); -} - -export async function removeFakeList(params) { - const { count = 5, ...restParams } = params; - return request(`/api/fake_list?count=${count}`, { - method: 'POST', - body: { - ...restParams, - method: 'delete', - }, - }); -} - -export async function addFakeList(params) { - const { count = 5, ...restParams } = params; - return request(`/api/fake_list?count=${count}`, { - method: 'POST', - body: { - ...restParams, - method: 'post', - }, - }); -} - -export async function updateFakeList(params) { - const { count = 5, ...restParams } = params; - return request(`/api/fake_list?count=${count}`, { - method: 'POST', - body: { - ...restParams, - method: 'update', - }, - }); -} - -export async function fakeAccountLogin(params) { - return request('/api/login/account', { - method: 'POST', - body: params, - }); -} - -export async function fakeRegister(params) { - return request('/api/register', { - method: 'POST', - body: params, - }); -} - -export async function queryNotices(params = {}) { - return request(`/api/notices?${stringify(params)}`); -} - -export async function getFakeCaptcha(mobile) { - return request(`/api/captcha?mobile=${mobile}`); -} diff --git a/src/services/error.js b/src/services/error.js deleted file mode 100644 index 13f2e942..00000000 --- a/src/services/error.js +++ /dev/null @@ -1,5 +0,0 @@ -import request from '@/utils/request'; - -export default async function queryError(code) { - return request(`/api/${code}`); -} diff --git a/src/services/geographic.js b/src/services/geographic.js deleted file mode 100644 index a5defd87..00000000 --- a/src/services/geographic.js +++ /dev/null @@ -1,9 +0,0 @@ -import request from '@/utils/request'; - -export async function queryProvince() { - return request('/api/geographic/province'); -} - -export async function queryCity(province) { - return request(`/api/geographic/city/${province}`); -} diff --git a/src/services/user.js b/src/services/user.js index 89e03c6f..e0a6f5e2 100644 --- a/src/services/user.js +++ b/src/services/user.js @@ -7,3 +7,7 @@ export async function query() { export async function queryCurrent() { return request('/api/currentUser'); } + +export async function queryNotices() { + return request('/api/notices'); +} -- GitLab