diff --git a/index.html b/index.html index dde16aa..779ebc4 100644 --- a/index.html +++ b/index.html @@ -2,9 +2,9 @@ - + - Vite + Vue + TS + 食光集
diff --git a/package.json b/package.json index fe2555b..1bdd3ed 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,8 @@ "private": true, "version": "0.0.0", "scripts": { - "dev": "vite", - "build": "vue-tsc -b && vite build", + "dev": "vite --host 0.0.0.0", + "build": "vite build", "preview": "vite preview" }, "dependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 244ff53..20540f0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,12 +8,18 @@ importers: .: dependencies: + '@vueuse/core': + specifier: ^13.1.0 + version: 13.4.0(vue@3.5.17(typescript@5.8.3)) + element-plus: + specifier: ^2.9.7 + version: 2.10.2(vue@3.5.17(typescript@5.8.3)) vue: specifier: ^3.5.13 version: 3.5.17(typescript@5.8.3) vue3-common: specifier: git+https://gitee.com/Cxx0822/vue3-common - version: git+https://gitee.com/Cxx0822/vue3-common#ba7c8a0b1a20a714f0bf09b10d9486b5fd518ca0(axios@1.10.0)(crypto-js@4.2.0)(echarts@5.6.0)(element-plus@2.10.2(vue@3.5.17(typescript@5.8.3)))(font-awesome@4.7.0)(js-cookie@3.0.5)(path-browserify@1.0.1)(pinia@2.3.1(typescript@5.8.3)(vue@3.5.17(typescript@5.8.3)))(qs@6.14.0)(vue-router@4.5.1(vue@3.5.17(typescript@5.8.3)))(vue@3.5.17(typescript@5.8.3)) + version: git+https://gitee.com/Cxx0822/vue3-common#4cabccc268f404bef9fd13078ff88fc2830b7461(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0)(typescript@5.8.3))(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint-config-standard@16.0.3(eslint-plugin-import@2.32.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0))(eslint-plugin-node@11.1.0(eslint@7.32.0))(eslint-plugin-promise@5.2.0(eslint@7.32.0))(eslint@7.32.0))(eslint-plugin-import@2.32.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0))(eslint-plugin-node@11.1.0(eslint@7.32.0))(eslint-plugin-promise@5.2.0(eslint@7.32.0))(eslint-plugin-vue@8.7.1(eslint@7.32.0))(eslint@7.32.0)(pinia@2.3.1(typescript@5.8.3)(vue@3.5.17(typescript@5.8.3)))(vue-router@4.5.1(vue@3.5.17(typescript@5.8.3)))(vue@3.5.17(typescript@5.8.3)) vue3-emoji-picker: specifier: ^1.1.8 version: 1.1.8(typescript@5.8.3) @@ -29,7 +35,7 @@ importers: version: 5.62.0(eslint@7.32.0)(typescript@5.8.3) '@vitejs/plugin-vue': specifier: ^5.2.3 - version: 5.2.4(vite@6.3.5(@types/node@18.19.112))(vue@3.5.17(typescript@5.8.3)) + version: 5.2.4(vite@6.3.5(@types/node@18.19.112)(sass@1.89.2))(vue@3.5.17(typescript@5.8.3)) '@vue/tsconfig': specifier: ^0.7.0 version: 0.7.0(typescript@5.8.3)(vue@3.5.17(typescript@5.8.3)) @@ -51,12 +57,15 @@ importers: eslint-plugin-vue: specifier: ^8.7.1 version: 8.7.1(eslint@7.32.0) + sass: + specifier: ^1.86.3 + version: 1.89.2 typescript: specifier: ~5.8.3 version: 5.8.3 vite: specifier: ^6.3.5 - version: 6.3.5(@types/node@18.19.112) + version: 6.3.5(@types/node@18.19.112)(sass@1.89.2) vue-tsc: specifier: ^2.2.8 version: 2.2.10(typescript@5.8.3) @@ -301,6 +310,94 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@parcel/watcher-android-arm64@2.5.1': + resolution: {integrity: sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [android] + + '@parcel/watcher-darwin-arm64@2.5.1': + resolution: {integrity: sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [darwin] + + '@parcel/watcher-darwin-x64@2.5.1': + resolution: {integrity: sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [darwin] + + '@parcel/watcher-freebsd-x64@2.5.1': + resolution: {integrity: sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [freebsd] + + '@parcel/watcher-linux-arm-glibc@2.5.1': + resolution: {integrity: sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==} + engines: {node: '>= 10.0.0'} + cpu: [arm] + os: [linux] + libc: [glibc] + + '@parcel/watcher-linux-arm-musl@2.5.1': + resolution: {integrity: sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==} + engines: {node: '>= 10.0.0'} + cpu: [arm] + os: [linux] + libc: [musl] + + '@parcel/watcher-linux-arm64-glibc@2.5.1': + resolution: {integrity: sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@parcel/watcher-linux-arm64-musl@2.5.1': + resolution: {integrity: sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@parcel/watcher-linux-x64-glibc@2.5.1': + resolution: {integrity: sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@parcel/watcher-linux-x64-musl@2.5.1': + resolution: {integrity: sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] + + '@parcel/watcher-win32-arm64@2.5.1': + resolution: {integrity: sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [win32] + + '@parcel/watcher-win32-ia32@2.5.1': + resolution: {integrity: sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==} + engines: {node: '>= 10.0.0'} + cpu: [ia32] + os: [win32] + + '@parcel/watcher-win32-x64@2.5.1': + resolution: {integrity: sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [win32] + + '@parcel/watcher@2.5.1': + resolution: {integrity: sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==} + engines: {node: '>= 10.0.0'} + '@popperjs/core@2.11.8': resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} @@ -448,6 +545,9 @@ packages: '@types/web-bluetooth@0.0.16': resolution: {integrity: sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==} + '@types/web-bluetooth@0.0.21': + resolution: {integrity: sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==} + '@typescript-eslint/eslint-plugin@5.62.0': resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -576,12 +676,25 @@ packages: vue: optional: true + '@vueuse/core@13.4.0': + resolution: {integrity: sha512-OnK7zW3bTq/QclEk17+vDFN3tuAm8ONb9zQUIHrYQkkFesu3WeGUx/3YzpEp+ly53IfDAT9rsYXgGW6piNZC5w==} + peerDependencies: + vue: ^3.5.0 + '@vueuse/core@9.13.0': resolution: {integrity: sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==} + '@vueuse/metadata@13.4.0': + resolution: {integrity: sha512-CPDQ/IgOeWbqItg1c/pS+Ulum63MNbpJ4eecjFJqgD/JUCJ822zLfpw6M9HzSvL6wbzMieOtIAW/H8deQASKHg==} + '@vueuse/metadata@9.13.0': resolution: {integrity: sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ==} + '@vueuse/shared@13.4.0': + resolution: {integrity: sha512-+AxuKbw8R1gYy5T21V5yhadeNM7rJqb4cPaRI9DdGnnNl3uqXh+unvQ3uCaA2DjYLbNr1+l7ht/B4qEsRegX6A==} + peerDependencies: + vue: ^3.5.0 + '@vueuse/shared@9.13.0': resolution: {integrity: sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==} @@ -720,6 +833,10 @@ packages: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} + chokidar@4.0.3: + resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} + engines: {node: '>= 14.16.0'} + color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} @@ -817,6 +934,11 @@ packages: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} + detect-libc@1.0.3: + resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==} + engines: {node: '>=0.10'} + hasBin: true + dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -1085,10 +1207,6 @@ packages: debug: optional: true - font-awesome@4.7.0: - resolution: {integrity: sha512-U6kGnykA/6bFmg1M/oT9EkFeIYv7JlX3bozwQJWiiLz6L0w3F5vBVPxHlwyX/vtNq1ckcpRKOB9f2Qal/VtFpg==} - engines: {node: '>=0.10.3'} - for-each@0.3.5: resolution: {integrity: sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==} engines: {node: '>= 0.4'} @@ -1157,10 +1275,6 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - happy-dom@16.8.1: - resolution: {integrity: sha512-n0QrmT9lD81rbpKsyhnlz3DgnMZlaOkJPpgi746doA+HvaMC79bdWkwjrNnGJRvDrWTI8iOcJiVTJ5CdT/AZRw==} - engines: {node: '>=18.0.0'} - has-bigints@1.1.0: resolution: {integrity: sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==} engines: {node: '>= 0.4'} @@ -1207,6 +1321,9 @@ packages: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} + immutable@5.1.3: + resolution: {integrity: sha512-+chQdDfvscSF1SJqv2gn4SRO2ZyS3xL3r7IW/wWEEzrzLisnOlKiQu5ytC/BVNcS15C39WT2Hg/bjKjDMcu+zg==} + import-fresh@3.3.1: resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} engines: {node: '>=6'} @@ -1452,6 +1569,9 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + node-addon-api@7.1.1: + resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==} + normalize-wheel-es@1.2.0: resolution: {integrity: sha512-Wj7+EJQ8mSuXr2iWfnujrimU35R2W4FAErEyTmJoJ7ucwTn2hOUSsRehMb5RSYkxXGTM7Y9QpvPmp++w5ftoJw==} @@ -1569,6 +1689,10 @@ packages: queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + readdirp@4.1.2: + resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} + engines: {node: '>= 14.18.0'} + reflect.getprototypeof@1.0.10: resolution: {integrity: sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==} engines: {node: '>= 0.4'} @@ -1623,6 +1747,11 @@ packages: resolution: {integrity: sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==} engines: {node: '>= 0.4'} + sass@1.89.2: + resolution: {integrity: sha512-xCmtksBKd/jdJ9Bt9p7nPKiuqrlBMBuuGkQlkhZjjQk3Ty48lv93k5Dq6OPkKt4XwxDJ7tvlfrTa1MPA9bf+QA==} + engines: {node: '>=14.0.0'} + hasBin: true + semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true @@ -1884,19 +2013,11 @@ packages: peerDependencies: typescript: '>=5.0.0' - vue3-common@git+https://gitee.com/Cxx0822/vue3-common#ba7c8a0b1a20a714f0bf09b10d9486b5fd518ca0: - resolution: {commit: ba7c8a0b1a20a714f0bf09b10d9486b5fd518ca0, repo: https://gitee.com/Cxx0822/vue3-common, type: git} + vue3-common@git+https://gitee.com/Cxx0822/vue3-common#4cabccc268f404bef9fd13078ff88fc2830b7461: + resolution: {commit: 4cabccc268f404bef9fd13078ff88fc2830b7461, repo: https://gitee.com/Cxx0822/vue3-common, type: git} version: 1.0.0 peerDependencies: - axios: ^1.4.0 || 0.27.2 - crypto-js: ^4.2.0 - echarts: ^5.5.1 - element-plus: ^2.6.0 - font-awesome: ^4.7.0 - js-cookie: ^3.0.5 - path-browserify: ^1.0.1 pinia: ^2.3.0 - qs: ^6.13.0 vue: ^3.5.12 vue-router: ^4.2.2 @@ -1904,6 +2025,19 @@ packages: resolution: {integrity: sha512-k9tVHeQEBVLzVCLYAkFaI1nib3FJFQwdPhWD5khJkhks3ktg3g12z5wPGOSDpIuSLNtelRGvq1qdmZuJu5khfA==} engines: {node: '>=16.0.0'} + vue3-eslint@git+https://gitee.com/Cxx0822/vue3-eslint#849a4e0e783d3ecc57035fb2f92950998b6b2e41: + resolution: {commit: 849a4e0e783d3ecc57035fb2f92950998b6b2e41, repo: https://gitee.com/Cxx0822/vue3-eslint, type: git} + version: 1.0.0 + peerDependencies: + '@typescript-eslint/eslint-plugin': ^5.40.1 + '@typescript-eslint/parser': ^5.40.1 + eslint: ^7.32.0 + eslint-config-standard: ^16.0.3 + eslint-plugin-import: ^2.25.4 + eslint-plugin-node: ^11.1.0 + eslint-plugin-promise: ^5.2.0 + eslint-plugin-vue: ^8.5.0 + vue@3.5.17: resolution: {integrity: sha512-LbHV3xPN9BeljML+Xctq4lbz2lVHCR6DtbpTf5XIO6gugpXUN49j2QQPcMj086r9+AkJ0FfUT8xjulKKBkkr9g==} peerDependencies: @@ -1912,14 +2046,6 @@ packages: typescript: optional: true - webidl-conversions@7.0.0: - resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} - engines: {node: '>=12'} - - whatwg-mimetype@3.0.0: - resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==} - engines: {node: '>=12'} - which-boxed-primitive@1.1.1: resolution: {integrity: sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==} engines: {node: '>= 0.4'} @@ -2118,6 +2244,67 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.19.1 + '@parcel/watcher-android-arm64@2.5.1': + optional: true + + '@parcel/watcher-darwin-arm64@2.5.1': + optional: true + + '@parcel/watcher-darwin-x64@2.5.1': + optional: true + + '@parcel/watcher-freebsd-x64@2.5.1': + optional: true + + '@parcel/watcher-linux-arm-glibc@2.5.1': + optional: true + + '@parcel/watcher-linux-arm-musl@2.5.1': + optional: true + + '@parcel/watcher-linux-arm64-glibc@2.5.1': + optional: true + + '@parcel/watcher-linux-arm64-musl@2.5.1': + optional: true + + '@parcel/watcher-linux-x64-glibc@2.5.1': + optional: true + + '@parcel/watcher-linux-x64-musl@2.5.1': + optional: true + + '@parcel/watcher-win32-arm64@2.5.1': + optional: true + + '@parcel/watcher-win32-ia32@2.5.1': + optional: true + + '@parcel/watcher-win32-x64@2.5.1': + optional: true + + '@parcel/watcher@2.5.1': + dependencies: + detect-libc: 1.0.3 + is-glob: 4.0.3 + micromatch: 4.0.8 + node-addon-api: 7.1.1 + optionalDependencies: + '@parcel/watcher-android-arm64': 2.5.1 + '@parcel/watcher-darwin-arm64': 2.5.1 + '@parcel/watcher-darwin-x64': 2.5.1 + '@parcel/watcher-freebsd-x64': 2.5.1 + '@parcel/watcher-linux-arm-glibc': 2.5.1 + '@parcel/watcher-linux-arm-musl': 2.5.1 + '@parcel/watcher-linux-arm64-glibc': 2.5.1 + '@parcel/watcher-linux-arm64-musl': 2.5.1 + '@parcel/watcher-linux-x64-glibc': 2.5.1 + '@parcel/watcher-linux-x64-musl': 2.5.1 + '@parcel/watcher-win32-arm64': 2.5.1 + '@parcel/watcher-win32-ia32': 2.5.1 + '@parcel/watcher-win32-x64': 2.5.1 + optional: true + '@popperjs/core@2.11.8': {} '@rollup/rollup-android-arm-eabi@4.44.0': @@ -2206,6 +2393,8 @@ snapshots: '@types/web-bluetooth@0.0.16': {} + '@types/web-bluetooth@0.0.21': {} + '@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0)(typescript@5.8.3)': dependencies: '@eslint-community/regexpp': 4.12.1 @@ -2290,9 +2479,9 @@ snapshots: '@typescript-eslint/types': 5.62.0 eslint-visitor-keys: 3.4.3 - '@vitejs/plugin-vue@5.2.4(vite@6.3.5(@types/node@18.19.112))(vue@3.5.17(typescript@5.8.3))': + '@vitejs/plugin-vue@5.2.4(vite@6.3.5(@types/node@18.19.112)(sass@1.89.2))(vue@3.5.17(typescript@5.8.3))': dependencies: - vite: 6.3.5(@types/node@18.19.112) + vite: 6.3.5(@types/node@18.19.112)(sass@1.89.2) vue: 3.5.17(typescript@5.8.3) '@volar/language-core@2.4.14': @@ -2386,6 +2575,13 @@ snapshots: typescript: 5.8.3 vue: 3.5.17(typescript@5.8.3) + '@vueuse/core@13.4.0(vue@3.5.17(typescript@5.8.3))': + dependencies: + '@types/web-bluetooth': 0.0.21 + '@vueuse/metadata': 13.4.0 + '@vueuse/shared': 13.4.0(vue@3.5.17(typescript@5.8.3)) + vue: 3.5.17(typescript@5.8.3) + '@vueuse/core@9.13.0(vue@3.5.17(typescript@5.8.3))': dependencies: '@types/web-bluetooth': 0.0.16 @@ -2396,8 +2592,14 @@ snapshots: - '@vue/composition-api' - vue + '@vueuse/metadata@13.4.0': {} + '@vueuse/metadata@9.13.0': {} + '@vueuse/shared@13.4.0(vue@3.5.17(typescript@5.8.3))': + dependencies: + vue: 3.5.17(typescript@5.8.3) + '@vueuse/shared@9.13.0(vue@3.5.17(typescript@5.8.3))': dependencies: vue-demi: 0.14.10(vue@3.5.17(typescript@5.8.3)) @@ -2570,6 +2772,10 @@ snapshots: ansi-styles: 4.3.0 supports-color: 7.2.0 + chokidar@4.0.3: + dependencies: + readdirp: 4.1.2 + color-convert@1.9.3: dependencies: color-name: 1.1.3 @@ -2659,6 +2865,9 @@ snapshots: delayed-stream@1.0.0: {} + detect-libc@1.0.3: + optional: true + dir-glob@3.0.1: dependencies: path-type: 4.0.0 @@ -3056,8 +3265,6 @@ snapshots: follow-redirects@1.15.9: {} - font-awesome@4.7.0: {} - for-each@0.3.5: dependencies: is-callable: 1.2.7 @@ -3149,11 +3356,6 @@ snapshots: graphemer@1.4.0: {} - happy-dom@16.8.1: - dependencies: - webidl-conversions: 7.0.0 - whatwg-mimetype: 3.0.0 - has-bigints@1.1.0: {} has-flag@3.0.0: {} @@ -3186,6 +3388,8 @@ snapshots: ignore@5.3.2: {} + immutable@5.1.3: {} + import-fresh@3.3.1: dependencies: parent-module: 1.0.1 @@ -3410,6 +3614,9 @@ snapshots: natural-compare@1.4.0: {} + node-addon-api@7.1.1: + optional: true + normalize-wheel-es@1.2.0: {} nth-check@2.1.1: @@ -3525,6 +3732,8 @@ snapshots: queue-microtask@1.2.3: {} + readdirp@4.1.2: {} + reflect.getprototypeof@1.0.10: dependencies: call-bind: 1.0.8 @@ -3612,6 +3821,14 @@ snapshots: es-errors: 1.3.0 is-regex: 1.2.1 + sass@1.89.2: + dependencies: + chokidar: 4.0.3 + immutable: 5.1.3 + source-map-js: 1.2.1 + optionalDependencies: + '@parcel/watcher': 2.5.1 + semver@6.3.1: {} semver@7.7.2: {} @@ -3840,7 +4057,7 @@ snapshots: v8-compile-cache@2.4.0: {} - vite@6.3.5(@types/node@18.19.112): + vite@6.3.5(@types/node@18.19.112)(sass@1.89.2): dependencies: esbuild: 0.25.5 fdir: 6.4.6(picomatch@4.0.2) @@ -3851,6 +4068,7 @@ snapshots: optionalDependencies: '@types/node': 18.19.112 fsevents: 2.3.3 + sass: 1.89.2 vscode-uri@3.1.0: {} @@ -3886,7 +4104,7 @@ snapshots: '@vue/language-core': 2.2.10(typescript@5.8.3) typescript: 5.8.3 - vue3-common@git+https://gitee.com/Cxx0822/vue3-common#ba7c8a0b1a20a714f0bf09b10d9486b5fd518ca0(axios@1.10.0)(crypto-js@4.2.0)(echarts@5.6.0)(element-plus@2.10.2(vue@3.5.17(typescript@5.8.3)))(font-awesome@4.7.0)(js-cookie@3.0.5)(path-browserify@1.0.1)(pinia@2.3.1(typescript@5.8.3)(vue@3.5.17(typescript@5.8.3)))(qs@6.14.0)(vue-router@4.5.1(vue@3.5.17(typescript@5.8.3)))(vue@3.5.17(typescript@5.8.3)): + vue3-common@git+https://gitee.com/Cxx0822/vue3-common#4cabccc268f404bef9fd13078ff88fc2830b7461(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0)(typescript@5.8.3))(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint-config-standard@16.0.3(eslint-plugin-import@2.32.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0))(eslint-plugin-node@11.1.0(eslint@7.32.0))(eslint-plugin-promise@5.2.0(eslint@7.32.0))(eslint@7.32.0))(eslint-plugin-import@2.32.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0))(eslint-plugin-node@11.1.0(eslint@7.32.0))(eslint-plugin-promise@5.2.0(eslint@7.32.0))(eslint-plugin-vue@8.7.1(eslint@7.32.0))(eslint@7.32.0)(pinia@2.3.1(typescript@5.8.3)(vue@3.5.17(typescript@5.8.3)))(vue-router@4.5.1(vue@3.5.17(typescript@5.8.3)))(vue@3.5.17(typescript@5.8.3)): dependencies: '@fortawesome/fontawesome-free': 6.7.2 '@popperjs/core': 2.11.8 @@ -3896,8 +4114,6 @@ snapshots: dayjs: 1.11.13 echarts: 5.6.0 element-plus: 2.10.2(vue@3.5.17(typescript@5.8.3)) - font-awesome: 4.7.0 - happy-dom: 16.8.1 js-cookie: 3.0.5 lunar-calendar: 0.1.4 lunar-javascript: 1.7.3 @@ -3907,6 +4123,18 @@ snapshots: v-calendar: 3.1.2(@popperjs/core@2.11.8)(vue@3.5.17(typescript@5.8.3)) vue: 3.5.17(typescript@5.8.3) vue-router: 4.5.1(vue@3.5.17(typescript@5.8.3)) + vue3-eslint: git+https://gitee.com/Cxx0822/vue3-eslint#849a4e0e783d3ecc57035fb2f92950998b6b2e41(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0)(typescript@5.8.3))(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint-config-standard@16.0.3(eslint-plugin-import@2.32.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0))(eslint-plugin-node@11.1.0(eslint@7.32.0))(eslint-plugin-promise@5.2.0(eslint@7.32.0))(eslint@7.32.0))(eslint-plugin-import@2.32.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0))(eslint-plugin-node@11.1.0(eslint@7.32.0))(eslint-plugin-promise@5.2.0(eslint@7.32.0))(eslint-plugin-vue@8.7.1(eslint@7.32.0))(eslint@7.32.0) + transitivePeerDependencies: + - '@typescript-eslint/eslint-plugin' + - '@typescript-eslint/parser' + - '@vue/composition-api' + - debug + - eslint + - eslint-config-standard + - eslint-plugin-import + - eslint-plugin-node + - eslint-plugin-promise + - eslint-plugin-vue vue3-emoji-picker@1.1.8(typescript@5.8.3): dependencies: @@ -3916,6 +4144,17 @@ snapshots: transitivePeerDependencies: - typescript + vue3-eslint@git+https://gitee.com/Cxx0822/vue3-eslint#849a4e0e783d3ecc57035fb2f92950998b6b2e41(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0)(typescript@5.8.3))(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint-config-standard@16.0.3(eslint-plugin-import@2.32.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0))(eslint-plugin-node@11.1.0(eslint@7.32.0))(eslint-plugin-promise@5.2.0(eslint@7.32.0))(eslint@7.32.0))(eslint-plugin-import@2.32.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0))(eslint-plugin-node@11.1.0(eslint@7.32.0))(eslint-plugin-promise@5.2.0(eslint@7.32.0))(eslint-plugin-vue@8.7.1(eslint@7.32.0))(eslint@7.32.0): + dependencies: + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0)(typescript@5.8.3) + '@typescript-eslint/parser': 5.62.0(eslint@7.32.0)(typescript@5.8.3) + eslint: 7.32.0 + eslint-config-standard: 16.0.3(eslint-plugin-import@2.32.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0))(eslint-plugin-node@11.1.0(eslint@7.32.0))(eslint-plugin-promise@5.2.0(eslint@7.32.0))(eslint@7.32.0) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.3))(eslint@7.32.0) + eslint-plugin-node: 11.1.0(eslint@7.32.0) + eslint-plugin-promise: 5.2.0(eslint@7.32.0) + eslint-plugin-vue: 8.7.1(eslint@7.32.0) + vue@3.5.17(typescript@5.8.3): dependencies: '@vue/compiler-dom': 3.5.17 @@ -3926,10 +4165,6 @@ snapshots: optionalDependencies: typescript: 5.8.3 - webidl-conversions@7.0.0: {} - - whatwg-mimetype@3.0.0: {} - which-boxed-primitive@1.1.1: dependencies: is-bigint: 1.1.0 diff --git a/public/logo.ico b/public/logo.ico new file mode 100644 index 0000000..9433e38 Binary files /dev/null and b/public/logo.ico differ diff --git a/public/vite.svg b/public/vite.svg deleted file mode 100644 index e7b8dfb..0000000 --- a/public/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/logo.png b/src/assets/logo.png new file mode 100644 index 0000000..4cb6009 Binary files /dev/null and b/src/assets/logo.png differ diff --git a/src/assets/logo/logo.png b/src/assets/logo/logo.png deleted file mode 100644 index 287d18d..0000000 Binary files a/src/assets/logo/logo.png and /dev/null differ diff --git a/src/components/ArriveButton.vue b/src/components/ArriveButton.vue new file mode 100644 index 0000000..8e38dac --- /dev/null +++ b/src/components/ArriveButton.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/src/components/DailyCard.vue b/src/components/DailyCard.vue new file mode 100644 index 0000000..10126c2 --- /dev/null +++ b/src/components/DailyCard.vue @@ -0,0 +1,111 @@ + + + + + diff --git a/src/components/DailySummary.vue b/src/components/DailySummary.vue new file mode 100644 index 0000000..1131661 --- /dev/null +++ b/src/components/DailySummary.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/src/components/DraggableButton.vue b/src/components/DraggableButton.vue new file mode 100644 index 0000000..4929006 --- /dev/null +++ b/src/components/DraggableButton.vue @@ -0,0 +1,101 @@ + + + diff --git a/src/components/Food/FoodCard.vue b/src/components/Food/FoodCard.vue new file mode 100644 index 0000000..84b1ccb --- /dev/null +++ b/src/components/Food/FoodCard.vue @@ -0,0 +1,129 @@ + + + + + diff --git a/src/components/Food/FoodDaily.vue b/src/components/Food/FoodDaily.vue new file mode 100644 index 0000000..416f042 --- /dev/null +++ b/src/components/Food/FoodDaily.vue @@ -0,0 +1,114 @@ + + + + + diff --git a/src/components/Food/FoodDailyItem.vue b/src/components/Food/FoodDailyItem.vue new file mode 100644 index 0000000..6985c8e --- /dev/null +++ b/src/components/Food/FoodDailyItem.vue @@ -0,0 +1,108 @@ + + + + + diff --git a/src/components/Food/FoodRecipe.vue b/src/components/Food/FoodRecipe.vue new file mode 100644 index 0000000..7c424ea --- /dev/null +++ b/src/components/Food/FoodRecipe.vue @@ -0,0 +1,97 @@ + + + + + diff --git a/src/components/Food/FoodTimeline.vue b/src/components/Food/FoodTimeline.vue new file mode 100644 index 0000000..dcaf384 --- /dev/null +++ b/src/components/Food/FoodTimeline.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/src/components/Moment/MomentCard.vue b/src/components/Moment/MomentCard.vue new file mode 100644 index 0000000..4018039 --- /dev/null +++ b/src/components/Moment/MomentCard.vue @@ -0,0 +1,105 @@ + + + + + diff --git a/src/components/Stats/FoodChart.vue b/src/components/Stats/FoodChart.vue new file mode 100644 index 0000000..c60351f --- /dev/null +++ b/src/components/Stats/FoodChart.vue @@ -0,0 +1,172 @@ + + + + + diff --git a/src/components/Stats/FoodRank.vue b/src/components/Stats/FoodRank.vue new file mode 100644 index 0000000..20b0e9f --- /dev/null +++ b/src/components/Stats/FoodRank.vue @@ -0,0 +1,33 @@ + + + diff --git a/src/components/Stats/FoodStats.vue b/src/components/Stats/FoodStats.vue new file mode 100644 index 0000000..33b4f83 --- /dev/null +++ b/src/components/Stats/FoodStats.vue @@ -0,0 +1,53 @@ + + + diff --git a/src/components/StatsCard.vue b/src/components/StatsCard.vue new file mode 100644 index 0000000..f14086c --- /dev/null +++ b/src/components/StatsCard.vue @@ -0,0 +1,92 @@ + + + + + diff --git a/src/layout/TabBar.vue b/src/layout/TabBar.vue index 73f2d84..a25beb3 100644 --- a/src/layout/TabBar.vue +++ b/src/layout/TabBar.vue @@ -1,14 +1,24 @@ diff --git a/src/layout/TitleBar.vue b/src/layout/TitleBar.vue index bfb5287..d2cab80 100644 --- a/src/layout/TitleBar.vue +++ b/src/layout/TitleBar.vue @@ -6,7 +6,7 @@ circle color="#FFFFFF" @click="goBackClick" />
- + {{ appStore.appName }}
diff --git a/src/main.ts b/src/main.ts index 430ad39..9737cd3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -12,6 +12,10 @@ import 'element-plus/theme-chalk/dark/css-vars.css' import 'dayjs/locale/zh-cn' import zhCn from 'element-plus/es/locale/lang/zh-cn' +// 引入日历组件 +import VCalendar from 'v-calendar' +import 'v-calendar/style.css' + // 引入font-awesome // import 'font-awesome/css/font-awesome.min.css' import '@fortawesome/fontawesome-free/css/all.css' @@ -24,5 +28,6 @@ app.use(router) app.use(createPinia()) // 使用Element UI Plus app.use(ElementPlus, { locale: zhCn }) +app.use(VCalendar, {}) // 挂载到根组件上 app.mount('#app') diff --git a/src/router/app.ts b/src/router/app.ts deleted file mode 100644 index 2b8641c..0000000 --- a/src/router/app.ts +++ /dev/null @@ -1,7 +0,0 @@ -import Layout from '@/layout/index.vue' -import { getRoutersByModules } from 'vue3-common/utils/routerUtil' -import { routerMeta } from '@/views/meta.ts' - -const routes = getRoutersByModules(import.meta.glob('@/views/app/**/*.vue'), Layout, routerMeta) - -export default routes diff --git a/src/router/menu.ts b/src/router/menu.ts new file mode 100644 index 0000000..1678cbd --- /dev/null +++ b/src/router/menu.ts @@ -0,0 +1,14 @@ +import { getRoutersByModules, sortRoutesByOrder } from 'vue3-common/utils/routerUtil' +import Layout from '@/layout/index.vue' +import { menuMeta } from '@/views/meta' + +const modules = { + ...import.meta.glob('@/views/record/**/*.vue'), + ...import.meta.glob('@/views/stats/**/*.vue'), + ...import.meta.glob('@/views/moment/**/*.vue'), + ...import.meta.glob('@/views/profile/**/*.vue') +} + +const menuRoutes = getRoutersByModules(modules, Layout, menuMeta) + +export default sortRoutesByOrder(menuRoutes) diff --git a/src/store/food.ts b/src/store/food.ts new file mode 100644 index 0000000..e6dc086 --- /dev/null +++ b/src/store/food.ts @@ -0,0 +1,235 @@ +import { defineStore } from 'pinia' +import type { + IFoodRecipe, IFoodMaterial, IFoodStep, + IFoodStats, IFoodRecord +} from '@/types/food' +// import { +// addFoodRecipeApi, addFoodRecordApi, deleteFoodRecipeApi, deleteFoodRecordApi, +// queryFoodNameListApi, queryFoodRecipeByIdApi, queryFoodRecipeApi, queryFoodRecordApi, +// queryFoodStatsApi, updateFoodRecipeApi, updateFoodRecordApi, queryFoodCategoryApi +// } from '@/apis/food.ts' +// import { IDateType, ImagePathEnum } from '@/types' +import type { IDialog, IHandleApi } from 'vue3-common/types' +import { ElMessage } from 'element-plus' +import { getCurrentMonth, getCurrentYear, getStartEndDate } from 'vue3-common/utils/dateUtil' +import { isMobile } from 'vue3-common/utils/layoutUtil' + +export const useFoodStore = defineStore('food', { + state: () => ({ + foodRecipeList: [] as IFoodRecipe[], + currentFoodRecipe: { + id: 0, + name: '', + category: '', + recommendRate: 0, + remark: '', + materialList: [], + stepList: [], + recordList: [] + } as IFoodRecipe, + foodRecordList: [] as IFoodRecord[], + currentFoodRecord: { + id: 0, + name: '', + category: '', + date: '', + person: '', + imageUrl: '' + } as IFoodRecord, + foodNameList: [] as string[], + queryRecipe: { + category: '' + }, + queryRecord: { + year: getCurrentYear(), + month: getCurrentMonth() + }, + queryDateType: 'month', + queryDateList: [] as string[], + foodRecipeApiType: 'ADD' as IHandleApi, + foodRecipeDialog: { + visible: false, + title: '', + data: {} + } as IDialog, + foodMaterialApiType: 'ADD' as IHandleApi, + foodMaterialDialog: { + visible: false, + title: '', + data: {} + } as IDialog, + editFoodMaterialIndex: 0, + foodStepApiType: 'ADD' as IHandleApi, + foodStepDialog: { + visible: false, + title: '', + data: {} + } as IDialog, + editFoodStepIndex: 0, + foodRecordApiType: 'ADD' as IHandleApi, + foodRecordDialog: { + visible: false, + title: '', + data: {} + } as IDialog, + editFoodRecordIndex: 0, + foodImagePath: 'food', + rateColorList: ['#E2DEDC', '#F7BA2A', '#009FA8'], + pageInfo: { + currentPage: 1, + pageSize: 3, + totalSize: 1 + }, + isScrollEnd: false, + foodCategoryList: [] as string[], + foodStats: { + recipeCount: 0, + categoryCount: 0, + workCount: 0 + } as IFoodStats, + isRefresh: false + }), + actions: { + async queryFoodRecipeList() { + const { currentPage, pageSize } = this.pageInfo + // const result = await queryFoodRecipeApi(currentPage, pageSize, this.queryRecipe) + const foodRecord: IFoodRecipe = { + category: '家常菜', + materialList: [], + name: '红烧鱼', + recommendRate: 4, + recordList: [], + remark: '', + stepList: [] + } + this.foodRecipeList = [] + this.foodRecipeList.push(foodRecord) + this.foodRecipeList.push(foodRecord) + // this.foodRecipeList.push(...result.records) + // this.pageInfo.totalSize = result.total + }, + async queryFoodRecordList() { + const { year, month } = this.queryRecord + const date = this.queryDateType === 'year' ? year : month + this.queryDateList = getStartEndDate(date, this.queryDateType) + + const foodRecord: IFoodRecord = { + category: '家常菜', + date: '2025-06-23', + id: 0, + imageUrl: 'https://ts2.tc.mm.bing.net/th/id/OSK.277ab994364a7e09543c78379bab1d05?w=612&h=408&c=7&rs=1&qlt=80&o=6&cdv=1&cb=ircwebp1&pid=16.1', + name: '红烧鱼', + person: '哥哥' + } + const foodRecord2: IFoodRecord = { + category: '家常菜', + date: '2025-06-22', + id: 0, + imageUrl: 'https://ts2.tc.mm.bing.net/th/id/OSK.277ab994364a7e09543c78379bab1d05?w=612&h=408&c=7&rs=1&qlt=80&o=6&cdv=1&cb=ircwebp1&pid=16.1', + name: '红烧鱼', + person: '哥哥' + } + this.foodRecordList = [] + this.foodRecordList.push(foodRecord) + this.foodRecordList.push(foodRecord2) + // this.foodRecordList = await queryFoodRecordApi(this.queryDateList[0], this.queryDateList[1]) + }, + async queryFoodNameList() { + // this.foodNameList = await queryFoodNameListApi() + }, + async queryFoodRecipe(id: number) { + // this.currentFoodRecipe = await queryFoodRecipeByIdApi(id) + }, + async queryFoodStats() { + // this.foodStats = await queryFoodStatsApi() + this.isRefresh = !this.isRefresh + }, + async queryFoodCategory() { + // this.foodCategoryList = await queryFoodCategoryApi() + }, + async handleFoodRecipeApi(id?: number) { + const { data } = this.foodRecipeDialog + switch (this.foodRecipeApiType) { + case 'ADD': + // await addFoodRecipeApi(data) + ElMessage.success('新增菜谱成功') + break + case 'UPDATE': + // await updateFoodRecipeApi(data.id as number, data) + ElMessage.success('更新菜谱成功') + break + case 'DELETE': + // await deleteFoodRecipeApi(id as number) + ElMessage.success('删除菜谱成功') + break + default: + break + } + this.foodRecipeDialog.visible = false + await this.refreshInfo() + }, + async handleFoodRecordApi(foodRecord: IFoodRecord) { + switch (this.foodRecordApiType) { + case 'ADD': + // await addFoodRecordApi(foodRecord) + ElMessage.success('新增成果成功') + break + case 'UPDATE': + // await updateFoodRecordApi(foodRecord.id as number, foodRecord) + ElMessage.success('更新成果成功') + break + case 'DELETE': + // await deleteFoodRecordApi(foodRecord.id as number) + ElMessage.success('删除成果成功') + break + default: + break + } + this.foodRecordDialog.visible = false + + if (!isMobile()) { + await this.refreshInfo() + } + }, + async refreshInfo() { + await this.queryFoodRecipeList() + await this.queryFoodRecordList() + this.isRefresh = !this.isRefresh + }, + getEmptyFoodRecipe(): IFoodRecipe { + return { + category: '', + materialList: [], + name: '', + recommendRate: 0, + remark: '', + stepList: [], + recordList: [] + } + }, + getEmptyFoodMaterial(): IFoodMaterial { + return { + amount: '', + name: '', + type: '' + } + }, + getEmptyFoodStep(): IFoodStep { + return { + content: '', + imageUrl: '', + sort: 0 + } + }, + getEmptyFoodRecord(): IFoodRecord { + return { + category: '', + person: '', + date: '', + id: 0, + imageUrl: '', + name: '' + } + } + } +}) diff --git a/src/styles/index.module.scss b/src/styles/index.module.scss index 61a48b0..b16e014 100644 --- a/src/styles/index.module.scss +++ b/src/styles/index.module.scss @@ -82,4 +82,4 @@ span, input { font-style: normal; } -@import "//at.alicdn.com/t/c/font_4793264_befv3sf3zdg.css"; +@import "//at.alicdn.com/t/c/font_4956432_suiec1b32.css"; diff --git a/src/styles/life.record.module.scss b/src/styles/life.record.module.scss new file mode 100644 index 0000000..fd6a75a --- /dev/null +++ b/src/styles/life.record.module.scss @@ -0,0 +1,90 @@ +$card-image-height: 200px; + +.life-record-card { + display: grid; + grid-template-rows: minmax($card-image-height, 26vh) 1fr; + + .el-carousel { + border-top-left-radius: 15px; + border-top-right-radius: 15px; + + .el-carousel__container { + height: 100%; + } + + .el-image { + width: 100%; + height: 100%; + + display: flex; + justify-content: center; + align-items: center; + } + } + + .record-info { + border-top: 1px solid var(--el-color-primary); + padding: 1vh; + position: relative; + display: flex; + flex-direction: column; + gap: 8px; + + .top-container, .bottom-container { + display: flex; + justify-content: space-between; + align-items: center; + + .info-list { + display: flex; + align-items: center; + gap: 8px; + + .el-rate { + height: auto; + } + + .info-item { + display: flex; + align-items: center; + gap: 3px; + + .title { + font-size: 1.2rem; + font-weight: bold; + } + } + + .category-item { + color: #0d9488; + } + + .location-item { + color: #0d9488; + } + + .amount-item { + font-size: 1.2rem; + color: #CFB53B; + } + + .fa-solid.fa-location-dot { + color: #008000; + } + + .fa-solid.fa-flag { + color: #0000FF; + } + + .fa-regular.fa-calendar-check { + color: #FF0000; + } + } + } + + .bottom-container { + font-size: small; + color: #9C9C9C; + } + } +} diff --git a/src/types/food.ts b/src/types/food.ts new file mode 100644 index 0000000..aae082f --- /dev/null +++ b/src/types/food.ts @@ -0,0 +1,79 @@ +export type IFoodSegment = 'recipe' | 'daily' | 'timeline' + +/** + * 菜谱信息 + */ +export interface IFoodRecipe { + id?: number; + /** + * 美食名称 + */ + name: string; + /** + * 美食菜系 + */ + category: string; + /** + * 推荐指数 + */ + recommendRate: number; + /** + * 备注 + */ + remark: string; + /** + * 食材 + */ + materialList: IFoodMaterial[]; + /** + * 步骤 + */ + stepList: IFoodStep[]; + /** + * 成果 + */ + recordList: IFoodRecord[]; +} + +/** + * 食材信息 + */ +export interface IFoodMaterial { + type: string; + name: string; + amount: string; +} + +/** + * 步骤信息 + */ +export interface IFoodStep { + sort: number; + content: string; + imageUrl: string; +} + +/** + * 成果信息 + */ +export interface IFoodRecord { + id: number; + name: string; + category: string; + date: string; + person: string; + imageUrl: string; +} + +/** + * 统计信息 + */ +export interface IFoodStats { + recipeCount: number; + categoryCount: number; + workCount: number; +} + +export interface IFoodQuery { + category: string; +} diff --git a/src/views/app/record/index.vue b/src/views/app/record/index.vue deleted file mode 100644 index 9d0f2ce..0000000 --- a/src/views/app/record/index.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 7be8564..449dc9f 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -1,11 +1,17 @@ diff --git a/src/views/app/stats/index.vue b/src/views/profile/index.vue similarity index 51% rename from src/views/app/stats/index.vue rename to src/views/profile/index.vue index 8b18995..1244bcb 100644 --- a/src/views/app/stats/index.vue +++ b/src/views/profile/index.vue @@ -1,13 +1,12 @@ - diff --git a/src/views/record/index.vue b/src/views/record/index.vue new file mode 100644 index 0000000..1874d72 --- /dev/null +++ b/src/views/record/index.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/src/views/stats/index.vue b/src/views/stats/index.vue new file mode 100644 index 0000000..a035b1e --- /dev/null +++ b/src/views/stats/index.vue @@ -0,0 +1,20 @@ + + + + + diff --git a/vite.config.ts b/vite.config.ts index cb9fb6e..1d0f756 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -11,5 +11,8 @@ export default defineConfig({ alias: { '@': path.resolve(__dirname, './src') } + }, + server: { + port: 5175 } })