提交 31ef44097a7c1946b0595c227ce9f4892ae49ed5

作者 愚道
1 个父辈 ec5087fb

use BLOCK_NAME_CAMEL_CASE as the model name

正在显示 35 个修改的文件 包含 114 行增加114 行删除
... ... @@ -31,9 +31,9 @@ const operationTabList = [
31 31 },
32 32 ];
33 33
34   -@connect(({ loading, BLOCK_NAME }) => ({
35   - currentUser: BLOCK_NAME.currentUser,
36   - currentUserLoading: loading.effects['BLOCK_NAME/fetchCurrent'],
  34 +@connect(({ loading, BLOCK_NAME_CAMEL_CASE }) => ({
  35 + currentUser: BLOCK_NAME_CAMEL_CASE.currentUser,
  36 + currentUserLoading: loading.effects['BLOCK_NAME_CAMEL_CASE/fetchCurrent'],
37 37 }))
38 38 class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent {
39 39 static getDerivedStateFromProps(props, state) {
... ... @@ -58,7 +58,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent {
58 58 componentDidMount() {
59 59 const { dispatch } = this.props;
60 60 dispatch({
61   - type: 'BLOCK_NAME/fetchCurrent',
  61 + type: 'BLOCK_NAME_CAMEL_CASE/fetchCurrent',
62 62 });
63 63 }
64 64
... ...
1 1 import { query as queryUsers, queryCurrent } from './service';
2 2
3 3 export default {
4   - namespace: 'BLOCK_NAME',
  4 + namespace: 'BLOCK_NAME_CAMEL_CASE',
5 5
6 6 state: {
7 7 list: [],
... ...
... ... @@ -11,8 +11,8 @@ import NotificationView from './components/notification';
11 11
12 12 const { Item } = Menu;
13 13
14   -@connect(({ BLOCK_NAME }) => ({
15   - currentUser: BLOCK_NAME.currentUser,
  14 +@connect(({ BLOCK_NAME_CAMEL_CASE }) => ({
  15 + currentUser: BLOCK_NAME_CAMEL_CASE.currentUser,
16 16 }))
17 17 class PAGE_NAME_UPPER_CAMEL_CASE extends Component {
18 18 constructor(props) {
... ... @@ -54,7 +54,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component {
54 54 componentDidMount() {
55 55 const { dispatch } = this.props;
56 56 dispatch({
57   - type: 'BLOCK_NAME/fetchCurrent',
  57 + type: 'BLOCK_NAME_CAMEL_CASE/fetchCurrent',
58 58 });
59 59 window.addEventListener('resize', this.resize);
60 60 this.resize();
... ...
1 1 import { query as queryUsers, queryCurrent, queryProvince, queryCity } from './service';
2 2
3 3 export default {
4   - namespace: 'BLOCK_NAME',
  4 + namespace: 'BLOCK_NAME_CAMEL_CASE',
5 5
6 6 state: {
7 7 list: [],
... ...
... ... @@ -58,7 +58,7 @@ const tableData = [
58 58 ];
59 59
60 60 @connect(({ loading }) => ({
61   - submitting: loading.effects['BLOCK_NAME/submitAdvancedForm'],
  61 + submitting: loading.effects['BLOCK_NAME_CAMEL_CASE/submitAdvancedForm'],
62 62 }))
63 63 @Form.create()
64 64 class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent {
... ... @@ -139,7 +139,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent {
139 139 if (!error) {
140 140 // submit the values
141 141 dispatch({
142   - type: 'BLOCK_NAME/submitAdvancedForm',
  142 + type: 'BLOCK_NAME_CAMEL_CASE/submitAdvancedForm',
143 143 payload: values,
144 144 });
145 145 }
... ...
... ... @@ -2,7 +2,7 @@ import { message } from 'antd';
2 2 import { fakeSubmitForm } from './service';
3 3
4 4 export default {
5   - namespace: 'BLOCK_NAME',
  5 + namespace: 'BLOCK_NAME_CAMEL_CASE',
6 6
7 7 state: {},
8 8
... ...
... ... @@ -180,9 +180,9 @@ const columns = [
180 180 },
181 181 ];
182 182
183   -@connect(({ BLOCK_NAME, loading }) => ({
184   - BLOCK_NAME,
185   - loading: loading.effects['BLOCK_NAME/fetchAdvanced'],
  183 +@connect(({ BLOCK_NAME_CAMEL_CASE, loading }) => ({
  184 + BLOCK_NAME_CAMEL_CASE,
  185 + loading: loading.effects['BLOCK_NAME_CAMEL_CASE/fetchAdvanced'],
186 186 }))
187 187 class PAGE_NAME_UPPER_CAMEL_CASE extends Component {
188 188 state = {
... ... @@ -193,7 +193,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component {
193 193 componentDidMount() {
194 194 const { dispatch } = this.props;
195 195 dispatch({
196   - type: 'BLOCK_NAME/fetchAdvanced',
  196 + type: 'BLOCK_NAME_CAMEL_CASE/fetchAdvanced',
197 197 });
198 198
199 199 this.setStepDirection();
... ... @@ -227,8 +227,8 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component {
227 227
228 228 render() {
229 229 const { stepDirection, operationkey } = this.state;
230   - const { BLOCK_NAME, loading } = this.props;
231   - const { advancedOperation1, advancedOperation2, advancedOperation3 } = BLOCK_NAME;
  230 + const { BLOCK_NAME_CAMEL_CASE, loading } = this.props;
  231 + const { advancedOperation1, advancedOperation2, advancedOperation3 } = BLOCK_NAME_CAMEL_CASE;
232 232 const contentList = {
233 233 tab1: (
234 234 <Table
... ...
1 1 import { queryAdvancedProfile } from './service';
2 2
3 3 export default {
4   - namespace: 'BLOCK_NAME',
  4 + namespace: 'BLOCK_NAME_CAMEL_CASE',
5 5
6 6 state: {
7 7 advancedOperation1: [],
... ...
... ... @@ -13,9 +13,9 @@ const TopSearch = React.lazy(() => import('./components/TopSearch'));
13 13 const ProportionSales = React.lazy(() => import('./components/ProportionSales'));
14 14 const OfflineData = React.lazy(() => import('./components/OfflineData'));
15 15
16   -@connect(({ BLOCK_NAME, loading }) => ({
17   - BLOCK_NAME,
18   - loading: loading.effects['BLOCK_NAME/fetch'],
  16 +@connect(({ BLOCK_NAME_CAMEL_CASE, loading }) => ({
  17 + BLOCK_NAME_CAMEL_CASE,
  18 + loading: loading.effects['BLOCK_NAME_CAMEL_CASE/fetch'],
19 19 }))
20 20 class PAGE_NAME_UPPER_CAMEL_CASE extends Component {
21 21 state = {
... ... @@ -28,7 +28,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component {
28 28 const { dispatch } = this.props;
29 29 this.reqRef = requestAnimationFrame(() => {
30 30 dispatch({
31   - type: 'BLOCK_NAME/fetch',
  31 + type: 'BLOCK_NAME_CAMEL_CASE/fetch',
32 32 });
33 33 });
34 34 }
... ... @@ -36,7 +36,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component {
36 36 componentWillUnmount() {
37 37 const { dispatch } = this.props;
38 38 dispatch({
39   - type: 'BLOCK_NAME/clear',
  39 + type: 'BLOCK_NAME_CAMEL_CASE/clear',
40 40 });
41 41 cancelAnimationFrame(this.reqRef);
42 42 clearTimeout(this.timeoutId);
... ... @@ -61,7 +61,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component {
61 61 });
62 62
63 63 dispatch({
64   - type: 'BLOCK_NAME/fetchSalesData',
  64 + type: 'BLOCK_NAME_CAMEL_CASE/fetchSalesData',
65 65 });
66 66 };
67 67
... ... @@ -72,7 +72,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component {
72 72 });
73 73
74 74 dispatch({
75   - type: 'BLOCK_NAME/fetchSalesData',
  75 + type: 'BLOCK_NAME_CAMEL_CASE/fetchSalesData',
76 76 });
77 77 };
78 78
... ... @@ -93,7 +93,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component {
93 93
94 94 render() {
95 95 const { rangePickerValue, salesType, currentTabKey } = this.state;
96   - const { BLOCK_NAME, loading } = this.props;
  96 + const { BLOCK_NAME_CAMEL_CASE, loading } = this.props;
97 97 const {
98 98 visitData,
99 99 visitData2,
... ... @@ -104,7 +104,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component {
104 104 salesTypeData,
105 105 salesTypeDataOnline,
106 106 salesTypeDataOffline,
107   - } = BLOCK_NAME;
  107 + } = BLOCK_NAME_CAMEL_CASE;
108 108 let salesPieData;
109 109 if (salesType === 'all') {
110 110 salesPieData = salesTypeData;
... ...
1 1 import { fakeChartData } from './service';
2 2
3 3 export default {
4   - namespace: 'BLOCK_NAME',
  4 + namespace: 'BLOCK_NAME_CAMEL_CASE',
5 5
6 6 state: {
7 7 visitData: [],
... ...
... ... @@ -22,7 +22,7 @@ const { RangePicker } = DatePicker;
22 22 const { TextArea } = Input;
23 23
24 24 @connect(({ loading }) => ({
25   - submitting: loading.effects['BLOCK_NAME/submitRegularForm'],
  25 + submitting: loading.effects['BLOCK_NAME_CAMEL_CASE/submitRegularForm'],
26 26 }))
27 27 @Form.create()
28 28 class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent {
... ... @@ -32,7 +32,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent {
32 32 form.validateFieldsAndScroll((err, values) => {
33 33 if (!err) {
34 34 dispatch({
35   - type: 'BLOCK_NAME/submitRegularForm',
  35 + type: 'BLOCK_NAME_CAMEL_CASE/submitRegularForm',
36 36 payload: values,
37 37 });
38 38 }
... ...
... ... @@ -2,7 +2,7 @@ import { message } from 'antd';
2 2 import { fakeSubmitForm } from './service';
3 3
4 4 export default {
5   - namespace: 'BLOCK_NAME',
  5 + namespace: 'BLOCK_NAME_CAMEL_CASE',
6 6
7 7 state: {},
8 8
... ...
... ... @@ -32,9 +32,9 @@ const RadioGroup = Radio.Group;
32 32 const SelectOption = Select.Option;
33 33 const { Search, TextArea } = Input;
34 34
35   -@connect(({ BLOCK_NAME, loading }) => ({
36   - BLOCK_NAME,
37   - loading: loading.models.BLOCK_NAME,
  35 +@connect(({ BLOCK_NAME_CAMEL_CASE, loading }) => ({
  36 + BLOCK_NAME_CAMEL_CASE,
  37 + loading: loading.models.BLOCK_NAME_CAMEL_CASE,
38 38 }))
39 39 @Form.create()
40 40 class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent {
... ... @@ -48,7 +48,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent {
48 48 componentDidMount() {
49 49 const { dispatch } = this.props;
50 50 dispatch({
51   - type: 'BLOCK_NAME/fetch',
  51 + type: 'BLOCK_NAME_CAMEL_CASE/fetch',
52 52 payload: {
53 53 count: 5,
54 54 },
... ... @@ -97,7 +97,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent {
97 97 done: true,
98 98 });
99 99 dispatch({
100   - type: 'BLOCK_NAME/submit',
  100 + type: 'BLOCK_NAME_CAMEL_CASE/submit',
101 101 payload: { id, ...fieldsValue },
102 102 });
103 103 });
... ... @@ -106,14 +106,14 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent {
106 106 deleteItem = id => {
107 107 const { dispatch } = this.props;
108 108 dispatch({
109   - type: 'BLOCK_NAME/submit',
  109 + type: 'BLOCK_NAME_CAMEL_CASE/submit',
110 110 payload: { id },
111 111 });
112 112 };
113 113
114 114 render() {
115 115 const {
116   - BLOCK_NAME: { list },
  116 + BLOCK_NAME_CAMEL_CASE: { list },
117 117 loading,
118 118 } = this.props;
119 119 const {
... ...
1 1 import { queryFakeList, removeFakeList, addFakeList, updateFakeList } from './service';
2 2
3 3 export default {
4   - namespace: 'BLOCK_NAME',
  4 + namespace: 'BLOCK_NAME_CAMEL_CASE',
5 5
6 6 state: {
7 7 list: [],
... ...
... ... @@ -41,21 +41,21 @@ const progressColumns = [
41 41 },
42 42 ];
43 43
44   -@connect(({ BLOCK_NAME, loading }) => ({
45   - BLOCK_NAME,
46   - loading: loading.effects['BLOCK_NAME/fetchBasic'],
  44 +@connect(({ BLOCK_NAME_CAMEL_CASE, loading }) => ({
  45 + BLOCK_NAME_CAMEL_CASE,
  46 + loading: loading.effects['BLOCK_NAME_CAMEL_CASE/fetchBasic'],
47 47 }))
48 48 class PAGE_NAME_UPPER_CAMEL_CASE extends Component {
49 49 componentDidMount() {
50 50 const { dispatch } = this.props;
51 51 dispatch({
52   - type: 'BLOCK_NAME/fetchBasic',
  52 + type: 'BLOCK_NAME_CAMEL_CASE/fetchBasic',
53 53 });
54 54 }
55 55
56 56 render() {
57   - const { BLOCK_NAME, loading } = this.props;
58   - const { basicGoods, basicProgress } = BLOCK_NAME;
  57 + const { BLOCK_NAME_CAMEL_CASE, loading } = this.props;
  58 + const { basicGoods, basicProgress } = BLOCK_NAME_CAMEL_CASE;
59 59 let goodsData = [];
60 60 if (basicGoods.length) {
61 61 let num = 0;
... ...
1 1 import { queryBasicProfile } from './service';
2 2
3 3 export default {
4   - namespace: 'BLOCK_NAME',
  4 + namespace: 'BLOCK_NAME_CAMEL_CASE',
5 5
6 6 state: {
7 7 basicGoods: [],
... ...
... ... @@ -7,15 +7,15 @@ import PageHeaderWrapper from './components/PageHeaderWrapper';
7 7
8 8 import styles from './style.less';
9 9
10   -@connect(({ BLOCK_NAME, loading }) => ({
11   - BLOCK_NAME,
  10 +@connect(({ BLOCK_NAME_CAMEL_CASE, loading }) => ({
  11 + BLOCK_NAME_CAMEL_CASE,
12 12 loading: loading.models.list,
13 13 }))
14 14 class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent {
15 15 componentDidMount() {
16 16 const { dispatch } = this.props;
17 17 dispatch({
18   - type: 'BLOCK_NAME/fetch',
  18 + type: 'BLOCK_NAME_CAMEL_CASE/fetch',
19 19 payload: {
20 20 count: 8,
21 21 },
... ... @@ -24,7 +24,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent {
24 24
25 25 render() {
26 26 const {
27   - BLOCK_NAME: { list },
  27 + BLOCK_NAME_CAMEL_CASE: { list },
28 28 loading,
29 29 } = this.props;
30 30
... ...
1 1 import { queryFakeList } from './service';
2 2
3 3 export default {
4   - namespace: 'BLOCK_NAME',
  4 + namespace: 'BLOCK_NAME_CAMEL_CASE',
5 5
6 6 state: {
7 7 list: [],
... ...
... ... @@ -13,21 +13,21 @@ const { Pie, WaterWave, Gauge, TagCloud } = Charts;
13 13
14 14 const targetTime = new Date().getTime() + 3900000;
15 15
16   -@connect(({ BLOCK_NAME, loading }) => ({
17   - BLOCK_NAME,
  16 +@connect(({ BLOCK_NAME_CAMEL_CASE, loading }) => ({
  17 + BLOCK_NAME_CAMEL_CASE,
18 18 loading: loading.models.monitor,
19 19 }))
20 20 class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent {
21 21 componentDidMount() {
22 22 const { dispatch } = this.props;
23 23 dispatch({
24   - type: 'BLOCK_NAME/fetchTags',
  24 + type: 'BLOCK_NAME_CAMEL_CASE/fetchTags',
25 25 });
26 26 }
27 27
28 28 render() {
29   - const { BLOCK_NAME, loading } = this.props;
30   - const { tags } = BLOCK_NAME;
  29 + const { BLOCK_NAME_CAMEL_CASE, loading } = this.props;
  30 + const { tags } = BLOCK_NAME_CAMEL_CASE;
31 31
32 32 return (
33 33 <React.Fragment>
... ...
1 1 import { queryTags } from './service';
2 2
3 3 export default {
4   - namespace: 'BLOCK_NAME',
  4 + namespace: 'BLOCK_NAME_CAMEL_CASE',
5 5
6 6 state: {
7 7 tags: [],
... ...
... ... @@ -11,9 +11,9 @@ import styles from './style.less';
11 11 const { Option } = Select;
12 12 const FormItem = Form.Item;
13 13
14   -@connect(({ BLOCK_NAME, loading }) => ({
15   - BLOCK_NAME,
16   - loading: loading.models.BLOCK_NAME,
  14 +@connect(({ BLOCK_NAME_CAMEL_CASE, loading }) => ({
  15 + BLOCK_NAME_CAMEL_CASE,
  16 + loading: loading.models.BLOCK_NAME_CAMEL_CASE,
17 17 }))
18 18 @Form.create({
19 19 onValuesChange({ dispatch }, changedValues, allValues) {
... ... @@ -22,7 +22,7 @@ const FormItem = Form.Item;
22 22 console.log(changedValues, allValues);
23 23 // 模拟查询表单生效
24 24 dispatch({
25   - type: 'BLOCK_NAME/fetch',
  25 + type: 'BLOCK_NAME_CAMEL_CASE/fetch',
26 26 payload: {
27 27 count: 8,
28 28 },
... ... @@ -33,7 +33,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent {
33 33 componentDidMount() {
34 34 const { dispatch } = this.props;
35 35 dispatch({
36   - type: 'BLOCK_NAME/fetch',
  36 + type: 'BLOCK_NAME_CAMEL_CASE/fetch',
37 37 payload: {
38 38 count: 8,
39 39 },
... ... @@ -42,7 +42,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent {
42 42
43 43 render() {
44 44 const {
45   - BLOCK_NAME: { list },
  45 + BLOCK_NAME_CAMEL_CASE: { list },
46 46 loading,
47 47 form,
48 48 } = this.props;
... ...
1 1 import { queryFakeList } from './service';
2 2
3 3 export default {
4   - namespace: 'BLOCK_NAME',
  4 + namespace: 'BLOCK_NAME_CAMEL_CASE',
5 5
6 6 state: {
7 7 list: [],
... ...
... ... @@ -12,9 +12,9 @@ const FormItem = Form.Item;
12 12
13 13 const pageSize = 5;
14 14
15   -@connect(({ BLOCK_NAME, loading }) => ({
16   - BLOCK_NAME,
17   - loading: loading.models.BLOCK_NAME,
  15 +@connect(({ BLOCK_NAME_CAMEL_CASE, loading }) => ({
  16 + BLOCK_NAME_CAMEL_CASE,
  17 + loading: loading.models.BLOCK_NAME_CAMEL_CASE,
18 18 }))
19 19 @Form.create({
20 20 onValuesChange({ dispatch }, changedValues, allValues) {
... ... @@ -23,7 +23,7 @@ const pageSize = 5;
23 23 console.log(changedValues, allValues);
24 24 // 模拟查询表单生效
25 25 dispatch({
26   - type: 'BLOCK_NAME/fetch',
  26 + type: 'BLOCK_NAME_CAMEL_CASE/fetch',
27 27 payload: {
28 28 count: 5,
29 29 },
... ... @@ -34,7 +34,7 @@ class SearchList extends Component {
34 34 componentDidMount() {
35 35 const { dispatch } = this.props;
36 36 dispatch({
37   - type: 'BLOCK_NAME/fetch',
  37 + type: 'BLOCK_NAME_CAMEL_CASE/fetch',
38 38 payload: {
39 39 count: 5,
40 40 },
... ... @@ -51,7 +51,7 @@ class SearchList extends Component {
51 51 fetchMore = () => {
52 52 const { dispatch } = this.props;
53 53 dispatch({
54   - type: 'BLOCK_NAME/appendFetch',
  54 + type: 'BLOCK_NAME_CAMEL_CASE/appendFetch',
55 55 payload: {
56 56 count: pageSize,
57 57 },
... ... @@ -61,7 +61,7 @@ class SearchList extends Component {
61 61 render() {
62 62 const {
63 63 form,
64   - BLOCK_NAME: { list },
  64 + BLOCK_NAME_CAMEL_CASE: { list },
65 65 loading,
66 66 } = this.props;
67 67 const { getFieldDecorator } = form;
... ...
1 1 import { queryFakeList } from './service';
2 2
3 3 export default {
4   - namespace: 'BLOCK_NAME',
  4 + namespace: 'BLOCK_NAME_CAMEL_CASE',
5 5
6 6 state: {
7 7 list: [],
... ...
... ... @@ -13,9 +13,9 @@ const FormItem = Form.Item;
13 13
14 14 /* eslint react/no-array-index-key: 0 */
15 15
16   -@connect(({ BLOCK_NAME_CAMEL_CASE, loading }) => ({
17   - BLOCK_NAME_CAMEL_CASE,
18   - loading: loading.models.BLOCK_NAME_CAMEL_CASE,
  16 +@connect(({ BLOCK_NAME_CAMEL_CASE_CAMEL_CASE, loading }) => ({
  17 + BLOCK_NAME_CAMEL_CASE_CAMEL_CASE,
  18 + loading: loading.models.BLOCK_NAME_CAMEL_CASE_CAMEL_CASE,
19 19 }))
20 20 @Form.create({
21 21 onValuesChange({ dispatch }, changedValues, allValues) {
... ... @@ -24,7 +24,7 @@ const FormItem = Form.Item;
24 24 console.log(changedValues, allValues);
25 25 // 模拟查询表单生效
26 26 dispatch({
27   - type: 'BLOCK_NAME_CAMEL_CASE/fetch',
  27 + type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/fetch',
28 28 payload: {
29 29 count: 8,
30 30 },
... ... @@ -35,7 +35,7 @@ class CoverCardList extends PureComponent {
35 35 componentDidMount() {
36 36 const { dispatch } = this.props;
37 37 dispatch({
38   - type: 'BLOCK_NAME_CAMEL_CASE/fetch',
  38 + type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/fetch',
39 39 payload: {
40 40 count: 8,
41 41 },
... ... @@ -44,7 +44,7 @@ class CoverCardList extends PureComponent {
44 44
45 45 render() {
46 46 const {
47   - BLOCK_NAME_CAMEL_CASE: { list = [] },
  47 + BLOCK_NAME_CAMEL_CASE_CAMEL_CASE: { list = [] },
48 48 loading,
49 49 form,
50 50 } = this.props;
... ...
1 1 import { queryFakeList } from './service';
2 2
3 3 export default {
4   - namespace: 'BLOCK_NAME_CAMEL_CASE',
  4 + namespace: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE',
5 5
6 6 state: {
7 7 list: [],
... ...
... ... @@ -2,7 +2,7 @@ import { routerRedux } from 'dva/router';
2 2 import { fakeSubmitForm } from './service';
3 3
4 4 export default {
5   - namespace: 'BLOCK_NAME_CAMEL_CASE',
  5 + namespace: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE',
6 6
7 7 state: {
8 8 step: {
... ...
... ... @@ -272,8 +272,8 @@ class UpdateForm extends PureComponent {
272 272 }
273 273
274 274 /* eslint react/no-multi-comp:0 */
275   -@connect(({ BLOCK_NAME_CAMEL_CASE, loading }) => ({
276   - BLOCK_NAME_CAMEL_CASE,
  275 +@connect(({ BLOCK_NAME_CAMEL_CASE_CAMEL_CASE, loading }) => ({
  276 + BLOCK_NAME_CAMEL_CASE_CAMEL_CASE,
277 277 loading: loading.models.rule,
278 278 }))
279 279 @Form.create()
... ... @@ -351,7 +351,7 @@ class TableList extends PureComponent {
351 351 componentDidMount() {
352 352 const { dispatch } = this.props;
353 353 dispatch({
354   - type: 'BLOCK_NAME_CAMEL_CASE/fetch',
  354 + type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/fetch',
355 355 });
356 356 }
357 357
... ... @@ -376,7 +376,7 @@ class TableList extends PureComponent {
376 376 }
377 377
378 378 dispatch({
379   - type: 'BLOCK_NAME_CAMEL_CASE/fetch',
  379 + type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/fetch',
380 380 payload: params,
381 381 });
382 382 };
... ... @@ -388,7 +388,7 @@ class TableList extends PureComponent {
388 388 formValues: {},
389 389 });
390 390 dispatch({
391   - type: 'BLOCK_NAME_CAMEL_CASE/fetch',
  391 + type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/fetch',
392 392 payload: {},
393 393 });
394 394 };
... ... @@ -408,7 +408,7 @@ class TableList extends PureComponent {
408 408 switch (e.key) {
409 409 case 'remove':
410 410 dispatch({
411   - type: 'BLOCK_NAME_CAMEL_CASE/remove',
  411 + type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/remove',
412 412 payload: {
413 413 key: selectedRows.map(row => row.key),
414 414 },
... ... @@ -448,7 +448,7 @@ class TableList extends PureComponent {
448 448 });
449 449
450 450 dispatch({
451   - type: 'BLOCK_NAME_CAMEL_CASE/fetch',
  451 + type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/fetch',
452 452 payload: values,
453 453 });
454 454 });
... ... @@ -470,7 +470,7 @@ class TableList extends PureComponent {
470 470 handleAdd = fields => {
471 471 const { dispatch } = this.props;
472 472 dispatch({
473   - type: 'BLOCK_NAME_CAMEL_CASE/add',
  473 + type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/add',
474 474 payload: {
475 475 desc: fields.desc,
476 476 },
... ... @@ -483,7 +483,7 @@ class TableList extends PureComponent {
483 483 handleUpdate = fields => {
484 484 const { dispatch } = this.props;
485 485 dispatch({
486   - type: 'BLOCK_NAME_CAMEL_CASE/update',
  486 + type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/update',
487 487 payload: {
488 488 name: fields.name,
489 489 desc: fields.desc,
... ... @@ -616,7 +616,7 @@ class TableList extends PureComponent {
616 616
617 617 render() {
618 618 const {
619   - BLOCK_NAME_CAMEL_CASE: { data },
  619 + BLOCK_NAME_CAMEL_CASE_CAMEL_CASE: { data },
620 620 loading,
621 621 } = this.props;
622 622 const { selectedRows, modalVisible, updateModalVisible, stepFormValues } = this.state;
... ...
1 1 import { queryRule, removeRule, addRule, updateRule } from './service';
2 2
3 3 export default {
4   - namespace: 'BLOCK_NAME_CAMEL_CASE',
  4 + namespace: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE',
5 5
6 6 state: {
7 7 data: {
... ...
... ... @@ -8,9 +8,9 @@ import styles from './style.less';
8 8
9 9 const { Tab, UserName, Password, Mobile, Captcha, Submit } = Login;
10 10
11   -@connect(({ BLOCK_NAME_CAMEL_CASE, loading }) => ({
12   - BLOCK_NAME_CAMEL_CASE,
13   - submitting: loading.effects['BLOCK_NAME_CAMEL_CASE/login'],
  11 +@connect(({ BLOCK_NAME_CAMEL_CASE_CAMEL_CASE, loading }) => ({
  12 + BLOCK_NAME_CAMEL_CASE_CAMEL_CASE,
  13 + submitting: loading.effects['BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/login'],
14 14 }))
15 15 class LoginPage extends Component {
16 16 state = {
... ... @@ -30,7 +30,7 @@ class LoginPage extends Component {
30 30 } else {
31 31 const { dispatch } = this.props;
32 32 dispatch({
33   - type: 'BLOCK_NAME_CAMEL_CASE/getCaptcha',
  33 + type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/getCaptcha',
34 34 payload: values.mobile,
35 35 })
36 36 .then(resolve)
... ... @@ -44,7 +44,7 @@ class LoginPage extends Component {
44 44 if (!err) {
45 45 const { dispatch } = this.props;
46 46 dispatch({
47   - type: 'BLOCK_NAME_CAMEL_CASE/login',
  47 + type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/login',
48 48 payload: {
49 49 ...values,
50 50 type,
... ... @@ -64,8 +64,8 @@ class LoginPage extends Component {
64 64 );
65 65
66 66 render() {
67   - const { BLOCK_NAME_CAMEL_CASE, submitting } = this.props;
68   - const { status, type: loginType } = BLOCK_NAME_CAMEL_CASE;
  67 + const { BLOCK_NAME_CAMEL_CASE_CAMEL_CASE, submitting } = this.props;
  68 + const { status, type: loginType } = BLOCK_NAME_CAMEL_CASE_CAMEL_CASE;
69 69 const { type, autoLogin } = this.state;
70 70 return (
71 71 <div className={styles.main}>
... ...
... ... @@ -6,7 +6,7 @@ import { reloadAuthorized } from './utils/Authorized';
6 6 import { fakeAccountLogin, getFakeCaptcha } from './service';
7 7
8 8 export default {
9   - namespace: 'BLOCK_NAME_CAMEL_CASE',
  9 + namespace: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE',
10 10
11 11 state: {
12 12 status: undefined,
... ...
... ... @@ -34,9 +34,9 @@ const passwordProgressMap = {
34 34 poor: 'exception',
35 35 };
36 36
37   -@connect(({ BLOCK_NAME_CAMEL_CASE, loading }) => ({
38   - BLOCK_NAME_CAMEL_CASE,
39   - submitting: loading.effects['BLOCK_NAME_CAMEL_CASE/submit'],
  37 +@connect(({ BLOCK_NAME_CAMEL_CASE_CAMEL_CASE, loading }) => ({
  38 + BLOCK_NAME_CAMEL_CASE_CAMEL_CASE,
  39 + submitting: loading.effects['BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/submit'],
40 40 }))
41 41 @Form.create()
42 42 class PAGE_NAME_UPPER_CAMEL_CASE extends Component {
... ... @@ -49,9 +49,9 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component {
49 49 };
50 50
51 51 componentDidUpdate() {
52   - const { form, BLOCK_NAME_CAMEL_CASE } = this.props;
  52 + const { form, BLOCK_NAME_CAMEL_CASE_CAMEL_CASE } = this.props;
53 53 const account = form.getFieldValue('mail');
54   - if (BLOCK_NAME_CAMEL_CASE.status === 'ok') {
  54 + if (BLOCK_NAME_CAMEL_CASE_CAMEL_CASE.status === 'ok') {
55 55 router.push({
56 56 pathname: '/user/register-result',
57 57 state: {
... ... @@ -96,7 +96,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component {
96 96 if (!err) {
97 97 const { prefix } = this.state;
98 98 dispatch({
99   - type: 'BLOCK_NAME_CAMEL_CASE/submit',
  99 + type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/submit',
100 100 payload: {
101 101 ...values,
102 102 prefix,
... ...
1 1 import { fakeRegister } from './service';
2 2
3 3 export default {
4   - namespace: 'BLOCK_NAME_CAMEL_CASE',
  4 + namespace: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE',
5 5
6 6 state: {
7 7 status: undefined,
... ...
... ... @@ -39,27 +39,27 @@ const links = [
39 39 },
40 40 ];
41 41
42   -@connect(({ BLOCK_NAME_CAMEL_CASE: { user, project, activities, chart }, loading }) => ({
  42 +@connect(({ BLOCK_NAME_CAMEL_CASE_CAMEL_CASE: { user, project, activities, chart }, loading }) => ({
43 43 currentUser: user.currentUser,
44 44 project,
45 45 activities,
46 46 chart,
47   - currentUserLoading: loading.effects['BLOCK_NAME_CAMEL_CASE/fetchUserCurrent'],
48   - projectLoading: loading.effects['BLOCK_NAME_CAMEL_CASE/fetchProjectNotice'],
49   - activitiesLoading: loading.effects['BLOCK_NAME_CAMEL_CASE/fetchActivitiesList'],
  47 + currentUserLoading: loading.effects['BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/fetchUserCurrent'],
  48 + projectLoading: loading.effects['BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/fetchProjectNotice'],
  49 + activitiesLoading: loading.effects['BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/fetchActivitiesList'],
50 50 }))
51 51 class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent {
52 52 componentDidMount() {
53 53 const { dispatch } = this.props;
54 54 dispatch({
55   - type: 'BLOCK_NAME_CAMEL_CASE/init',
  55 + type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/init',
56 56 });
57 57 }
58 58
59 59 componentWillUnmount() {
60 60 const { dispatch } = this.props;
61 61 dispatch({
62   - type: 'BLOCK_NAME_CAMEL_CASE/clear',
  62 + type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/clear',
63 63 });
64 64 }
65 65
... ...
1 1 import { queryCurrent, queryProjectNotice, queryActivities, fakeChartData } from './service';
2 2
3 3 export default {
4   - namespace: 'BLOCK_NAME_CAMEL_CASE',
  4 + namespace: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE',
5 5 state: {
6 6 user: {
7 7 currentUser: {},
... ...
注册登录 后发表评论