1
0
KaysonCui 5 роки тому
батько
коміт
f88936caf8
100 змінених файлів з 14104 додано та 0 видалено
  1. 28 0
      front/.babelrc
  2. 30 0
      front/.editorconfig
  3. 12 0
      front/.eslintignore
  4. 56 0
      front/.eslintrc
  5. 1 0
      front/.gitattributes
  6. 12 0
      front/.gitignore
  7. 89 0
      front/README.md
  8. 33 0
      front/bin/compile.js
  9. 24 0
      front/bin/other.js
  10. 6 0
      front/bin/start.js
  11. 6 0
      front/bin/static.js
  12. 49 0
      front/build/other.webpack.config.js
  13. 33 0
      front/build/webpack-compiler.js
  14. 239 0
      front/build/webpack.config.js
  15. 31 0
      front/config/environments.js
  16. 67 0
      front/config/index.js
  17. 39 0
      front/config/local.json
  18. 12425 0
      front/package-lock.json
  19. 139 0
      front/package.json
  20. 9 0
      front/project/admin/index.js
  21. 14 0
      front/project/admin/local.json
  22. 6 0
      front/project/admin/routes/index.js
  23. 14 0
      front/project/admin/routes/page/home/index.js
  24. 4 0
      front/project/admin/routes/page/home/index.less
  25. 10 0
      front/project/admin/routes/page/home/page.js
  26. 3 0
      front/project/admin/routes/page/index.js
  27. 15 0
      front/project/admin/routes/system/dashboard/base/index.js
  28. 3 0
      front/project/admin/routes/system/dashboard/base/index.less
  29. 10 0
      front/project/admin/routes/system/dashboard/base/page.js
  30. 5 0
      front/project/admin/routes/system/dashboard/group.js
  31. 3 0
      front/project/admin/routes/system/dashboard/index.js
  32. 7 0
      front/project/admin/routes/system/index.js
  33. 5 0
      front/project/admin/routes/system/manager/group.js
  34. 3 0
      front/project/admin/routes/system/manager/index.js
  35. 15 0
      front/project/admin/routes/system/manager/list/index.js
  36. 2 0
      front/project/admin/routes/system/manager/list/index.less
  37. 107 0
      front/project/admin/routes/system/manager/list/page.js
  38. 4 0
      front/project/admin/routes/system/module.js
  39. 15 0
      front/project/admin/routes/system/setting/explain/index.js
  40. 3 0
      front/project/admin/routes/system/setting/explain/index.less
  41. 10 0
      front/project/admin/routes/system/setting/explain/page.js
  42. 5 0
      front/project/admin/routes/system/setting/group.js
  43. 7 0
      front/project/admin/routes/system/setting/index.js
  44. 15 0
      front/project/admin/routes/system/setting/main/index.js
  45. 3 0
      front/project/admin/routes/system/setting/main/index.less
  46. 10 0
      front/project/admin/routes/system/setting/main/page.js
  47. 15 0
      front/project/admin/routes/system/setting/report/index.js
  48. 3 0
      front/project/admin/routes/system/setting/report/index.less
  49. 10 0
      front/project/admin/routes/system/setting/report/page.js
  50. 15 0
      front/project/admin/routes/system/setting/service/index.js
  51. 3 0
      front/project/admin/routes/system/setting/service/index.less
  52. 10 0
      front/project/admin/routes/system/setting/service/page.js
  53. 15 0
      front/project/admin/routes/system/setting/structure/index.js
  54. 3 0
      front/project/admin/routes/system/setting/structure/index.less
  55. 10 0
      front/project/admin/routes/system/setting/structure/page.js
  56. 15 0
      front/project/admin/routes/system/subject/add/index.js
  57. 3 0
      front/project/admin/routes/system/subject/add/index.less
  58. 10 0
      front/project/admin/routes/system/subject/add/page.js
  59. 15 0
      front/project/admin/routes/system/subject/exercisesList/index.js
  60. 3 0
      front/project/admin/routes/system/subject/exercisesList/index.less
  61. 10 0
      front/project/admin/routes/system/subject/exercisesList/page.js
  62. 5 0
      front/project/admin/routes/system/subject/group.js
  63. 8 0
      front/project/admin/routes/system/subject/index.js
  64. 15 0
      front/project/admin/routes/system/subject/machineList/index.js
  65. 3 0
      front/project/admin/routes/system/subject/machineList/index.less
  66. 10 0
      front/project/admin/routes/system/subject/machineList/page.js
  67. 15 0
      front/project/admin/routes/system/subject/materialList/index.js
  68. 3 0
      front/project/admin/routes/system/subject/materialList/index.less
  69. 10 0
      front/project/admin/routes/system/subject/materialList/page.js
  70. 15 0
      front/project/admin/routes/system/subject/mockList/index.js
  71. 3 0
      front/project/admin/routes/system/subject/mockList/index.less
  72. 10 0
      front/project/admin/routes/system/subject/mockList/page.js
  73. 15 0
      front/project/admin/routes/system/subject/taskList/index.js
  74. 3 0
      front/project/admin/routes/system/subject/taskList/index.less
  75. 10 0
      front/project/admin/routes/system/subject/taskList/page.js
  76. 15 0
      front/project/admin/routes/system/user/buyList/index.js
  77. 3 0
      front/project/admin/routes/system/user/buyList/index.less
  78. 10 0
      front/project/admin/routes/system/user/buyList/page.js
  79. 15 0
      front/project/admin/routes/system/user/exerciseList/index.js
  80. 3 0
      front/project/admin/routes/system/user/exerciseList/index.less
  81. 10 0
      front/project/admin/routes/system/user/exerciseList/page.js
  82. 15 0
      front/project/admin/routes/system/user/feedbackList/index.js
  83. 3 0
      front/project/admin/routes/system/user/feedbackList/index.less
  84. 10 0
      front/project/admin/routes/system/user/feedbackList/page.js
  85. 5 0
      front/project/admin/routes/system/user/group.js
  86. 9 0
      front/project/admin/routes/system/user/index.js
  87. 15 0
      front/project/admin/routes/system/user/infoList/index.js
  88. 3 0
      front/project/admin/routes/system/user/infoList/index.less
  89. 10 0
      front/project/admin/routes/system/user/infoList/page.js
  90. 15 0
      front/project/admin/routes/system/user/mockList/index.js
  91. 3 0
      front/project/admin/routes/system/user/mockList/index.less
  92. 10 0
      front/project/admin/routes/system/user/mockList/page.js
  93. 15 0
      front/project/admin/routes/system/user/questionList/index.js
  94. 3 0
      front/project/admin/routes/system/user/questionList/index.less
  95. 10 0
      front/project/admin/routes/system/user/questionList/page.js
  96. 15 0
      front/project/admin/routes/system/user/taskList/index.js
  97. 3 0
      front/project/admin/routes/system/user/taskList/index.less
  98. 10 0
      front/project/admin/routes/system/user/taskList/page.js
  99. 3 0
      front/project/admin/stores/index.js
  100. 0 0
      front/project/admin/stores/system.js

