KaysonCui 4 lat temu
rodzic
commit
157a2389ab
49 zmienionych plików z 852 dodań i 40 usunięć
  1. 1 1
      front/project/www/app.js
  2. 5 2
      front/project/www/components/CheckboxItem/index.js
  3. 4 0
      front/project/www/components/CheckboxItem/index.less
  4. 16 10
      front/project/www/components/Select/index.js
  5. 15 15
      front/project/www/components/Select/index.less
  6. 2 2
      front/project/www/components/Tabs/index.js
  7. 10 9
      front/project/www/components/Tabs/index.less
  8. 40 0
      front/project/www/components/UserAction/index.js
  9. 30 0
      front/project/www/components/UserAction/index.less
  10. 68 0
      front/project/www/components/UserFilter/index.js
  11. 49 0
      front/project/www/components/UserFilter/index.less
  12. 69 0
      front/project/www/components/UserTable/index.js
  13. 53 0
      front/project/www/components/UserTable/index.less
  14. 46 0
      front/project/www/layouts/User/index.js
  15. 65 0
      front/project/www/layouts/User/index.less
  16. 9 0
      front/project/www/routes/my/answer/index.js
  17. 3 0
      front/project/www/routes/my/answer/index.less
  18. 9 0
      front/project/www/routes/my/answer/page.js
  19. 9 0
      front/project/www/routes/my/collect/index.js
  20. 3 0
      front/project/www/routes/my/collect/index.less
  21. 9 0
      front/project/www/routes/my/collect/page.js
  22. 9 0
      front/project/www/routes/my/course/index.js
  23. 3 0
      front/project/www/routes/my/course/index.less
  24. 9 0
      front/project/www/routes/my/course/page.js
  25. 9 0
      front/project/www/routes/my/data/index.js
  26. 3 0
      front/project/www/routes/my/data/index.less
  27. 9 0
      front/project/www/routes/my/data/page.js
  28. 9 0
      front/project/www/routes/my/error/index.js
  29. 25 0
      front/project/www/routes/my/error/index.less
  30. 93 0
      front/project/www/routes/my/error/page.js
  31. 12 1
      front/project/www/routes/my/index.js
  32. 9 0
      front/project/www/routes/my/main/index.js
  33. 3 0
      front/project/www/routes/my/main/index.less
  34. 39 0
      front/project/www/routes/my/main/page.js
  35. 9 0
      front/project/www/routes/my/message/index.js
  36. 3 0
      front/project/www/routes/my/message/index.less
  37. 9 0
      front/project/www/routes/my/message/page.js
  38. 9 0
      front/project/www/routes/my/note/index.js
  39. 3 0
      front/project/www/routes/my/note/index.less
  40. 9 0
      front/project/www/routes/my/note/page.js
  41. 9 0
      front/project/www/routes/my/order/index.js
  42. 3 0
      front/project/www/routes/my/order/index.less
  43. 9 0
      front/project/www/routes/my/order/page.js
  44. 9 0
      front/project/www/routes/my/report/index.js
  45. 3 0
      front/project/www/routes/my/report/index.less
  46. 9 0
      front/project/www/routes/my/report/page.js
  47. 9 0
      front/project/www/routes/my/tools/index.js
  48. 3 0
      front/project/www/routes/my/tools/index.less
  49. 9 0
      front/project/www/routes/my/tools/page.js

+ 1 - 1
front/project/www/app.js

