diff --git a/demo_module/package-lock.json b/demo_module/package-lock.json index 64cd862e57cbe7d79e62668d6383204d9da51e70..ab61ffad9f8bed981506c47f8dcae2e73812e6b6 100644 --- a/demo_module/package-lock.json +++ b/demo_module/package-lock.json @@ -9,6 +9,7 @@ "version": "0.0.0", "dependencies": { "@reduxjs/toolkit": "^2.3.0", + "antd": "^5.22.3", "antd-mobile": "^5.38.1", "antd-mobile-icons": "^0.3.0", "axios": "^1.7.7", @@ -47,6 +48,103 @@ "node": ">=6.0.0" } }, + "node_modules/@ant-design/colors": { + "version": "7.1.0", + "resolved": "https://registry.npmmirror.com/@ant-design/colors/-/colors-7.1.0.tgz", + "integrity": "sha512-MMoDGWn1y9LdQJQSHiCC20x3uZ3CwQnv9QMz6pCmJOrqdgM9YxsoVVY0wtrdXbmfSgnV0KNk6zi09NAhMR2jvg==", + "license": "MIT", + "dependencies": { + "@ctrl/tinycolor": "^3.6.1" + } + }, + "node_modules/@ant-design/cssinjs": { + "version": "1.22.1", + "resolved": "https://registry.npmmirror.com/@ant-design/cssinjs/-/cssinjs-1.22.1.tgz", + "integrity": "sha512-SLuXM4wiEE1blOx94iXrkOgseMZHzdr4ngdFu3VVDq6AOWh7rlwqTkMAtJho3EsBF6x/eUGOtK53VZXGQG7+sQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.11.1", + "@emotion/hash": "^0.8.0", + "@emotion/unitless": "^0.7.5", + "classnames": "^2.3.1", + "csstype": "^3.1.3", + "rc-util": "^5.35.0", + "stylis": "^4.3.4" + }, + "peerDependencies": { + "react": ">=16.0.0", + "react-dom": ">=16.0.0" + } + }, + "node_modules/@ant-design/cssinjs-utils": { + "version": "1.1.3", + "resolved": "https://registry.npmmirror.com/@ant-design/cssinjs-utils/-/cssinjs-utils-1.1.3.tgz", + "integrity": "sha512-nOoQMLW1l+xR1Co8NFVYiP8pZp3VjIIzqV6D6ShYF2ljtdwWJn5WSsH+7kvCktXL/yhEtWURKOfH5Xz/gzlwsg==", + "license": "MIT", + "dependencies": { + "@ant-design/cssinjs": "^1.21.0", + "@babel/runtime": "^7.23.2", + "rc-util": "^5.38.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@ant-design/fast-color": { + "version": "2.0.6", + "resolved": "https://registry.npmmirror.com/@ant-design/fast-color/-/fast-color-2.0.6.tgz", + "integrity": "sha512-y2217gk4NqL35giHl72o6Zzqji9O7vHh9YmhUVkPtAOpoTCH4uWxo/pr4VE8t0+ChEPs0qo4eJRC5Q1eXWo3vA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.24.7" + }, + "engines": { + "node": ">=8.x" + } + }, + "node_modules/@ant-design/icons": { + "version": "5.5.2", + "resolved": "https://registry.npmmirror.com/@ant-design/icons/-/icons-5.5.2.tgz", + "integrity": "sha512-xc53rjVBl9v2BqFxUjZGti/RfdDeA8/6KYglmInM2PNqSXc/WfuGDTifJI/ZsokJK0aeKvOIbXc9y2g8ILAhEA==", + "license": "MIT", + "dependencies": { + "@ant-design/colors": "^7.0.0", + "@ant-design/icons-svg": "^4.4.0", + "@babel/runtime": "^7.24.8", + "classnames": "^2.2.6", + "rc-util": "^5.31.1" + }, + "engines": { + "node": ">=8" + }, + "peerDependencies": { + "react": ">=16.0.0", + "react-dom": ">=16.0.0" + } + }, + "node_modules/@ant-design/icons-svg": { + "version": "4.4.2", + "resolved": "https://registry.npmmirror.com/@ant-design/icons-svg/-/icons-svg-4.4.2.tgz", + "integrity": "sha512-vHbT+zJEVzllwP+CM+ul7reTEfBR0vgxFe7+lREAsAA7YGsYpboiq2sQNeQeRvh09GfQgs/GyFEvZpJ9cLXpXA==", + "license": "MIT" + }, + "node_modules/@ant-design/react-slick": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/@ant-design/react-slick/-/react-slick-1.1.2.tgz", + "integrity": "sha512-EzlvzE6xQUBrZuuhSAFTdsr4P2bBBHGZwKFemEfq8gIGyIQCxalYfZW/T2ORbtQx5rU69o+WycP3exY/7T1hGA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.10.4", + "classnames": "^2.2.5", + "json2mq": "^0.2.0", + "resize-observer-polyfill": "^1.5.1", + "throttle-debounce": "^5.0.0" + }, + "peerDependencies": { + "react": ">=16.9.0" + } + }, "node_modules/@babel/code-frame": { "version": "7.25.9", "resolved": "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.25.9.tgz", @@ -349,6 +447,27 @@ "node": ">=6.9.0" } }, + "node_modules/@ctrl/tinycolor": { + "version": "3.6.1", + "resolved": "https://registry.npmmirror.com/@ctrl/tinycolor/-/tinycolor-3.6.1.tgz", + "integrity": "sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/@emotion/hash": { + "version": "0.8.0", + "resolved": "https://registry.npmmirror.com/@emotion/hash/-/hash-0.8.0.tgz", + "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==", + "license": "MIT" + }, + "node_modules/@emotion/unitless": { + "version": "0.7.5", + "resolved": "https://registry.npmmirror.com/@emotion/unitless/-/unitless-0.7.5.tgz", + "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==", + "license": "MIT" + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.21.5", "resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", @@ -962,6 +1081,48 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@rc-component/async-validator": { + "version": "5.0.4", + "resolved": "https://registry.npmmirror.com/@rc-component/async-validator/-/async-validator-5.0.4.tgz", + "integrity": "sha512-qgGdcVIF604M9EqjNF0hbUTz42bz/RDtxWdWuU5EQe3hi7M8ob54B6B35rOsvX5eSvIHIzT9iH1R3n+hk3CGfg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.24.4" + }, + "engines": { + "node": ">=14.x" + } + }, + "node_modules/@rc-component/color-picker": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/@rc-component/color-picker/-/color-picker-2.0.1.tgz", + "integrity": "sha512-WcZYwAThV/b2GISQ8F+7650r5ZZJ043E57aVBFkQ+kSY4C6wdofXgB0hBx+GPGpIU0Z81eETNoDUJMr7oy/P8Q==", + "license": "MIT", + "dependencies": { + "@ant-design/fast-color": "^2.0.6", + "@babel/runtime": "^7.23.6", + "classnames": "^2.2.6", + "rc-util": "^5.38.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/context": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/@rc-component/context/-/context-1.4.0.tgz", + "integrity": "sha512-kFcNxg9oLRMoL3qki0OMxK+7g5mypjgaaJp/pkOis/6rVxma9nJBF/8kCIuTYHUQNr0ii7MxqE33wirPZLJQ2w==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.10.1", + "rc-util": "^5.27.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, "node_modules/@rc-component/mini-decimal": { "version": "1.1.0", "resolved": "https://registry.npmmirror.com/@rc-component/mini-decimal/-/mini-decimal-1.1.0.tgz", @@ -974,6 +1135,101 @@ "node": ">=8.x" } }, + "node_modules/@rc-component/mutate-observer": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/@rc-component/mutate-observer/-/mutate-observer-1.1.0.tgz", + "integrity": "sha512-QjrOsDXQusNwGZPf4/qRQasg7UFEj06XiCJ8iuiq/Io7CrHrgVi6Uuetw60WAMG1799v+aM8kyc+1L/GBbHSlw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.0", + "classnames": "^2.3.2", + "rc-util": "^5.24.4" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/portal": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/@rc-component/portal/-/portal-1.1.2.tgz", + "integrity": "sha512-6f813C0IsasTZms08kfA8kPAGxbbkYToa8ALaiDIGGECU4i9hj8Plgbx0sNJDrey3EtHO30hmdaxtT0138xZcg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.0", + "classnames": "^2.3.2", + "rc-util": "^5.24.4" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/qrcode": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/@rc-component/qrcode/-/qrcode-1.0.0.tgz", + "integrity": "sha512-L+rZ4HXP2sJ1gHMGHjsg9jlYBX/SLN2D6OxP9Zn3qgtpMWtO2vUfxVFwiogHpAIqs54FnALxraUy/BCO1yRIgg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.24.7", + "classnames": "^2.3.2", + "rc-util": "^5.38.0" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/tour": { + "version": "1.15.1", + "resolved": "https://registry.npmmirror.com/@rc-component/tour/-/tour-1.15.1.tgz", + "integrity": "sha512-Tr2t7J1DKZUpfJuDZWHxyxWpfmj8EZrqSgyMZ+BCdvKZ6r1UDsfU46M/iWAAFBy961Ssfom2kv5f3UcjIL2CmQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.0", + "@rc-component/portal": "^1.0.0-9", + "@rc-component/trigger": "^2.0.0", + "classnames": "^2.3.2", + "rc-util": "^5.24.4" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@rc-component/trigger": { + "version": "2.2.5", + "resolved": "https://registry.npmmirror.com/@rc-component/trigger/-/trigger-2.2.5.tgz", + "integrity": "sha512-F1EJ4KjFpGAHAjuKvOyZB/6IZDkVx0bHl0M4fQM5wXcmm7lgTgVSSnR3bXwdmS6jOJGHOqfDxIJW3WUvwMIXhQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.2", + "@rc-component/portal": "^1.1.0", + "classnames": "^2.3.2", + "rc-motion": "^2.0.0", + "rc-resize-observer": "^1.3.1", + "rc-util": "^5.38.0" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, "node_modules/@react-spring/animated": { "version": "9.6.1", "resolved": "https://registry.npmmirror.com/@react-spring/animated/-/animated-9.6.1.tgz", @@ -1487,6 +1743,71 @@ "node": ">=4" } }, + "node_modules/antd": { + "version": "5.22.3", + "resolved": "https://registry.npmmirror.com/antd/-/antd-5.22.3.tgz", + "integrity": "sha512-YyJ9PhsWkTqJzEo1cZ6wBFk8Ofrfs5O3uGsW8vWcpqBLq/w/yPM/nqZkEDoPFeZ1H+nAhuPF/oWmE/sfj3uYeg==", + "license": "MIT", + "dependencies": { + "@ant-design/colors": "^7.1.0", + "@ant-design/cssinjs": "^1.21.1", + "@ant-design/cssinjs-utils": "^1.1.1", + "@ant-design/icons": "^5.5.2", + "@ant-design/react-slick": "~1.1.2", + "@babel/runtime": "^7.25.7", + "@ctrl/tinycolor": "^3.6.1", + "@rc-component/color-picker": "~2.0.1", + "@rc-component/mutate-observer": "^1.1.0", + "@rc-component/qrcode": "~1.0.0", + "@rc-component/tour": "~1.15.1", + "@rc-component/trigger": "^2.2.5", + "classnames": "^2.5.1", + "copy-to-clipboard": "^3.3.3", + "dayjs": "^1.11.11", + "rc-cascader": "~3.30.0", + "rc-checkbox": "~3.3.0", + "rc-collapse": "~3.9.0", + "rc-dialog": "~9.6.0", + "rc-drawer": "~7.2.0", + "rc-dropdown": "~4.2.0", + "rc-field-form": "~2.6.0", + "rc-image": "~7.11.0", + "rc-input": "~1.6.4", + "rc-input-number": "~9.3.0", + "rc-mentions": "~2.17.0", + "rc-menu": "~9.16.0", + "rc-motion": "^2.9.3", + "rc-notification": "~5.6.2", + "rc-pagination": "~4.3.0", + "rc-picker": "~4.8.2", + "rc-progress": "~4.0.0", + "rc-rate": "~2.13.0", + "rc-resize-observer": "^1.4.0", + "rc-segmented": "~2.5.0", + "rc-select": "~14.16.3", + "rc-slider": "~11.1.7", + "rc-steps": "~6.0.1", + "rc-switch": "~4.1.0", + "rc-table": "~7.49.0", + "rc-tabs": "~15.4.0", + "rc-textarea": "~1.8.2", + "rc-tooltip": "~6.2.1", + "rc-tree": "~5.10.1", + "rc-tree-select": "~5.24.5", + "rc-upload": "~4.8.1", + "rc-util": "^5.43.0", + "scroll-into-view-if-needed": "^3.1.0", + "throttle-debounce": "^5.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ant-design" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, "node_modules/antd-mobile": { "version": "5.38.1", "resolved": "https://registry.npmmirror.com/antd-mobile/-/antd-mobile-5.38.1.tgz", @@ -1537,6 +1858,40 @@ "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "license": "MIT" }, + "node_modules/antd/node_modules/rc-field-form": { + "version": "2.6.0", + "resolved": "https://registry.npmmirror.com/rc-field-form/-/rc-field-form-2.6.0.tgz", + "integrity": "sha512-qU7ei+G/nZ5nkx7TFLRoPtcMR0s0R0yG/2O+iWqA/CX65tJmgODpJvTYYzGMPW/Psj+gy5QHbcZUrNVcPXKjLQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.0", + "@rc-component/async-validator": "^5.0.3", + "rc-util": "^5.32.2" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/antd/node_modules/rc-segmented": { + "version": "2.5.0", + "resolved": "https://registry.npmmirror.com/rc-segmented/-/rc-segmented-2.5.0.tgz", + "integrity": "sha512-B28Fe3J9iUFOhFJET3RoXAPFJ2u47QvLSYcZWC4tFYNGPEjug5LAxEasZlA/PpAxhdOPqGWsGbSj7ftneukJnw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.11.1", + "classnames": "^2.2.1", + "rc-motion": "^2.4.4", + "rc-util": "^5.17.0" + }, + "peerDependencies": { + "react": ">=16.0.0", + "react-dom": ">=16.0.0" + } + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz", @@ -1871,6 +2226,12 @@ "node": ">= 0.8" } }, + "node_modules/compute-scroll-into-view": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/compute-scroll-into-view/-/compute-scroll-into-view-3.1.0.tgz", + "integrity": "sha512-rj8l8pD4bJ1nx+dAkMhV1xB5RuZEyVysfxJqB1pRchh1KVvwOv9b7CGB8ZfjTImVv2oF+sYMUkMZq6Na5Ftmbg==", + "license": "MIT" + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz", @@ -1883,6 +2244,15 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, + "node_modules/copy-to-clipboard": { + "version": "3.3.3", + "resolved": "https://registry.npmmirror.com/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz", + "integrity": "sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==", + "license": "MIT", + "dependencies": { + "toggle-selection": "^1.0.6" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -1900,8 +2270,7 @@ "node_modules/csstype": { "version": "3.1.3", "resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "devOptional": true + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, "node_modules/data-view-buffer": { "version": "1.0.1", @@ -3399,6 +3768,15 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, + "node_modules/json2mq": { + "version": "0.2.0", + "resolved": "https://registry.npmmirror.com/json2mq/-/json2mq-0.2.0.tgz", + "integrity": "sha512-SzoRg7ux5DWTII9J2qkrZrqV1gt+rTaoufMxEzXbS26Uid0NwaJd123HcoB80TgubEppxxIGdNxCx50fEoEWQA==", + "license": "MIT", + "dependencies": { + "string-convert": "^0.2.0" + } + }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz", @@ -3868,87 +4246,629 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, - "node_modules/rc-field-form": { - "version": "1.44.0", - "resolved": "https://registry.npmmirror.com/rc-field-form/-/rc-field-form-1.44.0.tgz", - "integrity": "sha512-el7w87fyDUsca63Y/s8qJcq9kNkf/J5h+iTdqG5WsSHLH0e6Usl7QuYSmSVzJMgtp40mOVZIY/W/QP9zwrp1FA==", + "node_modules/rc-cascader": { + "version": "3.30.0", + "resolved": "https://registry.npmmirror.com/rc-cascader/-/rc-cascader-3.30.0.tgz", + "integrity": "sha512-rrzSbk1Bdqbu+pDwiLCLHu72+lwX9BZ28+JKzoi0DWZ4N29QYFeip8Gctl33QVd2Xg3Rf14D3yAOG76ElJw16w==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.18.0", - "async-validator": "^4.1.0", - "rc-util": "^5.32.2" - }, - "engines": { - "node": ">=8.x" + "@babel/runtime": "^7.25.7", + "classnames": "^2.3.1", + "rc-select": "~14.16.2", + "rc-tree": "~5.10.1", + "rc-util": "^5.43.0" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, - "node_modules/rc-motion": { - "version": "2.9.3", - "resolved": "https://registry.npmmirror.com/rc-motion/-/rc-motion-2.9.3.tgz", - "integrity": "sha512-rkW47ABVkic7WEB0EKJqzySpvDqwl60/tdkY7hWP7dYnh5pm0SzJpo54oW3TDUGXV5wfxXFmMkxrzRRbotQ0+w==", + "node_modules/rc-checkbox": { + "version": "3.3.0", + "resolved": "https://registry.npmmirror.com/rc-checkbox/-/rc-checkbox-3.3.0.tgz", + "integrity": "sha512-Ih3ZaAcoAiFKJjifzwsGiT/f/quIkxJoklW4yKGho14Olulwn8gN7hOBve0/WGDg5o/l/5mL0w7ff7/YGvefVw==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.11.1", - "classnames": "^2.2.1", - "rc-util": "^5.43.0" + "@babel/runtime": "^7.10.1", + "classnames": "^2.3.2", + "rc-util": "^5.25.2" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, - "node_modules/rc-segmented": { - "version": "2.4.1", - "resolved": "https://registry.npmmirror.com/rc-segmented/-/rc-segmented-2.4.1.tgz", - "integrity": "sha512-KUi+JJFdKnumV9iXlm+BJ00O4NdVBp2TEexLCk6bK1x/RH83TvYKQMzIz/7m3UTRPD08RM/8VG/JNjWgWbd4cw==", + "node_modules/rc-collapse": { + "version": "3.9.0", + "resolved": "https://registry.npmmirror.com/rc-collapse/-/rc-collapse-3.9.0.tgz", + "integrity": "sha512-swDdz4QZ4dFTo4RAUMLL50qP0EY62N2kvmk2We5xYdRwcRn8WcYtuetCJpwpaCbUfUt5+huLpVxhvmnK+PHrkA==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.11.1", - "classnames": "^2.2.1", - "rc-motion": "^2.4.4", - "rc-util": "^5.17.0" + "@babel/runtime": "^7.10.1", + "classnames": "2.x", + "rc-motion": "^2.3.4", + "rc-util": "^5.27.0" }, "peerDependencies": { - "react": ">=16.0.0", - "react-dom": ">=16.0.0" + "react": ">=16.9.0", + "react-dom": ">=16.9.0" } }, - "node_modules/rc-util": { - "version": "5.43.0", - "resolved": "https://registry.npmmirror.com/rc-util/-/rc-util-5.43.0.tgz", - "integrity": "sha512-AzC7KKOXFqAdIBqdGWepL9Xn7cm3vnAmjlHqUnoQaTMZYhM4VlXGLkkHHxj/BZ7Td0+SOPKB4RGPboBVKT9htw==", + "node_modules/rc-dialog": { + "version": "9.6.0", + "resolved": "https://registry.npmmirror.com/rc-dialog/-/rc-dialog-9.6.0.tgz", + "integrity": "sha512-ApoVi9Z8PaCQg6FsUzS8yvBEQy0ZL2PkuvAgrmohPkN3okps5WZ5WQWPc1RNuiOKaAYv8B97ACdsFU5LizzCqg==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.18.3", - "react-is": "^18.2.0" + "@babel/runtime": "^7.10.1", + "@rc-component/portal": "^1.0.0-8", + "classnames": "^2.2.6", + "rc-motion": "^2.3.0", + "rc-util": "^5.21.0" }, "peerDependencies": { "react": ">=16.9.0", "react-dom": ">=16.9.0" } }, - "node_modules/rc-util/node_modules/react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmmirror.com/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", - "license": "MIT" - }, - "node_modules/react": { - "version": "18.3.1", - "resolved": "https://registry.npmmirror.com/react/-/react-18.3.1.tgz", - "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "node_modules/rc-drawer": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/rc-drawer/-/rc-drawer-7.2.0.tgz", + "integrity": "sha512-9lOQ7kBekEJRdEpScHvtmEtXnAsy+NGDXiRWc2ZVC7QXAazNVbeT4EraQKYwCME8BJLa8Bxqxvs5swwyOepRwg==", + "license": "MIT", "dependencies": { - "loose-envify": "^1.1.0" + "@babel/runtime": "^7.23.9", + "@rc-component/portal": "^1.1.1", + "classnames": "^2.2.6", + "rc-motion": "^2.6.1", + "rc-util": "^5.38.1" }, - "engines": { - "node": ">=0.10.0" + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" } }, - "node_modules/react-dom": { + "node_modules/rc-dropdown": { + "version": "4.2.0", + "resolved": "https://registry.npmmirror.com/rc-dropdown/-/rc-dropdown-4.2.0.tgz", + "integrity": "sha512-odM8Ove+gSh0zU27DUj5cG1gNKg7mLWBYzB5E4nNLrLwBmYEgYP43vHKDGOVZcJSVElQBI0+jTQgjnq0NfLjng==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.3", + "@rc-component/trigger": "^2.0.0", + "classnames": "^2.2.6", + "rc-util": "^5.17.0" + }, + "peerDependencies": { + "react": ">=16.11.0", + "react-dom": ">=16.11.0" + } + }, + "node_modules/rc-field-form": { + "version": "1.44.0", + "resolved": "https://registry.npmmirror.com/rc-field-form/-/rc-field-form-1.44.0.tgz", + "integrity": "sha512-el7w87fyDUsca63Y/s8qJcq9kNkf/J5h+iTdqG5WsSHLH0e6Usl7QuYSmSVzJMgtp40mOVZIY/W/QP9zwrp1FA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.0", + "async-validator": "^4.1.0", + "rc-util": "^5.32.2" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-image": { + "version": "7.11.0", + "resolved": "https://registry.npmmirror.com/rc-image/-/rc-image-7.11.0.tgz", + "integrity": "sha512-aZkTEZXqeqfPZtnSdNUnKQA0N/3MbgR7nUnZ+/4MfSFWPFHZau4p5r5ShaI0KPEMnNjv4kijSCFq/9wtJpwykw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.11.2", + "@rc-component/portal": "^1.0.2", + "classnames": "^2.2.6", + "rc-dialog": "~9.6.0", + "rc-motion": "^2.6.2", + "rc-util": "^5.34.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-input": { + "version": "1.6.4", + "resolved": "https://registry.npmmirror.com/rc-input/-/rc-input-1.6.4.tgz", + "integrity": "sha512-lBZhfRD4NSAUW0zOKLUeI6GJuXkxeZYi0hr8VcJgJpyTNOvHw1ysrKWAHcEOAAHj7guxgmWYSi6xWrEdfrSAsA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.11.1", + "classnames": "^2.2.1", + "rc-util": "^5.18.1" + }, + "peerDependencies": { + "react": ">=16.0.0", + "react-dom": ">=16.0.0" + } + }, + "node_modules/rc-input-number": { + "version": "9.3.0", + "resolved": "https://registry.npmmirror.com/rc-input-number/-/rc-input-number-9.3.0.tgz", + "integrity": "sha512-JQ363ywqRyxwgVxpg2z2kja3CehTpYdqR7emJ/6yJjRdbvo+RvfE83fcpBCIJRq3zLp8SakmEXq60qzWyZ7Usw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.10.1", + "@rc-component/mini-decimal": "^1.0.1", + "classnames": "^2.2.5", + "rc-input": "~1.6.0", + "rc-util": "^5.40.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-mentions": { + "version": "2.17.0", + "resolved": "https://registry.npmmirror.com/rc-mentions/-/rc-mentions-2.17.0.tgz", + "integrity": "sha512-sfHy+qLvc+p8jx8GUsujZWXDOIlIimp6YQz7N5ONQ6bHsa2kyG+BLa5k2wuxgebBbH97is33wxiyq5UkiXRpHA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.22.5", + "@rc-component/trigger": "^2.0.0", + "classnames": "^2.2.6", + "rc-input": "~1.6.0", + "rc-menu": "~9.16.0", + "rc-textarea": "~1.8.0", + "rc-util": "^5.34.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-menu": { + "version": "9.16.0", + "resolved": "https://registry.npmmirror.com/rc-menu/-/rc-menu-9.16.0.tgz", + "integrity": "sha512-vAL0yqPkmXWk3+YKRkmIR8TYj3RVdEt3ptG2jCJXWNAvQbT0VJJdRyHZ7kG/l1JsZlB+VJq/VcYOo69VR4oD+w==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.10.1", + "@rc-component/trigger": "^2.0.0", + "classnames": "2.x", + "rc-motion": "^2.4.3", + "rc-overflow": "^1.3.1", + "rc-util": "^5.27.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-motion": { + "version": "2.9.3", + "resolved": "https://registry.npmmirror.com/rc-motion/-/rc-motion-2.9.3.tgz", + "integrity": "sha512-rkW47ABVkic7WEB0EKJqzySpvDqwl60/tdkY7hWP7dYnh5pm0SzJpo54oW3TDUGXV5wfxXFmMkxrzRRbotQ0+w==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.11.1", + "classnames": "^2.2.1", + "rc-util": "^5.43.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-notification": { + "version": "5.6.2", + "resolved": "https://registry.npmmirror.com/rc-notification/-/rc-notification-5.6.2.tgz", + "integrity": "sha512-Id4IYMoii3zzrG0lB0gD6dPgJx4Iu95Xu0BQrhHIbp7ZnAZbLqdqQ73aIWH0d0UFcElxwaKjnzNovTjo7kXz7g==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.10.1", + "classnames": "2.x", + "rc-motion": "^2.9.0", + "rc-util": "^5.20.1" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-overflow": { + "version": "1.3.2", + "resolved": "https://registry.npmmirror.com/rc-overflow/-/rc-overflow-1.3.2.tgz", + "integrity": "sha512-nsUm78jkYAoPygDAcGZeC2VwIg/IBGSodtOY3pMof4W3M9qRJgqaDYm03ZayHlde3I6ipliAxbN0RUcGf5KOzw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.11.1", + "classnames": "^2.2.1", + "rc-resize-observer": "^1.0.0", + "rc-util": "^5.37.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-pagination": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/rc-pagination/-/rc-pagination-4.3.0.tgz", + "integrity": "sha512-UubEWA0ShnroQ1tDa291Fzw6kj0iOeF26IsUObxYTpimgj4/qPCWVFl18RLZE+0Up1IZg0IK4pMn6nB3mjvB7g==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.10.1", + "classnames": "^2.3.2", + "rc-util": "^5.38.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-picker": { + "version": "4.8.3", + "resolved": "https://registry.npmmirror.com/rc-picker/-/rc-picker-4.8.3.tgz", + "integrity": "sha512-hJ45qoEs4mfxXPAJdp1n3sKwADul874Cd0/HwnsEOE60H+tgiJUGgbOD62As3EG/rFVNS5AWRfBCDJJfmRqOVQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.24.7", + "@rc-component/trigger": "^2.0.0", + "classnames": "^2.2.1", + "rc-overflow": "^1.3.2", + "rc-resize-observer": "^1.4.0", + "rc-util": "^5.43.0" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "date-fns": ">= 2.x", + "dayjs": ">= 1.x", + "luxon": ">= 3.x", + "moment": ">= 2.x", + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + }, + "peerDependenciesMeta": { + "date-fns": { + "optional": true + }, + "dayjs": { + "optional": true + }, + "luxon": { + "optional": true + }, + "moment": { + "optional": true + } + } + }, + "node_modules/rc-progress": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/rc-progress/-/rc-progress-4.0.0.tgz", + "integrity": "sha512-oofVMMafOCokIUIBnZLNcOZFsABaUw8PPrf1/y0ZBvKZNpOiu5h4AO9vv11Sw0p4Hb3D0yGWuEattcQGtNJ/aw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.10.1", + "classnames": "^2.2.6", + "rc-util": "^5.16.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-rate": { + "version": "2.13.0", + "resolved": "https://registry.npmmirror.com/rc-rate/-/rc-rate-2.13.0.tgz", + "integrity": "sha512-oxvx1Q5k5wD30sjN5tqAyWTvJfLNNJn7Oq3IeS4HxWfAiC4BOXMITNAsw7u/fzdtO4MS8Ki8uRLOzcnEuoQiAw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.10.1", + "classnames": "^2.2.5", + "rc-util": "^5.0.1" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-resize-observer": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/rc-resize-observer/-/rc-resize-observer-1.4.0.tgz", + "integrity": "sha512-PnMVyRid9JLxFavTjeDXEXo65HCRqbmLBw9xX9gfC4BZiSzbLXKzW3jPz+J0P71pLbD5tBMTT+mkstV5gD0c9Q==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.20.7", + "classnames": "^2.2.1", + "rc-util": "^5.38.0", + "resize-observer-polyfill": "^1.5.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-segmented": { + "version": "2.4.1", + "resolved": "https://registry.npmmirror.com/rc-segmented/-/rc-segmented-2.4.1.tgz", + "integrity": "sha512-KUi+JJFdKnumV9iXlm+BJ00O4NdVBp2TEexLCk6bK1x/RH83TvYKQMzIz/7m3UTRPD08RM/8VG/JNjWgWbd4cw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.11.1", + "classnames": "^2.2.1", + "rc-motion": "^2.4.4", + "rc-util": "^5.17.0" + }, + "peerDependencies": { + "react": ">=16.0.0", + "react-dom": ">=16.0.0" + } + }, + "node_modules/rc-select": { + "version": "14.16.4", + "resolved": "https://registry.npmmirror.com/rc-select/-/rc-select-14.16.4.tgz", + "integrity": "sha512-jP6qf7+vjnxGvPpfPWbGYfFlSl3h8L2XcD4O7g2GYXmEeBC0mw+nPD7i++OOE8v3YGqP8xtYjRKAWCMLfjgxlw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.10.1", + "@rc-component/trigger": "^2.1.1", + "classnames": "2.x", + "rc-motion": "^2.0.1", + "rc-overflow": "^1.3.1", + "rc-util": "^5.16.1", + "rc-virtual-list": "^3.5.2" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": "*", + "react-dom": "*" + } + }, + "node_modules/rc-slider": { + "version": "11.1.7", + "resolved": "https://registry.npmmirror.com/rc-slider/-/rc-slider-11.1.7.tgz", + "integrity": "sha512-ytYbZei81TX7otdC0QvoYD72XSlxvTihNth5OeZ6PMXyEDq/vHdWFulQmfDGyXK1NwKwSlKgpvINOa88uT5g2A==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.10.1", + "classnames": "^2.2.5", + "rc-util": "^5.36.0" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-steps": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/rc-steps/-/rc-steps-6.0.1.tgz", + "integrity": "sha512-lKHL+Sny0SeHkQKKDJlAjV5oZ8DwCdS2hFhAkIjuQt1/pB81M0cA0ErVFdHq9+jmPmFw1vJB2F5NBzFXLJxV+g==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.16.7", + "classnames": "^2.2.3", + "rc-util": "^5.16.1" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-switch": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/rc-switch/-/rc-switch-4.1.0.tgz", + "integrity": "sha512-TI8ufP2Az9oEbvyCeVE4+90PDSljGyuwix3fV58p7HV2o4wBnVToEyomJRVyTaZeqNPAp+vqeo4Wnj5u0ZZQBg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.21.0", + "classnames": "^2.2.1", + "rc-util": "^5.30.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-table": { + "version": "7.49.0", + "resolved": "https://registry.npmmirror.com/rc-table/-/rc-table-7.49.0.tgz", + "integrity": "sha512-/FoPLX94muAQOxVpi1jhnpKjOIqUbT81eELQPAzSXOke4ky4oCWYUXOcVpL31ZCO90xScwVSXRd7coqtgtB1Ng==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.10.1", + "@rc-component/context": "^1.4.0", + "classnames": "^2.2.5", + "rc-resize-observer": "^1.1.0", + "rc-util": "^5.41.0", + "rc-virtual-list": "^3.14.2" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-tabs": { + "version": "15.4.0", + "resolved": "https://registry.npmmirror.com/rc-tabs/-/rc-tabs-15.4.0.tgz", + "integrity": "sha512-llKuyiAVqmXm2z7OrmhX5cNb2ueZaL8ZyA2P4R+6/72NYYcbEgOXibwHiQCFY2RiN3swXl53SIABi2CumUS02g==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.11.2", + "classnames": "2.x", + "rc-dropdown": "~4.2.0", + "rc-menu": "~9.16.0", + "rc-motion": "^2.6.2", + "rc-resize-observer": "^1.0.0", + "rc-util": "^5.34.1" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-textarea": { + "version": "1.8.2", + "resolved": "https://registry.npmmirror.com/rc-textarea/-/rc-textarea-1.8.2.tgz", + "integrity": "sha512-UFAezAqltyR00a8Lf0IPAyTd29Jj9ee8wt8DqXyDMal7r/Cg/nDt3e1OOv3Th4W6mKaZijjgwuPXhAfVNTN8sw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.10.1", + "classnames": "^2.2.1", + "rc-input": "~1.6.0", + "rc-resize-observer": "^1.0.0", + "rc-util": "^5.27.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-tooltip": { + "version": "6.2.1", + "resolved": "https://registry.npmmirror.com/rc-tooltip/-/rc-tooltip-6.2.1.tgz", + "integrity": "sha512-rws0duD/3sHHsD905Nex7FvoUGy2UBQRhTkKxeEvr2FB+r21HsOxcDJI0TzyO8NHhnAA8ILr8pfbSBg5Jj5KBg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.11.2", + "@rc-component/trigger": "^2.0.0", + "classnames": "^2.3.1" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-tree": { + "version": "5.10.1", + "resolved": "https://registry.npmmirror.com/rc-tree/-/rc-tree-5.10.1.tgz", + "integrity": "sha512-FPXb3tT/u39mgjr6JNlHaUTYfHkVGW56XaGDahDpEFLGsnPxGcVLNTjcqoQb/GNbSCycl7tD7EvIymwOTP0+Yw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.10.1", + "classnames": "2.x", + "rc-motion": "^2.0.1", + "rc-util": "^5.16.1", + "rc-virtual-list": "^3.5.1" + }, + "engines": { + "node": ">=10.x" + }, + "peerDependencies": { + "react": "*", + "react-dom": "*" + } + }, + "node_modules/rc-tree-select": { + "version": "5.24.5", + "resolved": "https://registry.npmmirror.com/rc-tree-select/-/rc-tree-select-5.24.5.tgz", + "integrity": "sha512-PnyR8LZJWaiEFw0SHRqo4MNQWyyZsyMs8eNmo68uXZWjxc7QqeWcjPPoONN0rc90c3HZqGF9z+Roz+GLzY5GXA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.25.7", + "classnames": "2.x", + "rc-select": "~14.16.2", + "rc-tree": "~5.10.1", + "rc-util": "^5.43.0" + }, + "peerDependencies": { + "react": "*", + "react-dom": "*" + } + }, + "node_modules/rc-upload": { + "version": "4.8.1", + "resolved": "https://registry.npmmirror.com/rc-upload/-/rc-upload-4.8.1.tgz", + "integrity": "sha512-toEAhwl4hjLAI1u8/CgKWt30BR06ulPa4iGQSMvSXoHzO88gPCslxqV/mnn4gJU7PDoltGIC9Eh+wkeudqgHyw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.3", + "classnames": "^2.2.5", + "rc-util": "^5.2.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-util": { + "version": "5.43.0", + "resolved": "https://registry.npmmirror.com/rc-util/-/rc-util-5.43.0.tgz", + "integrity": "sha512-AzC7KKOXFqAdIBqdGWepL9Xn7cm3vnAmjlHqUnoQaTMZYhM4VlXGLkkHHxj/BZ7Td0+SOPKB4RGPboBVKT9htw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.3", + "react-is": "^18.2.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-util/node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmmirror.com/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "license": "MIT" + }, + "node_modules/rc-virtual-list": { + "version": "3.16.0", + "resolved": "https://registry.npmmirror.com/rc-virtual-list/-/rc-virtual-list-3.16.0.tgz", + "integrity": "sha512-tRpWBC0msU+MxFxnD6+y4v0P17Yzplf+mbiHrqRvfVanx0S4o0XV+2zu4vv7hM9nNfcucO+MPHivqpRT2lfnFQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.20.0", + "classnames": "^2.2.6", + "rc-resize-observer": "^1.0.0", + "rc-util": "^5.36.0" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmmirror.com/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { "version": "18.3.1", "resolved": "https://registry.npmmirror.com/react-dom/-/react-dom-18.3.1.tgz", "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", @@ -4247,6 +5167,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/scroll-into-view-if-needed": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/scroll-into-view-if-needed/-/scroll-into-view-if-needed-3.1.0.tgz", + "integrity": "sha512-49oNpRjWRvnU8NyGVmUaYG4jtTkNonFZI86MmGRDqBphEK2EXT9gdEUoQPZhuBM8yWHxCWbobltqYO5M4XrUvQ==", + "license": "MIT", + "dependencies": { + "compute-scroll-into-view": "^3.0.2" + } + }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", @@ -4351,6 +5280,12 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, + "node_modules/string-convert": { + "version": "0.2.1", + "resolved": "https://registry.npmmirror.com/string-convert/-/string-convert-0.2.1.tgz", + "integrity": "sha512-u/1tdPl4yQnPBjnVrmdLo9gtuLvELKsAoRapekWggdiQNvvvum+jYF329d84NAa660KQw7pB2n36KrIKVoXa3A==", + "license": "MIT" + }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", @@ -4474,6 +5409,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/stylis": { + "version": "4.3.4", + "resolved": "https://registry.npmmirror.com/stylis/-/stylis-4.3.4.tgz", + "integrity": "sha512-osIBl6BGUmSfDkyH2mB7EFvCJntXDrLhKjHTRj/rK6xLH0yuPrHULDRQzKokSOD4VoorhtKpfcfW1GAntu8now==", + "license": "MIT" + }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-5.5.0.tgz", @@ -4504,6 +5445,21 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/throttle-debounce": { + "version": "5.0.2", + "resolved": "https://registry.npmmirror.com/throttle-debounce/-/throttle-debounce-5.0.2.tgz", + "integrity": "sha512-B71/4oyj61iNH0KeCamLuE2rmKuTO5byTOSVwECM5FA7TiAiAW+UqTKZ9ERueC4qvgSttUhdmq1mXC3kJqGX7A==", + "license": "MIT", + "engines": { + "node": ">=12.22" + } + }, + "node_modules/toggle-selection": { + "version": "1.0.6", + "resolved": "https://registry.npmmirror.com/toggle-selection/-/toggle-selection-1.0.6.tgz", + "integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==", + "license": "MIT" + }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.8.1.tgz", diff --git a/demo_module/package.json b/demo_module/package.json index 8bf644b4f620bd7a2cebe699ca18f200f2d790e4..97e4dda42a891474a44a18fff245b667deb3f592 100644 --- a/demo_module/package.json +++ b/demo_module/package.json @@ -11,6 +11,7 @@ }, "dependencies": { "@reduxjs/toolkit": "^2.3.0", + "antd": "^5.22.3", "antd-mobile": "^5.38.1", "antd-mobile-icons": "^0.3.0", "axios": "^1.7.7", diff --git a/demo_module/public/audios/12.mp3 b/demo_module/public/audios/12.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..b083f488819f2a0f8c67d34366aebf72e9ee487a Binary files /dev/null and b/demo_module/public/audios/12.mp3 differ diff --git a/demo_module/public/audios/5.mp3 b/demo_module/public/audios/5.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..b7e6bb1b046b491f07c92ddc82ec689c92f06dd8 Binary files /dev/null and b/demo_module/public/audios/5.mp3 differ diff --git a/demo_module/public/audios/50.mp3 b/demo_module/public/audios/50.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..aadde02979127faf4e833686cc3de384ef5688c2 Binary files /dev/null and b/demo_module/public/audios/50.mp3 differ diff --git a/demo_module/public/audios/firethehole.mp3 b/demo_module/public/audios/firethehole.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..7beff5252f4bc2396d7eebd2890d96b880213da7 Binary files /dev/null and b/demo_module/public/audios/firethehole.mp3 differ diff --git a/demo_module/public/images/acc.jpg b/demo_module/public/images/acc.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ba5516317362b78870ce8a985b4d1fcd2ff6f803 Binary files /dev/null and b/demo_module/public/images/acc.jpg differ diff --git a/demo_module/public/images/memdl.png b/demo_module/public/images/memdl.png new file mode 100644 index 0000000000000000000000000000000000000000..4156819f249533d001f007a6f11ab03a2c8b321a Binary files /dev/null and b/demo_module/public/images/memdl.png differ diff --git a/demo_module/public/images/t1.png b/demo_module/public/images/t1.png new file mode 100644 index 0000000000000000000000000000000000000000..8498d68c595a81caf61db216bb4a3125634d217d Binary files /dev/null and b/demo_module/public/images/t1.png differ diff --git a/demo_module/public/images/t2.png b/demo_module/public/images/t2.png new file mode 100644 index 0000000000000000000000000000000000000000..738cc26627ee8337fe87597ccc95f4f2b48d67a0 Binary files /dev/null and b/demo_module/public/images/t2.png differ diff --git a/demo_module/public/images/t3.png b/demo_module/public/images/t3.png new file mode 100644 index 0000000000000000000000000000000000000000..5f6baed5dbde031a21bf676c57f92eedd2fd5667 Binary files /dev/null and b/demo_module/public/images/t3.png differ diff --git a/demo_module/public/imgs/licai.png b/demo_module/public/imgs/licai.png new file mode 100644 index 0000000000000000000000000000000000000000..4c42607e566acf42f41298e2e0b13f47a210002f Binary files /dev/null and b/demo_module/public/imgs/licai.png differ diff --git a/demo_module/public/imgs/xianxing.png b/demo_module/public/imgs/xianxing.png new file mode 100644 index 0000000000000000000000000000000000000000..725b77567aa7153a07974b75295977c706e521be Binary files /dev/null and b/demo_module/public/imgs/xianxing.png differ diff --git a/demo_module/public/imgs/yes.png b/demo_module/public/imgs/yes.png new file mode 100644 index 0000000000000000000000000000000000000000..1f6172b1cf355d07f6348828074887416c65024e Binary files /dev/null and b/demo_module/public/imgs/yes.png differ diff --git a/demo_module/public/imgs/you.png b/demo_module/public/imgs/you.png new file mode 100644 index 0000000000000000000000000000000000000000..de5baddb019342a88a72e91e4a657a913b64918f Binary files /dev/null and b/demo_module/public/imgs/you.png differ diff --git a/demo_module/src/router/index.jsx b/demo_module/src/router/index.jsx index a29aab0cdb017bc5d9bd869f481a3720ca1ebcb9..5dbe8976de7455b1215367d5f09419d513c7605f 100644 --- a/demo_module/src/router/index.jsx +++ b/demo_module/src/router/index.jsx @@ -21,11 +21,39 @@ const Mycoupon = lazy(() => import("../view/Mine/Mycoupon")) const Mybean = lazy(() => import("../view/Mine/Mybean")) const Earnings = lazy(() => import("../view/Mine/Earnings")) const Mycustomer = lazy(() => import("../view/Mine/Mycustomer")) +// 我的团队 +const Myteam = lazy(() => import("../view/Mine/Myteam")) +const Mycommission = lazy(() => import("../view/Mine/Mycommission")) +// 我的佣金 +const WithdrawMoney = lazy(() => import("../view/Mine/WithdrawMoney")) +const EarningsRecord = lazy(() => import("../view/Mine/EarningsRecord")) +const WithdrawalRecord = lazy(() => import("../view/Mine/WithdrawalRecord")) +const Yes = lazy(() => import("../view/Mine/Yes")) +//我的练习 +const MyReal = lazy(() => import("../view/Mine/MyReal")) +//我的批阅 +const MyRead = lazy(() => import("../view/Mine/MyRead")) +const MyResult = lazy(() => import("../view/Mine/MyResult")) +//我的学习 +//我的课程 + +const MyExercise = lazy(() => import("../view/Mine/MyExercise")) + +//收货地址MyResult +const Address = lazy(() => import("../view/Mine/Address")) +//我的面试 +const MyInterview = lazy(() => import("../view/Mine/MyInterview")) +//我的勋章 +const MyMedal = lazy(() => import("../view/Mine/MyMedal")) +//我的等级 +const Mylev = lazy(() => import("../view/Mine/Mylev")) + + // 路由设置 const routes = [ { path: '/', element: }, @@ -35,9 +63,6 @@ const routes = [ { path: '/mine/settings', element: < Settings /> }, //我的荣誉包含的路由 { path: '/mine/myhonor', element: < My_honor /> }, - //我的学习包含的路由 - { path: '/mine/mycourse', element: < Mycourse /> }, - { path: '/mine/mymock', element: < Mymock /> }, //我的权益包含的路由 { path: '/mine/mycode', element: < Mycode /> }, @@ -45,7 +70,35 @@ const routes = [ { path: '/mine/mybean', element: < Mybean /> }, { path: '/mine/mybean/earnings', element: }, { path: '/mine/mycustomer', element: }, - + // 我的团队包含的路由 + { path: '/mine/myteam', element: < Myteam /> }, + { path: '/mine/mycommission', element: < Mycommission /> }, + // 我的佣金包含的路由 + { path: '/mine/withdrawmoney', element: < WithdrawMoney /> }, + { path: '/mine/earningsrecord', element: < EarningsRecord /> }, + { path: '/mine/withdrawalrecord', element: < WithdrawalRecord /> }, + { path: '/mine/yes', element: < Yes /> }, + +//我的学习包含的路由 +{ path: '/mine/mycourse', element: < Mycourse /> }, +{ path: '/mine/mymock', element: < Mymock /> }, +{ path: '/mine/myexercise', element: < MyExercise /> }, + +//收货地址 +{ path: '/mine/address', element: < Address /> }, + +//我的练习 +{ path: '/mine/myreal', element: < MyReal /> }, +//我的面试 +{ path: '/mine/myinterview', element: < MyInterview /> }, +//我的批阅 +{ path: '/mine/myread', element: < MyRead /> }, +{ path: '/mine/myresult', element: < MyResult /> }, +//我的勋章 +{ path: '/mine/mymedal', element: < MyMedal /> }, +//我的等级 +{ path: '/mine/mylev', element: < Mylev /> }, + ] diff --git a/demo_module/src/view/Mine.css b/demo_module/src/view/Mine.css index 60eeaa234210a9b393a47e43332b83bfee68f2e4..b00af9d6235ea5f7ab6817ff6ff99222295e8840 100644 --- a/demo_module/src/view/Mine.css +++ b/demo_module/src/view/Mine.css @@ -6,7 +6,7 @@ /* 头部 */ .mine_top { width: 100%; - height: 160px; + height: 200px; padding: 0 20px; box-sizing: border-box; color: aliceblue; @@ -14,6 +14,10 @@ } +.item_link{ + text-decoration: none; + color: white; +} .flex_box { width: 100%; @@ -26,6 +30,7 @@ .my_honor { border-radius: 0 0 40% 40%; background-color: #db1717; + margin-top: 10px; } diff --git a/demo_module/src/view/Mine.jsx b/demo_module/src/view/Mine.jsx index c43ad5efd9ba36838976abf9747dc9b96761c3b6..01b1591758eb13fb133f369fc3432dddfe28bd13 100644 --- a/demo_module/src/view/Mine.jsx +++ b/demo_module/src/view/Mine.jsx @@ -1,8 +1,10 @@ // 页面样式 import './Mine.css' // 页面组件 -import React, { useState } from 'react' +import React, { useState,useEffect } from 'react' import { Outlet, useNavigate } from 'react-router-dom' +import { Link } from 'react-router-dom' +import axios from 'axios' export default function Mine() { // 设置 navigate功能 跳转页面 @@ -70,7 +72,7 @@ export default function Mine() { }, { id: 3, - title: '状元豆', + title: '欢乐豆', img: 'https://ts4.cn.mm.bing.net/th?id=ODLS.204fe2d2-8cd1-49ab-8525-0eb34d2e9eed&w=32&h=32&qlt=90&pcl=fffffa&o=6&pid=1.2', path: '/mine/mybean' }, @@ -97,42 +99,66 @@ export default function Mine() { } ]) - //跳转页面方法 + //跳转页面 const goPage = (val_path) => { navigate(val_path) } + const getUser = async () => { + try { + const response = await axios.get('http://localhost:3000/user'); + if (response.data.code === 200) { + const userData = response.data.data[0]; // 假设返回的数据是一个用户数组 + setUser({ + name: userData.nickname, // 根据后端的实际字段名调整 + img: userData.avatar, + signa:userData.signa, // 根据后端的实际字段名调整 + path: '/mine/personal' + }); + } + } catch (error) { + console.error("获取用户数据失败:", error); + } + } + + useEffect(() => { + getUser(); + }, []); + + return ( <> - {/* 王卓岩要完成的任务 */} {/* 用户信息 */}
-
{ goPage(user.path) }} > - -
-