+ 28 - 0
front/.babelrc

@@ -0,0 +1,28 @@
+{
+  "plugins": [
+    "syntax-dynamic-import",
+    "react-hot-loader/babel",
+    [
+      "transform-runtime",
+      {
+        "polyfill": false,
+        "regenerator": true
+      }
+    ],
+    [
+      "import",
+      {
+        "libraryName": "antd",
+        "style": true
+      }
+    ],
+    [
+      "import",
+      {
+        "libraryName": "antd-mobile",
+        "style": true
+      }
+    ]
+  ],
+  "presets": ["es2015", "stage-3", "react"]
+}

+ 30 - 0
front/.editorconfig

@@ -0,0 +1,30 @@
+# http://editorconfig.org
+
+# A special property that should be specified at the top of the file outside of
+# any sections. Set to true to stop .editor config file search on current file
+root = true
+
+[*]
+# Indentation style
+# Possible values - tab, space
+indent_style = space
+
+# Indentation size in single-spaced characters
+# Possible values - an integer, tab
+indent_size = 2
+
+# Line ending file format
+# Possible values - lf, crlf, cr
+end_of_line = lf
+
+# File character encoding
+# Possible values - latin1, utf-8, utf-16be, utf-16le
+charset = utf-8
+
+# Denotes whether to trim whitespace at the end of lines
+# Possible values - true, false
+trim_trailing_whitespace = true
+
+# Denotes whether file should end with a newline
+# Possible values - true, false
+insert_final_newline = true

+ 12 - 0
front/.eslintignore