@@ -22,7 +22,7 @@ export default class extends Component {
             <Login {...this.props} />
           </div>
         ) : (
-          <div className={`${config.tab}`} id="page">
+          <div className={`${config.tab || ''}`} id="page">
             <Header tabs={project.tabs} active={config.tab} />
             {children}
             <Login {...this.props} />

+ 5 - 2
front/project/www/components/CheckboxItem/index.js

@@ -2,9 +2,12 @@ import React from 'react';
 import './index.less';
 
 function CheckboxItem(props) {
-  const { checked, onClick } = props;
+  const { checked, theme = 'default', onClick } = props;
   return (
-    <div className={`checkbox-item ${checked ? 'checked' : ''}`} onClick={() => !checked && onClick && onClick()} />
+    <div
+      className={`checkbox-item ${theme} ${checked ? 'checked' : ''}`}
+      onClick={() => onClick && onClick(!checked)}
+    />
   );
 }
 CheckboxItem.propTypes = {};

+ 4 - 0
front/project/www/components/CheckboxItem/index.less

@@ -15,4 +15,8 @@
   background-repeat: no-repeat;
   background-position: center;
   position: relative;
+}
+
+.checkbox-item.white {
+  background: #fff;
 }

+ 16 - 10
front/project/www/components/Select/index.js

@@ -8,9 +8,9 @@ export default class Select extends Component {
     this.state = { selecting: false };
   }
 
-  componentWillMount() { }
+  componentWillMount() {}
 