用户名

-

用户的个性签名

+
{ goPage(user.path) }}> + +
+

{user.name}

+

{user.signa}

+
-
{ goPage('/mine/settings') }} >设置
+
+
{ goPage('/mine/settings') }} style={{width:"70px",marginTop:"20px"}}>设置
-
+
我的荣誉
-
+
-

我的勋章

+

我的勋章


-

我的等级

+

我的等级

+ {/* 我的学习 */}
我的学习
@@ -151,8 +177,6 @@ export default function Mine() { }
- - {/* 章富要完成的任务 */} {/* 我的权益 */}
我的权益
diff --git a/demo_module/src/view/Mine/Address.jsx b/demo_module/src/view/Mine/Address.jsx new file mode 100644 index 0000000000000000000000000000000000000000..9712d8719744813c3d718a35cc8d652915000ca9 --- /dev/null +++ b/demo_module/src/view/Mine/Address.jsx @@ -0,0 +1,240 @@ +import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; +import "./List.css"; +import axios from 'axios'; +import { LeftOutline, FillinOutline, CloseOutline } from 'antd-mobile-icons'; +import { Modal, Input, Form, Button } from 'antd'; + +export default class Address extends Component { + constructor(props) { + super(props); + this.state = { + address: [], + defaultAddressId: '', + isModalVisible: false, + currentAddress: {}, + isDeleteModalVisible: false, + addressIdToDelete: null + }; + } + + getAddress = async () => { + const response = await axios.get('http://localhost:3000/address'); + if (response.data.code === 200) { + this.setState({ address: response.data.data }); + } + } + + componentDidMount() { + this.getAddress(); + } + + showEditModal = (address) => { + this.setState({ + isModalVisible: true, + currentAddress: address + }); + } + + handleSave = async (values) => { + try { + const response = await axios.put('http://localhost:3000/updateAddress', { + id: this.state.currentAddress.id, + ...values + }); + if (response.data.code === 200) { + this.setState({ isModalVisible: false }); + this.getAddress(); + } + } catch (error) { + this.setState({ isModalVisible: false }); + this.getAddress(); + } + } + + setDefaultAddress = async (id) => { + const updatedAddresses = this.state.address.map(item => { + return { ...item, default: item.id === id }; + }); + + this.setState({ address: updatedAddresses }); + await axios.post('http://localhost:3000/setDefaultAddress', { id }); + this.getAddress(); + } + + showDeleteConfirm = (id) => { + this.setState({ isDeleteModalVisible: true, addressIdToDelete: id }); + } + + // 处理删除确认 + handleDelete = async () => { + const { addressIdToDelete } = this.state; + + try { + const response = await axios.delete(`http://localhost:3000/deleteAddress/${addressIdToDelete}`); + if (response.data.code === 200) { + this.setState({ isDeleteModalVisible: false, addressIdToDelete: null }); + this.getAddress(); // 更新地址列表 + } + } catch (error) { + console.error("删除地址失败:", error); + this.setState({ isDeleteModalVisible: false, addressIdToDelete: null }); + } + } + +//添加地址的模态框 + showAddModal = () => { + this.setState({ isAddModalVisible: true }); + } + + handleAdd = async (values) => { + try { + const response = await axios.post('http://localhost:3000/address/add', values); + if (response.data.code === 200) { + this.setState({ isAddModalVisible: false }); + this.getAddress(); + } + } catch (error) { + console.error("添加地址失败:", error); + this.setState({ isAddModalVisible: false }); + } + } + + render() { + return ( + +
+ + 收货地址 +

+
+
+ {this.state.address.map(item => { + return ( + +
+ this.setDefaultAddress(item.id)} + /> +
+ {item.address} +
    +
  • {item.name}
  • +
  • {item.phone}
  • + this.setDefaultAddress(item.id)} + > + {item.default ? "默认地址" : "设为默认"} + +
+
+
+ this.showEditModal(item)} />  + this.showDeleteConfirm(item.id)} /> +
+
+
+
+ ); + })} + + {/* 编辑地址的模态框 */} + this.setState({ isModalVisible: false })} + footer={null} + > +
+ + + + + + + + + + + + +
+
+ + {/* 删除确认模态框 */} + this.setState({ isDeleteModalVisible: false })} + > +

