From 477b033276ebaacf028bc2493e020ddb2010f4e8 Mon Sep 17 00:00:00 2001
From: lxb <1079052079@qq.com>
Date: Wed, 27 Nov 2024 18:43:44 +0800
Subject: [PATCH] v1
---
.gitignore | 22 +
config/env.js | 90 +
config/jest/cssTransform.js | 14 +
config/jest/fileTransform.js | 12 +
config/paths.js | 55 +
config/polyfills.js | 22 +
config/webpack.config.dev.js | 263 +
config/webpack.config.prod.js | 342 +
config/webpackDevServer.config.js | 100 +
doc/临时卡延期申请表.xls | Bin 0 -> 27136 bytes
doc/临时卡申请表.xls | Bin 0 -> 29696 bytes
doc/校园一卡通系统使用说明.docx | Bin 0 -> 12800 bytes
package-lock.json | 11872 ++++++++++++++++
package.json | 127 +
public/favicon.ico | Bin 0 -> 902 bytes
public/index.html | 40 +
public/manifest.json | 15 +
scripts/build.js | 150 +
scripts/start.js | 92 +
scripts/test.js | 27 +
server/config/Router.js | 54 +
server/controllers/Admin.js | 65 +
server/controllers/Card.js | 394 +
server/controllers/File.js | 118 +
server/controllers/Img.js | 32 +
server/controllers/Instruction.js | 38 +
server/controllers/Notice.js | 111 +
server/models/Admin.js | 4 +
server/models/Card.js | 4 +
server/models/File.js | 4 +
server/models/Instruction.js | 4 +
server/models/Notice.js | 4 +
server/public/upload/files/1519460939797.xls | Bin 0 -> 29696 bytes
server/public/upload/files/1519460939801.xls | Bin 0 -> 27136 bytes
server/public/upload/files/1519522215613.doc | Bin 0 -> 12800 bytes
server/public/upload/files/1527397442128.doc | Bin 0 -> 19456 bytes
server/public/upload/imgs/1517988286574.png | Bin 0 -> 8783 bytes
server/public/upload/imgs/1517988291988.png | Bin 0 -> 9351 bytes
server/public/upload/imgs/1517988359591.png | Bin 0 -> 7910 bytes
server/public/upload/imgs/1519443487968.png | Bin 0 -> 9993 bytes
server/public/upload/imgs/1527664608777.png | Bin 0 -> 7237 bytes
server/public/upload/imgs/1527665016934.png | Bin 0 -> 8783 bytes
server/public/upload/imgs/1527907193986.png | Bin 0 -> 8783 bytes
server/public/upload/imgs/404/404.png | Bin 0 -> 5609 bytes
server/schemas/AdminSchema.js | 69 +
server/schemas/CardSchema.js | 119 +
server/schemas/FileSchema.js | 38 +
server/schemas/InstructionSchema.js | 31 +
server/schemas/NoticeSchema.js | 45 +
server/server.js | 94 +
server/until/SetJson.js | 7 +
src/actions/menuKey.js | 8 +
src/actions/modalVisible.js | 8 +
src/actions/userInfo.js | 8 +
src/components/AboutUsModal/AboutUsModal.js | 52 +
src/components/AboutUsModal/style.less | 8 +
src/components/BalanceState/BalanceState.js | 114 +
src/components/BalanceState/style.less | 13 +
src/components/BillCalendar/BillCalendar.js | 148 +
src/components/BillListTable/BillListTable.js | 58 +
src/components/CardBaseInfo/BaseCardInfo.js | 36 +
src/components/CardBaseInfo/style.less | 5 +
.../CardDetailInfoForm/CardDetailInfoForm.js | 271 +
src/components/CardListTable/CardListTable.js | 180 +
.../ChangePasswordModal.js | 158 +
src/components/DataAnalysis/DataAnalysis.js | 106 +
src/components/FileList/FileList.js | 38 +
src/components/FileList/style.less | 10 +
src/components/FileListTable/FileListTable.js | 75 +
src/components/FileUpload/FileUpload.js | 47 +
src/components/FrozenState/FrozenState.js | 32 +
src/components/FrozenState/style.less | 7 +
src/components/GoodList/GoodList.js | 43 +
src/components/GoodList/style.less | 13 +
.../HomeBreadcrumb/HomeBreadcrumb.js | 69 +
src/components/HomeFooter/HomeFooter.js | 24 +
src/components/HomeHeader/HomeHeader.js | 106 +
src/components/HomeHeader/style.less | 17 +
src/components/LeftAside/LeftAside.js | 118 +
src/components/LeftAside/style.less | 13 +
src/components/LoginModal/LoginModal.js | 149 +
src/components/LoginModal/style.less | 3 +
.../NoticeDetailDisplay.js | 36 +
src/components/NoticeDetailDisplay/style.less | 28 +
.../NoticeDetailInfoForm.js | 121 +
.../NoticeListTable/NoticeListTable.js | 121 +
.../SearchByCodeInput/SearchByCodeInput.js | 85 +
.../SearchNoticeInput/SearchNoticeInput.js | 67 +
src/constants/menuKey.js | 2 +
src/constants/modalVisible.js | 2 +
src/constants/userInfo.js | 2 +
src/containers/App.js | 88 +
src/containers/NotFound.js | 50 +
src/containers/billListPage/index.js | 151 +
src/containers/cardholderDetailPage/index.js | 120 +
src/containers/cardholderListPage/index.js | 76 +
src/containers/editInstruction/index.js | 79 +
src/containers/excelManagementPage/index.js | 75 +
src/containers/excelPage/index.js | 48 +
src/containers/instructionPage/index.js | 51 +
src/containers/instructionPage/style.less | 14 +
src/containers/lostAndFoundPage/index.js | 20 +
src/containers/newCardPage/index.js | 97 +
src/containers/newNoticePage/index.js | 112 +
src/containers/noticeListPage/index.js | 88 +
src/containers/noticePage/index.js | 57 +
src/containers/noticePage/style.less | 9 +
src/containers/operatePage/index.js | 198 +
src/containers/processPage/index.js | 30 +
src/containers/shopPage/index.js | 56 +
src/fetch/domainConstants.js | 6 +
src/fetch/download.js | 29 +
src/fetch/get.js | 32 +
src/fetch/post.js | 37 +
src/index.js | 37 +
src/reducers/index.js | 10 +
src/reducers/menuKey.js | 13 +
src/reducers/modalVisible.js | 15 +
src/reducers/userInfo.js | 17 +
src/registerServiceWorker.js | 108 +
src/router/RouterMap.js | 52 +
src/static/css/common.less | 13 +
src/static/imgs/404.svg | 1 +
src/static/imgs/bg1.jpg | Bin 0 -> 933578 bytes
src/static/imgs/campusCardTitle.png | Bin 0 -> 26195 bytes
src/static/imgs/goods/三角三明治-1.svg | 1 +
src/static/imgs/goods/冰淇淋-1.svg | 1 +
src/static/imgs/goods/咖啡-1.svg | 1 +
src/static/imgs/goods/奶酪-1.svg | 1 +
src/static/imgs/goods/柠檬-1.svg | 1 +
src/static/imgs/goods/汉堡-1.svg | 1 +
src/static/imgs/goods/甜甜圈-1.svg | 1 +
src/static/imgs/goods/糖果-1.svg | 1 +
src/static/imgs/goods/罐头-1.svg | 1 +
src/static/imgs/goods/胡萝卜-1.svg | 1 +
src/static/imgs/goods/花菜-1.svg | 1 +
src/static/imgs/goods/蛋糕-2.svg | 1 +
src/static/imgs/goods/西瓜-1.svg | 1 +
src/static/imgs/goods/西餐-1.svg | 1 +
src/static/imgs/goods/雪糕-1.svg | 1 +
src/static/imgs/goods/面-1.svg | 1 +
src/static/imgs/goods/饮料-1.svg | 1 +
src/static/imgs/goods/鸡腿-1.svg | 1 +
src/static/imgs/goods/鸡蛋-1.svg | 1 +
src/static/imgs/listItem.svg | 1 +
src/static/imgs/logo.svg | 1 +
src/static/imgs/时间.svg | 1 +
src/static/imgs/火箭.svg | 1 +
src/static/imgs/爱心.svg | 1 +
src/store/configureStore.js | 9 +
src/until/localStore.js | 26 +
src/until/selectedKeyUntil.js | 22 +
src/until/sessionStorage.js | 26 +
src/viewDatas/goods.js | 23 +
src/viewDatas/menu.js | 92 +
src/viewDatas/processDetail.js | 146 +
src/viewDatas/typeRadio.js | 4 +
157 files changed, 19040 insertions(+)
create mode 100644 .gitignore
create mode 100644 config/env.js
create mode 100644 config/jest/cssTransform.js
create mode 100644 config/jest/fileTransform.js
create mode 100644 config/paths.js
create mode 100644 config/polyfills.js
create mode 100644 config/webpack.config.dev.js
create mode 100644 config/webpack.config.prod.js
create mode 100644 config/webpackDevServer.config.js
create mode 100644 doc/临时卡延期申请表.xls
create mode 100644 doc/临时卡申请表.xls
create mode 100644 doc/校园一卡通系统使用说明.docx
create mode 100644 package-lock.json
create mode 100644 package.json
create mode 100644 public/favicon.ico
create mode 100644 public/index.html
create mode 100644 public/manifest.json
create mode 100644 scripts/build.js
create mode 100644 scripts/start.js
create mode 100644 scripts/test.js
create mode 100644 server/config/Router.js
create mode 100644 server/controllers/Admin.js
create mode 100644 server/controllers/Card.js
create mode 100644 server/controllers/File.js
create mode 100644 server/controllers/Img.js
create mode 100644 server/controllers/Instruction.js
create mode 100644 server/controllers/Notice.js
create mode 100644 server/models/Admin.js
create mode 100644 server/models/Card.js
create mode 100644 server/models/File.js
create mode 100644 server/models/Instruction.js
create mode 100644 server/models/Notice.js
create mode 100644 server/public/upload/files/1519460939797.xls
create mode 100644 server/public/upload/files/1519460939801.xls
create mode 100644 server/public/upload/files/1519522215613.doc
create mode 100644 server/public/upload/files/1527397442128.doc
create mode 100644 server/public/upload/imgs/1517988286574.png
create mode 100644 server/public/upload/imgs/1517988291988.png
create mode 100644 server/public/upload/imgs/1517988359591.png
create mode 100644 server/public/upload/imgs/1519443487968.png
create mode 100644 server/public/upload/imgs/1527664608777.png
create mode 100644 server/public/upload/imgs/1527665016934.png
create mode 100644 server/public/upload/imgs/1527907193986.png
create mode 100644 server/public/upload/imgs/404/404.png
create mode 100644 server/schemas/AdminSchema.js
create mode 100644 server/schemas/CardSchema.js
create mode 100644 server/schemas/FileSchema.js
create mode 100644 server/schemas/InstructionSchema.js
create mode 100644 server/schemas/NoticeSchema.js
create mode 100644 server/server.js
create mode 100644 server/until/SetJson.js
create mode 100644 src/actions/menuKey.js
create mode 100644 src/actions/modalVisible.js
create mode 100644 src/actions/userInfo.js
create mode 100644 src/components/AboutUsModal/AboutUsModal.js
create mode 100644 src/components/AboutUsModal/style.less
create mode 100644 src/components/BalanceState/BalanceState.js
create mode 100644 src/components/BalanceState/style.less
create mode 100644 src/components/BillCalendar/BillCalendar.js
create mode 100644 src/components/BillListTable/BillListTable.js
create mode 100644 src/components/CardBaseInfo/BaseCardInfo.js
create mode 100644 src/components/CardBaseInfo/style.less
create mode 100644 src/components/CardDetailInfoForm/CardDetailInfoForm.js
create mode 100644 src/components/CardListTable/CardListTable.js
create mode 100644 src/components/ChangePasswordModal/ChangePasswordModal.js
create mode 100644 src/components/DataAnalysis/DataAnalysis.js
create mode 100644 src/components/FileList/FileList.js
create mode 100644 src/components/FileList/style.less
create mode 100644 src/components/FileListTable/FileListTable.js
create mode 100644 src/components/FileUpload/FileUpload.js
create mode 100644 src/components/FrozenState/FrozenState.js
create mode 100644 src/components/FrozenState/style.less
create mode 100644 src/components/GoodList/GoodList.js
create mode 100644 src/components/GoodList/style.less
create mode 100644 src/components/HomeBreadcrumb/HomeBreadcrumb.js
create mode 100644 src/components/HomeFooter/HomeFooter.js
create mode 100644 src/components/HomeHeader/HomeHeader.js
create mode 100644 src/components/HomeHeader/style.less
create mode 100644 src/components/LeftAside/LeftAside.js
create mode 100644 src/components/LeftAside/style.less
create mode 100644 src/components/LoginModal/LoginModal.js
create mode 100644 src/components/LoginModal/style.less
create mode 100644 src/components/NoticeDetailDisplay/NoticeDetailDisplay.js
create mode 100644 src/components/NoticeDetailDisplay/style.less
create mode 100644 src/components/NoticeDetailInfoForm/NoticeDetailInfoForm.js
create mode 100644 src/components/NoticeListTable/NoticeListTable.js
create mode 100644 src/components/SearchByCodeInput/SearchByCodeInput.js
create mode 100644 src/components/SearchNoticeInput/SearchNoticeInput.js
create mode 100644 src/constants/menuKey.js
create mode 100644 src/constants/modalVisible.js
create mode 100644 src/constants/userInfo.js
create mode 100644 src/containers/App.js
create mode 100644 src/containers/NotFound.js
create mode 100644 src/containers/billListPage/index.js
create mode 100644 src/containers/cardholderDetailPage/index.js
create mode 100644 src/containers/cardholderListPage/index.js
create mode 100644 src/containers/editInstruction/index.js
create mode 100644 src/containers/excelManagementPage/index.js
create mode 100644 src/containers/excelPage/index.js
create mode 100644 src/containers/instructionPage/index.js
create mode 100644 src/containers/instructionPage/style.less
create mode 100644 src/containers/lostAndFoundPage/index.js
create mode 100644 src/containers/newCardPage/index.js
create mode 100644 src/containers/newNoticePage/index.js
create mode 100644 src/containers/noticeListPage/index.js
create mode 100644 src/containers/noticePage/index.js
create mode 100644 src/containers/noticePage/style.less
create mode 100644 src/containers/operatePage/index.js
create mode 100644 src/containers/processPage/index.js
create mode 100644 src/containers/shopPage/index.js
create mode 100644 src/fetch/domainConstants.js
create mode 100644 src/fetch/download.js
create mode 100644 src/fetch/get.js
create mode 100644 src/fetch/post.js
create mode 100644 src/index.js
create mode 100644 src/reducers/index.js
create mode 100644 src/reducers/menuKey.js
create mode 100644 src/reducers/modalVisible.js
create mode 100644 src/reducers/userInfo.js
create mode 100644 src/registerServiceWorker.js
create mode 100644 src/router/RouterMap.js
create mode 100644 src/static/css/common.less
create mode 100644 src/static/imgs/404.svg
create mode 100644 src/static/imgs/bg1.jpg
create mode 100644 src/static/imgs/campusCardTitle.png
create mode 100644 src/static/imgs/goods/三角三明治-1.svg
create mode 100644 src/static/imgs/goods/冰淇淋-1.svg
create mode 100644 src/static/imgs/goods/咖啡-1.svg
create mode 100644 src/static/imgs/goods/奶酪-1.svg
create mode 100644 src/static/imgs/goods/柠檬-1.svg
create mode 100644 src/static/imgs/goods/汉堡-1.svg
create mode 100644 src/static/imgs/goods/甜甜圈-1.svg
create mode 100644 src/static/imgs/goods/糖果-1.svg
create mode 100644 src/static/imgs/goods/罐头-1.svg
create mode 100644 src/static/imgs/goods/胡萝卜-1.svg
create mode 100644 src/static/imgs/goods/花菜-1.svg
create mode 100644 src/static/imgs/goods/蛋糕-2.svg
create mode 100644 src/static/imgs/goods/西瓜-1.svg
create mode 100644 src/static/imgs/goods/西餐-1.svg
create mode 100644 src/static/imgs/goods/雪糕-1.svg
create mode 100644 src/static/imgs/goods/面-1.svg
create mode 100644 src/static/imgs/goods/饮料-1.svg
create mode 100644 src/static/imgs/goods/鸡腿-1.svg
create mode 100644 src/static/imgs/goods/鸡蛋-1.svg
create mode 100644 src/static/imgs/listItem.svg
create mode 100644 src/static/imgs/logo.svg
create mode 100644 src/static/imgs/时间.svg
create mode 100644 src/static/imgs/火箭.svg
create mode 100644 src/static/imgs/爱心.svg
create mode 100644 src/store/configureStore.js
create mode 100644 src/until/localStore.js
create mode 100644 src/until/selectedKeyUntil.js
create mode 100644 src/until/sessionStorage.js
create mode 100644 src/viewDatas/goods.js
create mode 100644 src/viewDatas/menu.js
create mode 100644 src/viewDatas/processDetail.js
create mode 100644 src/viewDatas/typeRadio.js
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c6385ef
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,22 @@
+# See https://help.github.com/ignore-files/ for more about ignoring files.
+
+# dependencies
+/node_modules
+/.idea
+
+# testing
+/coverage
+
+# production
+/build
+
+# misc
+.DS_Store
+.env.local
+.env.development.local
+.env.test.local
+.env.production.local
+
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
diff --git a/config/env.js b/config/env.js
new file mode 100644
index 0000000..8b39b6c
--- /dev/null
+++ b/config/env.js
@@ -0,0 +1,90 @@
+'use strict';
+
+const fs = require('fs');
+const path = require('path');
+const paths = require('./paths');
+
+// Make sure that including paths.js after env.js will read .env variables.
+delete require.cache[require.resolve('./paths')];
+
+const NODE_ENV = process.env.NODE_ENV;
+if (!NODE_ENV) {
+ throw new Error(
+ 'The NODE_ENV environment variable is required but was not specified.'
+ );
+}
+
+// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
+var dotenvFiles = [
+ `${paths.dotenv}.${NODE_ENV}.local`,
+ `${paths.dotenv}.${NODE_ENV}`,
+ // Don't include `.env.local` for `test` environment
+ // since normally you expect tests to produce the same
+ // results for everyone
+ NODE_ENV !== 'test' && `${paths.dotenv}.local`,
+ paths.dotenv,
+].filter(Boolean);
+
+// Load environment variables from .env* files. Suppress warnings using silent
+// if this file is missing. dotenv will never modify any environment variables
+// that have already been set.
+// https://github.com/motdotla/dotenv
+dotenvFiles.forEach(dotenvFile => {
+ if (fs.existsSync(dotenvFile)) {
+ require('dotenv').config({
+ path: dotenvFile,
+ });
+ }
+});
+
+// We support resolving modules according to `NODE_PATH`.
+// This lets you use absolute paths in imports inside large monorepos:
+// https://github.com/facebookincubator/create-react-app/issues/253.
+// It works similar to `NODE_PATH` in Node itself:
+// https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders
+// Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored.
+// Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims.
+// https://github.com/facebookincubator/create-react-app/issues/1023#issuecomment-265344421
+// We also resolve them to make sure all tools using them work consistently.
+const appDirectory = fs.realpathSync(process.cwd());
+process.env.NODE_PATH = (process.env.NODE_PATH || '')
+ .split(path.delimiter)
+ .filter(folder => folder && !path.isAbsolute(folder))
+ .map(folder => path.resolve(appDirectory, folder))
+ .join(path.delimiter);
+
+// Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be
+// injected into the application via DefinePlugin in Webpack configuration.
+const REACT_APP = /^REACT_APP_/i;
+
+function getClientEnvironment(publicUrl) {
+ const raw = Object.keys(process.env)
+ .filter(key => REACT_APP.test(key))
+ .reduce(
+ (env, key) => {
+ env[key] = process.env[key];
+ return env;
+ },
+ {
+ // Useful for determining whether we’re running in production mode.
+ // Most importantly, it switches React into the correct mode.
+ NODE_ENV: process.env.NODE_ENV || 'development',
+ // Useful for resolving the correct path to static assets in `public`.
+ // For example,
.
+ // This should only be used as an escape hatch. Normally you would put
+ // images into the `src` and `import` them in code to get their paths.
+ PUBLIC_URL: publicUrl,
+ }
+ );
+ // Stringify all values so we can feed into Webpack DefinePlugin
+ const stringified = {
+ 'process.env': Object.keys(raw).reduce((env, key) => {
+ env[key] = JSON.stringify(raw[key]);
+ return env;
+ }, {}),
+ };
+
+ return { raw, stringified };
+}
+
+module.exports = getClientEnvironment;
diff --git a/config/jest/cssTransform.js b/config/jest/cssTransform.js
new file mode 100644
index 0000000..f1534f6
--- /dev/null
+++ b/config/jest/cssTransform.js
@@ -0,0 +1,14 @@
+'use strict';
+
+// This is a custom Jest transformer turning style imports into empty objects.
+// http://facebook.github.io/jest/docs/tutorial-webpack.html
+
+module.exports = {
+ process() {
+ return 'module.exports = {};';
+ },
+ getCacheKey() {
+ // The output is always the same.
+ return 'cssTransform';
+ },
+};
diff --git a/config/jest/fileTransform.js b/config/jest/fileTransform.js
new file mode 100644
index 0000000..ffce0da
--- /dev/null
+++ b/config/jest/fileTransform.js
@@ -0,0 +1,12 @@
+'use strict';
+
+const path = require('path');
+
+// This is a custom Jest transformer turning file imports into filenames.
+// http://facebook.github.io/jest/docs/tutorial-webpack.html
+
+module.exports = {
+ process(src, filename) {
+ return `module.exports = ${JSON.stringify(path.basename(filename))};`;
+ },
+};
diff --git a/config/paths.js b/config/paths.js
new file mode 100644
index 0000000..6d16efc
--- /dev/null
+++ b/config/paths.js
@@ -0,0 +1,55 @@
+'use strict';
+
+const path = require('path');
+const fs = require('fs');
+const url = require('url');
+
+// Make sure any symlinks in the project folder are resolved:
+// https://github.com/facebookincubator/create-react-app/issues/637
+const appDirectory = fs.realpathSync(process.cwd());
+const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
+
+const envPublicUrl = process.env.PUBLIC_URL;
+
+function ensureSlash(path, needsSlash) {
+ const hasSlash = path.endsWith('/');
+ if (hasSlash && !needsSlash) {
+ return path.substr(path, path.length - 1);
+ } else if (!hasSlash && needsSlash) {
+ return `${path}/`;
+ } else {
+ return path;
+ }
+}
+
+const getPublicUrl = appPackageJson =>
+ envPublicUrl || require(appPackageJson).homepage;
+
+// We use `PUBLIC_URL` environment variable or "homepage" field to infer
+// "public path" at which the app is served.
+// Webpack needs to know it to put the right