-  componentWillUnmount() { }
+  componentWillUnmount() {}
 
   open() {
     this.setState({ selecting: true });
@@ -22,7 +22,7 @@ export default class Select extends Component {
 
   render() {
     const { selecting } = this.state;
-    const { value, list = [], size = 'small', theme = 'theme', excludeSelf, onChange } = this.props;
+    const { placeholder, value, list = [], size = 'basic', theme = 'theme', excludeSelf, onChange } = this.props;
     let index = 0;
     for (let i = 0; i < list.length; i += 1) {
       if (list[i].key === value) {
@@ -30,8 +30,7 @@ export default class Select extends Component {
         break;
       }
     }
-    const title = list.length > 0 ? list[index].title : '';
-    console.log(list);
+    const title = list.length > 0 ? list[index].title : placeholder;
     return (
       <div className={`select ${theme || ''}`}>
         <div hidden={!selecting} className="mask" onClick={() => this.close()} />
@@ -39,13 +38,20 @@ export default class Select extends Component {
           <Button size={size} theme={theme} radius onClick={() => this.open()}>
             {title} <i className={selecting ? 'up-arrow' : 'down-arrow'} />
           </Button>
-          <div className={`select-body ${selecting ? 'select' : ''}`}>
+          <div className={`select-body ${selecting ? 'selected' : ''}`}>
             {list.map((item, i) => {
               if (excludeSelf && index === i) return null;
-              return <div className="select-option" onClick={() => {
-                if (onChange) onChange(item);
-                this.close();
-              }}>{item.title}</div>;
+              return (
+                <div
+                  className="select-option"
+                  onClick={() => {
+                    if (onChange) onChange(item);
+                    this.close();
+                  }}
+                >
+                  {item.title}
+                </div>
+              );
             })}
           </div>
         </div>

+ 15 - 15
front/project/www/components/Select/index.less

@@ -1,5 +1,17 @@
 @import '../../app.less';
 
+.select.small {
+  .select-warp {
+    line-height: 24px;
+  }
+}
+
+.select.basic {
+  .select-warp {
+    line-height: 30px;
+  }
+}
+
 .select {
   position: relative;
   text-align: center;
@@ -14,8 +26,6 @@
   }
 
   .select-warp {
-    line-height: 30px;
-    display: inline-block;
     position: relative;
     text-align: center;
   }
@@ -54,7 +64,7 @@
     }
   }
 
-  .select-body.select {
+  .select-body.selected {
     opacity: 1;
 
     .select-option {
@@ -118,7 +128,6 @@
       border-radius: 0;
       background: none;
       color: #686872;
-      line-height: 30px;
     }
 
     .up-arrow {
@@ -138,7 +147,6 @@
     .select-option {
       padding: 0;
       text-align: center;
-      line-height: 30px;
       border: none;
     }
   }
@@ -160,21 +168,13 @@
   &.default {
     cursor: pointer;
 
-    .select-warp.active {
-      background: rgba(241, 243, 246, 1);
-    }
-
-    .button {
-      line-height: 20px;
-    }
-
     .up-arrow::after {
       width: auto;
       height: auto;
       border-width: 5px;
       border-color: transparent transparent #8897a8 transparent;
       border-style: solid;
-      transform: translateY(-3px);
+      transform: translateY(-4px);
     }
 
     .down-arrow::after {
@@ -183,7 +183,7 @@
       border-width: 5px;
       border-color: #8897a8 transparent transparent transparent;
       border-style: solid;
-      transform: translateY(3px);
+      transform: translateY(2px);
     }
 
     .select-body {

+ 2 - 2
front/project/www/components/Tabs/index.js

@@ -16,9 +16,9 @@ function getItem(props, item, onChange) {
 }
 
 function Tabs(props) {
-  const { tabs = [], type = 'line', theme = 'default', border, space, onChange } = props;
+  const { tabs = [], size = 'basic', type = 'line', theme = 'default', border, space, onChange } = props;
   return (
-    <div className={`tabs ${type} ${theme} ${border ? 'border' : ''}`}>
+    <div className={`tabs ${type} ${theme} ${size} ${border ? 'border' : ''}`}>
       <div className="tabs-warpper" style={{ marginLeft: space * -1 || '', marginRight: space * -1 || '' }}>
         {tabs.map(item => {
           return item.path ? <Link to={item.path}>{getItem(props, item)}</Link> : getItem(props, item, onChange);

+ 10 - 9
front/project/www/components/Tabs/index.less

@@ -1,13 +1,21 @@
 @import '../../app.less';
 
+.tabs {
+  height: 44px;
+  line-height: 44px;
+}
+
+.tabs.small {
+  height: 32px;
+  line-height: 32px;
+}
+
 .tabs.border {
   border-bottom: 1px solid @line_color;
 }
 
 .tabs.line {
   text-align: center;
-  height: 44px;
-  line-height: 44px;
   background: #fff;
 
   .tab {
@@ -45,8 +53,6 @@
 
 .tabs.card {
   text-align: center;
-  height: 44px;
-  line-height: 44px;
   background: @theme_bg_color;
 
   .tabs-warpper {
@@ -119,8 +125,6 @@
 }
 
 .tabs.text {
-  height: 44px;
-  line-height: 44px;
   padding-left: 44px;
   background: #fff;
 
@@ -156,10 +160,7 @@
 }
 
 .tabs.division {
-
   text-align: center;
-  height: 44px;
-  line-height: 44px;
 
   .tabs-warpper {
     display: flex;

+ 40 - 0
front/project/www/components/UserAction/index.js

@@ -0,0 +1,40 @@
+import React, { Component } from 'react';
+import './index.less';
+import { Icon } from 'antd';
+import CheckboxItem from '../CheckboxItem';
+import { Button } from '../Button';
+
+export default class UserAction extends Component {
+  onAction(key) {
+    const { onAction } = this.props;
+    if (onAction) onAction(key);
+  }
+
+  onAll(checked) {
+    const { onAll } = this.props;
+    if (onAll) onAll(checked);
+  }
+
+  render() {
+    const { allCheckbox, help, btnList = [], right } = this.props;
+    return (
+      <div className="user-action">
+        {allCheckbox && (
+          <div className="all">
+            <CheckboxItem theme="white" onClick={value => this.onAll(value)} />
+            全选
+          </div>
+        )}
+        {btnList.map(btn => {
+          return (
+            <Button radius size="small" onClick={() => this.onAction(btn.key)}>
+              {btn.title}
+            </Button>
+          );
+        })}
+        {help && <Icon type="question-circle" theme="filled" onClick={() => this.onAction('help')} />}
+        {right && <div className="right">{right}</div>}
+      </div>
+    );
+  }
+}

+ 30 - 0
front/project/www/components/UserAction/index.less

@@ -0,0 +1,30 @@
+@import '../../app.less';
+
+.user-action {
+  border-top: 1px solid #ECEDEE;
+  height: 40px;
+  line-height: 40px;
+
+  .all {
+    display: inline-block;
+    margin-right: 15px;
+
+    .checkbox-item {
+      transform: translateY(5px);
+      margin-right: 5px;
+    }
+  }
+
+  .button {
+    margin-right: 10px;
+  }
+
+  i {
+    font-size: 14px;
+    color: #D0D8E2;
+  }
+
+  .right {
+    float: right;
+  }
+}

+ 68 - 0
front/project/www/components/UserFilter/index.js

@@ -0,0 +1,68 @@
+import React, { Component } from 'react';
+import './index.less';
+import { Icon } from 'antd';
+import Select from '../Select';
+
+export default class UserFilter extends Component {
+  constructor(props) {
+    super(props);
+    this.state = { showInput: false, searchText: '' };
+  }
+
+  onSearch(value) {
+    this.setState({ searchText: value });
+  }
+
+  onFilter(key, value) {
+    const { filterMap = {}, onFilter } = this.props;
+    filterMap[key] = value;
+    if (onFilter) onFilter(filterMap);
+  }
+
+  render() {
+    const { search, data = [] } = this.props;
+    const { showInput, searchText } = this.state;
+    return (
+      <div className="user-filter">
+        <div className="item-list">
+          {data.map(item => {
+            return (
+              <div className={`item ${item.right ? 'right' : ''}`}>
+                <span>{item.label}</span>
+                {item.select && this.renderSelect(item)}
+                {item.children && item.children.map(child => this.renderSelect(child))}
+              </div>
+            );
+          })}
+        </div>
+        {search && (
+          <div className="search">
+            {showInput && (
+              <input
+                className="search-input"
+                placeholder="请输入您想搜索的内容"
+                value={searchText}
+                onChange={e => this.onSearch(e.target.value)}
+              />
+            )}
+            {!showInput && <Icon type="search" onClick={() => this.setState({ showInput: true })} />}
+          </div>
+        )}
+      </div>
+    );
+  }
+
+  renderSelect(item) {
+    const { filterMap = {} } = this.props;
+    return (
+      <Select
+        size="small"
+        theme="default"
+        value={filterMap[item.key]}
+        placeholder={item.placeholder}
+        list={item.be ? item.selectMap[filterMap[item.be]] || [] : item.select}
+        onChange={({ key }) => this.onFilter(item.key, key)}
+      />
+    );
+  }
+}

+ 49 - 0
front/project/www/components/UserFilter/index.less

@@ -0,0 +1,49 @@
+@import '../../app.less';
+
+.user-filter {
+  border-top: 1px solid #ECEDEE;
+  height: 40px;
+  line-height: 40px;
+  display: flex;
+
+  .item-list {
+    flex: 1;
+  }
+
+  .item.right {
+    float: right;
+  }
+
+  .item {
+    display: inline-block;
+    margin-right: 12px;
+
+    .label {
+      margin-left: 12px;
+    }
+
+    .select {
+      margin-left: 12px;
+      display: inline-block;
+    }
+  }
+
+  .search {
+    input {
+      border-radius: 12px;
+      height: 24px;
+      padding: 2px 10px;
+      line-height: 20px;
+      width: 180px;
+      border: 1px solid #e0e0e0;
+      font-size: 12px;
+    }
+
+
+    i {
+      color: #4299FF;
+      font-size: 20px;
+      cursor: pointer;
+    }
+  }
+}

+ 69 - 0
front/project/www/components/UserTable/index.js

@@ -0,0 +1,69 @@
+import React, { Component } from 'react';
+import './index.less';
+import CheckboxItem from '../CheckboxItem';
+import Icon from '../Icon';
+
+export default class UserTable extends Component {
+  onChange() {
+    if (this.props.onChange) this.props.onChange();
+  }
+
+  onSelect(checked, key) {
+    const { selectList = [] } = this.props;
+    if (checked) {
+      selectList.push(key);
+    } else {
+      selectList.splice(selectList.indexOf(key), 1);
+    }
+    if (this.props.onSelect) this.props.onSelect(selectList);
+  }
+
+  render() {
+    const { columns = [], rowKey = 'key', data = [], select, selectList = [] } = this.props;
+    return (
+      <div className="user-table">
+        <table>
+          <thead>
+            <tr>
+              {select && <th className="select" />}
+              {columns.map(item => {
+                return <th>{item.title}</th>;
+              })}
+            </tr>
+          </thead>
+          <tbody>
+            {data.map(row => {
+              const checked = selectList.indexOf(row[rowKey]) >= 0;
+              return (
+                <tr>
+                  {select && (
+                    <td className="select">
+                      <CheckboxItem
+                        theme="white"
+                        checked={checked}
+                        onClick={value => this.onSelect(value, row[rowKey])}
+                      />
+                    </td>
+                  )}
+                  {columns.map(item => {
+                    return <td>{item.render ? item.render(row[item.key], row) : row[item.key]}</td>;
+                  })}
+                </tr>
+              );
+            })}
+          </tbody>
+        </table>
+        {data.length === 0 && <div className="empty">暂无数据</div>}
+        {data.length > 0 && (
+          <div className="page">
+            <Icon name="prev" />
+            <span>
+              <b>1</b>/10
+            </span>
+            <Icon name="next" />
+          </div>
+        )}
+      </div>
+    );
+  }
+}

+ 53 - 0
front/project/www/components/UserTable/index.less

@@ -0,0 +1,53 @@
+@import '../../app.less';
+
+.user-table {
+  table {
+    width: 100%;
+    margin-bottom: 10px;
+    border-bottom: 1px solid #ECEDEE;
+
+    .select {
+      padding-left: 12px;
+      padding-right: 0;
+    }
+
+    th {
+      padding: 0 20px;
+      background: #ECEDEE;
+      height: 60px;
+      border: 1px solid #fff;
+    }
+
+    td {
+      padding: 20px;
+    }
+
+    tbody {
+      tr:nth-of-type(even) {
+        background: #FBFBFB;
+      }
+    }
+  }
+
+  .empty {
+    width: 100%;
+    height: 100px;
+    line-height: 100px;
+    text-align: center;
+  }
+
+  .page {
+    text-align: center;
+
+    span {
+      margin: 0 15px;
+      display: inline-block;
+      color: #303139;
+
+      b {
+        color: #4299FF;
+        font-weight: 500;
+      }
+    }
+  }
+}

+ 46 - 0
front/project/www/layouts/User/index.js

@@ -0,0 +1,46 @@
+import React from 'react';
+import { Link } from 'react-router-dom';
+import './index.less';
+
+function UserLayout(props) {
+  const { menu = [], active, right, center } = props;
+
+  return (
+    <div className={`user-layout content ${right ? 'right' : ''}`}>
+      <div className="left-layout">
+        <div className="block-layout">
+          {menu.map(item => {
+            return (
+              <Link to={item.path} className={`item ${active === item.key ? 'active' : ''}`}>
+                {item.title}
+              </Link>
+            );
+          })}
+        </div>
+      </div>
+      {center && (
+        <div className="center-layout">
+          {center.length > 0 ? (
+            center.map(item => {
+              return <div className="block-layout">{item}</div>;
+            })
+          ) : (
+            <div className="block-layout">{center}</div>
+          )}
+        </div>
+      )}
+      {right && (
+        <div className="right-layout">
+          {right.length > 0 ? (
+            right.map(item => {
+              return <div className="block-layout">{item}</div>;
+            })
+          ) : (
+            <div className="block-layout">{right}</div>
+          )}
+        </div>
+      )}
+    </div>
+  );
+}
+export default UserLayout;

+ 65 - 0
front/project/www/layouts/User/index.less

@@ -0,0 +1,65 @@
+.user-layout {
+  margin-top: 30px !important;
+  position: relative;
+
+  .block-layout {
+    background: rgba(255, 255, 255, 1);
+    box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.06);
+    border-radius: 12px;
+    position: relative;
+    margin-bottom: 10px;
+  }
+
+  .left-layout {
+    width: 150px;
+    position: absolute;
+    left: 0;
+    top: 0;
+
+    .block-layout {
+      padding: 24px 0;
+      padding-right: 8px;
+    }
+
+    .item {
+      display: block;
+      height: 32px;
+      line-height: 32px;
+      color: #686872;
+      text-align: center;
+      margin: 4px 0;
+    }
+
+    .item:hover,
+    .item.active {
+      color: #fff;
+      background: #4299FF;
+      border-top-right-radius: 16px;
+      border-bottom-right-radius: 16px;
+    }
+  }
+
+  .center-layout {
+    padding-left: 160px;
+
+  }
+
+  .right-layout {
+    width: 230px;
+    display: none;
+    position: absolute;
+    top: 0;
+    right: 0;
+  }
+}
+
+.user-layout.right {
+  .center-layout {
+    padding-right: 240px;
+  }
+
+  .right-layout {
+    display: block;
+  }
+
+}

+ 9 - 0
front/project/www/routes/my/answer/index.js

@@ -0,0 +1,9 @@
+export default {
+  path: '/my/answer',
+  key: 'my-answer',
+  title: '问答',
+  needLogin: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/www/routes/my/answer/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+#my-answer {}

+ 9 - 0
front/project/www/routes/my/answer/page.js

@@ -0,0 +1,9 @@
+import React from 'react';
+import './index.less';
+import Page from '@src/containers/Page';
+
+export default class extends Page {
+  renderView() {
+    return <div />;
+  }
+}

+ 9 - 0
front/project/www/routes/my/collect/index.js

@@ -0,0 +1,9 @@
+export default {
+  path: '/my/collect',
+  key: 'my-collect',
+  title: '收藏',
+  needLogin: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/www/routes/my/collect/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+#my-sollect {}

+ 9 - 0
front/project/www/routes/my/collect/page.js

@@ -0,0 +1,9 @@
+import React from 'react';
+import './index.less';
+import Page from '@src/containers/Page';
+
+export default class extends Page {
+  renderView() {
+    return <div />;
+  }
+}

+ 9 - 0
front/project/www/routes/my/course/index.js

@@ -0,0 +1,9 @@
+export default {
+  path: '/my/course',
+  key: 'my-course',
+  title: '课程',
+  needLogin: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/www/routes/my/course/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+#my-course {}

+ 9 - 0
front/project/www/routes/my/course/page.js

@@ -0,0 +1,9 @@
+import React from 'react';
+import './index.less';
+import Page from '@src/containers/Page';
+
+export default class extends Page {
+  renderView() {
+    return <div />;
+  }
+}

+ 9 - 0
front/project/www/routes/my/data/index.js

@@ -0,0 +1,9 @@
+export default {
+  path: '/my/data',
+  key: 'my-data',
+  title: '数据',
+  needLogin: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/www/routes/my/data/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+#my-data {}

+ 9 - 0
front/project/www/routes/my/data/page.js

@@ -0,0 +1,9 @@
+import React from 'react';
+import './index.less';
+import Page from '@src/containers/Page';
+
+export default class extends Page {
+  renderView() {
+    return <div />;
+  }
+}

+ 9 - 0
front/project/www/routes/my/error/index.js

@@ -0,0 +1,9 @@
+export default {
+  path: '/my/error',
+  key: 'my-error',
+  title: '错题',
+  needLogin: true,
+  component() {
+    return import('./page');
+  },
+};

+ 25 - 0
front/project/www/routes/my/error/index.less

@@ -0,0 +1,25 @@
+@charset "utf-8";
+
+#my-error {
+  .user-action {
+    .tip {
+      font-size: 12px;
+      color: #A7A7B7;
+
+      span {
+        color: #4299FF;
+        cursor: pointer;
+        margin: 0 5px;
+      }
+
+      i {
+        font-size: 14px;
+        cursor: pointer;
+      }
+    }
+  }
+
+  .table-layout {
+    padding: 20px 30px;
+  }
+}

+ 93 - 0
front/project/www/routes/my/error/page.js

@@ -0,0 +1,93 @@
+import React from 'react';
+import './index.less';
+import { Icon } from 'antd';
+import Page from '@src/containers/Page';
+import UserLayout from '../../../layouts/User';
+import UserTable from '../../../components/UserTable';
+import UserFilter from '../../../components/UserFilter';
+import UserAction from '../../../components/UserAction';
+import menu from '../index';
+import Tabs from '../../../components/Tabs';
+
+const columns = [
+  { key: '', title: '题型' },
+  { key: '', title: '题目ID' },
+  { key: '', title: '内容' },
+  { key: '', title: '耗时' },
+  { key: '', title: '错误率' },
+  { key: '', title: '最近做题' },
+  { key: '', title: '' },
+];
+
+export default class extends Page {
+  initState() {
+    return {
+      filterMap: {},
+    };
+  }
+
+  onFilter(value) {
+    this.setState({ filterMap: value });
+  }
+
+  renderView() {
+    const { config } = this.props;
+    return <UserLayout active={config.key} menu={menu} center={this.renderTable()} />;
+  }
+
+  renderTable() {
+    const { filterMap = {} } = this.state;
+    return (
+      <div className="table-layout">
+        <Tabs
+          type="division"
+          theme="theme"
+          size="small"
+          space={2.5}
+          width={100}
+          active={'1'}
+          tabs={[{ key: '1', title: '练习' }, { key: '2', title: '模考' }]}
+        />
+        <UserFilter
+          search
+          data={[
+            {
+              label: '123',
+              children: [
+                {
+                  key: 'one',
+                  default: '1',
+                  select: [{ title: '123', key: '1' }, { title: '123', key: '2' }, { title: '123', key: '2' }],
+                },
+                {
+                  key: 'two',
+                  be: 'one',
+                  placeholder: '全部',
+                  selectMap: [{ title: '123', key: '1' }, { title: '123', key: '2' }, { title: '123', key: '2' }],
+                },
+              ],
+            },
+          ]}
+          filterMap={filterMap}
+          onFilter={value => this.onFilter(value)}
+        />
+        <UserAction
+          allCheckbox
+          help
+          btnList={[
+            { title: '移除', key: 'remove' },
+            { title: '组卷', key: 'group', vip: true },
+            { title: '导出', key: 'export', vip: true },
+          ]}
+          right={
+            <div className="tip">
+              2019-06-03 15:30 组卷50题,做对30题。<span>移除正确题目</span>
+              <Icon type="close-circle" theme="filled" />
+            </div>
+          }
+        />
+        <UserTable select columns={columns} data={[{}]} />
+      </div>
+    );
+  }
+}

+ 12 - 1
front/project/www/routes/my/index.js

@@ -1,2 +1,13 @@
+import main from './main';
+import course from './course';
+import tools from './tools';
+import error from './error';
+import note from './note';
+import answer from './answer';
+import report from './report';
+import data from './data';
+import collect from './collect';
+import order from './order';
+import message from './message';
 
-export default [];
+export default [main, course, tools, error, note, answer, report, data, collect, order, message];

+ 9 - 0
front/project/www/routes/my/main/index.js

@@ -0,0 +1,9 @@
+export default {
+  path: '/my/main',
+  key: 'my-main',
+  title: '我的',
+  needLogin: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/www/routes/my/main/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+#my-main {}

+ 39 - 0
front/project/www/routes/my/main/page.js

@@ -0,0 +1,39 @@
+import React from 'react';
+import './index.less';
+import Page from '@src/containers/Page';
+import UserLayout from '../../../layouts/User';
+import menu from '../index';
+
+export default class extends Page {
+  renderView() {
+    const { config } = this.props;
+    return (
+      <UserLayout
+        active={config.key}
+        menu={menu}
+        center={[this.renderTotal(), this.renderLog(), this.renderTime()]}
+        right={[this.renderInfo(), this.renderMessage()]}
+      />
+    );
+  }
+
+  renderTotal() {
+    return <div className="total-layout">1</div>;
+  }
+
+  renderLog() {
+    return <div className="log-layout">1</div>;
+  }
+
+  renderTime() {
+    return <div className="time-layout">1</div>;
+  }
+
+  renderInfo() {
+    return <div className="info-layout">1</div>;
+  }
+
+  renderMessage() {
+    return <div className="message-layout">1</div>;
+  }
+}

+ 9 - 0
front/project/www/routes/my/message/index.js

@@ -0,0 +1,9 @@
+export default {
+  path: '/my/message',
+  key: 'my-message',
+  title: '消息',
+  needLogin: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/www/routes/my/message/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+#my-message {}

+ 9 - 0
front/project/www/routes/my/message/page.js

@@ -0,0 +1,9 @@
+import React from 'react';
+import './index.less';
+import Page from '@src/containers/Page';
+
+export default class extends Page {
+  renderView() {
+    return <div />;
+  }
+}

+ 9 - 0
front/project/www/routes/my/note/index.js

@@ -0,0 +1,9 @@
+export default {
+  path: '/my/note',
+  key: 'my-note',
+  title: '笔记',
+  needLogin: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/www/routes/my/note/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+#my-note {}

+ 9 - 0
front/project/www/routes/my/note/page.js

@@ -0,0 +1,9 @@
+import React from 'react';
+import './index.less';
+import Page from '@src/containers/Page';
+
+export default class extends Page {
+  renderView() {
+    return <div />;
+  }
+}

+ 9 - 0
front/project/www/routes/my/order/index.js

@@ -0,0 +1,9 @@
+export default {
+  path: '/my/order',
+  key: 'my-order',
+  title: '订单',
+  needLogin: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/www/routes/my/order/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+#my-order {}

+ 9 - 0
front/project/www/routes/my/order/page.js

@@ -0,0 +1,9 @@
+import React from 'react';
+import './index.less';
+import Page from '@src/containers/Page';
+
+export default class extends Page {
+  renderView() {
+    return <div />;
+  }
+}

+ 9 - 0
front/project/www/routes/my/report/index.js

@@ -0,0 +1,9 @@
+export default {
+  path: '/my/report',
+  key: 'my-report',
+  title: '报告',
+  needLogin: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/www/routes/my/report/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+#my-answer {}

+ 9 - 0
front/project/www/routes/my/report/page.js

@@ -0,0 +1,9 @@
+import React from 'react';
+import './index.less';
+import Page from '@src/containers/Page';
+
+export default class extends Page {
+  renderView() {
+    return <div />;
+  }
+}

+ 9 - 0
front/project/www/routes/my/tools/index.js

@@ -0,0 +1,9 @@
+export default {
+  path: '/my/tools',
+  key: 'my-tools',
+  title: '工具',
+  needLogin: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/www/routes/my/tools/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+#my-tools {}

+ 9 - 0
front/project/www/routes/my/tools/page.js

@@ -0,0 +1,9 @@
+import React from 'react';
+import './index.less';
+import Page from '@src/containers/Page';
+
+export default class extends Page {
+  renderView() {
+    return <div />;
+  }
+}