您确定要删除此地址吗?

+
+ + this.setState({ isAddModalVisible: false })} + footer={null} +> +
+ + + + + + + + + + + + +
+
+ + +
+ ); + } +} diff --git a/demo_module/src/view/Mine/EarningsRecord.css b/demo_module/src/view/Mine/EarningsRecord.css new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/demo_module/src/view/Mine/EarningsRecord.jsx b/demo_module/src/view/Mine/EarningsRecord.jsx new file mode 100644 index 0000000000000000000000000000000000000000..cdb53e2d052d83229959c2bcc62538fa210c08ee --- /dev/null +++ b/demo_module/src/view/Mine/EarningsRecord.jsx @@ -0,0 +1,25 @@ +import React from 'react' +import { NavBar } from 'antd-mobile' +import { useNavigate } from 'react-router-dom' +import './EarningsRecord.css' + +export default function Earnings() { + const navigate = useNavigate() + + // 返回上一个页面 + const back = () => { + navigate(-1) + // window.history.go(-1) + } + + + + return ( + <> + 收益记录 +
+ +
+ + ) +} diff --git a/demo_module/src/view/Mine/List.css b/demo_module/src/view/Mine/List.css new file mode 100644 index 0000000000000000000000000000000000000000..3e1bd2cad80390d6b12a7e6f2360865c7073f34a --- /dev/null +++ b/demo_module/src/view/Mine/List.css @@ -0,0 +1,254 @@ +*{ + margin: 0; + padding: 0; +} +.av-back { + text-decoration: none; + color: black; + font-size: 23px; +} +.av-top{ + width: 100%; + height: 30px; + margin-top: 10px; + font-size: 20px; +} +.av-top img{ + width: 60px; + border-radius: 50%; +} +.av-ul{ + width: 95%; + height: 60px; + display: flex; + justify-content: space-between; + margin-top: 10px; + line-height: 60px; +} +.av-ul2{ + width: 95%; + height: 60px; + display: flex; + justify-content: space-between; + margin-top: 10px; + line-height: 60px; +} +.av-ul2 input{ + width: 150px; + height: 30px; + border: none; + margin-top: 15px; + font-size: 20px; + color: gray; +} +.nolink{ + text-decoration: none; + color: black; + +} +.ad-top{ + font-size: 20px; + margin-top: 10px; +} +.ad-con{ + width: 375px; + height: 60px; + display: flex; + line-height: 20px; + justify-content: space-around; +} +ul{ + list-style: none; +} +.ad-btn{ + font-size: 20px; + margin-top: 20px; +} +.ad-btn2{ + background-color: rgb(197, 0, 0); + color: white; + position:fixed; + bottom: 1px; + width: 100%; + height: 40px; + line-height: 50px; + text-align: center; + font-size: 16px; +} +.av-item{ + height: 40px; + width: 90%; + margin-left: 20px; + display: flex; + justify-content: space-between; + font-size: 16px; + line-height: 40px; +} +.mycon{ + width: 100%; + height: 125px; + + +} +ul{ + list-style: none; +} +.mycon img{ + width: 40px; + border-radius: 50%; +} +.mycon button{ + margin-left: 80px; + margin-top: 40px; + color: rgb(208, 0, 0); + background-color: white; + border: 1px solid rgb(206, 0, 0); + width: 70px; + height: 25px; +} +.my-mo{ + width: 94%; + height: 70px; + border: 1px solid #ccc; + margin-left: 10px; + line-height: 30px; + margin-top: 20px; +} +.my-ex{ + width: 300px; + height: 150px; + + margin-top: 50px; + margin-left: 35px; + text-align: center; + + + } +.one{ + width: 150px; + height: 75px; + border-right: 1px solid #ccc; + border-bottom: 1px solid #ccc; + +} +.two{ + width: 150px; + height: 75px; + border-left: 1px solid #ccc; + border-bottom: 1px solid #ccc; +} +.three{ + width: 150px; + height: 75px; + border-top: 1px solid #ccc; + border-right: 1px solid #ccc; +} +.four{ + width: 150px; + height: 75px; + border-left: 1px solid #ccc; + border-top: 1px solid #ccc; +} +.his{ + width: 90%; + height: 300px; + margin: 0 auto; + margin-top: 20px; +} + +.his-con{ + width: 90%; + height: 100px; + margin: 0 auto; + margin-top: 20px; + border: 1px solid #ccc; +} +.read-nav{ + width: 100%; + height: 30px; + font-size: 20px; + display: flex; + justify-content: space-around; +} +.re-mo{ + width: 100%; + height: 100px; + border: 1px solid rgb(218,18,91); + border-radius: 10px; + line-height: 50px; + margin-top: 20px; +} +.show{ + display: block; +} +.no{ + display: none; +} +.re-mo button{ + width: 100px; + height: 30px; + margin-left: 20px; + background-color: rgb(220, 0, 81); + color: white; + border: none; + border-radius: 5px; + font-weight: bold; +} +.red{ + color: red; +} +/* Add to List.css for styling */ + + + .level-section { + background-color: #f5f5f5; + padding: 20px; + border-radius: 10px; + margin-top: 22px; +} + + .level-info { + display: flex; + align-items: center; + justify-content: space-between; + padding: 10px 0; + } + + .level-progress { + text-align: center; + } + + .progress-bar { + margin: 10px 0; + } + + .steps { + margin-top: 20px; + } + + .step { + display: flex; + align-items: center; + margin: 10px 0; + } + + .step-number { + background-color: #007bff; + color: white; + border-radius: 50%; + width: 30px; + height: 30px; + display: flex; + align-items: center; + justify-content: center; + margin-right: 10px; + } + + .step-content { + flex-grow: 1; + background-color: white; + padding: 10px; + border-radius: 10px; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.1); + } + diff --git a/demo_module/src/view/Mine/MyCourse.jsx b/demo_module/src/view/Mine/MyCourse.jsx index f0819e37de7c0a6af186d9a4959d69109484f39b..325deb9b385f7657629c14e8fbce8e87639fa04e 100644 --- a/demo_module/src/view/Mine/MyCourse.jsx +++ b/demo_module/src/view/Mine/MyCourse.jsx @@ -1,9 +1,158 @@ -import React from 'react' - -export default function MyCourse() { - return ( -
- 我的课程 -
- ) +import React, { Component } from 'react' +import { Link } from 'react-router-dom' +import { LeftOutline,RightOutline } from 'antd-mobile-icons' +import './List.css' + +export default class MyCourse extends Component { + render() { + return ( + +
+ + 我的课程 +

+
+
+
+
+ +
+ + {/* 这里是课程列表 */} +
+ +  2020年【各省公务员】笔试全程班合集 +

+ + +
+
+
    +
  • +
  • 苏晴雨
  • +
+
+ +
+
    +
  • +
  • 陆泽飞
  • +
+
+ +
+
    +
  • +
  • 刘俊堂
  • +
+
+ +
+ +
+

+ +
+ +  2021年【河北省公务员】笔试全程班合集 +

+ + +
+
+
    +
  • +
  • 苏晴雨
  • +
+
+ +
+
    +
  • +
  • 陆泽飞
  • +
+
+ +
+
    +
  • +
  • 刘俊堂
  • +
+
+ +
+ +
+

+ +
+ +  2022年【山东省公务员】笔试全程班合集 +

+ + +
+
+
    +
  • +
  • 苏晴雨
  • +
+
+ +
+
    +
  • +
  • 陆泽飞
  • +
+
+ +
+
    +
  • +
  • 刘俊堂
  • +
+
+ +
+ +
+

+ +
+ +  2023年【河南省公务员】笔试全程班合集 +

+ + +
+
+
    +
  • +
  • 苏晴雨
  • +
+
+ +
+
    +
  • +
  • 陆泽飞
  • +
+
+ +
+
    +
  • +
  • 刘俊堂
  • +
+
+ +
+ +
+
+
+
+ ) + } } + diff --git a/demo_module/src/view/Mine/MyExercise.jsx b/demo_module/src/view/Mine/MyExercise.jsx new file mode 100644 index 0000000000000000000000000000000000000000..b41de753177b1425958cbbd79a9b4faafc793634 --- /dev/null +++ b/demo_module/src/view/Mine/MyExercise.jsx @@ -0,0 +1,70 @@ +import React, { Component } from 'react' +import { Link } from 'react-router-dom' +import { LeftOutline,RightOutline } from 'antd-mobile-icons' +import { Button, ProgressBar, Space } from 'antd-mobile' +import './List.css' + +export default class MyExercise extends Component { + render() { + return ( + +
+ + 我的练习 +

+
+
+ +
+
+
+
304
+
累计答题数
+
+
+
85%
+
正确率
+
+
+ +
+
+
16
+
累计天数
+
+
+
23
+
当日答题数
+
+
+
+
+
+
+ 历史数据 已完成2次 +
+
 答题时间:2024.12.01 20:18 至 2024.12.01 20:25
+
+ +
 练习题
+
 共25道,答对20道,正确率80%
+
+ +
+
 答题时间:2024.12.02 09.12 至 2024.12.02 09.20
+
+ +
 练习题--常识判断--科技
+
 共30道,答对27道,正确率90%
+
+ + +
+ + + + +
+ ) + } +} diff --git a/demo_module/src/view/Mine/MyInterview.jsx b/demo_module/src/view/Mine/MyInterview.jsx new file mode 100644 index 0000000000000000000000000000000000000000..ff6315d942126dac28814d02c06a9bd92e654738 --- /dev/null +++ b/demo_module/src/view/Mine/MyInterview.jsx @@ -0,0 +1,89 @@ +import React, { Component } from 'react' +import { Link } from 'react-router-dom' +import { LeftOutline,RightOutline } from 'antd-mobile-icons' +import { Button, ProgressBar, Space } from 'antd-mobile' +import './List.css' + +export default class MyInterview extends Component { + render() { + return ( + +
+ + 我的面试 +

+
+


+ +
+ +  2020年【各省公务员】面试全程班合集(线上) +

+ + +
+
+
    +
  • +
  • 苏晴雨
  • +
+
+ +
+
    +
  • +
  • 陆泽飞
  • +
+
+ +
+
    +
  • +
  • 刘俊堂
  • +
+
+ +
+ +
+
+
+ +
+ +  2020年【各省公务员】面试(线下) +

+ + +
+
+
    +
  • +
  • 苏晴雨
  • +
+
+ +
+
    +
  • +
  • 陆泽飞
  • +
+
+ +
+
    +
  • +
  • 刘俊堂
  • +
+
+ +
+ +
+
+ + +
+ ) + } +} diff --git a/demo_module/src/view/Mine/MyMedal.jsx b/demo_module/src/view/Mine/MyMedal.jsx new file mode 100644 index 0000000000000000000000000000000000000000..245338ef19be03ba53605b9b28cfec001f19b062 --- /dev/null +++ b/demo_module/src/view/Mine/MyMedal.jsx @@ -0,0 +1,22 @@ +import React, { Component } from 'react' +import { Link } from 'react-router-dom' +import { LeftOutline,RightOutline } from 'antd-mobile-icons' +import { Button, ProgressBar, Space } from 'antd-mobile' +import './List.css' + +export default class MyMedal extends Component { + render() { + return ( + +
+ + 我的勋章 +

+
+
+

+ +
+ ) + } +} diff --git a/demo_module/src/view/Mine/MyMock.jsx b/demo_module/src/view/Mine/MyMock.jsx index c07edec467931fea6fd21f1bd21471653b8225ec..8e31823be1ef25b0553c469fa7c48b374f8c401c 100644 --- a/demo_module/src/view/Mine/MyMock.jsx +++ b/demo_module/src/view/Mine/MyMock.jsx @@ -1,9 +1,43 @@ -import React from 'react' - -export default function MyMock() { - return ( -
- 我的模考 -
- ) +import React, { Component } from 'react' +import { Link } from 'react-router-dom' +import { LeftOutline,RightOutline } from 'antd-mobile-icons' +import { Button, ProgressBar, Space } from 'antd-mobile' +import './List.css' + +export default class MyMock extends Component { + render() { + return ( + +
+ + 我的模考 +

+
+
+

+
+   模拟考试4: +  
+
+ +
+   模拟考试3: +  
+
+ +
+   模拟考试2: +  
+
+ +
+   模拟考试1: +  
+
+
+ +
+ ) + } } + diff --git a/demo_module/src/view/Mine/MyRead.jsx b/demo_module/src/view/Mine/MyRead.jsx new file mode 100644 index 0000000000000000000000000000000000000000..5386c4358e1b7fbab807b5aae9eb5af10dea8ec0 --- /dev/null +++ b/demo_module/src/view/Mine/MyRead.jsx @@ -0,0 +1,62 @@ +import React, { Component } from 'react' +import { Link } from 'react-router-dom' +import { LeftOutline,RightOutline } from 'antd-mobile-icons' +import { Button, ProgressBar, Space } from 'antd-mobile' +import './List.css' + +export default class MyRead extends Component { + constructor(props) { + super(props) + this.state = { + isnav:false + } + } + + + + render() { + return ( + +
+ + 我的批阅 +

+
+



+ +
+
this.setState({isnav:false})}> + 已批阅 +
+
this.setState({isnav:true})}> + 批阅中 +
+
+ +
+
+   国家申论 (第一期)
+  交卷时间:2024-12-01 20:25:20
+ +
+ + +
+ +
+
+   国家申论 (第二期)
+  交卷时间:2024-12-01 20:25:20
+ +
+ +
+   国家申论 (第三期)
+  交卷时间:2024-12-02 09:20:35
+ +
+
+
+ ) + } +} diff --git a/demo_module/src/view/Mine/MyReal.jsx b/demo_module/src/view/Mine/MyReal.jsx new file mode 100644 index 0000000000000000000000000000000000000000..04348575584b8cab1d29191b92930d47b6cc5254 --- /dev/null +++ b/demo_module/src/view/Mine/MyReal.jsx @@ -0,0 +1,42 @@ +import React, { Component } from 'react' +import { Link } from 'react-router-dom' +import { LeftOutline,RightOutline } from 'antd-mobile-icons' +import { Button, ProgressBar, Space } from 'antd-mobile' +import './List.css' + +export default class MyPapers extends Component { + render() { + return ( + + +
+ + 我的真题 +

+
+

+
+   2020年【公共基础知识】 第十二期真题:
已完成0次
+ +
+ +
+   2021年【公共基础知识】 第十一期真题:
已完成2次
+ +
+ +
+   2022年【公共基础知识】 第十期真题:
已完成1次
+ +
+ +
+   2023年【公共基础知识】 第九期真题:
已完成0次
+ +
+ + +
+ ) + } +} diff --git a/demo_module/src/view/Mine/MyResult.jsx b/demo_module/src/view/Mine/MyResult.jsx new file mode 100644 index 0000000000000000000000000000000000000000..b5c5be5a921e273fdd573e6af8ab21b3470396aa --- /dev/null +++ b/demo_module/src/view/Mine/MyResult.jsx @@ -0,0 +1,44 @@ +import React, { Component } from 'react' +import { Link } from 'react-router-dom' +import { LeftOutline,RightOutline } from 'antd-mobile-icons' +import { Button, ProgressBar, Space } from 'antd-mobile' +import './List.css' + +export default class MyResult extends Component { + render() { + return ( + +
+ + 查看批阅结果 +

+
+



+ + + 材料一 : + +

+ +
+ +   N市为推动“中国制造2025”试点示范城市在本地落地实施,组成调研组对本市制造业情况进行了调研。下面是调研所形成的材料。 + +
+ +
+ +   我市已经基本形成了比较完备的智能制造政策框架体系,智能制造试点示范工作稳步推进,智能制造创新平台和核心技术突破初见成效,龙头企业智能化转型和区域集聚加快形成,以工业机器人为引领的智能制造装备产业发展驶入“快车道”。可以说,在以智能制造为重心的方略下,智能经济之“核”初步形成。但仍面临问题和不足:智能制造的基础有待夯实,物联网、云计算和大数据等基础性关键环境要素的建设滞后于智能制造发展需求。其中,智能制造装备缺“核”少“芯”问题最为突出,核心控制技术依赖进口,工业机器人等智能制造核心产业研发投入大部分仍处于实验室阶段。这导致了我市智能经济发展过程中存在着示范引领有待加强、智能制造标准指数缺位、国际技术合作服务乏力等诸多亟待解决的难题。 + +
+ + +
+ +   “要推进强基工程,打通智能制造承载能力的'卡口’。”调研组建议,要瞄准关键基础材料、核心基础零部件、先进基础工艺和产业技术基础的“四基"短板,着力在新材料、智能装备、新一代信息技术等重点领部件、先进基础工艺和产业技术基础的“四基”短板,着力在新材料、智能装备、新一代信息技术等。 + +
+
+ ) + } +} diff --git a/demo_module/src/view/Mine/Mycommission.css b/demo_module/src/view/Mine/Mycommission.css new file mode 100644 index 0000000000000000000000000000000000000000..b6ca9a0b9cf15915ad260bd8a8ade1f98f4abc6a --- /dev/null +++ b/demo_module/src/view/Mine/Mycommission.css @@ -0,0 +1,93 @@ +.bigbox { + width: 100%; + height: 150px; + background-color: #f33e3e; + margin: 10px 0 20px 0; + display: flex; + align-items: center; + justify-content: space-around; + border-radius: 10px; +} + +.bai { + color: #fff; + font-size: 1em; + font-weight: bold; +} + +.big { + height: 40px; + line-height: 40px; + font-size: 1.5em; + font-weight: bold; + color: #fff; +} + +.tixian { + width: 100px; + height: 50px; + line-height: 50px; + text-align: center; + color: #ff0000; + font-size: 1.2em; + font-weight: bold; + border-radius: 50px; + background-color: #fff; +} + + +.jilu { + width: 100%; + height: 60px; + line-height: 60px; + font-size: 1.2em; + font-weight: bold; + display: flex; + align-items: center; + justify-content: space-between; + /* padding-left: 20px; + padding-right: 20px; */ + box-sizing: border-box; + border-bottom: 2px solid #ccc; + /* background-color: yellow; */ +} + +.item_box { + width: 150px; + font-size: 1em; + display: flex; + align-items: center; + justify-content: space-between; + /* background-color: #f33e3e; */ + padding-left: 20px; + padding-right: 10px; + box-sizing: border-box; +} + + + + + +.xianxing { + width: 40px; + height: 40px; + padding: 5px; + box-sizing: border-box; + border-radius: 50%; + background-color: rgb(124, 189, 55); +} + +.licai { + width: 40px; + height: 40px; + padding: 5px; + box-sizing: border-box; + border-radius: 50%; + background-color: rgb(238, 163, 48); +} + +.ll { + width: 30px; + height: 30px; + text-align: center; +} \ No newline at end of file diff --git a/demo_module/src/view/Mine/Mycommission.jsx b/demo_module/src/view/Mine/Mycommission.jsx new file mode 100644 index 0000000000000000000000000000000000000000..204ebc17356fa8208fe117d8bdb3c57614b4628e --- /dev/null +++ b/demo_module/src/view/Mine/Mycommission.jsx @@ -0,0 +1,55 @@ +import React from 'react' +import { NavBar } from 'antd-mobile' +import { useNavigate } from 'react-router-dom' +import './Mycommission.css' + +export default function Earnings() { + const navigate = useNavigate() + + // 返回上一个页面 + const back = () => { + navigate(-1) + } + + + + return ( + <> + 我的佣金 +
+
+
总佣金 ¥100.00
+
可提现收益 ¥80.00
+
+
{ + navigate('/mine/withdrawMoney') + }} >立即提现
+
+ + + {/* 记录 */} +
{ + navigate('/mine/earningsRecord') + }} > +
+ +
收益记录
+
+
+ +
+
+
{ + navigate('/mine/withdrawalRecord') + }} > +
+ +