@@ -0,0 +1,12 @@
+blueprints/**/files/**
+coverage/**
+node_modules/**
+dist/**
+config/**
+server/**
+build/**
+bin/**
+src/static/**
+project/*/static/**
+project/*/other/**
+src/index.html

+ 56 - 0
front/.eslintrc

@@ -0,0 +1,56 @@
+{
+  "parser": "babel-eslint",
+  "extends": ["standard-react", "airbnb-base"],
+  "plugins": ["react", "import"],
+  "settings": {
+    "import/resolver": {
+      "alias": {
+        "map": [["@src", "./src"], ["@project", "./project/admin"], ["@components", "./components"]]
+      }
+    }
+  },
+  "parserOptions": {
+    "ecmaVersion": 7,
+    "sourceType": "module"
+  },
+  "env": {
+    "browser": true,
+    "node": true,
+    "es6": true
+  },
+  "globals": {
+    "__DEV__": false,
+    "__PROD__": false,
+    "__DEBUG__": false,
+    "__API_PATH__": false,
+    "__BASE_NAME__": false,
+    "linkTo": false,
+    "replaceLink": false,
+    "goBack": false,
+    "toLink": false,
+    "openLink": false
+  },
+  "rules": {
+    "camelcase": "off",
+    "arrow-parens": "off",
+    "arrow-body-style": "off",
+    "func-names": "off",
+    "no-continue": "off",
+    "object-curly-newline": "off",
+    "no-extend-native": "off",
+    "no-underscore-dangle": "off",
+    "no-nested-ternary": "off",
+    "no-param-reassign": "off",
+    "space-before-function-paren": "off",
+    "generator-star-spacing": "off",
+    "max-len": "off",
+    "no-console": "off",
+    "no-bitwise": "off",
+    "no-multi-assign": "off",
+    "linebreak-style": "off",
+    "class-methods-use-this": "off",
+    "react/prop-types": "off",
+    "global-require": "off",
+    "import/no-extraneous-dependencies": "off"
+  }
+}

+ 1 - 0
front/.gitattributes

@@ -0,0 +1 @@
+* text=auto

+ 12 - 0
front/.gitignore

@@ -0,0 +1,12 @@
+.DS_STORE
+*.log
+*.log.*
+
+node_modules
+dist
+tmp
+lib
+coverage
+.idea/
+.vscode/
+.githooks/

+ 89 - 0
front/README.md

@@ -0,0 +1,89 @@
+## 项目描述:
+
+该项目是由 node.js 为 webServer,react 结合 redux 的前端框架进行封装
+
+本地开发需要在 config 目录下建立 local.json 文件进行本地环境配置
+
+在项目目录下执行初始化命令:
+
+> `npm run init`
+
+在项目目录下执行命令启动本地开发环境:
+
+> `npm run start`
+
+测试环境的打包:
+
+> `npm run deploy:test`
+
+生产环境打包:
+
+> `npm run deploy:prod`
+
+## 项目目录:
+
+> bin 可执行文件
+
+> build webpack 配置文件
+
+> config 项目配置文件
+
+> dist 项目打包生成目录
+
+> server 本地服务主程序
+
+> src 项目资源目录
+
+## 项目配置:
+
+> 在 config 目录下的 index 文件,包含该项目的本地、开发、测试、生产都在该文件内进行设置
+
+## webpack 配置:
+
+> 在 build 目录下的 webpack.config 文件,会针对环境的不同进行不同的处理
+
+## 本地 server:
+
+> 本地开发时会启动 webServer 方便开发,server 下的 main 是入口文件,会根据开发环境进行不同的处理,
+> 在开发模式下会启动 webpack 的热更新功能,其他模式下会返回 dist 目录下的静态资源模拟线上环境,
+> 对项目的 api 访问进行了反向代理,方便以测试环境的 api 请求进行本地开发
+
+## 前端页面资源:
+
+>
+
+#### 前端资源目录:
+
+> components 组件库 独立的样式组件和功能组件
+
+> containers 容器库
+
+> data 数据接口层
+
+> layouts 布局库
+
+> services 扩展服务类
+
+> routes 路由
+
+> static 静态资源文件
+
+> store store 和 reducers 文件
+
+> styles 样式文件
+
+> index.html 入口文件
+
+> main 主程序
+
+##### reducers:
+
+> 目录 src/store
+
+##### 扩展服务类:
+
+> 目录 src/services
+
+##### 路由层:
+
+> 目录 src/routes

+ 33 - 0
front/bin/compile.js

@@ -0,0 +1,33 @@
+const fs = require('fs-extra');
+const debug = require('debug')('app:bin:compile');
+const webpackCompiler = require('../build/webpack-compiler');
+const webpackConfig = require('../build/webpack.config');
+const config = require('../config');
+
+const paths = config.utils_paths;
+
+const compile = () => {
+  debug('Starting compiler.');
+  return Promise.resolve()
+    .then(() => webpackCompiler(webpackConfig))
+    .then(stats => {
+      if (stats.warnings.length && config.compiler_fail_on_warning) {
+        throw new Error('Config set to fail on warning, exiting with status code "1".');
+      }
+      debug('Copying static assets to dist folder.');
+      fs.copySync(paths.client('static'), paths.dist());
+      fs.copySync(paths.client('assets'), paths.dist('assets'));
+      fs.copySync(paths.project('static'), paths.dist());
+      fs.copySync(paths.project('assets'), paths.dist('assets'));
+      fs.copySync(paths.lib(), paths.dist());
+    })
+    .then(() => {
+      debug('Compilation completed successfully.');
+    })
+    .catch(err => {
+      debug('Compiler encountered an error.', err);
+      process.exit(1);
+    });
+};
+
+compile();

+ 24 - 0
front/bin/other.js

@@ -0,0 +1,24 @@
+const debug = require('debug')('app:bin:compile');
+const webpackCompiler = require('../build/webpack-compiler');
+const webpackConfig = require('../build/other.webpack.config');
+const config = require('../config');
+
+const compile = () => {
+  debug('Starting compiler.');
+  return Promise.resolve()
+    .then(() => webpackCompiler(webpackConfig))
+    .then(stats => {
+      if (stats.warnings.length && config.compiler_fail_on_warning) {
+        throw new Error('Config set to fail on warning, exiting with status code "1".');
+      }
+    })
+    .then(() => {
+      debug('Compilation completed successfully.');
+    })
+    .catch(err => {
+      debug('Compiler encountered an error.', err);
+      process.exit(1);
+    });
+};
+
+compile();

+ 6 - 0
front/bin/start.js

@@ -0,0 +1,6 @@
+const config = require('../config');
+const server = require('../server/hotServer');
+const debug = require('debug')('app:bin:start');
+server.listen(config.serverPort);
+debug(`Server is now running at http://${config.serverHost}:${config.serverPort}.`);
+require('child_process').exec(`start http://${config.serverHost}:${config.serverPort}`);

+ 6 - 0
front/bin/static.js

@@ -0,0 +1,6 @@
+const config = require('../config');
+const server = require('../server/staticServer');
+const debug = require('debug')('app:bin:static');
+server.listen(config.serverPort);
+debug(`Server is now running at http://${config.serverHost}:${config.serverPort}.`);
+require('child_process').exec(`start http://${config.serverHost}:${config.serverPort}`);

+ 49 - 0
front/build/other.webpack.config.js

@@ -0,0 +1,49 @@
+const webpack = require('webpack');
+const CleanWebpackPlugin = require('clean-webpack-plugin');
+const config = require('../config');
+
+const paths = config.utils_paths;
+
+const vendors = [
+  'fastclick',
+  'promise',
+  'react-redux',
+  'redux',
+  'redux-thunk',
+  'superagent',
+  'react',
+  'react-dom',
+  'react-router-dom',
+  'history',
+];
+
+module.exports = {
+  output: {
+    filename: '[name]_[hash].js',
+    path: paths.lib(),
+    library: '[name]_[hash]',
+  },
+  resolve: {
+    extensions: ['.web.tsx', '.web.ts', '.web.jsx', '.web.js', '.ts', '.tsx', '.js', '.jsx', '.json'],
+  },
+  entry: {
+    lib: vendors,
+  },
+  plugins: [
+    new webpack.DefinePlugin(config.globals),
+    new CleanWebpackPlugin(['*'], {
+      root: paths.lib(),
+    }),
+    new webpack.ProgressPlugin(),
+    new webpack.optimize.UglifyJsPlugin({
+      compress: {
+        warnings: false,
+      },
+    }),
+    new webpack.DllPlugin({
+      path: paths.lib('manifest.json'),
+      name: '[name]_[hash]',
+      context: paths.lib(),
+    }),
+  ],
+};

+ 33 - 0
front/build/webpack-compiler.js

@@ -0,0 +1,33 @@
+const webpack = require('webpack');
+const debug = require('debug')('app:build:webpack-compiler');
+
+function webpackCompiler(webpackConfig) {
+  return new Promise((resolve, reject) => {
+    const compiler = webpack(webpackConfig);
+
+    compiler.run((err, stats) => {
+      if (err) {
+        debug('Webpack compiler encountered a fatal error.', err);
+        return reject(err);
+      }
+
+      const jsonStats = stats.toJson();
+      debug('Webpack compile completed.');
+
+      if (jsonStats.errors.length > 0) {
+        debug('Webpack compiler encountered errors.');
+        debug(jsonStats.errors.join('\n'));
+        return reject(new Error('Webpack compiler encountered errors'));
+      }
+      if (jsonStats.warnings.length > 0) {
+        debug('Webpack compiler encountered warnings.');
+        debug(jsonStats.warnings.join('\n'));
+      } else {
+        debug('No errors or warnings encountered.');
+      }
+      return resolve(jsonStats);
+    });
+  });
+}
+
+module.exports = webpackCompiler;

+ 239 - 0
front/build/webpack.config.js

@@ -0,0 +1,239 @@
+const webpack = require('webpack');
+const cssnano = require('cssnano');
+const pxtorem = require('postcss-pxtorem');
+const HtmlWebpackPlugin = require('html-webpack-plugin');
+const CleanWebpackPlugin = require('clean-webpack-plugin');
+const ExtractTextPlugin = require('extract-text-webpack-plugin');
+const debug = require('debug')('app:webpack:config');
+const fs = require('fs');
+const config = require('../config');
+
+const paths = config.utils_paths;
+const { __DEV__, __PROD__ } = config.globals;
+
+function getPublicPath(path) {
+  const publicPath =
+    config.publicPath.substr(config.publicPath.length - 2, 1) === '/' ? config.publicPath : config.publicPath + '/';
+  if (path) {
+    path = path.indexOf('/') === 0 ? path.substr(1, path.length - 1) : path;
+    return publicPath + path;
+  } else {
+    return publicPath;
+  }
+}
+
+function fileNameFormat(type, ext) {
+  ext = ext || '[ext]';
+  return `src/[name].[${type}].${ext}`;
+}
+debug('Creating configuration.');
+
+const webpackConfig = {
+  name: 'client',
+  target: 'web',
+  cache: true,
+  resolve: {
+    extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
+    alias: {
+      '@src': paths.client(),
+      '@project': paths.project(),
+      '@components': paths.components(),
+    },
+  },
+  module: {},
+  stats: config.compiler_stats,
+};
+
+if (config.compiler_devtool) webpackConfig.devtool = config.compiler_devtool;
+
+const APP_ENTRY = paths.client('main.js');
+const devApp = [
+  'webpack/hot/dev-server',
+  `webpack-hot-middleware/client?path=${config.publicPath}__webpack_hmr`,
+  'react-hot-loader/patch',
+  APP_ENTRY,
+];
+webpackConfig.entry = {
+  app: __DEV__ ? devApp : [APP_ENTRY],
+};
+
+webpackConfig.output = {
+  filename: fileNameFormat(config.compiler_hash_type, 'js'),
+  path: paths.dist(),
+  publicPath: getPublicPath(),
+  chunkFilename: fileNameFormat(config.compiler_hash_type, 'js'),
+};
+
+function getLibPath(path) {
+  let pach = null;
+  try {
+    fs.readdirSync(path).forEach(file => {
+      if (file.indexOf('lib') === 0) {
+        pach = file;
+      }
+    });
+  } catch (e) {
+    console.log(e);
+  }
+  return pach;
+}
+
+for (let i = 0; i < config.scripts.length; i += 1) {
+  const script = config.scripts[i];
+  if (script.indexOf('http') !== 0) {
+    config.scripts[i] = getPublicPath(script);
+  }
+}
+
+config.scripts.push(getPublicPath(getLibPath(paths.lib())));
+
+webpackConfig.plugins = [
+  new webpack.DefinePlugin(config.globals),
+  new CleanWebpackPlugin(['*'], {
+    root: paths.dist(),
+  }),
+  new webpack.ProgressPlugin(),
+  new webpack.DllReferencePlugin({
+    context: paths.lib(),
+    manifest: paths.lib('manifest.json'),
+    extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
+  }),
+  new HtmlWebpackPlugin({
+    template: paths.client('index.html'),
+    hash: false,
+    minify: {
+      collapseWhitespace: true,
+    },
+    title: config.title,
+    filename: 'index.html',
+    inject: 'body',
+    globals: Object.assign(config.globals, {
+      keyword: config.keyword,
+      description: config.description,
+      scripts: config.scripts,
+    }),
+  }),
+  new webpack.LoaderOptionsPlugin({
+    options: {
+      postcss() {
+        return [
+          cssnano({
+            autoprefixer: {
+              add: true,
+              browsers: ['iOS >= 7', 'Android >= 4.1'],
+            },
+            discardComments: {
+              removeAll: true,
+            },
+            discardUnused: false,
+            mergeIdents: false,
+            reduceIdents: false,
+            safe: true,
+            sourcemap: true,
+          }),
+          pxtorem({
+            rootValue: 50,
+            propWhiteList: [],
+          }),
+        ];
+      },
+    },
+  }),
+];
+if (__DEV__) {
+  webpackConfig.plugins.push(new webpack.HotModuleReplacementPlugin(), new webpack.NoEmitOnErrorsPlugin());
+} else {
+  webpackConfig.plugins.push(
+    // new webpack.optimize.CommonsChunkPlugin({
+    //   name: ['app'],
+    //   minChunks: function (module, count) {
+    //     return module.context && module.context.indexOf('node_modules') !== -1
+    //   }
+    // }),
+    new webpack.optimize.UglifyJsPlugin({
+      cache: true,
+      parallel: true,
+    }),
+    new ExtractTextPlugin({
+      filename: fileNameFormat(config.compiler_hash_type, 'css'),
+      allChunks: true,
+    }),
+  );
+}
+
+webpackConfig.module.rules = [
+  {
+    test: /\.(js|jsx)$/,
+    exclude: /node_modules/,
+    use: ['babel-loader', 'eslint-loader'],
+  },
+  {
+    test: /\.yml$/,
+    use: ['json-loader', 'yaml-loader'],
+  },
+  {
+    test: /\.json$/,
+    use: 'json-loader',
+  },
+  {
+    test: /\.(svg)(\?.*)?$/,
+    include: paths.client(),
+    use: {
+      loader: 'url-loader',
+      options: {
+        limit: 10240,
+        name: fileNameFormat('hash'),
+      },
+    },
+  },
+  {
+    test: /\.(png|jpe?g|gif)(\?.*)?$/,
+    use: {
+      loader: 'url-loader',
+      options: {
+        limit: 10240,
+        name: fileNameFormat('hash'),
+      },
+    },
+  },
+  {
+    test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
+    use: {
+      loader: 'url-loader',
+      options: {
+        limit: 10240,
+        name: fileNameFormat('hash'),
+      },
+    },
+  },
+];
+
+function loaderAnalysis(loaders) {
+  if (__PROD__) {
+    return ExtractTextPlugin.extract({
+      fallback: loaders.shift(),
+      use: loaders,
+    });
+  }
+  return loaders;
+}
+
+const theme = {
+  // 'primary-color': '#f54b37'
+};
+
+webpackConfig.module.rules.push({
+  test: /\.css$/,
+  use: loaderAnalysis(['style-loader', 'css-loader', 'postcss-loader']),
+});
+webpackConfig.module.rules.push({
+  test: /\.less$/,
+  use: loaderAnalysis([
+    'style-loader',
+    'css-loader',
+    'postcss-loader',
+    `less-loader?{'modifyVars':${JSON.stringify(theme)}}`,
+  ]),
+});
+
+module.exports = webpackConfig;

+ 31 - 0
front/config/environments.js

@@ -0,0 +1,31 @@
+const defaultConfig = {
+  compiler_hash_type: 'hash',
+  compiler_fail_on_warning: true,
+  compiler_stats: 'minimal',
+  compiler_vendors: [],
+};
+module.exports = {
+  // ======================================================
+  // Overrides when NODE_ENV === 'development'
+  // ======================================================
+  development: () =>
+    Object.assign(defaultConfig, {
+      compiler_devtool: 'cheap-eval-source-map',
+    }),
+  // ======================================================
+  // Overrides when NODE_ENV === 'test'
+  // ======================================================
+  test: () =>
+    Object.assign(defaultConfig, {
+      compiler_devtool: 'source-map',
+    }),
+  // ======================================================
+  // Overrides when NODE_ENV === 'production'
+  // ======================================================
+  production: () =>
+    Object.assign(defaultConfig, {
+      compiler_fail_on_warning: false,
+      compiler_hash_type: 'chunkhash',
+      compiler_stats: 'verbose',
+    }),
+};

+ 67 - 0
front/config/index.js

@@ -0,0 +1,67 @@
+const path = require('path');
+const debug = require('debug')('app:config');
+let config = require('./local');
+
+const NODE_ENV = process.env.NODE_ENV || 'development';
+
+debug('Creating default configuration.');
+const argv = JSON.parse(process.env.npm_config_argv);
+const project = argv.remain.length > 0 ? argv.remain[0] : 'admin';
+
+debug('Current Project -> ' + project);
+
+let projectConfig = require(`../project/${project}/local`);
+
+config = Object.assign(
+  {
+    env: NODE_ENV,
+    path_base: path.resolve(__dirname, '..'),
+    dir_client: 'src',
+    dir_dist: 'dist',
+    dir_lib: 'lib',
+    dir_components: 'components',
+    basename: '/',
+    dir_project: 'project/' + project,
+    api_path: `/api`,
+  },
+  config[NODE_ENV],
+  projectConfig[NODE_ENV],
+);
+
+function base() {
+  const args = [config.path_base].concat([].slice.call(arguments));
+  return path.resolve.apply(path, args);
+}
+config.utils_paths = {
+  base,
+  client: base.bind(null, config.dir_client),
+  components: base.bind(null, config.dir_components),
+  dist: base.bind(null, config.dir_dist),
+  lib: base.bind(null, config.dir_lib),
+  project: base.bind(null, config.dir_project),
+};
+
+config.globals = {
+  'process.env': {
+    NODE_ENV: JSON.stringify(config.env),
+  },
+  NODE_ENV: config.env,
+  __DEV__: config.env === 'development',
+  __PROD__: config.env === 'production',
+  __TEST__: config.env === 'test',
+  __DEBUG__: config.env === 'development' || config.env === 'test',
+  __API_PATH__: `\'${config.api_path}\'`,
+  __BASE_NAME__: `\'${config.basename}\'`,
+};
+
+debug(`Looking for environment overrides for NODE_ENV '${config.env}'.`);
+const environments = require('./environments');
+
+const overrides = environments[config.env];
+if (overrides) {
+  debug('Found overrides, applying to default configuration.');
+  Object.assign(config, overrides());
+} else {
+  debug('No environment overrides found, defaults will be used.');
+}
+module.exports = config;

+ 39 - 0
front/config/local.json

@@ -0,0 +1,39 @@
+{
+  "development": {
+    "serverHost": "127.0.0.1",
+    "serverPort": 80,
+    "title": "",
+    "description": "",
+    "keyword": "",
+    "scripts": [],
+    "publicPath": "/",
+    "basename": "/",
+    "proxy": [
+      {
+        "target": "",
+        "from": "/",
+        "to": "/"
+      }
+    ]
+  },
+  "test": {
+    "serverHost": "127.0.0.1",
+    "serverPort": 3000,
+    "title": "",
+    "description": "",
+    "keyword": "",
+    "scripts": [],
+    "publicPath": "/",
+    "basename": "/"
+  },
+  "production": {
+    "serverHost": "127.0.0.1",
+    "serverPort": 3000,
+    "title": "",
+    "description": "",
+    "keyword": "",
+    "scripts": [],
+    "publicPath": "/",
+    "basename": "/"
+  }
+}

Різницю між файлами не показано, бо вона завелика
+ 12425 - 0
front/package-lock.json


+ 139 - 0
front/package.json

@@ -0,0 +1,139 @@
+{
+  "name": "Gj-react-frame",
+  "version": "2.0.0",
+  "description": "new project",
+  "main": "index.js",
+  "engines": {
+    "node": ">=7.0.0",
+    "npm": "^3.0.0"
+  },
+  "scripts": {
+    "init": "npm run i && npm run other && npm run ln",
+    "ln": "cd node_modules && rm -rf @src && ln -s ../src @src",
+    "i": "npm i --registry=https://registry.npm.taobao.org",
+    "other": "better-npm-run other",
+    "compile": "better-npm-run compile",
+    "start": "better-npm-run start",
+    "static": "better-npm-run static",
+    "deploy": "better-npm-run deploy",
+    "deploy:test": "better-npm-run deploy:test",
+    "deploy:prod": "better-npm-run deploy:prod"
+  },
+  "betterScripts": {
+    "other": {
+      "command": "node bin/other",
+      "env": {
+        "NODE_ENV": "production",
+        "DEBUG": "app:*"
+      }
+    },
+    "compile": {
+      "command": "node bin/compile",
+      "env": {
+        "DEBUG": "app:*"
+      }
+    },
+    "deploy": {
+      "command": "npm run compile",
+      "env": {
+        "NODE_ENV": "development",
+        "DEBUG": "app:*"
+      }
+    },
+    "deploy:test": {
+      "command": "npm run compile",
+      "env": {
+        "NODE_ENV": "test",
+        "DEBUG": "app:*"
+      }
+    },
+    "deploy:prod": {
+      "command": "npm run deploy",
+      "env": {
+        "NODE_ENV": "production",
+        "DEBUG": "app:*"
+      }
+    },
+    "start": {
+      "command": "node bin/start",
+      "env": {
+        "NODE_ENV": "development",
+        "DEBUG": "app:*"
+      }
+    },
+    "static": {
+      "command": "node bin/static",
+      "env": {
+        "NODE_ENV": "development",
+        "DEBUG": "app:*"
+      }
+    }
+  },
+  "dependencies": {
+    "antd": "^3.11.6",
+    "antd-mobile": "^2.2.7",
+    "fastclick": "^1.0.6",
+    "history": "^4.7.2",
+    "moment": "^2.22.2",
+    "promise": "^7.1.1",
+    "react": "^16.6.3",
+    "react-addons-css-transition-group": "^15.6.2",
+    "react-contextmenu": "^2.10",
+    "react-dom": "^16.6.3",
+    "react-quill": "^1.3.3",
+    "react-redux": "^4.4.5",
+    "react-router-dom": "^4.3.1",
+    "redbox-react": "^1.6.0",
+    "redux": "^3.6.0",
+    "redux-thunk": "^2.0.0",
+    "superagent": "^3.4.1",
+    "url": "^0.11.0"
+  },
+  "devDependencies": {
+    "@hot-loader/react-dom": "^16.8.4",
+    "babel-core": "^6.17.0",
+    "babel-eslint": "^10.0.1",
+    "babel-loader": "^6.2.5",
+    "babel-plugin-import": "^1.11.0",
+    "babel-plugin-syntax-dynamic-import": "^6.18.0",
+    "babel-plugin-transform-runtime": "^6.15.0",
+    "babel-preset-es2015": "^6.24.1",
+    "babel-preset-react": "^6.24.1",
+    "babel-preset-stage-0": "^6.24.1",
+    "babel-runtime": "^6.26.0",
+    "better-npm-run": "0.0.11",
+    "clean-webpack-plugin": "^0.1.17",
+    "connect-history-api-fallback": "^1.3.0",
+    "css-loader": "^0.25.0",
+    "cssnano": "^3.7.4",
+    "debug": "^2.2.0",
+    "eslint": "^5.15.1",
+    "eslint-config-airbnb-base": "^13.1.0",
+    "eslint-config-standard-react": "^4.0.0",
+    "eslint-import-resolver-alias": "^1.1.2",
+    "eslint-loader": "^1.9.0",
+    "eslint-plugin-import": "^2.14.0",
+    "eslint-plugin-react": "^6.0.0",
+    "express": "^4.14.0",
+    "extract-text-webpack-plugin": "^2.1.2",
+    "file-loader": "^0.9.0",
+    "fs-extra": "^0.30.0",
+    "html-webpack-plugin": "^2.22.0",
+    "http-proxy-middleware": "^0.17.3",
+    "imports-loader": "^0.6.5",
+    "json-loader": "^0.5.4",
+    "less": "^2.7.2",
+    "less-loader": "^2.2.3",
+    "postcss-loader": "^0.13.0",
+    "postcss-pxtorem": "^4.0.0",
+    "react-hot-loader": "^4.8.0",
+    "style-loader": "^0.13.1",
+    "svg-sprite-loader": "^0.3.0",
+    "url-loader": "^0.5.6",
+    "webpack": "^3.8.1",
+    "webpack-dev-middleware": "^1.12.1",
+    "webpack-dev-server": "^2.9.4",
+    "webpack-hot-middleware": "^2.20.0",
+    "yaml-loader": "^0.5.0"
+  }
+}

+ 9 - 0
front/project/admin/index.js

@@ -0,0 +1,9 @@
+export default {
+  mode: 'adminLeft',
+  rootPath: '/system/dashboard',
+  apiToken: 'token',
+  loginAuth(route, { user }) {
+    if (route.needLogin && !user.login) return true;
+    return true;
+  },
+};

+ 14 - 0
front/project/admin/local.json

@@ -0,0 +1,14 @@
+{
+  "development": {
+    "scripts": [],
+    "proxy": [
+      {
+        "target": "http://127.0.0.1",
+        "from": "/api",
+        "to": "/"
+      }
+    ]
+  },
+  "test": {},
+  "production": {}
+}

+ 6 - 0
front/project/admin/routes/index.js

@@ -0,0 +1,6 @@
+// We only need to import the modules necessary for initial render
+
+import Page from './page';
+import System from './system';
+
+export default [...Page, ...System];

+ 14 - 0
front/project/admin/routes/page/home/index.js

@@ -0,0 +1,14 @@
+export default {
+  path: '/',
+  key: 'index',
+  title: '首页',
+  needLogin: true,
+  module: {
+    key: 'index',
+    name: '首页',
+  },
+  index: true,
+  component() {
+    return import('./page');
+  },
+};

+ 4 - 0
front/project/admin/routes/page/home/index.less

@@ -0,0 +1,4 @@
+@charset "utf-8";
+
+#index {
+}

+ 10 - 0
front/project/admin/routes/page/home/page.js

@@ -0,0 +1,10 @@
+import React from 'react';
+import './index.less';
+import Page from '@src/containers/Page';
+import Block from '@src/components/Block';
+
+export default class extends Page {
+  renderView() {
+    return <Block full>首页</Block>;
+  }
+}

+ 3 - 0
front/project/admin/routes/page/index.js

@@ -0,0 +1,3 @@
+import home from './home';
+
+export default [home];

+ 15 - 0
front/project/admin/routes/system/dashboard/base/index.js

@@ -0,0 +1,15 @@
+import module from '../../module';
+import group from '../group';
+
+export default {
+  path: '/system/dashboard',
+  key: 'system-dashboard',
+  title: '控制台',
+  needLogin: true,
+  module,
+  group,
+  index: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/admin/routes/system/dashboard/base/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+.system-dashboard {}

+ 10 - 0
front/project/admin/routes/system/dashboard/base/page.js

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

+ 5 - 0
front/project/admin/routes/system/dashboard/group.js

@@ -0,0 +1,5 @@
+export default {
+  key: 'dashboard',
+  name: '控制台',
+  icon: 'dashboard',
+};

+ 3 - 0
front/project/admin/routes/system/dashboard/index.js

@@ -0,0 +1,3 @@
+import base from './base';
+
+export default [base];

+ 7 - 0
front/project/admin/routes/system/index.js

@@ -0,0 +1,7 @@
+import dashboard from './dashboard';
+import subject from './subject';
+import user from './user';
+import setting from './setting';
+import manager from './manager';
+
+export default [...dashboard, ...subject, ...user, ...setting, ...manager];

+ 5 - 0
front/project/admin/routes/system/manager/group.js

@@ -0,0 +1,5 @@
+export default {
+  key: 'manager',
+  name: '管理员',
+  icon: 'crown',
+};

+ 3 - 0
front/project/admin/routes/system/manager/index.js

@@ -0,0 +1,3 @@
+import list from './list';
+
+export default [list];

+ 15 - 0
front/project/admin/routes/system/manager/list/index.js

@@ -0,0 +1,15 @@
+import module from '../../module';
+import group from '../group';
+
+export default {
+  path: '/system/manager/list',
+  key: 'system-manager-list',
+  title: '账号列表',
+  needLogin: true,
+  module,
+  group,
+  index: true,
+  component() {
+    return import('./page');
+  },
+};

+ 2 - 0
front/project/admin/routes/system/manager/list/index.less

@@ -0,0 +1,2 @@
+@charset "utf-8";
+.system-manager-list {}

+ 107 - 0
front/project/admin/routes/system/manager/list/page.js

@@ -0,0 +1,107 @@
+import React from 'react';
+import './index.less';
+import Page from '@src/containers/Page';
+import TableLayout from '@src/layouts/TableLayout';
+import ActionLayout from '@src/layouts/ActionLayout';
+import Block from '@src/components/Block';
+import { asyncDelConfirm, asyncForm, asyncSMessage } from '@src/services/AsyncTools';
+import { System } from '../../../../stores/system';
+
+const actionList = [
+  {
+    key: 'add',
+    name: '新增',
+  },
+  {
+    key: 'edit',
+    name: '编辑',
+    selectNum: 1,
+  },
+  {
+    key: 'del',
+    name: '删除',
+    needSelect: 1,
+  },
+];
+
+const itemList = [
+  {
+    key: 'id',
+    type: 'hidden',
+  },
+  {
+    key: 'username',
+    name: '用户名',
+    type: 'input',
+    placeholder: '请输入用户名',
+    require: true,
+  },
+];
+
+export default class extends Page {
+  init() {
+    this.columns = [
+      {
+        title: '用户名',
+        dataIndex: 'username',
+      },
+    ];
+  }
+
+  initData() {
+    System.listManager(this.state.search).then(result => {
+      this.setTableData(result.list, result.total);
+    });
+  }
+
+  addAction() {
+    asyncForm('新增', itemList, {}, data => {
+      return System.addManager(data).then(() => {
+        asyncSMessage('新增成功!');
+        this.refresh();
+      });
+    });
+  }
+
+  editAction() {
+    const { selectedRows } = this.state;
+    asyncForm('编辑', itemList, selectedRows[0], data => {
+      return System.putManager(data).then(() => {
+        asyncSMessage('编辑成功!');
+        this.refresh();
+      });
+    });
+  }
+
+  delAction() {
+    const { selectedKeys } = this.state;
+    asyncDelConfirm('删除确认', '是否删除选中账号?', () => {
+      Promise.all(selectedKeys.map(row => System.delManager({ id: row }))).then(() => {
+        asyncSMessage('删除成功!');
+        this.refresh();
+      });
+    });
+  }
+
+  renderView() {
+    return (
+      <Block flex>
+        <ActionLayout
+          itemList={actionList}
+          selectedKeys={this.state.selectedKeys}
+          onAction={key => this.onAction(key)}
+        />
+        <TableLayout
+          select
+          columns={this.columns}
+          list={this.state.list}
+          pagination={this.state.page}
+          loading={this.props.core.loading}
+          onChange={(pagination, filters, sorter) => this.tableChange(pagination, filters, sorter)}
+          onSelect={(keys, rows) => this.tableSelect(keys, rows)}
+          selectedKeys={this.state.selectedKeys}
+        />
+      </Block>
+    );
+  }
+}

+ 4 - 0
front/project/admin/routes/system/module.js

@@ -0,0 +1,4 @@
+export default {
+  key: 'system',
+  name: '系统管理',
+};

+ 15 - 0
front/project/admin/routes/system/setting/explain/index.js

@@ -0,0 +1,15 @@
+import module from '../../module';
+import group from '../group';
+
+export default {
+  path: '/system/setting/explain',
+  key: 'system-setting-explain',
+  title: '说明设置',
+  needLogin: true,
+  module,
+  group,
+  index: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/admin/routes/system/setting/explain/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+.system-setting-explain {}

+ 10 - 0
front/project/admin/routes/system/setting/explain/page.js

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

+ 5 - 0
front/project/admin/routes/system/setting/group.js

@@ -0,0 +1,5 @@
+export default {
+  key: 'setting',
+  name: '设置',
+  icon: 'setting',
+};

+ 7 - 0
front/project/admin/routes/system/setting/index.js

@@ -0,0 +1,7 @@
+import structure from './structure';
+import explain from './explain';
+import report from './report';
+import service from './service';
+import main from './main';
+
+export default [structure, explain, report, service, main];

+ 15 - 0
front/project/admin/routes/system/setting/main/index.js

@@ -0,0 +1,15 @@
+import module from '../../module';
+import group from '../group';
+
+export default {
+  path: '/system/setting/main',
+  key: 'system-setting-main',
+  title: '首页设置',
+  needLogin: true,
+  module,
+  group,
+  index: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/admin/routes/system/setting/main/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+.system-setting-main {}

+ 10 - 0
front/project/admin/routes/system/setting/main/page.js

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

+ 15 - 0
front/project/admin/routes/system/setting/report/index.js

@@ -0,0 +1,15 @@
+import module from '../../module';
+import group from '../group';
+
+export default {
+  path: '/system/setting/report',
+  key: 'system-setting-report',
+  title: '报告设置',
+  needLogin: true,
+  module,
+  group,
+  index: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/admin/routes/system/setting/report/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+.system-setting-report {}

+ 10 - 0
front/project/admin/routes/system/setting/report/page.js

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

+ 15 - 0
front/project/admin/routes/system/setting/service/index.js

@@ -0,0 +1,15 @@
+import module from '../../module';
+import group from '../group';
+
+export default {
+  path: '/system/setting/service',
+  key: 'system-setting-service',
+  title: '服务设置',
+  needLogin: true,
+  module,
+  group,
+  index: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/admin/routes/system/setting/service/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+.system-setting-service {}

+ 10 - 0
front/project/admin/routes/system/setting/service/page.js

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

+ 15 - 0
front/project/admin/routes/system/setting/structure/index.js

@@ -0,0 +1,15 @@
+import module from '../../module';
+import group from '../group';
+
+export default {
+  path: '/system/setting/structure',
+  key: 'system-setting-structure',
+  title: '结构设置',
+  needLogin: true,
+  module,
+  group,
+  index: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/admin/routes/system/setting/structure/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+.system-setting-structure {}

+ 10 - 0
front/project/admin/routes/system/setting/structure/page.js

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

+ 15 - 0
front/project/admin/routes/system/subject/add/index.js

@@ -0,0 +1,15 @@
+import module from '../../module';
+import group from '../group';
+
+export default {
+  path: '/system/subject/add',
+  key: 'system-subject-add',
+  title: '题目录入',
+  needLogin: true,
+  module,
+  group,
+  index: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/admin/routes/system/subject/add/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+.system-subject-add {}

+ 10 - 0
front/project/admin/routes/system/subject/add/page.js

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

+ 15 - 0
front/project/admin/routes/system/subject/exercisesList/index.js

@@ -0,0 +1,15 @@
+import module from '../../module';
+import group from '../group';
+
+export default {
+  path: '/system/subject/exercisesList',
+  key: 'system-subject-exercisesList',
+  title: '练习题列表',
+  needLogin: true,
+  module,
+  group,
+  index: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/admin/routes/system/subject/exercisesList/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+.system-subject-exercisesList {}

+ 10 - 0
front/project/admin/routes/system/subject/exercisesList/page.js

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

+ 5 - 0
front/project/admin/routes/system/subject/group.js

@@ -0,0 +1,5 @@
+export default {
+  key: 'subject',
+  name: '练习频道设置',
+  icon: 'dashboard',
+};

+ 8 - 0
front/project/admin/routes/system/subject/index.js

@@ -0,0 +1,8 @@
+import add from './add';
+import exercisesList from './exercisesList';
+import mockList from './mockList';
+import machineList from './machineList';
+import materialList from './materialList';
+import taskList from './taskList';
+
+export default [add, exercisesList, mockList, machineList, materialList, taskList];

+ 15 - 0
front/project/admin/routes/system/subject/machineList/index.js

@@ -0,0 +1,15 @@
+import module from '../../module';
+import group from '../group';
+
+export default {
+  path: '/system/subject/machineList',
+  key: 'system-subject-machineList',
+  title: '机经列表',
+  needLogin: true,
+  module,
+  group,
+  index: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/admin/routes/system/subject/machineList/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+.system-subject-machineList {}

+ 10 - 0
front/project/admin/routes/system/subject/machineList/page.js

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

+ 15 - 0
front/project/admin/routes/system/subject/materialList/index.js

@@ -0,0 +1,15 @@
+import module from '../../module';
+import group from '../group';
+
+export default {
+  path: '/system/subject/materialList',
+  key: 'system-subject-materialList',
+  title: '长难句教材',
+  needLogin: true,
+  module,
+  group,
+  index: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/admin/routes/system/subject/materialList/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+.system-subject-materialList {}

+ 10 - 0
front/project/admin/routes/system/subject/materialList/page.js

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

+ 15 - 0
front/project/admin/routes/system/subject/mockList/index.js

@@ -0,0 +1,15 @@
+import module from '../../module';
+import group from '../group';
+
+export default {
+  path: '/system/subject/mockList',
+  key: 'system-subject-mockList',
+  title: '模考列表',
+  needLogin: true,
+  module,
+  group,
+  index: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/admin/routes/system/subject/mockList/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+.system-subject-mockList {}

+ 10 - 0
front/project/admin/routes/system/subject/mockList/page.js

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

+ 15 - 0
front/project/admin/routes/system/subject/taskList/index.js

@@ -0,0 +1,15 @@
+import module from '../../module';
+import group from '../group';
+
+export default {
+  path: '/system/subject/taskList',
+  key: 'system-subject-taskList',
+  title: '预习作业',
+  needLogin: true,
+  module,
+  group,
+  index: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/admin/routes/system/subject/taskList/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+.system-subject-taskList {}

+ 10 - 0
front/project/admin/routes/system/subject/taskList/page.js

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

+ 15 - 0
front/project/admin/routes/system/user/buyList/index.js

@@ -0,0 +1,15 @@
+import module from '../../module';
+import group from '../group';
+
+export default {
+  path: '/system/user/buyList',
+  key: 'system-user-buyList',
+  title: '购买记录',
+  needLogin: true,
+  module,
+  group,
+  index: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/admin/routes/system/user/buyList/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+.system-user-buyList {}

+ 10 - 0
front/project/admin/routes/system/user/buyList/page.js

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

+ 15 - 0
front/project/admin/routes/system/user/exerciseList/index.js

@@ -0,0 +1,15 @@
+import module from '../../module';
+import group from '../group';
+
+export default {
+  path: '/system/user/exerciseList',
+  key: 'system-user-exerciseList',
+  title: '练习记录',
+  needLogin: true,
+  module,
+  group,
+  index: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/admin/routes/system/user/exerciseList/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+.system-user-exerciseList {}

+ 10 - 0
front/project/admin/routes/system/user/exerciseList/page.js

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

+ 15 - 0
front/project/admin/routes/system/user/feedbackList/index.js

@@ -0,0 +1,15 @@
+import module from '../../module';
+import group from '../group';
+
+export default {
+  path: '/system/user/feedbackList',
+  key: 'system-user-feedbackList',
+  title: '勘误反馈',
+  needLogin: true,
+  module,
+  group,
+  index: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/admin/routes/system/user/feedbackList/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+.system-user-feedbackList {}

+ 10 - 0
front/project/admin/routes/system/user/feedbackList/page.js

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

+ 5 - 0
front/project/admin/routes/system/user/group.js

@@ -0,0 +1,5 @@
+export default {
+  key: 'user',
+  name: '用户管理',
+  icon: 'user',
+};

+ 9 - 0
front/project/admin/routes/system/user/index.js

@@ -0,0 +1,9 @@
+import infoList from './infoList';
+import questionList from './questionList';
+import taskList from './taskList';
+import exerciseList from './exerciseList';
+import mockList from './mockList';
+import buyList from './buyList';
+import feedbackList from './feedbackList';
+
+export default [infoList, questionList, taskList, exerciseList, mockList, buyList, feedbackList];

+ 15 - 0
front/project/admin/routes/system/user/infoList/index.js

@@ -0,0 +1,15 @@
+import module from '../../module';
+import group from '../group';
+
+export default {
+  path: '/system/user/infoList',
+  key: 'system-user-infoList',
+  title: '基本信息',
+  needLogin: true,
+  module,
+  group,
+  index: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/admin/routes/system/user/infoList/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+.system-user-infoList {}

+ 10 - 0
front/project/admin/routes/system/user/infoList/page.js

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

+ 15 - 0
front/project/admin/routes/system/user/mockList/index.js

@@ -0,0 +1,15 @@
+import module from '../../module';
+import group from '../group';
+
+export default {
+  path: '/system/user/mockList',
+  key: 'system-user-mockList',
+  title: '控制台',
+  needLogin: true,
+  module,
+  group,
+  index: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/admin/routes/system/user/mockList/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+.system-user-mockList {}

+ 10 - 0
front/project/admin/routes/system/user/mockList/page.js

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

+ 15 - 0
front/project/admin/routes/system/user/questionList/index.js

@@ -0,0 +1,15 @@
+import module from '../../module';
+import group from '../group';
+
+export default {
+  path: '/system/user/questionList',
+  key: 'system-user-questionList',
+  title: '学生提问',
+  needLogin: true,
+  module,
+  group,
+  index: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/admin/routes/system/user/questionList/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+.system-user-questionList {}

+ 10 - 0
front/project/admin/routes/system/user/questionList/page.js

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

+ 15 - 0
front/project/admin/routes/system/user/taskList/index.js

@@ -0,0 +1,15 @@
+import module from '../../module';
+import group from '../group';
+
+export default {
+  path: '/system/user/taskList',
+  key: 'system-user-taskList',
+  title: '预习作业',
+  needLogin: true,
+  module,
+  group,
+  index: true,
+  component() {
+    return import('./page');
+  },
+};

+ 3 - 0
front/project/admin/routes/system/user/taskList/index.less

@@ -0,0 +1,3 @@
+@charset "utf-8";
+
+.system-user-taskList {}

+ 10 - 0
front/project/admin/routes/system/user/taskList/page.js

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

+ 3 - 0
front/project/admin/stores/index.js

@@ -0,0 +1,3 @@
+import { System } from './system';
+
+export default [System];

+ 0 - 0
front/project/admin/stores/system.js


Деякі файли не було показано, через те що забагато файлів було змінено