diff --git a/config/plugin.config.js b/config/plugin.config.js index 27879fdd25927da27fd88ffcfa0bc424e85aa5f9..dd76beb80623107fe64bea70b94ad336746c78fd 100644 --- a/config/plugin.config.js +++ b/config/plugin.config.js @@ -5,6 +5,8 @@ const AntDesignThemePlugin = require('antd-theme-webpack-plugin'); const path = require('path'); const plugin = config => { + return; + // 将所有 less 合并为一个供 themePlugin使用 const outFile = path.join(__dirname, '../.temp/ant-design-pro.less'); const stylesDir = path.join(__dirname, '../src/'); diff --git a/src/models/list.js b/src/models/list.js index 8acf49f3ba5be00cfb1d07c6dd0b41da8adedfdd..06d25a93849e616d0d23e10f79f1121ff37481ca 100644 --- a/src/models/list.js +++ b/src/models/list.js @@ -1,4 +1,4 @@ -import { queryFakeList, removeFakeList, addFakeList, updateFakeList } from '../services/api'; +import { queryFakeList, removeFakeList, addFakeList, updateFakeList } from '@/services/api'; export default { namespace: 'list', diff --git a/src/models/project.js b/src/models/project.js index f68bef5302d79ae1a11b3300521f8198a9a1d957..cf894125d0bdce999f280f6263ab43532318400c 100644 --- a/src/models/project.js +++ b/src/models/project.js @@ -1,4 +1,4 @@ -import { queryProjectNotice } from '../services/api'; +import { queryProjectNotice } from '@/services/api'; export default { namespace: 'project', diff --git a/src/models/geographic.js b/src/pages/Account/Settings/models/geographic.js similarity index 100% rename from src/models/geographic.js rename to src/pages/Account/Settings/models/geographic.js diff --git a/src/services/geographic.js b/src/pages/Account/Settings/services/geographic.js similarity index 79% rename from src/services/geographic.js rename to src/pages/Account/Settings/services/geographic.js index 570a36e05239a9f869833d54ef6efb1077541996..ee7fcc3fc136bae9d6802284891b6d39b9e899a2 100644 --- a/src/services/geographic.js +++ b/src/pages/Account/Settings/services/geographic.js @@ -1,4 +1,4 @@ -import request from '../utils/request'; +import request from '../../../../utils/request'; export async function queryProvince() { return request('/api/geographic/province'); diff --git a/src/pages/Dashboard/Workplace.js b/src/pages/Dashboard/Workplace.js index 91e5dd28119465dd0261e5486faedb4c5bcf0d77..986586e864da0b97b240839e138d10feed125c70 100644 --- a/src/pages/Dashboard/Workplace.js +++ b/src/pages/Dashboard/Workplace.js @@ -4,9 +4,9 @@ import { connect } from 'dva'; import { Link } from 'dva/router'; import { Row, Col, Card, List, Avatar } from 'antd'; -import { Radar } from 'components/Charts'; -import EditableLinkGroup from 'components/EditableLinkGroup'; -import PageHeaderLayout from '../../layouts/PageHeaderLayout'; +import { Radar } from '@/components/Charts'; +import EditableLinkGroup from '@/components/EditableLinkGroup'; +import PageHeaderLayout from '@/layouts/PageHeaderLayout'; import styles from './Workplace.less'; diff --git a/src/models/activities.js b/src/pages/Dashboard/models/activities.js similarity index 89% rename from src/models/activities.js rename to src/pages/Dashboard/models/activities.js index 76a7d502e3565de535f3c58a5d51c79ef8647228..4e0a11e277f8b6e881da6eba44f884a04ce60aa9 100644 --- a/src/models/activities.js +++ b/src/pages/Dashboard/models/activities.js @@ -1,4 +1,4 @@ -import { queryActivities } from '../services/api'; +import { queryActivities } from '@/services/api'; export default { namespace: 'activities', diff --git a/src/models/chart.js b/src/pages/Dashboard/models/chart.js similarity index 95% rename from src/models/chart.js rename to src/pages/Dashboard/models/chart.js index 17bd30614d7b2577c5154f0bd1415a3b9e6c2b7c..8dfe4a93f5b9b1efbc957fc7034e9949b67f1d29 100644 --- a/src/models/chart.js +++ b/src/pages/Dashboard/models/chart.js @@ -1,4 +1,4 @@ -import { fakeChartData } from '../services/api'; +import { fakeChartData } from '@/services/api'; export default { namespace: 'chart', diff --git a/src/models/monitor.js b/src/pages/Dashboard/models/monitor.js similarity index 89% rename from src/models/monitor.js rename to src/pages/Dashboard/models/monitor.js index a5f96f82a42f4f9a88d6d6a9be4e3e6addd0cc00..e3e832ff8bc79e34430a69e671d1017023c317fa 100644 --- a/src/models/monitor.js +++ b/src/pages/Dashboard/models/monitor.js @@ -1,4 +1,4 @@ -import { queryTags } from '../services/api'; +import { queryTags } from '@/services/api'; export default { namespace: 'monitor', diff --git a/src/models/error.js b/src/pages/Exception/models/error.js similarity index 100% rename from src/models/error.js rename to src/pages/Exception/models/error.js diff --git a/src/services/error.js b/src/pages/Exception/services/error.js similarity index 61% rename from src/services/error.js rename to src/pages/Exception/services/error.js index 7e1eeee1948fcbcd725af01420b7905432816b93..2cb9456cf9df7a622a5c2b2ee8dea5ba69f75110 100644 --- a/src/services/error.js +++ b/src/pages/Exception/services/error.js @@ -1,4 +1,4 @@ -import request from '../utils/request'; +import request from '../../../utils/request'; export async function query(code) { return request(`/api/${code}`); diff --git a/src/models/form.js b/src/pages/Forms/models/form.js similarity index 95% rename from src/models/form.js rename to src/pages/Forms/models/form.js index 64a1d49794b9b059564eadf7fce0bb9dbde5a8a3..0b241b133d5fb8c0147f8bf81f8400df1a97ffd7 100644 --- a/src/models/form.js +++ b/src/pages/Forms/models/form.js @@ -1,6 +1,6 @@ import { routerRedux } from 'dva/router'; import { message } from 'antd'; -import { fakeSubmitForm } from '../services/api'; +import { fakeSubmitForm } from '@/services/api'; export default { namespace: 'form', diff --git a/src/models/rule.js b/src/pages/List/models/rule.js similarity index 93% rename from src/models/rule.js rename to src/pages/List/models/rule.js index 8303dd21198c112689c84f7c42918c3da4bca430..b318dbe3649b8957b29bad438d42baecec269d4a 100644 --- a/src/models/rule.js +++ b/src/pages/List/models/rule.js @@ -1,4 +1,4 @@ -import { queryRule, removeRule, addRule, updateRule } from '../services/api'; +import { queryRule, removeRule, addRule, updateRule } from '@/services/api'; export default { namespace: 'rule', diff --git a/src/models/profile.js b/src/pages/Profile/models/profile.js similarity index 89% rename from src/models/profile.js rename to src/pages/Profile/models/profile.js index 7c9d01986447a096eeffbf064bae253b8b8d5905..de651b8afde813a230777c8af4d78dfecbfd86d7 100644 --- a/src/models/profile.js +++ b/src/pages/Profile/models/profile.js @@ -1,4 +1,4 @@ -import { queryBasicProfile, queryAdvancedProfile } from '../services/api'; +import { queryBasicProfile, queryAdvancedProfile } from '@/services/api'; export default { namespace: 'profile', diff --git a/src/pages/Result/Error.js b/src/pages/Result/Error.js index 4ef70c6db46c5b9c72ec74108a5933a897b2bb7a..6d8aafcff0f73c7f41f3391a12dcf0cc56c6305a 100644 --- a/src/pages/Result/Error.js +++ b/src/pages/Result/Error.js @@ -1,8 +1,8 @@ import React, { Fragment } from 'react'; import { formatMessage, FormattedMessage } from 'umi/locale'; import { Button, Icon, Card } from 'antd'; -import Result from 'components/Result'; -import PageHeaderLayout from '../../layouts/PageHeaderLayout'; +import Result from '@/components/Result'; +import PageHeaderLayout from '@/layouts/PageHeaderLayout'; const extra = ( diff --git a/src/pages/Result/Success.js b/src/pages/Result/Success.js index 7ce0c68f1e1007a8459e615e71b85673e4c2fecc..1d049b8f9fb3e6dd82a0540954c4c4009366ca52 100644 --- a/src/pages/Result/Success.js +++ b/src/pages/Result/Success.js @@ -2,7 +2,7 @@ import React, { Fragment } from 'react'; import { formatMessage, FormattedMessage } from 'umi/locale'; import { Button, Row, Col, Icon, Steps, Card } from 'antd'; import Result from 'components/Result'; -import PageHeaderLayout from '../../layouts/PageHeaderLayout'; +import PageHeaderLayout from '@/layouts/PageHeaderLayout'; const { Step } = Steps; diff --git a/src/models/login.js b/src/pages/User/models/login.js similarity index 88% rename from src/models/login.js rename to src/pages/User/models/login.js index 426c9e86915f79293fa6289e7c66660051ba6c0f..d38465d03d435e119592c4dce2ad5b92855ab859 100644 --- a/src/models/login.js +++ b/src/pages/User/models/login.js @@ -1,9 +1,9 @@ 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'; +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', diff --git a/src/models/register.js b/src/pages/User/models/register.js similarity index 76% rename from src/models/register.js rename to src/pages/User/models/register.js index 57a97838d693532283476509391bfb3080e5ddc1..a2901bbd5c1393503bc0663eeee50b073ef33a08 100644 --- a/src/models/register.js +++ b/src/pages/User/models/register.js @@ -1,6 +1,6 @@ -import { fakeRegister } from '../services/api'; -import { setAuthority } from '../utils/authority'; -import { reloadAuthorized } from '../utils/Authorized'; +import { fakeRegister } from '@/services/api'; +import { setAuthority } from '@/utils/authority'; +import { reloadAuthorized } from '@/utils/Authorized'; export default { namespace: 'register',