diff --git a/package-lock.json b/package-lock.json index 1add349d51f1d32c57f9034c017169c97d3df78a..8acaef26a8a24d3c2775932e147b39fc596b2590 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.1.0", "dependencies": { "@ant-design/icons-vue": "^6.1.0", + "@element-plus/icons-vue": "^2.1.0", "@kangc/v-md-editor": "^2.3.15", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.12", @@ -17,8 +18,11 @@ "axios": "^1.3.4", "core-js": "^3.8.3", "element-plus": "^2.2.34", + "emoji-mart-vue-fast": "^12.0.1", + "js-cookie": "^3.0.1", "mitt": "^3.0.0", "register-service-worker": "^1.7.2", + "socket.io-client": "2.3.0", "vue": "^3.2.13", "vue-i18n": "^9.2.2", "vue-router": "4.0.4", @@ -28,6 +32,7 @@ "@commitlint/cli": "^17.4.4", "@commitlint/config-conventional": "^17.4.4", "@types/jest": "^27.0.1", + "@types/js-cookie": "^3.0.3", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", "@vue/cli-plugin-babel": "~5.0.0", @@ -4196,6 +4201,12 @@ "pretty-format": "^27.0.0" } }, + "node_modules/@types/js-cookie": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/@types/js-cookie/-/js-cookie-3.0.3.tgz", + "integrity": "sha512-Xe7IImK09HP1sv2M/aI+48a20VX+TdRJucfq4vfRVy6nWN8PYPOEnlMRSgxJAgYQIXJVL8dZ4/ilAM7dWNaOww==", + "dev": true + }, "node_modules/@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.11.tgz", @@ -6454,6 +6465,11 @@ "node": ">= 10.0.0" } }, + "node_modules/after": { + "version": "0.8.2", + "resolved": "https://registry.npmmirror.com/after/-/after-0.8.2.tgz", + "integrity": "sha512-QbJ0NTQ/I9DI3uSJA4cbexiwQeRAfjPScqIbSjUDd9TOrcg6pTkdgziesOqxBMBzit8vFCTwrP27t13vFOORRA==" + }, "node_modules/agent-base": { "version": "6.0.2", "resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-6.0.2.tgz", @@ -6772,6 +6788,11 @@ "node": ">=0.10.0" } }, + "node_modules/arraybuffer.slice": { + "version": "0.0.7", + "resolved": "https://registry.npmmirror.com/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", + "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==" + }, "node_modules/arrify": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/arrify/-/arrify-1.0.1.tgz", @@ -6815,6 +6836,11 @@ "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", "dev": true }, + "node_modules/async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" + }, "node_modules/async-validator": { "version": "4.2.5", "resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-4.2.5.tgz", @@ -7123,6 +7149,11 @@ "@babel/core": "^7.0.0" } }, + "node_modules/backo2": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/backo2/-/backo2-1.0.2.tgz", + "integrity": "sha512-zj6Z6M7Eq+PBZ7PQxl5NT665MvJdAkzp0f60nAJ+sLaSCBPMwVak5ZegFbgVCzFcCJTKFoMizvM5Ld7+JrRJHA==" + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz", @@ -7156,6 +7187,14 @@ "node": ">=0.10.0" } }, + "node_modules/base64-arraybuffer": { + "version": "0.1.5", + "resolved": "https://registry.npmmirror.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", + "integrity": "sha512-437oANT9tP582zZMwSvZGy2nmSeAb8DW2me3y+Uv1Wp2Rulr8Mqlyrv3E7MLxmsiaPSMMDmiDVzgE+e8zlMx9g==", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz", @@ -7168,6 +7207,17 @@ "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", "dev": true }, + "node_modules/better-assert": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/better-assert/-/better-assert-1.0.2.tgz", + "integrity": "sha512-bYeph2DFlpK1XmGs6fvlLRUN29QISM3GBuUwSFsMY2XRx4AvC0WNCS57j4c/xGrK2RS24C1w3YoBOsw9fT46tQ==", + "dependencies": { + "callsite": "1.0.0" + }, + "engines": { + "node": "*" + } + }, "node_modules/big.js": { "version": "5.2.2", "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz", @@ -7197,6 +7247,11 @@ "readable-stream": "^3.4.0" } }, + "node_modules/blob": { + "version": "0.0.5", + "resolved": "https://registry.npmmirror.com/blob/-/blob-0.0.5.tgz", + "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==" + }, "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmmirror.com/bluebird/-/bluebird-3.7.2.tgz", @@ -7421,6 +7476,14 @@ "resolved": "https://registry.npmmirror.com/call-me-maybe/-/call-me-maybe-1.0.2.tgz", "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==" }, + "node_modules/callsite": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/callsite/-/callsite-1.0.0.tgz", + "integrity": "sha512-0vdNRFXn5q+dtOqjfFtmtlI9N2eVZ7LMyEV2iKC5mEEFvSg/69Ml6b/WU2qF8W1nLRa0wiSrDT3Y5jOHZCwKPQ==", + "engines": { + "node": "*" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmmirror.com/callsites/-/callsites-3.1.0.tgz", @@ -8028,11 +8091,21 @@ "dot-prop": "^5.1.0" } }, + "node_modules/component-bind": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/component-bind/-/component-bind-1.0.0.tgz", + "integrity": "sha512-WZveuKPeKAG9qY+FkYDeADzdHyTYdIboXS59ixDeRJL5ZhxpqUnxSOwop4FQjMsiYm3/Or8cegVbpAHNA7pHxw==" + }, "node_modules/component-emitter": { "version": "1.3.0", "resolved": "https://registry.npmmirror.com/component-emitter/-/component-emitter-1.3.0.tgz", "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" }, + "node_modules/component-inherit": { + "version": "0.0.3", + "resolved": "https://registry.npmmirror.com/component-inherit/-/component-inherit-0.0.3.tgz", + "integrity": "sha512-w+LhYREhatpVqTESyGFg3NlP6Iu0kEKUHETY9GoZP/pQyW4mHFZuFWRUCIqVPZ36ueVLtoOEZaAqbCF2RDndaA==" + }, "node_modules/compressible": { "version": "2.0.18", "resolved": "https://registry.npmmirror.com/compressible/-/compressible-2.0.18.tgz", @@ -10203,6 +10276,18 @@ "node": ">=10" } }, + "node_modules/emoji-mart-vue-fast": { + "version": "12.0.1", + "resolved": "https://registry.npmmirror.com/emoji-mart-vue-fast/-/emoji-mart-vue-fast-12.0.1.tgz", + "integrity": "sha512-qO8F9aduHwPGEU2U1YobOH3lRXEMvrjej6KdhGMnSoMJ+OFSmNf+pUal/MbrEn0RUy+Uqc7U9sPopA+3ipK4+g==", + "dependencies": { + "@babel/runtime": "^7.18.6", + "core-js": "^3.23.5" + }, + "peerDependencies": { + "vue": ">2.0.0" + } + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -10243,6 +10328,75 @@ "node": ">= 0.11.14" } }, + "node_modules/engine.io-client": { + "version": "3.4.4", + "resolved": "https://registry.npmmirror.com/engine.io-client/-/engine.io-client-3.4.4.tgz", + "integrity": "sha512-iU4CRr38Fecj8HoZEnFtm2EiKGbYZcPn3cHxqNGl/tmdWRf60KhK+9vE0JeSjgnlS/0oynEfLgKbT9ALpim0sQ==", + "dependencies": { + "component-emitter": "~1.3.0", + "component-inherit": "0.0.3", + "debug": "~3.1.0", + "engine.io-parser": "~2.2.0", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "parseqs": "0.0.6", + "parseuri": "0.0.6", + "ws": "~6.1.0", + "xmlhttprequest-ssl": "~1.5.4", + "yeast": "0.1.2" + } + }, + "node_modules/engine.io-client/node_modules/debug": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/engine.io-client/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/engine.io-client/node_modules/parseqs": { + "version": "0.0.6", + "resolved": "https://registry.npmmirror.com/parseqs/-/parseqs-0.0.6.tgz", + "integrity": "sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w==" + }, + "node_modules/engine.io-client/node_modules/parseuri": { + "version": "0.0.6", + "resolved": "https://registry.npmmirror.com/parseuri/-/parseuri-0.0.6.tgz", + "integrity": "sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow==" + }, + "node_modules/engine.io-client/node_modules/ws": { + "version": "6.1.4", + "resolved": "https://registry.npmmirror.com/ws/-/ws-6.1.4.tgz", + "integrity": "sha512-eqZfL+NE/YQc1/ZynhojeV8q+H050oR8AZ2uIev7RU10svA9ZnJUddHcOUZTJLinZ9yEfdA2kSATS2qZK5fhJA==", + "dependencies": { + "async-limiter": "~1.0.0" + } + }, + "node_modules/engine.io-parser": { + "version": "2.2.1", + "resolved": "https://registry.npmmirror.com/engine.io-parser/-/engine.io-parser-2.2.1.tgz", + "integrity": "sha512-x+dN/fBH8Ro8TFwJ+rkB2AmuVw9Yu2mockR/p3W8f8YtExwFgDvBDi0GWyb4ZLkpahtDGZgtr3zLovanJghPqg==", + "dependencies": { + "after": "0.8.2", + "arraybuffer.slice": "~0.0.7", + "base64-arraybuffer": "0.1.4", + "blob": "0.0.5", + "has-binary2": "~1.0.2" + } + }, + "node_modules/engine.io-parser/node_modules/base64-arraybuffer": { + "version": "0.1.4", + "resolved": "https://registry.npmmirror.com/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz", + "integrity": "sha512-a1eIFi4R9ySrbiMuyTGx5e92uRH5tQY6kArNcFaKBUleIoLjdjBg7Zxm3Mqm3Kmkf27HLR/1fnxX9q8GQ7Iavg==", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/enhanced-resolve": { "version": "5.12.0", "resolved": "https://registry.npmmirror.com/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", @@ -12469,6 +12623,24 @@ "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true }, + "node_modules/has-binary2": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-binary2/-/has-binary2-1.0.3.tgz", + "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", + "dependencies": { + "isarray": "2.0.1" + } + }, + "node_modules/has-binary2/node_modules/isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha512-c2cu3UxbI+b6kR3fy0nRnAhodsvR9dx7U5+znCOzdj6IfP3upFURTr0Xl5BlQZNKZjEtxrmVyfSdeE3O57smoQ==" + }, + "node_modules/has-cors": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/has-cors/-/has-cors-1.1.0.tgz", + "integrity": "sha512-g5VNKdkFuUuVCP9gYfDJHjK2nqdQJ7aDLTnycnc2+RvsOQbuLdF5pm7vuE5J76SEBIQjs4kQY/BWq74JUmjbXA==" + }, "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-3.0.0.tgz", @@ -12984,6 +13156,11 @@ "node": ">=8" } }, + "node_modules/indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmmirror.com/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg==" + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmmirror.com/inflight/-/inflight-1.0.6.tgz", @@ -16093,6 +16270,14 @@ "node": ">=10" } }, + "node_modules/js-cookie": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/js-cookie/-/js-cookie-3.0.1.tgz", + "integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==", + "engines": { + "node": ">=12" + } + }, "node_modules/js-message": { "version": "1.0.7", "resolved": "https://registry.npmmirror.com/js-message/-/js-message-1.0.7.tgz", @@ -18058,6 +18243,11 @@ "node": ">=0.10.0" } }, + "node_modules/object-component": { + "version": "0.0.3", + "resolved": "https://registry.npmmirror.com/object-component/-/object-component-0.0.3.tgz", + "integrity": "sha512-S0sN3agnVh2SZNEIGc0N1X4Z5K0JeFbGBrnuZpsxuUh5XLF0BnvWkMjRXo/zGKLd/eghvNIKcx1pQkmUjXIyrA==" + }, "node_modules/object-copy": { "version": "0.1.0", "resolved": "https://registry.npmmirror.com/object-copy/-/object-copy-0.1.0.tgz", @@ -18544,6 +18734,22 @@ "parse5": "^6.0.1" } }, + "node_modules/parseqs": { + "version": "0.0.5", + "resolved": "https://registry.npmmirror.com/parseqs/-/parseqs-0.0.5.tgz", + "integrity": "sha512-B3Nrjw2aL7aI4TDujOzfA4NsEc4u1lVcIRE0xesutH8kjeWF70uk+W5cBlIQx04zUH9NTBvuN36Y9xLRPK6Jjw==", + "dependencies": { + "better-assert": "~1.0.0" + } + }, + "node_modules/parseuri": { + "version": "0.0.5", + "resolved": "https://registry.npmmirror.com/parseuri/-/parseuri-0.0.5.tgz", + "integrity": "sha512-ijhdxJu6l5Ru12jF0JvzXVPvsC+VibqeaExlNoMhWN6VQ79PGjkmc7oA4W1lp00sFkNyj0fx6ivPLdV51/UMog==", + "dependencies": { + "better-assert": "~1.0.0" + } + }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmmirror.com/parseurl/-/parseurl-1.3.3.tgz", @@ -20851,6 +21057,69 @@ "node": ">=0.10.0" } }, + "node_modules/socket.io-client": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/socket.io-client/-/socket.io-client-2.3.0.tgz", + "integrity": "sha512-cEQQf24gET3rfhxZ2jJ5xzAOo/xhZwK+mOqtGRg5IowZsMgwvHwnf/mCRapAAkadhM26y+iydgwsXGObBB5ZdA==", + "dependencies": { + "backo2": "1.0.2", + "base64-arraybuffer": "0.1.5", + "component-bind": "1.0.0", + "component-emitter": "1.2.1", + "debug": "~4.1.0", + "engine.io-client": "~3.4.0", + "has-binary2": "~1.0.2", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "object-component": "0.0.3", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "socket.io-parser": "~3.3.0", + "to-array": "0.1.4" + } + }, + "node_modules/socket.io-client/node_modules/component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha512-jPatnhd33viNplKjqXKRkGU345p263OIWzDL2wH3LGIGp5Kojo+uXizHmOADRvhGFFTnJqX3jBAKP6vvmSDKcA==" + }, + "node_modules/socket.io-client/node_modules/debug": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/socket.io-parser": { + "version": "3.3.3", + "resolved": "https://registry.npmmirror.com/socket.io-parser/-/socket.io-parser-3.3.3.tgz", + "integrity": "sha512-qOg87q1PMWWTeO01768Yh9ogn7chB9zkKtQnya41Y355S0UmpXgpcrFwAgjYJxu9BdKug5r5e9YtVSeWhKBUZg==", + "dependencies": { + "component-emitter": "~1.3.0", + "debug": "~3.1.0", + "isarray": "2.0.1" + } + }, + "node_modules/socket.io-parser/node_modules/debug": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/socket.io-parser/node_modules/isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha512-c2cu3UxbI+b6kR3fy0nRnAhodsvR9dx7U5+znCOzdj6IfP3upFURTr0Xl5BlQZNKZjEtxrmVyfSdeE3O57smoQ==" + }, + "node_modules/socket.io-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, "node_modules/sockjs": { "version": "0.3.24", "resolved": "https://registry.npmmirror.com/sockjs/-/sockjs-0.3.24.tgz", @@ -21846,6 +22115,11 @@ "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", "dev": true }, + "node_modules/to-array": { + "version": "0.1.4", + "resolved": "https://registry.npmmirror.com/to-array/-/to-array-0.1.4.tgz", + "integrity": "sha512-LhVdShQD/4Mk4zXNroIQZJC+Ap3zgLcDuwEdcmLv9CCO73NWockQDwyUnW/m8VX/EElfL6FcYx7EeutN4HJA6A==" + }, "node_modules/to-arraybuffer": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", @@ -24028,6 +24302,14 @@ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true }, + "node_modules/xmlhttprequest-ssl": { + "version": "1.5.5", + "resolved": "https://registry.npmmirror.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", + "integrity": "sha512-/bFPLUgJrfGUL10AIv4Y7/CUt6so9CLtB/oFxQSHseSDNNCdC6vwwKEqwLN6wNPBg9YWXAiMu8jkf6RPRS/75Q==", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/xregexp": { "version": "2.0.0", "resolved": "https://registry.npmmirror.com/xregexp/-/xregexp-2.0.0.tgz", @@ -24109,6 +24391,11 @@ "node": ">=10" } }, + "node_modules/yeast": { + "version": "0.1.2", + "resolved": "https://registry.npmmirror.com/yeast/-/yeast-0.1.2.tgz", + "integrity": "sha512-8HFIh676uyGYP6wP13R/j6OJ/1HwJ46snpvzE7aHAN3Ryqh2yX6Xox2B4CUmTwwOIzlG3Bs7ocsP5dZH/R1Qbg==" + }, "node_modules/yn": { "version": "3.1.1", "resolved": "https://registry.npmmirror.com/yn/-/yn-3.1.1.tgz", diff --git a/package.json b/package.json index 3d501a1df3f23945d2f4280b6acf4cd5e7152835..5d57aa43b9f9415a7507c4afb9ee3de0660a9ca3 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ }, "dependencies": { "@ant-design/icons-vue": "^6.1.0", + "@element-plus/icons-vue": "^2.1.0", "@kangc/v-md-editor": "^2.3.15", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.12", @@ -21,6 +22,8 @@ "axios": "^1.3.4", "core-js": "^3.8.3", "element-plus": "^2.2.34", + "emoji-mart-vue-fast": "^12.0.1", + "js-cookie": "^3.0.1", "mitt": "^3.0.0", "register-service-worker": "^1.7.2", "socket.io-client": "2.3.0", @@ -33,6 +36,7 @@ "@commitlint/cli": "^17.4.4", "@commitlint/config-conventional": "^17.4.4", "@types/jest": "^27.0.1", + "@types/js-cookie": "^3.0.3", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", "@vue/cli-plugin-babel": "~5.0.0", diff --git a/src/App.vue b/src/App.vue index 23ac8f526934a6527b9f67f10af2d6b791dbc979..8625fadc202373b02c3bb3c06bc039990c381065 100644 --- a/src/App.vue +++ b/src/App.vue @@ -26,6 +26,10 @@ export default defineComponent({ list-style: none; text-decoration: none; } +.box { + background: #fff; + height: auto; +} .sbox, #app, body, diff --git a/src/assets/img/author.png b/src/assets/img/author.png new file mode 100644 index 0000000000000000000000000000000000000000..4f205cbc5bb44994aa936fbf60bf4edf6bdef558 Binary files /dev/null and b/src/assets/img/author.png differ diff --git a/src/assets/img/demo_comment.gif b/src/assets/img/demo_comment.gif new file mode 100644 index 0000000000000000000000000000000000000000..e16c222573105ca451709e25b5ea6fef9f9eb837 Binary files /dev/null and b/src/assets/img/demo_comment.gif differ diff --git a/src/assets/img/emoji_sprite.png b/src/assets/img/emoji_sprite.png new file mode 100644 index 0000000000000000000000000000000000000000..f9eae1b0254836e5284853ee5d6f966ed2885a9a Binary files /dev/null and b/src/assets/img/emoji_sprite.png differ diff --git a/src/assets/img/face_logo.png b/src/assets/img/face_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..98d9c517336ac9e53ca995931b4912f02160cf19 Binary files /dev/null and b/src/assets/img/face_logo.png differ diff --git a/src/assets/img/heading.jpg b/src/assets/img/heading.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3297da375a26c12ddba075a0e20f3f3cd93e5103 Binary files /dev/null and b/src/assets/img/heading.jpg differ diff --git a/src/assets/imgs/emoji/grinning-face_1f600 (1).png b/src/assets/imgs/emoji/grinning-face_1f600 (1).png new file mode 100644 index 0000000000000000000000000000000000000000..59ac6f0e0980180d474a730740a321eb636753b8 Binary files /dev/null and b/src/assets/imgs/emoji/grinning-face_1f600 (1).png differ diff --git a/src/assets/imgs/emoji/grinning-face_1f600 (2).png b/src/assets/imgs/emoji/grinning-face_1f600 (2).png new file mode 100644 index 0000000000000000000000000000000000000000..b2df24a2239cecadb08cb7418a15a7de5733afb9 Binary files /dev/null and b/src/assets/imgs/emoji/grinning-face_1f600 (2).png differ diff --git a/src/assets/imgs/emoji/grinning-face_1f600 (3).png b/src/assets/imgs/emoji/grinning-face_1f600 (3).png new file mode 100644 index 0000000000000000000000000000000000000000..6002e57390d4c5fe122f3f23de5c550bcf7dc5a8 Binary files /dev/null and b/src/assets/imgs/emoji/grinning-face_1f600 (3).png differ diff --git a/src/assets/imgs/emoji/grinning-face_1f600 (4).png b/src/assets/imgs/emoji/grinning-face_1f600 (4).png new file mode 100644 index 0000000000000000000000000000000000000000..1b86d1e4c511fad12ceee63664c727f11b97dffd Binary files /dev/null and b/src/assets/imgs/emoji/grinning-face_1f600 (4).png differ diff --git a/src/assets/imgs/emoji/grinning-face_1f600 (5).png b/src/assets/imgs/emoji/grinning-face_1f600 (5).png new file mode 100644 index 0000000000000000000000000000000000000000..9441146b04b6036ef4da24bfa430973bcdf15e2c Binary files /dev/null and b/src/assets/imgs/emoji/grinning-face_1f600 (5).png differ diff --git a/src/assets/imgs/emoji/grinning-face_1f600 (6).png b/src/assets/imgs/emoji/grinning-face_1f600 (6).png new file mode 100644 index 0000000000000000000000000000000000000000..11188f69fbdfa494c4a4aae8b08dfcbf23a86fe4 Binary files /dev/null and b/src/assets/imgs/emoji/grinning-face_1f600 (6).png differ diff --git a/src/assets/imgs/emoji/grinning-face_1f600 (7).png b/src/assets/imgs/emoji/grinning-face_1f600 (7).png new file mode 100644 index 0000000000000000000000000000000000000000..108e11b453c4c506fa3d0fabacdd5f757badeed0 Binary files /dev/null and b/src/assets/imgs/emoji/grinning-face_1f600 (7).png differ diff --git a/src/assets/imgs/emoji/grinning-face_1f600.png b/src/assets/imgs/emoji/grinning-face_1f600.png new file mode 100644 index 0000000000000000000000000000000000000000..91c868daab6b2583a3352d10c3e147f7ca09218e Binary files /dev/null and b/src/assets/imgs/emoji/grinning-face_1f600.png differ diff --git a/src/components/HomeSidebar.vue b/src/components/HomeSidebar.vue new file mode 100644 index 0000000000000000000000000000000000000000..29970153a1e982307825be506447976f144020b7 --- /dev/null +++ b/src/components/HomeSidebar.vue @@ -0,0 +1,273 @@ + + + + + diff --git a/src/components/Nav.vue b/src/components/Nav.vue new file mode 100644 index 0000000000000000000000000000000000000000..ab797e8b600cb1492c355e7011a62ce223880cea --- /dev/null +++ b/src/components/Nav.vue @@ -0,0 +1,45 @@ + + + + + diff --git a/src/components/VIewLogin.vue b/src/components/VIewLogin.vue index dd1bbcb04ac9987e85d41b882494d20085f20d8e..f16b8fa57d88e827705d84ec89adcf19dca4630d 100644 --- a/src/components/VIewLogin.vue +++ b/src/components/VIewLogin.vue @@ -51,6 +51,11 @@ /> Forgot your password? + + 第三方登录 @@ -81,7 +86,7 @@ import router from '@/router' import { useI18n } from 'vue-i18n' import i18n from '@/i18n' import axios from 'axios' -const route = useRoute() + interface newUser { user: string pasd: string @@ -126,9 +131,11 @@ export default defineComponent({ identifyCodes: '0123456789abcdwerwshdjeJKDHRJHKOOPLMKQ', emm: '' }) + const route = useRoute() onMounted(() => { - // login(); - console.log('state.newList', state.newList) + disanfang(), + // login(); + console.log('state.newList', state.newList) }) const onSignInBtn = () => { @@ -141,8 +148,8 @@ export default defineComponent({ //登录接口 const login = async () => { - console.log('username:', state.user) - console.log('password:', state.pasd) + // console.log('username:', state.user) + // console.log('password:', state.pasd) const resp = await axios.post( 'https://creationapi.shbwyz.com/api/auth/login', { name: state.user, password: state.pasd } @@ -152,6 +159,10 @@ export default defineComponent({ localStorage.setItem('token', resp.data.data.token) localStorage.setItem('user', JSON.stringify(resp.data.data.role)) localStorage.setItem('username', `${resp.data.data.name}`) + localStorage.setItem( + 'imgurl', + `https://liu-yi-quan.oss-cn-beijing.aliyuncs.com/2023-03-10/2.jpg` + ) if (resp.status !== 200) { ElMessage.error('账号或密码错误,请重新输入') @@ -160,10 +171,29 @@ export default defineComponent({ message: `欢迎您${resp.data.data.name}`, type: 'success' }) + router.push('/home') // location.href = '/layout/workbench' } } + // console.log('route', route) + //第三方登录 + const disanfang = async () => { + if (route.query.code) { + // console.log('route', route.query.code) + const resp = await httpPost({ + url: '/api/thirdLogin', + data: { code: route.query.code } + }) + // console.log('resp', resp) + if (resp.data.statu === 200) { + localStorage.setItem('token', resp.data.token) + localStorage.setItem('username', `${resp.data.user.name}`) + localStorage.setItem('imgurl', `${resp.data.user.avatar_url}`) + router.push('/home') + } + } + } // const goLogin = () => { // HTTP.post('/api/user/register', { @@ -216,6 +246,7 @@ export default defineComponent({ lang.value = state.emm } return { + disanfang, btn, onSignInBtn, onSignUpBtn, diff --git a/src/components/allitem.vue b/src/components/allitem.vue index aaa689eaf7890951956e41471355d0023ffab2c0..2e2676ebbea9c1794893e869c95fa155f865894f 100644 --- a/src/components/allitem.vue +++ b/src/components/allitem.vue @@ -84,18 +84,22 @@ import store from '@/store' import { computed, defineComponent } from 'vue' import { fromNow } from '../utils/index.js' +import router from '@/router' export default defineComponent({ name: 'all-item', setup() { //推荐阅读内容 const get_recommend: any = computed(() => { - return store.state.recommend + return store.state.all_recommend }) - - console.log('get_recommend', get_recommend) + //跳详情 + const handleH4 = (id: any) => { + router.push(`/detail?id=${id}`) + } store.dispatch('fetch_recommend') return { + handleH4, get_recommend, fromNow } diff --git a/src/components/commentInputBox.vue b/src/components/commentInputBox.vue new file mode 100644 index 0000000000000000000000000000000000000000..59a0524506dcaa8ccf30ceb937c2520d52f30ece --- /dev/null +++ b/src/components/commentInputBox.vue @@ -0,0 +1,167 @@ + + + + diff --git a/src/components/commentlist.vue b/src/components/commentlist.vue new file mode 100644 index 0000000000000000000000000000000000000000..9e0338ff7a3884bdda7e5406090437e12b32df00 --- /dev/null +++ b/src/components/commentlist.vue @@ -0,0 +1,172 @@ + + + diff --git a/src/components/emotion.vue b/src/components/emotion.vue new file mode 100644 index 0000000000000000000000000000000000000000..13d4d0d58f47265f8835daba8b7f24672593334e --- /dev/null +++ b/src/components/emotion.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/src/components/publish-comment/index.vue b/src/components/publish-comment/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..c5c9c6ebfc8718d117ac6e30354f8a44944ffe9c --- /dev/null +++ b/src/components/publish-comment/index.vue @@ -0,0 +1,82 @@ + + + + + + + + diff --git a/src/hooks/detaiil.ts b/src/hooks/detaiil.ts new file mode 100644 index 0000000000000000000000000000000000000000..26bc535af1e21fc882f26b08f60f2723dc419974 --- /dev/null +++ b/src/hooks/detaiil.ts @@ -0,0 +1,17 @@ +import axios from 'axios' +const useDetail = () => { + // 获取评论 + const getcomment = async (val: string, data: any): Promise => { + return await axios.get( + `https://creation.shbwyz.com/api/comment/host/${val}`, + { + params: { + ...data + } + } + ) + } + + return { getcomment } +} +export default useDetail diff --git a/src/hooks/index.ts b/src/hooks/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..08aed01dd6cebff0100fccc53d6f8019479f7ab1 --- /dev/null +++ b/src/hooks/index.ts @@ -0,0 +1 @@ +export { default as useDetail } from './detaiil' diff --git a/src/hooks/useI18nChange.ts b/src/hooks/useI18nChange.ts index 83303b1c911d7e7ba9b43b698357a2f54a7f1cf5..cc8d46ffb40d7c5e47324b3da159e42d8abf4ab1 100644 --- a/src/hooks/useI18nChange.ts +++ b/src/hooks/useI18nChange.ts @@ -11,7 +11,8 @@ const messages = { search: '搜索', login: '登录', register: '注册', - write: '写文章' + write: '写文章', + msg: '消息' } }, @@ -25,7 +26,8 @@ const messages = { search: 'search', login: 'Sign in', register: 'register', - write: 'write' + write: 'write', + msg: 'messages' } }, ja: { @@ -38,7 +40,8 @@ const messages = { search: '検索けんさく', login: 'ログイン', register: '登録', - write: '小論を書く' + write: '小論を書く', + msg: 'xiaoxi' } } } diff --git a/src/i18n/langauage.ts b/src/i18n/langauage.ts index 4dc72b0df227f7cd01ccf61aabfa33fe8dbf43d1..dab7a5b8547f066df15124932933727461ea6bd8 100644 --- a/src/i18n/langauage.ts +++ b/src/i18n/langauage.ts @@ -17,7 +17,9 @@ export const messages = { search: '搜索', login: '登录', register: '注册', - write: '写文章' + write: '写文章', + msg: '消息', + DayAndNight: '昼夜切换' } }, @@ -31,7 +33,9 @@ export const messages = { search: 'search', login: 'Sign in', register: 'register', - write: 'write' + write: 'write', + msg: 'message', + DayAndNight: 'day and night' } }, ja: { @@ -44,7 +48,9 @@ export const messages = { search: '検索けんさく', login: 'ログイン', register: '登録', - write: '小論を書く' + write: '小論を書く', + msg: 'xiaoxi', + DayAndNight: '嘿白' } } } diff --git a/src/img/QRcode.png b/src/img/QRcode.png new file mode 100644 index 0000000000000000000000000000000000000000..288c1888c23a11f1255a6a27d9d0c669882468f5 Binary files /dev/null and b/src/img/QRcode.png differ diff --git a/src/img/homeA.png b/src/img/homeA.png new file mode 100644 index 0000000000000000000000000000000000000000..3d8d412381aa6a5e6a3769db253b74559c78f286 Binary files /dev/null and b/src/img/homeA.png differ diff --git a/src/img/homeB.png b/src/img/homeB.png new file mode 100644 index 0000000000000000000000000000000000000000..aa52931010db1282bf358dbf2fa01a593f715813 Binary files /dev/null and b/src/img/homeB.png differ diff --git a/src/img/homeC.png b/src/img/homeC.png new file mode 100644 index 0000000000000000000000000000000000000000..833376679c0aae04ffa21b87553f74f2331a1df3 Binary files /dev/null and b/src/img/homeC.png differ diff --git a/src/img/homeD.png b/src/img/homeD.png new file mode 100644 index 0000000000000000000000000000000000000000..dabfcd439f1fa0bb94c0766fb7b55ea805085973 Binary files /dev/null and b/src/img/homeD.png differ diff --git a/src/main.ts b/src/main.ts index 610f93db7c3ad28aefd2b1999a584aa573f98e21..a1c25021d50273c90c0a1cf13f1e0fa778bd8572 100644 --- a/src/main.ts +++ b/src/main.ts @@ -13,15 +13,19 @@ import githubTheme from '@kangc/v-md-editor/lib/theme/github.js' import '@kangc/v-md-editor/lib/theme/style/github.css' import i18n from './i18n' import { app } from './plugins/index' +import * as ElementPlusIconsVue from '@element-plus/icons-vue' import './Dark/index.scss' import '@wangeditor/editor/dist/css/style.css' // 引入 css +for (const [key, component] of Object.entries(ElementPlusIconsVue)) { + app.component(key, component) +} // import ElementUI from "element-ui"; // 动态引入组件 (工程化) -const requireComponents = require.context('@/components', false, /\.vue$/) +const requireComponents = require.context('@/components', true, /\.vue$/) requireComponents.keys().forEach((item) => { const reqCom = requireComponents(item) - console.log('reqCom:', reqCom.default) + // console.log('reqCom:', reqCom.default) app.component(reqCom.default.name, reqCom.default) }) // highlightjs diff --git a/src/mitt/index.ts b/src/mitt/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..c7b563f4386668354ef299a692ef6bf1b49fb0b1 --- /dev/null +++ b/src/mitt/index.ts @@ -0,0 +1,6 @@ +// 类似于vue2=>eventBus +// vuex 做项目->业务传输 +// mitt 做封装->兄弟组件通信 (做组件封装使用) +import mitt from 'mitt' + +export const emitter = mitt() diff --git a/src/plugins/index.ts b/src/plugins/index.ts index 3df0724621d2983ed95e1b5c10f3bff11f568507..3935896132fd8cd15bc09d8f83a3f436257b654e 100644 --- a/src/plugins/index.ts +++ b/src/plugins/index.ts @@ -1,11 +1,3 @@ -/* - * @Author: fenghongxin 160813791@qq.com - * @Date: 2023-03-07 20:38:24 - * @LastEditors: fenghongxin 160813791@qq.com - * @LastEditTime: 2023-03-07 20:54:08 - * @FilePath: \i18n\myapp\src\plugins\index.ts - * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE - */ import { createApp } from 'vue' import App from '../App.vue' diff --git a/src/router/index.ts b/src/router/index.ts index 8a275bdc87863048f8635f6352282489dae02e51..0f57282bb13b1672aa19d2d7c8dc0d06ea670e2e 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,5 +1,11 @@ import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router' const routes: Array = [ + { + path: '/detail', + name: 'detail', + component: () => + import(/* webpackChunkName: "about" */ '../views/detail/index.vue') + }, { path: '/login', name: '登录', @@ -12,12 +18,6 @@ const routes: Array = [ component: () => import(/* webpackChunkName: "about" */ '../views/editor/index.vue') }, - // { - // path: '/zhuce', - // name: '注册', - // component: () => - // import(/* webpackChunkName: "about" */ '../views/register/index.vue') - // }, { path: '/', name: 'layout', @@ -28,6 +28,7 @@ const routes: Array = [ { path: '/home', name: 'home', + // redirect: '/home/detail', component: () => import(/* webpackChunkName: "about" */ '../views/home/index.vue') }, @@ -44,10 +45,75 @@ const routes: Array = [ import(/* webpackChunkName: "about" */ '../views/vip/index.vue') }, { - path: '/layout/itartisan', + path: '/itartisan', name: 'itartisan', component: () => import(/* webpackChunkName: "about" */ '../views/itArtisan/index.vue') + }, + { + path: '/message', + name: 'message', + // redirect: '/message/pinglun', + component: () => + import(/* webpackChunkName: "about" */ '../views/message/index.vue'), + children: [ + { + path: '/message/pinglun', + name: '评论', + component: () => + import( + /* webpackChunkName: "about" */ '../views/message/pinglun/index.vue' + ) + }, + { + path: '/message/jianxin', + name: '简信', + component: () => + import( + /* webpackChunkName: "about" */ '../views/message/jianxin/index.vue' + ) + }, + { + path: '/message/tougao', + name: '投稿请求', + component: () => + import( + /* webpackChunkName: "about" */ '../views/message/tougao/index.vue' + ) + }, + { + path: '/message/xihuan', + name: '喜欢和赞', + component: () => + import( + /* webpackChunkName: "about" */ '../views/message/xihuan/index.vue' + ) + }, + { + path: '/message/guanzhu', + name: '关注', + component: () => + import( + /* webpackChunkName: "about" */ '../views/message/guanzhu/index.vue' + ) + }, + { + path: '/message/zanshang', + name: '赞赏和付费', + component: () => + import( + /* webpackChunkName: "about" */ '../views/message/zanshang/index.vue' + ) + }, + { + path: '/message/qita', + name: '其他提醒', + component: () => + import( + /* webpackChunkName: "about" */ '../views/message/qita/index.vue' + ) + } + ] } ] } diff --git a/src/router/msg.ts b/src/router/msg.ts new file mode 100644 index 0000000000000000000000000000000000000000..d149ae1bc5a520ee77112ef7472ca4f04e1e60b9 --- /dev/null +++ b/src/router/msg.ts @@ -0,0 +1,58 @@ +const MASSAGE = [ + { + path: '/message/pinglun', + name: '评论', + component: () => + import( + /* webpackChunkName: "about" */ '../views/message/pinglun/index.vue' + ) + }, + { + path: '/message/jianxin', + name: '简信', + component: () => + import( + /* webpackChunkName: "about" */ '../views/message/jianxin/index.vue' + ) + }, + { + path: '/message/tougao', + name: '投稿请求', + component: () => + import( + /* webpackChunkName: "about" */ '../views/message/tougao/index.vue' + ) + }, + { + path: '/message/xihuan', + name: '喜欢和赞', + component: () => + import( + /* webpackChunkName: "about" */ '../views/message/xihuan/index.vue' + ) + }, + { + path: '/message/guanzhu', + name: '关注', + component: () => + import( + /* webpackChunkName: "about" */ '../views/message/guanzhu/index.vue' + ) + }, + { + path: '/message/zanshang', + name: '赞赏和付费', + component: () => + import( + /* webpackChunkName: "about" */ '../views/message/zanshang/index.vue' + ) + }, + { + path: '/message/qita', + name: '其他提醒', + component: () => + import(/* webpackChunkName: "about" */ '../views/message/qita/index.vue') + } +] + +export { MASSAGE } diff --git a/src/store/index.ts b/src/store/index.ts index 4b5a38d77b3ae861a3f70e8ab0bac6f0dd27b8f0..88c415700439a01e2228ee7331e80ef93ab4fbbc 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -12,8 +12,12 @@ export default createStore({ //所有数据 article: [], //文章标签 - tag: [] + tag: [], //https://creation.shbwyz.com/api/tag + //搜索出来的值 + searchData: [], + //评论 + pinglun: [] }, getters: {}, mutations: { @@ -31,6 +35,12 @@ export default createStore({ }, SET_TAG(state, tag) { state.tag = tag + }, + SET_SEARCH(state, search) { + state.searchData = search + }, + SET_PINLUN(state, pinglun) { + state.pinglun = pinglun } }, actions: { @@ -40,7 +50,7 @@ export default createStore({ url: 'https://creation.shbwyz.com/api/article/all/recommend', data: {} }) - console.log('fetch_all_recommend', resp.data.data) + // console.log('fetch_all_recommend', resp.data.data) commit('SET_ALL_RECOMMEND', resp.data.data) }, //分类管理 @@ -58,7 +68,7 @@ export default createStore({ url: 'https://creation.shbwyz.com/api/article/recommend', data: {} }) - commit('SET_RECOMMEND', resp.data.data) + // console.log('fetch_recommend', resp.data.data) }, //所有数据 @@ -67,7 +77,7 @@ export default createStore({ url: 'https://creation.shbwyz.com/api/article', data: {} }) - commit('SET_ARTICLE', resp.data.data) + commit('SET_ARTICLE------vuex', resp.data.data) // console.log('fetch_recommend', resp.data.data) }, //文章标签 diff --git a/src/utils/filterRouter.js b/src/utils/filterRouter.js deleted file mode 100644 index 38aaaf524d7c4ae74d369d0cfadfd95c650a6520..0000000000000000000000000000000000000000 --- a/src/utils/filterRouter.js +++ /dev/null @@ -1,17 +0,0 @@ -// 根据权限筛选路由表函数 -export const filterRouter = (routers, term) => { - if (term === '管理员') { - return routers - } - //在路由里面过滤返回 包含包含角色的路由 - const res = routers.filter((v) => { - return v.meta.auth.includes(term) - }) - // 在遍历路由如果有children的话 递归传children再次过滤直到结束 - res.forEach((item) => { - if (item.children && res.length > 0) { - item.children = filterRouter(item.children, term) - } - }) - return res -} diff --git a/src/utils/http.js b/src/utils/http.js index b7459d64da07c83eacd8183925c1ac222905babe..940bd34f6487e669ad7e9bc85e30762646c89776 100644 --- a/src/utils/http.js +++ b/src/utils/http.js @@ -2,9 +2,10 @@ import axios from 'axios' import app from '../main' // 请求头附带token -const http = axios.create({ +export const http = axios.create({ timeout: 10000, headers: { authorization: localStorage.getItem('token') } + // baseURL: 'http://localhost:7001' }) // 添加请求拦截器 diff --git a/src/utils/index.js b/src/utils/index.js index 9a4c3f35e79c42bd38cab77e90a42cac07f4ba05..bea24f0a4ae9ee20f30963bb633a999115e0bde6 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -1,11 +1,4 @@ -/* - * @Author: fenghongxin 160813791@qq.com - * @Date: 2023-03-10 17:15:19 - * @LastEditors: fenghongxin 160813791@qq.com - * @LastEditTime: 2023-03-10 17:15:47 - * @FilePath: \i18n\myapp\src\utils\index.js - * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE - */ +//格式化时间 工具函数 export const fromNow = (time) => { function formate(times) { const dt = new Date(times) diff --git a/src/views/detail/index.vue b/src/views/detail/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..39fca3f836c343f160702d9800b754fa9fed0a1b --- /dev/null +++ b/src/views/detail/index.vue @@ -0,0 +1,346 @@ + + + + + diff --git a/src/views/editor/index.vue b/src/views/editor/index.vue index 80d7a8b8838bb5d92069bcd58554dbd90a53507d..988482e3103a593ce9be8974c39705ce67a5f6c0 100644 --- a/src/views/editor/index.vue +++ b/src/views/editor/index.vue @@ -46,7 +46,7 @@ export default { watch( () => valueHtml.value, (newVal, oldVal) => { - console.log('newVal:', newVal) + // console.log('newVal:', newVal) // 发送内容 socket.emit('enterMarkdown', { name: newVal }) } @@ -54,7 +54,7 @@ export default { const handleMarkdown = debounce(() => { socket.on('enterMarkdown', (data) => { - console.log('dataA=:', data.name) + // console.log('dataA=:', data.name) valueHtml.value = data.name }) }, 500) diff --git a/src/views/home/index.vue b/src/views/index.vue similarity index 96% rename from src/views/home/index.vue rename to src/views/index.vue index 314b5e359fe7026b4a1faee547449c0379184f5e..45904bf0ea9e3d642a4e27334f94081b609c8a75 100644 --- a/src/views/home/index.vue +++ b/src/views/index.vue @@ -38,6 +38,7 @@
+
推荐阅读
    @@ -219,7 +220,7 @@ export default defineComponent({ .homebox { width: 100%; height: auto; - background: #f4a7a7; + // background: #f4a7a7; display: flex; //左侧盒子 .home-box-left { @@ -227,20 +228,20 @@ export default defineComponent({ margin-top: 20px; width: 60%; height: auto; - background: #f4a7a7; + // background: #f4a7a7; // background: #f6e1e1; // margin-left: 200px; //上层盒子 .home-box-left-top { width: 95%; height: 380px; - background: #fbd085; + background: #ccc; margin-left: 5%; position: relative; .home-box-left-top-content { width: 96%; height: 360px; - background: #f77272; + // background: #f77272; position: absolute; top: 10px; left: 15px; @@ -264,7 +265,7 @@ export default defineComponent({ .home-box-left-bottom { width: 95%; height: auto; - background: #e9d793; + // background: #e9d793; margin-top: 20px; margin-left: 5%; // .demo-tabs > .el-tabs__content { @@ -282,13 +283,14 @@ export default defineComponent({ width: 380px; height: auto; // background: #f6e1e1; - background: #f4a7a7; + // background: #f4a7a7; margin-left: 50px; //右侧上层 .home-box-right-top { + margin-top: 360px; width: 90%; height: 280px; - background: #97d9ff; + // background: #97d9ff; ._1hh60i8CByuosza1JbgE0Q { padding: 1rem; border-bottom: 1px solid #ccc; @@ -304,7 +306,7 @@ export default defineComponent({ margin-top: 20px; width: 90%; height: 200px; - background: #97d9ff; + // background: #97d9ff; ._3hddbH_G4SAdLwXVCERQY7 .ZkMDU4OFJElCj5-UMc-Ae { padding: 1rem; border-bottom: 1px solid var(--border-color); diff --git a/src/views/itArtisan/index.vue b/src/views/itArtisan/index.vue index abe3f35e0ea71ed5e9fba990ea1c312621c1269b..7ecf3a38da0a2444b989ba847eb76b400f072679 100644 --- a/src/views/itArtisan/index.vue +++ b/src/views/itArtisan/index.vue @@ -1,16 +1,99 @@ - + diff --git a/src/views/layout/index.vue b/src/views/layout/index.vue index f94c0bc1c89a1bbc7ce657b32eaf369301b9973c..a44bff1787e0b80cbab6cd31ca0851f367eef8a6 100644 --- a/src/views/layout/index.vue +++ b/src/views/layout/index.vue @@ -127,27 +127,106 @@ {{ $t('messages.technology') }} + + + + + + {{ $t('messages.msg') }} +
    - + +
    - - {{ $t('messages.language') }}: - - - - -
    - +
    + +
    +
    {{ $t('messages.DayAndNight') }} :
    + +
    + + {{ $t('messages.language') }}: + + + + + + +
    {{ $t('messages.login') }}
    -
    {{ state.username }}
    +
    + + + {{ state.username }} +

    退出登录

    +