提现记录

+
+
+ +
+
+ + ) +} diff --git a/demo_module/src/view/Mine/Mylev.jsx b/demo_module/src/view/Mine/Mylev.jsx new file mode 100644 index 0000000000000000000000000000000000000000..7166d888eea2f8d01ae3f0e423fe8c21aee1b43c --- /dev/null +++ b/demo_module/src/view/Mine/Mylev.jsx @@ -0,0 +1,53 @@ +import React, { Component } from 'react' +import { Link } from 'react-router-dom' +import { LeftOutline } from 'antd-mobile-icons' +import './List.css' +import { ProgressBar } from 'antd-mobile'; + +export default class Mylev extends Component { + render() { + return ( + +
+ + 我的等级 +

+
+
+ +
+
+
当前等级: LV.1 白丁
+
LV.2 书童
+
+
+
距离下一等级
+
+ +
+
+
+
+
1
+
需学习500分钟
+
+
+
+
+
+
2
+
需推荐5人
+
+
+
+
+
+
3
+
直属团队下单8笔
+
+
+
+
+ ) + } +} diff --git a/demo_module/src/view/Mine/Myteam.css b/demo_module/src/view/Mine/Myteam.css new file mode 100644 index 0000000000000000000000000000000000000000..99f7a9794d5af76eeb0c2933a0a470879d4bcb77 --- /dev/null +++ b/demo_module/src/view/Mine/Myteam.css @@ -0,0 +1,5 @@ +.item_box1 { + width: 99%; + border: 1px solid red; + +} \ No newline at end of file diff --git a/demo_module/src/view/Mine/Myteam.jsx b/demo_module/src/view/Mine/Myteam.jsx new file mode 100644 index 0000000000000000000000000000000000000000..bec4861ed9a1332a4e0d9a68f0b9634621082a42 --- /dev/null +++ b/demo_module/src/view/Mine/Myteam.jsx @@ -0,0 +1,102 @@ +import React, { useEffect, useState } from 'react' +import { NavBar } from 'antd-mobile' +import './Earnings.css' +import './Myteam.css' + + +export default function Mycoupon() { + const [list, setList] = useState([ + { name: '张三', state: 0 }, + { name: '李四', state: 0 }, + { name: '王五', state: 0 }, + { name: '赵六', state: 1 }, + ]) + const [status, setStatus] = useState(0) + const [active, setActive] = useState(0) + //筛选状态 + const up = (val) => { + console.log(val); + + if (val === 0) { + setStatus(0) + } else { + let ls = list.filter(ele => { return ele.state === val }).length + if (ls < 1) { + setStatus(3) + } else { + setStatus(val) + console.log(status); + } + } + } + const [stop, setStop] = useState(0) + useEffect(() => { + if (stop === 0) { + up(0) + setStop(1) + } + + }) + // 返回上一个页面 + const back = () => { + window.history.go(-1) + } + + + + return ( + <> + {/* 标头 */} + 收益记录 + {/* choose */} +
+
{ + setActive(0) + up(0) + }}>直属
+
{ + setActive(1) + up(1) + }}>间接
+
+ {/* nav */} +
+ { + status === 0 ? + list.filter(ele => { return ele.state === 0 }).map(item => { + return ( +
+ {/* 头像和信息 */} +
+ +
+

{item.name} {item.purposes}

+

{item.time}

+
+
+
+ ) + }) + : status === 1 ? + list.filter(ele => { return ele.state === 1 }).map(item => { + return ( +
+ {/* 头像和信息 */} +
+ +
+

{item.name} {item.purposes}

+

{item.time}

+
+
+
+ ) + }) + : status === 3 ? +
还没有成员哦
+ :
还没有成员哦
+ } +
+ + ) +} diff --git a/demo_module/src/view/Mine/Personal.jsx b/demo_module/src/view/Mine/Personal.jsx index 8c7fe52209d32eb77f860780eaca2360b3816910..00dea0321498d481280a25d6955393561b6aaa8b 100644 --- a/demo_module/src/view/Mine/Personal.jsx +++ b/demo_module/src/view/Mine/Personal.jsx @@ -1,10 +1,181 @@ -import React from 'react' - -export default function Personal() { - return ( -
- 个人资料 - 头像等 -
- ) +import React, { Component } from 'react'; +import { LeftOutline, RightOutline } from 'antd-mobile-icons'; +import { Link } from 'react-router-dom'; +import "./List.css"; +import axios from 'axios'; + +export default class Avatar extends Component { + constructor(props) { + super(props); + this.state = { + avatar: [], + selectedFile: null, + editingField: null, // 当前正在编辑的字段 + updatedDetails: {} // 用户更新的信息 + }; + } + + getUser = async () => { + const user = await axios.get('http://localhost:3000/user'); + if (user.data.code === 200) { + this.setState({ + avatar: user.data.data + }); + } + } + + handleFileChange = (event) => { + const file = event.target.files[0]; + if (file) { + this.setState({ selectedFile: file }); + this.uploadAvatar(file); + } + } + + uploadAvatar = async (file) => { + + + const reader = new FileReader(); + reader.onloadend = () => { + const base64String = reader.result; + + const updatedAvatar = this.state.avatar.map(item => ({ + ...item, + avatar: base64String // 仅更新头像 + })); + + localStorage.setItem('userAvatar', base64String); + this.setState({ avatar: updatedAvatar }); // 更新状态以显示图像 + }; + reader.readAsDataURL(file); + }; + + handleFieldClick = (field, currentValue, userId) => { + // 设置正在编辑的字段和当前的值 + this.setState({ editingField: field, updatedDetails: { ...this.state.updatedDetails, [field]: currentValue } }); + }; + + saveChanges = async (userId) => { + console.log("保存请求体:", this.state.updatedDetails); // 调试信息 + try { + const response = await axios.put(`http://localhost:3000/user/${userId}`, this.state.updatedDetails); + if (response.data.code === 200) { + this.getUser(); // 更新用户信息 + this.setState({ editingField: null, updatedDetails: {} }); // 隐藏输入框 + } + } catch (error) { + this.getUser(); + this.setState({ editingField: null, updatedDetails: {} }); + + } + }; + + + componentDidMount() { + this.getUser(); + const storedAvatar = localStorage.getItem('userAvatar'); + if (storedAvatar) { + this.setState({ avatar: [{ _id: 'temp', avatar: storedAvatar }] }); + } + } + + render() { + return ( + +
+ + 个人资料 +

+
+ {this.state.avatar.map(item => ( + +
+ 头像 +
+ document.getElementById('fileInput').click()} + /> + + +
+
+
+ + {/* 昵称 */} +
+ 昵称 + {this.state.editingField === 'nickname' ? ( + this.saveChanges(item._id)} + onChange={(e) => this.setState({ updatedDetails: { ...this.state.updatedDetails, nickname: e.target.value } })} + /> + ) : ( +
this.handleFieldClick('nickname', item.nickname, item._id)}> + {item.nickname} + +
+ )} +
+
+ + {/* 签名 */} +
+ 签名 + {this.state.editingField === 'signa' ? ( + this.saveChanges(item._id)} + onChange={(e) => this.setState({ updatedDetails: { ...this.state.updatedDetails, signa: e.target.value } })} + /> + ) : ( +
this.handleFieldClick('signa', item.signa, item._id)}> + {item.signa} + +
+ )} +
+
+ + {/* 手机号 */} +
+ 手机号 + {this.state.editingField === 'phone' ? ( + this.saveChanges(item._id)} + onChange={(e) => this.setState({ updatedDetails: { ...this.state.updatedDetails, phone: e.target.value } })} + /> + ) : ( +
this.handleFieldClick('phone', item.phone, item._id)}> + {item.phone} + +
+ )} +
+
+
+ 收货地址 + +
+
+ +
+ ))} +
+
+ ); + } } diff --git a/demo_module/src/view/Mine/Settings.jsx b/demo_module/src/view/Mine/Settings.jsx index cd55151db50a70ac2061236df2ccc5462d2ed6e1..df89fc5940a785ead814fb19143dc959072d00b5 100644 --- a/demo_module/src/view/Mine/Settings.jsx +++ b/demo_module/src/view/Mine/Settings.jsx @@ -1,9 +1,58 @@ import React from 'react' +import { Link } from'react-router-dom' +import { LeftOutline,RightOutline } from 'antd-mobile-icons' +import "./List.css" +import { Modal, Input, Form, Button } from 'antd'; + export default function Settings() { return ( -
- 设置 -
+ +
+ + 设置 +

+
+
+ 登录密码 + 已设置 +
+
+ +
+ 设置声音 + +
+
+ +
+ 版本信息 + V2.21 +
+
+ +
+ 用户协议 + +
+
+ +
+ 隐私协议 + +
+
+ +
+ 彻底注销账号 + +
+
+
+ + +
) } diff --git a/demo_module/src/view/Mine/WithdrawMoney.css b/demo_module/src/view/Mine/WithdrawMoney.css new file mode 100644 index 0000000000000000000000000000000000000000..d6a3e53c213c79d420f2889b44c6231713a57397 --- /dev/null +++ b/demo_module/src/view/Mine/WithdrawMoney.css @@ -0,0 +1,99 @@ +.jine { + padding: 40px; + box-sizing: border-box; + width: 99%; + text-align: center; + /* border: 1px solid red; */ +} + +.OneHundred { + height: 50px; + line-height: 50px; + font-size: 3.5em; + font-weight: bold; +} + +.WithdrawalAmount { + color: rgb(170, 167, 167); +} + +.Amount { + width: 90%; + height: 50px; + margin: auto; + display: flex; + justify-content: space-around; + align-items: center; + margin-top: 20px; + margin-bottom: 20px; + border-bottom: 1px solid rgb(216, 215, 215); +} + +.Amount>input { + width: 60%; + height: 100%; + border: none; +} + +.span1 { + font-size: 30px; + font-weight: bold; +} + +.span2 { + color: red; + font-size: 16px; +} + + +.WarmReminder { + width: 90%; + height: 50px; + margin: auto; + display: flex; + flex-direction: column; +} + +.WarmReminder_txt { + width: 100%; + font-size: 12px; + margin-top: 7px; + color: rgb(170, 167, 167); +} + + +.imgsfile { + width: 130px; + margin: auto; + display: flex; + flex-direction: column; + align-items: center; +} + +.imgfile1 { + width: 100px; + height: 100px; + border-radius: 50%; + margin: auto; + margin-top: 20px; +} + + + + + + + + +.yes { + width: 90%; + height: 40px; + line-height: 40px; + font-size: 1.5em; + font-weight: 100; + margin: auto; + background-color: red; + color: white; + text-align: center; + margin-top: 20px; +} \ No newline at end of file diff --git a/demo_module/src/view/Mine/WithdrawMoney.jsx b/demo_module/src/view/Mine/WithdrawMoney.jsx new file mode 100644 index 0000000000000000000000000000000000000000..da2708886be38c9fb28ccb2d666ee7fe03faebef --- /dev/null +++ b/demo_module/src/view/Mine/WithdrawMoney.jsx @@ -0,0 +1,84 @@ +import React, { useState } from 'react' +import { NavBar, ImageUploader } from 'antd-mobile' +import { useNavigate } from 'react-router-dom' +import './WithdrawMoney.css' + + +export default function Earnings() { + const navigate = useNavigate() + + const [num, setNum] = useState(100) + const [yesnum, setYesnum] = useState(80) + + // 返回上一个页面 + const back = () => { + navigate(-1) + } + + + const [demoSrc, setDemoSrc] = useState('') + + + const mockUpload = async (file) => { + return new Promise((resolve) => { + setTimeout(() => { + resolve({ + url: demoSrc, + }) + }, 1000) + }) + } + + const [fileList, setFileList] = useState([ + { + url: demoSrc, + }, + ]) + + const [show, setShow] = useState(false) + + + + return ( + <> + 提现 +
+
{num}.00
+
可提现金额{yesnum}.00(元)
+
+ +
+ + + 全部提现 +
+ +
+
温馨提示:
+
+ 请上传微信收款二维码,我们会通过微信将钱款发放给您。 +
+
+ +
+ { + show ? + : + + } +

请输入微信收款二维码

+
+
{ + navigate('/mine/Yes') + }} >确认提现
+ + ) +} diff --git a/demo_module/src/view/Mine/WithdrawalRecord.css b/demo_module/src/view/Mine/WithdrawalRecord.css new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/demo_module/src/view/Mine/WithdrawalRecord.jsx b/demo_module/src/view/Mine/WithdrawalRecord.jsx new file mode 100644 index 0000000000000000000000000000000000000000..d3b0f97b727200f23ffc410849b992db7079588f --- /dev/null +++ b/demo_module/src/view/Mine/WithdrawalRecord.jsx @@ -0,0 +1,25 @@ +import React from 'react' +import { NavBar } from 'antd-mobile' +import { useNavigate } from 'react-router-dom' +import './WithdrawalRecord.css' + +export default function Earnings() { + const navigate = useNavigate() + + // 返回上一个页面 + const back = () => { + navigate(-1) + // window.history.go(-1) + } + + + + return ( + <> + 提现记录 +
+ +
+ + ) +} diff --git a/demo_module/src/view/Mine/Yes.css b/demo_module/src/view/Mine/Yes.css new file mode 100644 index 0000000000000000000000000000000000000000..0efd294c128a39859fe87446e8453f80f9e4ad37 --- /dev/null +++ b/demo_module/src/view/Mine/Yes.css @@ -0,0 +1,32 @@ +.yesbox { + width: 100%; + height: 100%; + background-color: #fff; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} + + +.yesimg { + width: 200px; + height: 200px; + margin: 0 auto; + margin-top: 100px; + margin-bottom: 50px; + +} + +.yesbu { + width: 200px; + height: 50px; + background-color: #ff9900; + border-radius: 10px; + color: #fff; + font-size: 20px; + text-align: center; + line-height: 50px; + margin: 0 auto; + border: none; +} \ No newline at end of file diff --git a/demo_module/src/view/Mine/Yes.jsx b/demo_module/src/view/Mine/Yes.jsx new file mode 100644 index 0000000000000000000000000000000000000000..84a4841296e400c1b077acf63aa6d856f2ce4160 --- /dev/null +++ b/demo_module/src/view/Mine/Yes.jsx @@ -0,0 +1,58 @@ +import React, { useState, useEffect } from 'react' +import { NavBar } from 'antd-mobile' +import { useNavigate } from 'react-router-dom' +import './Yes.css' + +import mp3url from '../../../public/audios/50.mp3' + +export default function Yes() { + const navigate = useNavigate() + + // 返回上一个页面 + const back = () => { + navigate(-1) + } + + + const [stopmusic, setStopmusic] = useState(0) + + window.onload = function () { + var music = document.getElementById('background-music'); + if (stopmusic == 0) { + music.play(); + } else { + music.pause(); + } + }; + + useEffect(() => { + setTimeout(() => { + setStopmusic(1) + }, 6000) + }) + + + return ( + <> + { + stopmusic == 0 ? : null + } + 提现成功! +
+ {/* 惊喜页面 */} + +
+

恭喜您,提现成功!

+

请前往微信查看

+
+
+ +
+
+ + + + ) +} diff --git a/demo_server/modules/db.js b/demo_server/db/index.js similarity index 40% rename from demo_server/modules/db.js rename to demo_server/db/index.js index ec08321a882e439888e42cde25e59a43ecd2a92a..621a9bdb068b591e00eecb9ee2aa0f963ce84785 100644 --- a/demo_server/modules/db.js +++ b/demo_server/db/index.js @@ -1,11 +1,9 @@ const mongoose = require('mongoose'); -mongoose.connect('mongodb+srv://3079975645:YANG123123@zhangfu-database.5i5er.mongodb.net/XIANGMU-BASE') - .then(() => { - console.log('数据库链接成功'); - }) - .catch((err) => { - console.log('数据库链接失败', err); - }) +mongoose.connect('mongodb+srv://3079975645:YANG123123@zhangfu-database.5i5er.mongodb.net/XIANGMU-BASE').then(res => { + console.log('OK'); +}).catch(err => { + console.log('NO'); +}) module.exports = mongoose; \ No newline at end of file diff --git a/demo_server/db/model.js b/demo_server/db/model.js new file mode 100644 index 0000000000000000000000000000000000000000..34280da5e7fbbf211d2f2164013fdc7ae9cb4700 --- /dev/null +++ b/demo_server/db/model.js @@ -0,0 +1,24 @@ +const mongoose = require('./index.js'); + +const UserSchema = new mongoose.Schema({ + avatar: String, + nickname: String, + phone:Number, + signa:String, +}) +const User = mongoose.model('User', UserSchema); + +const AddressSchema = new mongoose.Schema({ + id: Number, + name: String, + phone: Number, + address: String, + status:Boolean, + default:Boolean, +}) +const Address = mongoose.model('Address', AddressSchema); + +module.exports = { + User, + Address +} \ No newline at end of file diff --git a/demo_server/modules/module.js b/demo_server/modules/module.js deleted file mode 100644 index 8d24056534d4bb133fcd658f2b0a7f50ace03256..0000000000000000000000000000000000000000 --- a/demo_server/modules/module.js +++ /dev/null @@ -1,30 +0,0 @@ -const mongoose = require('./db'); - -// 课程表 -const courseSchema = new mongoose.Schema({ - name: { - type: String, - required: true, - unique: true - }, - description: { - type: String, - required: true - }, - course: { - type: String, - required: true - }, - semester: { - type: String, - required: true - }, -}) -const course = mongoose.model('course', courseSchema, 'course'); - - -module.exports = { - course, - - -}; \ No newline at end of file diff --git a/demo_server/package-lock.json b/demo_server/package-lock.json index 9bd65fadb9eeb532448d1f41672c043f83752b78..ad23564fa86f7d75c734099714840e94da7c8dcd 100644 --- a/demo_server/package-lock.json +++ b/demo_server/package-lock.json @@ -14,8 +14,9 @@ "express": "~4.16.1", "http-errors": "~1.6.3", "jade": "~1.11.0", - "mongoose": "^8.8.2", - "morgan": "~1.9.1" + "mongoose": "^8.8.4", + "morgan": "~1.9.1", + "multer": "^1.4.5-lts.1" } }, "node_modules/@mongodb-js/saslprep": { @@ -91,6 +92,12 @@ "node": ">=0.4.2" } }, + "node_modules/append-field": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/append-field/-/append-field-1.0.0.tgz", + "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==", + "license": "MIT" + }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmmirror.com/array-flatten/-/array-flatten-1.1.1.tgz", @@ -140,6 +147,23 @@ "node": ">=16.20.1" } }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "license": "MIT" + }, + "node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmmirror.com/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, "node_modules/bytes": { "version": "3.0.0", "resolved": "https://registry.npmmirror.com/bytes/-/bytes-3.0.0.tgz", @@ -217,6 +241,21 @@ "node": ">= 0.6.x" } }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmmirror.com/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "engines": [ + "node >= 0.8" + ], + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, "node_modules/constantinople": { "version": "3.0.2", "resolved": "https://registry.npmmirror.com/constantinople/-/constantinople-3.0.2.tgz", @@ -267,10 +306,17 @@ "resolved": "https://registry.npmmirror.com/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "license": "MIT" + }, "node_modules/cors": { "version": "2.8.5", "resolved": "https://registry.npmmirror.com/cors/-/cors-2.8.5.tgz", "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "license": "MIT", "dependencies": { "object-assign": "^4", "vary": "^1" @@ -487,6 +533,12 @@ "resolved": "https://registry.npmmirror.com/is-promise/-/is-promise-2.2.2.tgz", "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "license": "MIT" + }, "node_modules/jade": { "version": "1.11.0", "resolved": "https://registry.npmmirror.com/jade/-/jade-1.11.0.tgz", @@ -679,9 +731,10 @@ } }, "node_modules/mongoose": { - "version": "8.8.2", - "resolved": "https://registry.npmmirror.com/mongoose/-/mongoose-8.8.2.tgz", - "integrity": "sha512-jCTSqDANfRzk909v4YoZQi7jlGRB2MTvgG+spVBc/BA4tOs1oWJr//V6yYujqNq9UybpOtsSfBqxI0dSOEFJHQ==", + "version": "8.8.4", + "resolved": "https://registry.npmmirror.com/mongoose/-/mongoose-8.8.4.tgz", + "integrity": "sha512-yJbn695qCsqDO+xyPII29x2R7flzXhxCDv09mMZPSGllf0sm4jKw3E9s9uvQ9hjO6bL2xjU8KKowYqcY9eSTMQ==", + "license": "MIT", "dependencies": { "bson": "^6.7.0", "kareem": "2.6.3", @@ -764,6 +817,24 @@ "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, + "node_modules/multer": { + "version": "1.4.5-lts.1", + "resolved": "https://registry.npmmirror.com/multer/-/multer-1.4.5-lts.1.tgz", + "integrity": "sha512-ywPWvcDMeH+z9gQq5qYHCCy+ethsk4goepZ45GLD63fOu0YcNecQxi64nDs3qluZB+murG3/D4dJ7+dGctcCQQ==", + "license": "MIT", + "dependencies": { + "append-field": "^1.0.0", + "busboy": "^1.0.0", + "concat-stream": "^1.5.2", + "mkdirp": "^0.5.4", + "object-assign": "^4.1.1", + "type-is": "^1.6.4", + "xtend": "^4.0.0" + }, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-0.6.3.tgz", @@ -820,6 +891,12 @@ "resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "license": "MIT" + }, "node_modules/promise": { "version": "6.1.0", "resolved": "https://registry.npmmirror.com/promise/-/promise-6.1.0.tgz", @@ -878,6 +955,21 @@ "node": ">= 0.8" } }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, "node_modules/repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmmirror.com/repeat-string/-/repeat-string-1.6.1.tgz", @@ -981,6 +1073,23 @@ "node": ">= 0.6" } }, + "node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, "node_modules/tr46": { "version": "4.1.1", "resolved": "https://registry.npmmirror.com/tr46/-/tr46-4.1.1.tgz", @@ -1054,6 +1163,12 @@ "node": ">= 0.6" } }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmmirror.com/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "license": "MIT" + }, "node_modules/uglify-js": { "version": "2.8.29", "resolved": "https://registry.npmmirror.com/uglify-js/-/uglify-js-2.8.29.tgz", @@ -1094,6 +1209,12 @@ "node": ">= 0.8" } }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, "node_modules/utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/utils-merge/-/utils-merge-1.0.1.tgz", @@ -1174,6 +1295,15 @@ "node": ">=0.4.0" } }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmmirror.com/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, "node_modules/yargs": { "version": "3.10.0", "resolved": "https://registry.npmmirror.com/yargs/-/yargs-3.10.0.tgz", @@ -1245,6 +1375,11 @@ "resolved": "https://registry.npmmirror.com/amdefine/-/amdefine-1.0.1.tgz", "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==" }, + "append-field": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/append-field/-/append-field-1.0.0.tgz", + "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==" + }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmmirror.com/array-flatten/-/array-flatten-1.1.1.tgz", @@ -1285,6 +1420,19 @@ "resolved": "https://registry.npmmirror.com/bson/-/bson-6.10.0.tgz", "integrity": "sha512-ROchNosXMJD2cbQGm84KoP7vOGPO6/bOAW0veMMbzhXLqoZptcaYRVLitwvuhwhjjpU1qP4YZRWLhgETdgqUQw==" }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmmirror.com/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "requires": { + "streamsearch": "^1.1.0" + } + }, "bytes": { "version": "3.0.0", "resolved": "https://registry.npmmirror.com/bytes/-/bytes-3.0.0.tgz", @@ -1343,6 +1491,17 @@ "resolved": "https://registry.npmmirror.com/commander/-/commander-2.6.0.tgz", "integrity": "sha512-PhbTMT+ilDXZKqH8xbvuUY2ZEQNef0Q7DKxgoEKb4ccytsdvVVJmYqR0sGbi96nxU6oGrwEIQnclpK2NBZuQlg==" }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmmirror.com/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, "constantinople": { "version": "3.0.2", "resolved": "https://registry.npmmirror.com/constantinople/-/constantinople-3.0.2.tgz", @@ -1380,6 +1539,11 @@ "resolved": "https://registry.npmmirror.com/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, "cors": { "version": "2.8.5", "resolved": "https://registry.npmmirror.com/cors/-/cors-2.8.5.tgz", @@ -1563,6 +1727,11 @@ "resolved": "https://registry.npmmirror.com/is-promise/-/is-promise-2.2.2.tgz", "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, "jade": { "version": "1.11.0", "resolved": "https://registry.npmmirror.com/jade/-/jade-1.11.0.tgz", @@ -1683,9 +1852,9 @@ } }, "mongoose": { - "version": "8.8.2", - "resolved": "https://registry.npmmirror.com/mongoose/-/mongoose-8.8.2.tgz", - "integrity": "sha512-jCTSqDANfRzk909v4YoZQi7jlGRB2MTvgG+spVBc/BA4tOs1oWJr//V6yYujqNq9UybpOtsSfBqxI0dSOEFJHQ==", + "version": "8.8.4", + "resolved": "https://registry.npmmirror.com/mongoose/-/mongoose-8.8.4.tgz", + "integrity": "sha512-yJbn695qCsqDO+xyPII29x2R7flzXhxCDv09mMZPSGllf0sm4jKw3E9s9uvQ9hjO6bL2xjU8KKowYqcY9eSTMQ==", "requires": { "bson": "^6.7.0", "kareem": "2.6.3", @@ -1748,6 +1917,20 @@ "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, + "multer": { + "version": "1.4.5-lts.1", + "resolved": "https://registry.npmmirror.com/multer/-/multer-1.4.5-lts.1.tgz", + "integrity": "sha512-ywPWvcDMeH+z9gQq5qYHCCy+ethsk4goepZ45GLD63fOu0YcNecQxi64nDs3qluZB+murG3/D4dJ7+dGctcCQQ==", + "requires": { + "append-field": "^1.0.0", + "busboy": "^1.0.0", + "concat-stream": "^1.5.2", + "mkdirp": "^0.5.4", + "object-assign": "^4.1.1", + "type-is": "^1.6.4", + "xtend": "^4.0.0" + } + }, "negotiator": { "version": "0.6.3", "resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-0.6.3.tgz", @@ -1789,6 +1972,11 @@ "resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, "promise": { "version": "6.1.0", "resolved": "https://registry.npmmirror.com/promise/-/promise-6.1.0.tgz", @@ -1832,6 +2020,20 @@ "unpipe": "1.0.0" } }, + "readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, "repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmmirror.com/repeat-string/-/repeat-string-1.6.1.tgz", @@ -1917,6 +2119,19 @@ "resolved": "https://registry.npmmirror.com/statuses/-/statuses-1.4.0.tgz", "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" }, + "streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, "tr46": { "version": "4.1.1", "resolved": "https://registry.npmmirror.com/tr46/-/tr46-4.1.1.tgz", @@ -1976,6 +2191,11 @@ "mime-types": "~2.1.24" } }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmmirror.com/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" + }, "uglify-js": { "version": "2.8.29", "resolved": "https://registry.npmmirror.com/uglify-js/-/uglify-js-2.8.29.tgz", @@ -2004,6 +2224,11 @@ "resolved": "https://registry.npmmirror.com/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==" }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/utils-merge/-/utils-merge-1.0.1.tgz", @@ -2059,6 +2284,11 @@ "resolved": "https://registry.npmmirror.com/wordwrap/-/wordwrap-0.0.2.tgz", "integrity": "sha512-xSBsCeh+g+dinoBv3GAOWM4LcVVO68wLXRanibtBSdUvkGWQRGeE9P7IwU9EmDDi4jA6L44lz15CGMwdw9N5+Q==" }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmmirror.com/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, "yargs": { "version": "3.10.0", "resolved": "https://registry.npmmirror.com/yargs/-/yargs-3.10.0.tgz", diff --git a/demo_server/package.json b/demo_server/package.json index 5105ba37351e36ac90f5c7286d21511a49ff3d35..b29722642f3e5021803a1e79fdea8f38f22e3f4d 100644 --- a/demo_server/package.json +++ b/demo_server/package.json @@ -3,7 +3,7 @@ "version": "0.0.0", "private": true, "scripts": { - "start": "node ./bin/www" + "start": "nodemon ./bin/www" }, "dependencies": { "cookie-parser": "~1.4.4", @@ -12,7 +12,8 @@ "express": "~4.16.1", "http-errors": "~1.6.3", "jade": "~1.11.0", - "mongoose": "^8.8.2", - "morgan": "~1.9.1" + "mongoose": "^8.8.4", + "morgan": "~1.9.1", + "multer": "^1.4.5-lts.1" } } diff --git a/demo_server/routes/index.js b/demo_server/routes/index.js index 2de26960a5c4e31e06c39684f3430e91201d97ea..d1d6a6a1458f6a94f8e15587cd17232c854835f1 100644 --- a/demo_server/routes/index.js +++ b/demo_server/routes/index.js @@ -1,27 +1,171 @@ var express = require('express'); -var api = express.Router(); +var router = express.Router(); +const multer = require('multer'); +const path = require('path'); +const { User,Address } = require('../db/model'); -//结构集合 -const { } = require('../modules/module') -//数据测试接口 -api.get('/', async (req, res) => { - const list = await [{ - id: 1, - name: '张三', - age: 18 - }] +const bodyParser = require('body-parser'); +const app = express(); +app.use(bodyParser.json()); +app.use(bodyParser.urlencoded({ extended: true })); + + + +// 设置 multer 存储配置 +const storage = multer.diskStorage({ + destination: (req, file, cb) => { + cb(null, 'uploads/'); // 存储文件的位置 + }, + filename: (req, file, cb) => { + const uniqueSuffix = Date.now() + '-' + Math.round(Math.random() * 1E9); + cb(null, uniqueSuffix + path.extname(file.originalname)); // 重命名文件 + } +}); + + +const upload = multer({ storage: storage }); + +/* GET home page. */ +router.get('/', function(req, res, next) { + res.render('index', { title: 'Express' }); +}); + +// 获取用户信息 +router.get('/user', async function(req, res, next) { + const user = await User.find(); res.send({ code: 200, - msg: '这里是Api测试接口', - data: { - list: list, + msg: 'success', + data: user + }); +}); + +// 添加用户 +router.post('/user/add', async function(req, res, next) { + const user = req.body; + await User.create(user); + res.send({ + code: 200, + msg: 'success', + data: user + }); +}); + +// 上传头像 +router.post('/uploadAvatar', upload.single('avatar'), async function(req, res, next) { + console.log('收到的用户ID:', req.body.userId); // 打印用户ID + const userId = req.body.userId; + + if (!userId) { + return res.status(400).json({ code: 400, message: '用户ID缺失' }); + } + + // 更新用户头像 + const filePath = `http://localhost:3000/${req.file.path}`; + const updatedUser = await User.updateOne({ _id: userId }, { avatar: filePath }); + + if (updatedUser.nModified > 0) { + res.json({ code: 200, message: '头像上传成功' }); + } else { + res.status(400).json({ code: 400, message: '头像上传失败,用户ID无效' }); + } +}); + +// 更新用户信息 +router.put('/user/:id', async function(req, res) { + const userId = req.params.id; + const updatedData = req.body; + + console.log('更新的数据:', updatedData); // 打印请求体 + + try { + const updatedUser = await User.updateOne({ _id: userId }, { $set: updatedData }); + if (updatedUser.nModified > 0) { + res.json({ code: 200, message: '用户信息更新成功' }); + } else { + res.status(200).json({ code: 200, message: 'OK' }); + } + } catch (error) { + + } +}); + +//收货地址 + +router.get('/address', async function(req, res, next) { + const address = await Address.find(); + res.send({ + code: 200, + msg: 'success', + data: address + }); +}); + +//添加收货地址 +router.post('/address/add', async function(req, res, next) { + const address = req.body; + + const id = address.length + 1; + await Address.create(address); + res.send({ + code: 200, + msg: 'success', + data: address + }); +}); + +//更改收货地址状态 +// app.post('/setDefaultAddress', async function (req, res) { +// const { id } = req.body; +// try { +// // 将所有地址的默认字段设为 false +// await Address.updateMany({}, { default: false }); +// // 将指定地址的默认字段设为 true +// await Address.updateOne({ id }, { default: true }); +// res.json({ code: 200, message: '设置默认地址成功' }); +// } catch (error) { +// res.status(500).json({ code: 500, message: '设置默认地址失败' }); +// } +// }); + +//更新地址 +router.put('/updateAddress', async function (req, res) { + const { id, address, name, phone } = req.body; + try { + const result = await Address.updateOne({ id }, { address, name, phone }); + if (result.nModified > 0) { + res.json({ code: 200, message: '更新地址成功' }); + } else { + res.status(400).json({ code: 400, message: '没有修改任何数据' }); + } + } catch (error) { + console.error("更新地址失败:", error); + res.status(500).json({ code: 500, message: '更新地址失败' }); + } +}); + +router.delete('/deleteAddress/:id', async (req, res) => { + const id = req.params.id; + try { + const result = await Address.deleteOne({ id }); + if (result.deletedCount > 0) { + return res.json({ code: 200, message: '删除成功' }); + } else { + return res.status(404).json({ code: 404, message: '地址未找到' }); + } + } catch (error) { + console.error("删除地址时出错:", error); + res.status(500).json({ code: 500, message: '删除失败' }); + } +}); + + + + - } - }) -}) @@ -29,4 +173,4 @@ api.get('/', async (req, res) => { -module.exports = api; \ No newline at end of file +module.exports = router;