From 02b58972d6f6e5322fe3c4168333887bfe416d34 Mon Sep 17 00:00:00 2001 From: Qing Date: Sun, 9 Jul 2023 19:05:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E7=AE=A1=E7=90=86=E6=A1=86?= =?UTF-8?q?=E6=9E=B6=E6=90=AD=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 318 ++++++++++++++++++ package.json | 2 + src/assets/styles/element-variables.scss | 3 + src/components/Home/Header.vue | 83 +++-- src/components/Home/SearchInput.vue | 3 +- src/components/Project/ProjectDetail.vue | 108 ++++-- src/components/System/AdminAside.vue | 71 ++++ src/components/System/AdminHeader.vue | 71 ++++ src/components/System/AdminHome.vue | 31 ++ src/components/System/AdminLogin.vue | 135 +++++++- src/components/System/AdminTags.vue | 22 ++ src/components/System/BreadCrumb.vue | 32 ++ .../System/Manage/articleManage.vue | 13 + .../System/Manage/categoryManage.vue | 13 + .../System/Manage/commentManage.vue | 15 + .../System/Manage/projectManage.vue | 15 + src/components/System/Manage/systemManage.vue | 15 + src/components/System/Manage/userManage.vue | 15 + src/main.js | 1 + src/router/index.js | 64 +++- src/store/index.js | 31 +- src/views/systemIndex.vue | 37 ++ vue.config.js | 2 +- 23 files changed, 1001 insertions(+), 99 deletions(-) create mode 100644 src/components/System/AdminAside.vue create mode 100644 src/components/System/AdminHeader.vue create mode 100644 src/components/System/AdminHome.vue create mode 100644 src/components/System/AdminTags.vue create mode 100644 src/components/System/BreadCrumb.vue create mode 100644 src/components/System/Manage/articleManage.vue create mode 100644 src/components/System/Manage/categoryManage.vue create mode 100644 src/components/System/Manage/commentManage.vue create mode 100644 src/components/System/Manage/projectManage.vue create mode 100644 src/components/System/Manage/systemManage.vue create mode 100644 src/components/System/Manage/userManage.vue create mode 100644 src/views/systemIndex.vue diff --git a/package-lock.json b/package-lock.json index 438b92d..0cb32d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,6 +32,8 @@ "@vue/cli-service": "~5.0.0", "eslint": "^7.32.0", "eslint-plugin-vue": "^8.0.3", + "less": "^4.1.3", + "less-loader": "^11.1.3", "node-sass": "^9.0.0", "sass-loader": "^13.3.2", "vue-template-compiler": "^2.6.14" @@ -4841,6 +4843,15 @@ "resolved": "https://registry.npmmirror.com/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, + "node_modules/copy-anything": { + "version": "2.0.6", + "resolved": "https://registry.npmmirror.com/copy-anything/-/copy-anything-2.0.6.tgz", + "integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==", + "dev": true, + "dependencies": { + "is-what": "^3.14.1" + } + }, "node_modules/copy-webpack-plugin": { "version": "9.1.0", "resolved": "https://registry.npmmirror.com/copy-webpack-plugin/-/copy-webpack-plugin-9.1.0.tgz", @@ -5784,6 +5795,19 @@ "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", "dev": true }, + "node_modules/errno": { + "version": "0.1.8", + "resolved": "https://registry.npmmirror.com/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "dev": true, + "optional": true, + "dependencies": { + "prr": "~1.0.1" + }, + "bin": { + "errno": "cli.js" + } + }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmmirror.com/error-ex/-/error-ex-1.3.2.tgz", @@ -7820,6 +7844,19 @@ "node": ">= 4" } }, + "node_modules/image-size": { + "version": "0.5.5", + "resolved": "https://registry.npmmirror.com/image-size/-/image-size-0.5.5.tgz", + "integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==", + "dev": true, + "optional": true, + "bin": { + "image-size": "bin/image-size.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmmirror.com/import-fresh/-/import-fresh-3.3.0.tgz", @@ -8230,6 +8267,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-what": { + "version": "3.14.1", + "resolved": "https://registry.npmmirror.com/is-what/-/is-what-3.14.1.tgz", + "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==", + "dev": true + }, "node_modules/is-wsl": { "version": "2.2.0", "resolved": "https://registry.npmmirror.com/is-wsl/-/is-wsl-2.2.0.tgz", @@ -8604,6 +8647,79 @@ "launch-editor": "^2.6.0" } }, + "node_modules/less": { + "version": "4.1.3", + "resolved": "https://registry.npmmirror.com/less/-/less-4.1.3.tgz", + "integrity": "sha512-w16Xk/Ta9Hhyei0Gpz9m7VS8F28nieJaL/VyShID7cYvP6IL5oHeL6p4TXSDJqZE/lNv0oJ2pGVjJsRkfwm5FA==", + "dev": true, + "dependencies": { + "copy-anything": "^2.0.1", + "parse-node-version": "^1.0.1", + "tslib": "^2.3.0" + }, + "bin": { + "lessc": "bin/lessc" + }, + "engines": { + "node": ">=6" + }, + "optionalDependencies": { + "errno": "^0.1.1", + "graceful-fs": "^4.1.2", + "image-size": "~0.5.0", + "make-dir": "^2.1.0", + "mime": "^1.4.1", + "needle": "^3.1.0", + "source-map": "~0.6.0" + } + }, + "node_modules/less-loader": { + "version": "11.1.3", + "resolved": "https://registry.npmmirror.com/less-loader/-/less-loader-11.1.3.tgz", + "integrity": "sha512-A5b7O8dH9xpxvkosNrP0dFp2i/dISOJa9WwGF3WJflfqIERE2ybxh1BFDj5CovC2+jCE4M354mk90hN6ziXlVw==", + "dev": true, + "engines": { + "node": ">= 14.15.0" + }, + "peerDependencies": { + "less": "^3.5.0 || ^4.0.0", + "webpack": "^5.0.0" + } + }, + "node_modules/less/node_modules/make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "optional": true, + "dependencies": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/less/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "optional": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/less/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "optional": true, + "bin": { + "semver": "bin/semver" + } + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmmirror.com/levn/-/levn-0.4.1.tgz", @@ -9662,6 +9778,47 @@ "resolved": "https://registry.npmmirror.com/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" }, + "node_modules/needle": { + "version": "3.2.0", + "resolved": "https://registry.npmmirror.com/needle/-/needle-3.2.0.tgz", + "integrity": "sha512-oUvzXnyLiVyVGoianLijF9O/RecZUf7TkBfimjGrLM4eQhXyeJwM6GeAWccwfQ9aa4gMCZKqhAOuLaMIcQxajQ==", + "dev": true, + "optional": true, + "dependencies": { + "debug": "^3.2.6", + "iconv-lite": "^0.6.3", + "sax": "^1.2.4" + }, + "bin": { + "needle": "bin/needle" + }, + "engines": { + "node": ">= 4.4.x" + } + }, + "node_modules/needle/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "optional": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/needle/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-0.6.3.tgz", @@ -10585,6 +10742,15 @@ "node": ">=8" } }, + "node_modules/parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/parse5": { "version": "5.1.1", "resolved": "https://registry.npmmirror.com/parse5/-/parse5-5.1.1.tgz", @@ -11604,6 +11770,13 @@ "resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, + "node_modules/prr": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/prr/-/prr-1.0.1.tgz", + "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", + "dev": true, + "optional": true + }, "node_modules/pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmmirror.com/pseudomap/-/pseudomap-1.0.2.tgz", @@ -12121,6 +12294,13 @@ } } }, + "node_modules/sax": { + "version": "1.2.4", + "resolved": "https://registry.npmmirror.com/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true, + "optional": true + }, "node_modules/schema-utils": { "version": "2.7.1", "resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-2.7.1.tgz", @@ -18800,6 +18980,15 @@ "resolved": "https://registry.npmmirror.com/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, + "copy-anything": { + "version": "2.0.6", + "resolved": "https://registry.npmmirror.com/copy-anything/-/copy-anything-2.0.6.tgz", + "integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==", + "dev": true, + "requires": { + "is-what": "^3.14.1" + } + }, "copy-webpack-plugin": { "version": "9.1.0", "resolved": "https://registry.npmmirror.com/copy-webpack-plugin/-/copy-webpack-plugin-9.1.0.tgz", @@ -19549,6 +19738,16 @@ "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", "dev": true }, + "errno": { + "version": "0.1.8", + "resolved": "https://registry.npmmirror.com/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "dev": true, + "optional": true, + "requires": { + "prr": "~1.0.1" + } + }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmmirror.com/error-ex/-/error-ex-1.3.2.tgz", @@ -21137,6 +21336,13 @@ "resolved": "https://registry.npmmirror.com/ignore/-/ignore-5.2.4.tgz", "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==" }, + "image-size": { + "version": "0.5.5", + "resolved": "https://registry.npmmirror.com/image-size/-/image-size-0.5.5.tgz", + "integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==", + "dev": true, + "optional": true + }, "import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmmirror.com/import-fresh/-/import-fresh-3.3.0.tgz", @@ -21424,6 +21630,12 @@ "call-bind": "^1.0.2" } }, + "is-what": { + "version": "3.14.1", + "resolved": "https://registry.npmmirror.com/is-what/-/is-what-3.14.1.tgz", + "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==", + "dev": true + }, "is-wsl": { "version": "2.2.0", "resolved": "https://registry.npmmirror.com/is-wsl/-/is-wsl-2.2.0.tgz", @@ -21722,6 +21934,58 @@ "launch-editor": "^2.6.0" } }, + "less": { + "version": "4.1.3", + "resolved": "https://registry.npmmirror.com/less/-/less-4.1.3.tgz", + "integrity": "sha512-w16Xk/Ta9Hhyei0Gpz9m7VS8F28nieJaL/VyShID7cYvP6IL5oHeL6p4TXSDJqZE/lNv0oJ2pGVjJsRkfwm5FA==", + "dev": true, + "requires": { + "copy-anything": "^2.0.1", + "errno": "^0.1.1", + "graceful-fs": "^4.1.2", + "image-size": "~0.5.0", + "make-dir": "^2.1.0", + "mime": "^1.4.1", + "needle": "^3.1.0", + "parse-node-version": "^1.0.1", + "source-map": "~0.6.0", + "tslib": "^2.3.0" + }, + "dependencies": { + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "optional": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "optional": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "optional": true + } + } + }, + "less-loader": { + "version": "11.1.3", + "resolved": "https://registry.npmmirror.com/less-loader/-/less-loader-11.1.3.tgz", + "integrity": "sha512-A5b7O8dH9xpxvkosNrP0dFp2i/dISOJa9WwGF3WJflfqIERE2ybxh1BFDj5CovC2+jCE4M354mk90hN6ziXlVw==", + "dev": true, + "requires": {} + }, "levn": { "version": "0.4.1", "resolved": "https://registry.npmmirror.com/levn/-/levn-0.4.1.tgz", @@ -22580,6 +22844,40 @@ "resolved": "https://registry.npmmirror.com/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" }, + "needle": { + "version": "3.2.0", + "resolved": "https://registry.npmmirror.com/needle/-/needle-3.2.0.tgz", + "integrity": "sha512-oUvzXnyLiVyVGoianLijF9O/RecZUf7TkBfimjGrLM4eQhXyeJwM6GeAWccwfQ9aa4gMCZKqhAOuLaMIcQxajQ==", + "dev": true, + "optional": true, + "requires": { + "debug": "^3.2.6", + "iconv-lite": "^0.6.3", + "sax": "^1.2.4" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + } + } + }, "negotiator": { "version": "0.6.3", "resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-0.6.3.tgz", @@ -23292,6 +23590,12 @@ "lines-and-columns": "^1.1.6" } }, + "parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "dev": true + }, "parse5": { "version": "5.1.1", "resolved": "https://registry.npmmirror.com/parse5/-/parse5-5.1.1.tgz", @@ -24045,6 +24349,13 @@ "resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/prr/-/prr-1.0.1.tgz", + "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", + "dev": true, + "optional": true + }, "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmmirror.com/pseudomap/-/pseudomap-1.0.2.tgz", @@ -24442,6 +24753,13 @@ "neo-async": "^2.6.2" } }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmmirror.com/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true, + "optional": true + }, "schema-utils": { "version": "2.7.1", "resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-2.7.1.tgz", diff --git a/package.json b/package.json index ed74215..46d42e4 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,8 @@ "@vue/cli-service": "~5.0.0", "eslint": "^7.32.0", "eslint-plugin-vue": "^8.0.3", + "less": "^4.1.3", + "less-loader": "^11.1.3", "node-sass": "^9.0.0", "sass-loader": "^13.3.2", "vue-template-compiler": "^2.6.14" diff --git a/src/assets/styles/element-variables.scss b/src/assets/styles/element-variables.scss index b0311df..47d102d 100644 --- a/src/assets/styles/element-variables.scss +++ b/src/assets/styles/element-variables.scss @@ -89,4 +89,7 @@ $--font-path: '~element-ui/lib/theme-chalk/fonts'; } .el-avatar{ background-color: transparent; +} +.el-tag { + border-radius: 15px!important; } \ No newline at end of file diff --git a/src/components/Home/Header.vue b/src/components/Home/Header.vue index 29ba37f..bae7013 100644 --- a/src/components/Home/Header.vue +++ b/src/components/Home/Header.vue @@ -123,7 +123,7 @@ multiple>
将文件拖到此处,或点击上传
-
只能上传jpg/png文件,且不超过500kb
+
只能上传zip文件,且不超过50mb
@@ -204,7 +204,6 @@ export default { name: null, tags: [], tag: [], - fileList: [], content: null, }, rules: { @@ -320,44 +319,54 @@ export default { closeUploadFile(){ this.openPublishProject=false; this.openUploadFile=false; + window.location.reload(); }, submitProject(){ - if (this.form.tag) { - this.form.tag = this.form.tag.join(","); + if(this.avatar_url===null||this.form.name===null|| this.form.url===null||this.form.title===null||this.form.content===null||this.form.tag.length===0){ + Vue.prototype.$notify.error({ + title: '错误', + message: "请先填写相关信息!", + offset: 50 + }); + }else { + if (this.form.tag) { + this.form.tag = this.form.tag.join(","); + } + Object.assign({}, this.form); + var that=this; + axios({ + method: 'post', + // 请求的地址 + url: 'http://localhost:8082/helloGithub_war_exploded/commitProject', + // URL 中的查询参数 + params: { + projectIco:this.avatar_url, + projectName:this.form.name, + projectUrl:this.form.url, + projectTitle:this.form.title, + projectDescription:this.form.content, + categoryIdList:this.form.tag + } + }).then( (res)=> { + if(res.data.code===200){ + Vue.prototype.$notify({ + title: '成功', + message: ('i', {style: 'color: teal'}, res.data.msg), + type: 'success', + offset: 50 + }); + this.openPublishProject=false; + that.openUploadFile=true + }else{ + Vue.prototype.$notify.error({ + title: '错误', + message: res.data.msg, + offset: 50 + }); + } + }); } - Object.assign({}, this.form); - var that=this; - axios({ - method: 'post', - // 请求的地址 - url: 'http://localhost:8082/helloGithub_war_exploded/commitProject', - // URL 中的查询参数 - params: { - projectIco:this.avatar_url, - projectName:this.form.name, - projectUrl:this.form.url, - projectTitle:this.form.title, - projectDescription:this.form.content, - categoryIdList:this.form.tag - } - }).then( (res)=> { - if(res.data.code===200){ - Vue.prototype.$notify({ - title: '成功', - message: ('i', {style: 'color: teal'}, res.data.msg), - type: 'success', - offset: 50 - }); - this.openPublishProject=false; - that.openUploadFile=true - }else{ - Vue.prototype.$notify.error({ - title: '错误', - message: res.data.msg, - offset: 50 - }); - } - }); + }, isExist(){ axios({ diff --git a/src/components/Home/SearchInput.vue b/src/components/Home/SearchInput.vue index 4fc1ae4..f57d99c 100644 --- a/src/components/Home/SearchInput.vue +++ b/src/components/Home/SearchInput.vue @@ -17,7 +17,7 @@
{ + console.log(res.data.length); that.historySearch=res.data; }); diff --git a/src/components/Project/ProjectDetail.vue b/src/components/Project/ProjectDetail.vue index 10c4531..4bc92cd 100644 --- a/src/components/Project/ProjectDetail.vue +++ b/src/components/Project/ProjectDetail.vue @@ -51,7 +51,7 @@ 源码 官方下载 - 快速下载 + 快速下载 点 赞 {{startNum}} @@ -84,8 +84,8 @@ {{formatNumber(github.starNum)}} - {{briefName}} - {{brief}} + {{briefName}} + {{brief}} 是 否 {{formatNumber(github.subscribers_count)}} @@ -104,6 +104,7 @@ {{github.open_issues_count}} 是 + 否 {{github.default_branch}} {{formatNumber(github.forks_count)}} {{github.license}} @@ -117,7 +118,7 @@
- +
收录于: 第 {{periodicals}} 期 @@ -370,7 +371,7 @@ export default { totalStar:3.7, Content:'', imageUrl:'', - fileAddress:null, + fileAddress:'', } }, mounted() { @@ -378,7 +379,7 @@ export default { this.getLastComment(); this.isStart(); // this.getUserInfo(); - + this.getGithub(); }, watch: { $route () { @@ -445,6 +446,7 @@ export default { that.fileAddress=res.data.project.fileAddress; // that.userUri=res.data.project.userUri; that.getDetailByGitHub(); + // that.getGithub(); that.changeAvatarByLocal(); }); }, @@ -698,19 +700,25 @@ export default { } }).then((res)=>{ - that.github.starNum=res.data.stargazers_count; - that.github.language=res.data.language; - that.github.watchers_count=res.data.watchers_count; - that.github.subscribers_count=res.data.subscribers_count; - that.github.allow_forking=res.data.allow_forking; - that.github.open_issues_count=res.data.open_issues_count; - that.github.forks_count=res.data.forks_count; - that.github.organization=res.data.organization.type; - that.github.license=res.data.license.spdx_id; - that.github.name=res.data.name; - that.github.default_branch=res.data.default_branch; - that.github.avatar_url=res.data.owner.avatar_url; - that.saveGithubInfo(); + if(res.data){ + that.github.starNum=res.data.stargazers_count; + that.github.language=res.data.language; + that.github.watchers_count=res.data.watchers_count; + that.github.subscribers_count=res.data.subscribers_count; + that.github.allow_forking=res.data.allow_forking; + that.github.open_issues_count=res.data.open_issues_count; + that.github.forks_count=res.data.forks_count; + that.github.organization=res.data.owner.type; + that.github.license=res.data.license.spdx_id; + that.github.name=res.data.name; + that.github.default_branch=res.data.default_branch; + that.github.avatar_url=res.data.owner.avatar_url; + that.saveGithubInfo(); + return true; + }else{ + return false; + } + }); }, @@ -756,19 +764,24 @@ export default { }, changeAvatarByLocal(){ - var that=this; - axios({ - method: 'post', - // 请求的地址 - url: '/api/retUserAv', - // URL 中的查询参数 - params:{ - username:this.username, - }, - responseType:'blob' - }).then((res)=>{ - that.imageUrl = window.URL.createObjectURL(res.data)//这里也是关键,调用window的这个方法URL方法 - }) + if(this.username!==null){ + var that=this; + axios({ + method: 'post', + // 请求的地址 + url: '/api/retUserAv', + // URL 中的查询参数 + params:{ + username:this.username, + }, + responseType:'blob' + }).then((res)=>{ + that.imageUrl = window.URL.createObjectURL(res.data)//这里也是关键,调用window的这个方法URL方法 + }) + }else{ + return; + } + }, Download(){ @@ -790,7 +803,36 @@ export default { // type:"success" // }); // }) - } + }, + + getGithub(){ + var that=this; + axios({ + method: 'post', + // 请求的地址 + url: 'http://localhost:8082/helloGithub_war_exploded/returnGithubInfo', + // URL 中的查询参数 + params: { + projectId:this.$route.query.id + } + }).then(function (res) { + if(!res.data){ + return false; + }else{ + that.github.starNum=res.data.starCount; + that.github.language=res.data.mainLanguage; + that.github.subscribers_count=res.data.subscriber; + that.github.open_issues_count=res.data.issues; + that.github.forks_count=res.data.forks; + that.github.allow_forking=res.data.isActive; + that.github.license=res.data.protocol; + that.github.name=res.data.name; + that.github.default_branch=res.data.defaultBranch; + that.github.avatar_url=res.data.avatar; + } + + }); + }, }, diff --git a/src/components/System/AdminAside.vue b/src/components/System/AdminAside.vue new file mode 100644 index 0000000..b0ce276 --- /dev/null +++ b/src/components/System/AdminAside.vue @@ -0,0 +1,71 @@ + + + + + \ No newline at end of file diff --git a/src/components/System/AdminHeader.vue b/src/components/System/AdminHeader.vue new file mode 100644 index 0000000..5f995ef --- /dev/null +++ b/src/components/System/AdminHeader.vue @@ -0,0 +1,71 @@ + + + + + \ No newline at end of file diff --git a/src/components/System/AdminHome.vue b/src/components/System/AdminHome.vue new file mode 100644 index 0000000..3744871 --- /dev/null +++ b/src/components/System/AdminHome.vue @@ -0,0 +1,31 @@ + + + + + \ No newline at end of file diff --git a/src/components/System/AdminLogin.vue b/src/components/System/AdminLogin.vue index f2c133f..83467bb 100644 --- a/src/components/System/AdminLogin.vue +++ b/src/components/System/AdminLogin.vue @@ -1,24 +1,143 @@ \ No newline at end of file diff --git a/src/components/System/AdminTags.vue b/src/components/System/AdminTags.vue new file mode 100644 index 0000000..ede639c --- /dev/null +++ b/src/components/System/AdminTags.vue @@ -0,0 +1,22 @@ + + + + + \ No newline at end of file diff --git a/src/components/System/BreadCrumb.vue b/src/components/System/BreadCrumb.vue new file mode 100644 index 0000000..7b5fd74 --- /dev/null +++ b/src/components/System/BreadCrumb.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/src/components/System/Manage/articleManage.vue b/src/components/System/Manage/articleManage.vue new file mode 100644 index 0000000..a8d9d23 --- /dev/null +++ b/src/components/System/Manage/articleManage.vue @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/src/components/System/Manage/categoryManage.vue b/src/components/System/Manage/categoryManage.vue new file mode 100644 index 0000000..5119b22 --- /dev/null +++ b/src/components/System/Manage/categoryManage.vue @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/src/components/System/Manage/commentManage.vue b/src/components/System/Manage/commentManage.vue new file mode 100644 index 0000000..fdb24bf --- /dev/null +++ b/src/components/System/Manage/commentManage.vue @@ -0,0 +1,15 @@ + + + + + \ No newline at end of file diff --git a/src/components/System/Manage/projectManage.vue b/src/components/System/Manage/projectManage.vue new file mode 100644 index 0000000..1117461 --- /dev/null +++ b/src/components/System/Manage/projectManage.vue @@ -0,0 +1,15 @@ + + + + + \ No newline at end of file diff --git a/src/components/System/Manage/systemManage.vue b/src/components/System/Manage/systemManage.vue new file mode 100644 index 0000000..5eee529 --- /dev/null +++ b/src/components/System/Manage/systemManage.vue @@ -0,0 +1,15 @@ + + + + + \ No newline at end of file diff --git a/src/components/System/Manage/userManage.vue b/src/components/System/Manage/userManage.vue new file mode 100644 index 0000000..b595c66 --- /dev/null +++ b/src/components/System/Manage/userManage.vue @@ -0,0 +1,15 @@ + + + + + \ No newline at end of file diff --git a/src/main.js b/src/main.js index 9085b18..a87c4f9 100644 --- a/src/main.js +++ b/src/main.js @@ -6,6 +6,7 @@ import './assets/styles/element-variables.scss' import axios from "axios"; import './assets/icon/iconfont.css' import store from './store' + import * as echarts from 'echarts';//引入echarts Vue.prototype.$echarts = echarts //引入组件 diff --git a/src/router/index.js b/src/router/index.js index b18b00c..29f6f71 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -11,6 +11,15 @@ import UserInfoPage from "@/components/User/UserInfoPage.vue"; import ProjectDetail from "@/components/Project/ProjectDetail.vue"; import ArticleDetail from "@/components/Paper/ArticleDetail.vue"; import adminLogin from "@/components/System/AdminLogin.vue"; +import systemIndex from "@/views/systemIndex.vue"; +import AdminHome from "@/components/System/AdminHome.vue"; +import systemManage from "@/components/System/Manage/systemManage.vue"; +import userManage from "@/components/System/Manage/userManage.vue"; +import projectManage from "@/components/System/Manage/projectManage.vue"; +import commentManage from "@/components/System/Manage/commentManage.vue"; +import categoryManage from "@/components/System/Manage/categoryManage.vue"; +import articleManage from "@/components/System/Manage/articleManage.vue"; + const originalPush = VueRouter.prototype.push VueRouter.prototype.push = function push(location) { return originalPush.call(this, location).catch(err => err) @@ -79,14 +88,65 @@ const routes = [ path: '/adminLogin', name: 'adminLogin', component: adminLogin - } + }, { + path: '/systemIndex', + name: 'systemIndex', + component: systemIndex, + redirect: '/adminHome', + children: [ + { + path: '/adminHome', + name: 'adminHome', + meta: {title: '首页'}, + component: AdminHome + }, + { + path: '/systemManage', + meta: {title: '系统管理'}, + name: 'systemManage', + component: systemManage + }, + { + path: '/userManage', + name: 'userManage', + meta: {title: '用户管理'}, + component: userManage + }, + { + path: '/projectManage', + meta: {title: '项目管理'}, + name: 'projectManage', + component: projectManage + }, + { + path: '/commentManage', + name: 'commentManage', + meta: {title: '评论管理'}, + component: commentManage + }, + { + path: '/categoryManage', + name: 'categoryManage', + meta: {title: '标签管理'}, + + component: categoryManage + }, + { + path: '/articleManage', + meta: {title: '文章管理'}, + name: 'articleManage', + component: articleManage + }, + + ] + } ] const router = new VueRouter({ - mode:'history', + mode: 'history', routes }) diff --git a/src/store/index.js b/src/store/index.js index 583d20b..9fa075f 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1,21 +1,18 @@ -import Vue from 'vue' -import Vuex from 'vuex' +import Vue from "vue"; +import Vuex from 'vuex'; + Vue.use(Vuex) +// 创建Vuex实例并导出 export default new Vuex.Store({ - state: { - // CookieUserName:"" - }, - getters: { - }, - mutations: { - // saveCookieUserName(state,userName){ - // state.pathName = userName; - // }, - }, - actions: { - }, - modules: { - } -}) + state: { + isCollapse: false,//导航栏是否折叠 + }, + mutations: { + // 修改导航栏展开和收起的方法 + CollapseMenu(state) { + state.isCollapse = !state.isCollapse + }, + } +}) \ No newline at end of file diff --git a/src/views/systemIndex.vue b/src/views/systemIndex.vue new file mode 100644 index 0000000..b6fffa0 --- /dev/null +++ b/src/views/systemIndex.vue @@ -0,0 +1,37 @@ + + + + + \ No newline at end of file diff --git a/vue.config.js b/vue.config.js index be33294..3341614 100644 --- a/vue.config.js +++ b/vue.config.js @@ -13,7 +13,7 @@ module.exports = { proxy: { '/github': { //后端接口的baseurl - target: 'https://api.github.com/repos', + target: 'https://api.landaiqing.space/repos', //是否允许跨域 changeOrigin: true, // ws: true, //是否代理 websockets