From f1e4ba7d31228911cc1fe1729ffbd2f74733ec3f Mon Sep 17 00:00:00 2001 From: zjf <1799650030@qq.com> Date: Thu, 17 Apr 2025 15:02:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BF=E5=AE=A2=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 299 +++++++--- package.json | 1 + src/manifest.json | 15 +- src/pages.json | 161 ++++-- src/pages/integrated/visitor/index.vue | 517 +++++++++--------- src/pages/integrated/visitor/myvisitor.vue | 42 +- .../integrated/visitor/myyyvisitorlist.vue | 163 ++++-- src/pages/tabbar/my.vue | 14 +- src/sheep/api/integrated/visitors.ts | 18 + 9 files changed, 783 insertions(+), 447 deletions(-) diff --git a/package-lock.json b/package-lock.json index 55a8838..4f3332c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,6 +23,7 @@ "@dcloudio/uni-mp-weixin": "3.0.0-4020920240930001", "@dcloudio/uni-mp-xhs": "3.0.0-4020920240930001", "@dcloudio/uni-quickapp-webview": "3.0.0-4020920240930001", + "@vant/weapp": "^1.11.7", "@vue/compiler-core": "^3.5.11", "@zebra-ui/swiper": "^2.2.8", "crypto-js": "^4.2.0", @@ -30,6 +31,7 @@ "gdt-jsapi": "^1.9.51", "luch-request": "^3.1.1", "pinia": "^2.2.6", + "qrcode": "^1.5.4", "qs": "^6.13.1", "radash": "^12.1.0", "vue": "^3.3.11", @@ -5508,8 +5510,6 @@ "version": "5.0.1", "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -5518,8 +5518,6 @@ "version": "4.3.0", "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "peer": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -6051,8 +6049,6 @@ "version": "5.3.1", "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "peer": true, "engines": { "node": ">=6" } @@ -6201,8 +6197,6 @@ "version": "2.0.1", "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "peer": true, "dependencies": { "color-name": "~1.1.4" }, @@ -6213,9 +6207,7 @@ "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "peer": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/colorette": { "version": "2.0.20", @@ -6503,6 +6495,14 @@ } } }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/decimal.js": { "version": "10.4.3", "resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.4.3.tgz", @@ -6600,6 +6600,11 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/dijkstrajs": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/dijkstrajs/-/dijkstrajs-1.0.3.tgz", + "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==" + }, "node_modules/dom-walk": { "version": "0.1.2", "resolved": "https://registry.npmmirror.com/dom-walk/-/dom-walk-0.1.2.tgz", @@ -6675,9 +6680,7 @@ "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "peer": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "node_modules/emojis-list": { "version": "3.0.0", @@ -7189,8 +7192,6 @@ "version": "4.1.0", "resolved": "https://registry.npmmirror.com/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "peer": true, "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -7333,8 +7334,6 @@ "version": "2.0.5", "resolved": "https://registry.npmmirror.com/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "peer": true, "engines": { "node": "6.* || 8.* || >= 10.*" } @@ -7781,8 +7780,6 @@ "version": "3.0.0", "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -8925,8 +8922,6 @@ "version": "5.0.0", "resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "peer": true, "dependencies": { "p-locate": "^4.1.0" }, @@ -9404,8 +9399,6 @@ "version": "2.3.0", "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "peer": true, "dependencies": { "p-try": "^2.0.0" }, @@ -9420,8 +9413,6 @@ "version": "4.1.0", "resolved": "https://registry.npmmirror.com/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "peer": true, "dependencies": { "p-limit": "^2.2.0" }, @@ -9433,8 +9424,6 @@ "version": "2.2.0", "resolved": "https://registry.npmmirror.com/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "peer": true, "engines": { "node": ">=6" } @@ -9540,8 +9529,6 @@ "version": "4.0.0", "resolved": "https://registry.npmmirror.com/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -9960,6 +9947,22 @@ "node": ">=6" } }, + "node_modules/qrcode": { + "version": "1.5.4", + "resolved": "https://registry.npmmirror.com/qrcode/-/qrcode-1.5.4.tgz", + "integrity": "sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==", + "dependencies": { + "dijkstrajs": "^1.0.1", + "pngjs": "^5.0.0", + "yargs": "^15.3.1" + }, + "bin": { + "qrcode": "bin/qrcode" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/qrcode-reader": { "version": "1.0.4", "resolved": "https://registry.npmmirror.com/qrcode-reader/-/qrcode-reader-1.0.4.tgz", @@ -9973,6 +9976,75 @@ "qrcode-terminal": "bin/qrcode-terminal.js" } }, + "node_modules/qrcode/node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/qrcode/node_modules/pngjs": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/pngjs/-/pngjs-5.0.0.tgz", + "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/qrcode/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/qrcode/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmmirror.com/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" + }, + "node_modules/qrcode/node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmmirror.com/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/qrcode/node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/qs": { "version": "6.13.1", "resolved": "https://registry.npmmirror.com/qs/-/qs-6.13.1.tgz", @@ -10175,8 +10247,6 @@ "version": "2.1.1", "resolved": "https://registry.npmmirror.com/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "peer": true, "engines": { "node": ">=0.10.0" } @@ -10191,6 +10261,11 @@ "node": ">=0.10.0" } }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, "node_modules/requires-port": { "version": "1.0.0", "resolved": "https://registry.npmmirror.com/requires-port/-/requires-port-1.0.0.tgz", @@ -10580,6 +10655,11 @@ "node": ">= 0.8.0" } }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" + }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmmirror.com/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -10790,8 +10870,6 @@ "version": "4.2.3", "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "peer": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -10805,8 +10883,6 @@ "version": "6.0.1", "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "peer": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -12048,6 +12124,11 @@ "node": ">= 8" } }, + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==" + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -16387,16 +16468,12 @@ "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "peer": true + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "peer": true, "requires": { "color-convert": "^2.0.1" } @@ -16760,9 +16837,7 @@ "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "peer": true + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" }, "caniuse-lite": { "version": "1.0.30001690", @@ -16861,8 +16936,6 @@ "version": "2.0.1", "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "peer": true, "requires": { "color-name": "~1.1.4" } @@ -16870,9 +16943,7 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "peer": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "colorette": { "version": "2.0.20", @@ -17103,6 +17174,11 @@ "ms": "^2.1.3" } }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==" + }, "decimal.js": { "version": "10.4.3", "resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.4.3.tgz", @@ -17178,6 +17254,11 @@ "dev": true, "peer": true }, + "dijkstrajs": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/dijkstrajs/-/dijkstrajs-1.0.3.tgz", + "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==" + }, "dom-walk": { "version": "0.1.2", "resolved": "https://registry.npmmirror.com/dom-walk/-/dom-walk-0.1.2.tgz", @@ -17239,9 +17320,7 @@ "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "peer": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "emojis-list": { "version": "3.0.0", @@ -17638,8 +17717,6 @@ "version": "4.1.0", "resolved": "https://registry.npmmirror.com/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "peer": true, "requires": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -17732,9 +17809,7 @@ "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmmirror.com/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "peer": true + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, "get-intrinsic": { "version": "1.2.7", @@ -18042,9 +18117,7 @@ "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "peer": true + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, "is-function": { "version": "1.0.2", @@ -18925,8 +18998,6 @@ "version": "5.0.0", "resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "peer": true, "requires": { "p-locate": "^4.1.0" } @@ -19295,8 +19366,6 @@ "version": "2.3.0", "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "peer": true, "requires": { "p-try": "^2.0.0" } @@ -19305,8 +19374,6 @@ "version": "4.1.0", "resolved": "https://registry.npmmirror.com/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "peer": true, "requires": { "p-limit": "^2.2.0" } @@ -19314,9 +19381,7 @@ "p-try": { "version": "2.2.0", "resolved": "https://registry.npmmirror.com/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "peer": true + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" }, "package-manager-detector": { "version": "0.2.8", @@ -19411,9 +19476,7 @@ "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmmirror.com/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "peer": true + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" }, "path-is-absolute": { "version": "1.0.1", @@ -19694,6 +19757,75 @@ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true }, + "qrcode": { + "version": "1.5.4", + "resolved": "https://registry.npmmirror.com/qrcode/-/qrcode-1.5.4.tgz", + "integrity": "sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==", + "requires": { + "dijkstrajs": "^1.0.1", + "pngjs": "^5.0.0", + "yargs": "^15.3.1" + }, + "dependencies": { + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "pngjs": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/pngjs/-/pngjs-5.0.0.tgz", + "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==" + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmmirror.com/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmmirror.com/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, "qrcode-reader": { "version": "1.0.4", "resolved": "https://registry.npmmirror.com/qrcode-reader/-/qrcode-reader-1.0.4.tgz", @@ -19856,9 +19988,7 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmmirror.com/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "peer": true + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==" }, "require-from-string": { "version": "2.0.2", @@ -19867,6 +19997,11 @@ "dev": true, "peer": true }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, "requires-port": { "version": "1.0.0", "resolved": "https://registry.npmmirror.com/requires-port/-/requires-port-1.0.0.tgz", @@ -20129,6 +20264,11 @@ "send": "0.19.0" } }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" + }, "setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmmirror.com/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -20288,8 +20428,6 @@ "version": "4.2.3", "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "peer": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -20300,8 +20438,6 @@ "version": "6.0.1", "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "peer": true, "requires": { "ansi-regex": "^5.0.1" } @@ -21187,6 +21323,11 @@ "isexe": "^2.0.0" } }, + "which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==" + }, "wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz", diff --git a/package.json b/package.json index 8db1750..a8711ed 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,7 @@ "gdt-jsapi": "^1.9.51", "luch-request": "^3.1.1", "pinia": "^2.2.6", + "qrcode": "^1.5.4", "qs": "^6.13.1", "radash": "^12.1.0", "vue": "^3.3.11", diff --git a/src/manifest.json b/src/manifest.json index 028cf07..5161538 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -8,6 +8,8 @@ /* 5+App特有相关 */ "app-plus": { "usingComponents": true, + "nvueCompiler": "uni-app", + "renderer": "native", "nvueStyleCompiler": "uni-app", "compilerVersion": 3, "splashscreen": { @@ -53,9 +55,18 @@ "mp-weixin": { "appid": "", "setting": { - "urlCheck": false + "urlCheck": false, + "es6": true, + "postcss": true, + "minified": true }, - "usingComponents": true + "usingComponents": true, + "requiredPrivateInfos": ["getLocation"], + "permission": { + "scope.userLocation": { + "desc": "你的位置信息将用于小程序位置接口的效果展示" + } + } }, "mp-alipay": { "usingComponents": true diff --git a/src/pages.json b/src/pages.json index 5c1ec3d..df12b47 100644 --- a/src/pages.json +++ b/src/pages.json @@ -9,34 +9,34 @@ } }, "pages": [ - { - "path": "pages/tabbar/canteen", - "style": { - "navigationBarTitleText": "食堂", - "disableScroll": true - } - }, - { - "path": "pages/tabbar/selfMerchant", - "style": { - "navigationBarTitleText": "自营商家", - "disableScroll": true - } - }, - { - "path": "pages/tabbar/coopMerchant", - "style": { - "navigationBarTitleText": "合作商家", - "disableScroll": true - } - }, - { - "path": "pages/tabbar/order", - "style": { - "navigationBarTitleText": "订单", - "disableScroll": true - } - }, +// { +// "path": "pages/tabbar/canteen", +// "style": { +// "navigationBarTitleText": "食堂", +// "disableScroll": true +// } +// }, +// { +// "path": "pages/tabbar/selfMerchant", +// "style": { +// "navigationBarTitleText": "自营商家", +// "disableScroll": true +// } +// }, +// { +// "path": "pages/tabbar/coopMerchant", +// "style": { +// "navigationBarTitleText": "合作商家", +// "disableScroll": true +// } +// }, +// { +// "path": "pages/tabbar/order", +// "style": { +// "navigationBarTitleText": "订单", +// "disableScroll": true +// } +// }, // { // "path": "pages/tabbar/flowStatistics", // "style": { @@ -64,6 +64,12 @@ "navigationBarTitleText": "我的", "disableScroll": true } + }, + { + "path": "pages/integrated/visitor/verify", + "style": { + "navigationStyle": "custom" + } } ], "subPackages": [ @@ -380,6 +386,18 @@ } } ] + }, + { + "root": "pages/integrated", + "pages": [ + { + "path": "visitor/visitorDetail", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "记录详情" + } + } + ] } ], "globalStyle": { @@ -392,47 +410,77 @@ "tabBar": { "list": [ { - "pagePath": "pages/tabbar/canteen", - "text": "", + "pagePath": "pages/integrated/visitor/index", + "text": "访客申请", "iconPath": "", "selectedIconPath": "" }, { - "pagePath": "pages/tabbar/selfMerchant", - "text": "", + "pagePath": "pages/integrated/visitor/myvisitor", + "text": "申请记录", "iconPath": "", "selectedIconPath": "" }, { - "pagePath": "pages/tabbar/coopMerchant", - "text": "", + "pagePath": "pages/integrated/visitor/myyyvisitor", + "text": "访客邀约", "iconPath": "", "selectedIconPath": "" }, { - "pagePath": "pages/tabbar/order", - "text": "", + "pagePath": "pages/integrated/visitor/myyyvisitorlist", + "text": "邀约记录", "iconPath": "", "selectedIconPath": "" }, { - "pagePath": "pages/tabbar/flowStatistics", - "text": "", + "pagePath": "pages/integrated/visitor/verify", + "text": "核销", "iconPath": "", "selectedIconPath": "" }, - { - "pagePath": "pages/tabbar/individualOrder", - "text": "", - "iconPath": "", - "selectedIconPath": "" - }, - { - "pagePath": "pages/tabbar/my", - "text": "", - "iconPath": "", - "selectedIconPath": "" - } +// { +// "pagePath": "pages/tabbar/canteen", +// "text": "", +// "iconPath": "", +// "selectedIconPath": "" +// }, +// { +// "pagePath": "pages/tabbar/selfMerchant", +// "text": "", +// "iconPath": "", +// "selectedIconPath": "" +// }, +// { +// "pagePath": "pages/tabbar/coopMerchant", +// "text": "", +// "iconPath": "", +// "selectedIconPath": "" +// }, +// { +// "pagePath": "pages/tabbar/order", +// "text": "", +// "iconPath": "", +// "selectedIconPath": "" +// }, +// { +// "pagePath": "pages/tabbar/flowStatistics", +// "text": "", +// "iconPath": "", +// "selectedIconPath": "" +// }, +// { +// "pagePath": "pages/tabbar/individualOrder", +// "text": "", +// "iconPath": "", +// "selectedIconPath": "" +// }, +// { +// "pagePath": "pages/tabbar/my", +// "text": "", +// "iconPath": "", +// "selectedIconPath": "" +// } // { // "pagePath": "pages/tabbar/canteen", // "text": "食堂", @@ -469,12 +517,13 @@ // "iconPath": "static/tabbar/order.png", // "selectedIconPath": "static/tabbar/order-select.png" // }, - // { - // "pagePath": "pages/tabbar/my", - // "text": "我的", - // "iconPath": "static/tabbar/my.png", - // "selectedIconPath": "static/tabbar/my-select.png" - // }, + { + "pagePath": "pages/tabbar/my", + "text": "我的", + "iconPath": "static/tabbar/my.png", + "selectedIconPath": "static/tabbar/my-select.png" + } + ] } } diff --git a/src/pages/integrated/visitor/index.vue b/src/pages/integrated/visitor/index.vue index f44c482..faa999c 100644 --- a/src/pages/integrated/visitor/index.vue +++ b/src/pages/integrated/visitor/index.vue @@ -14,164 +14,160 @@ scroll-y class="page-content" > - - - ℹ - 入园预约请填写以下信息: - - - - - - 您的姓名 - *必填 - + + + ℹ + 入园预约请填写以下信息: - - 联系方式 - *必填 - - - - - 公司名称 - * - - - - - 拜访原因* - - - - {{ formData.reasonLabel || '请选择拜访原因' }} - - > - - - - - - 是否有随行人员 - - - - - - - - - - - 删除 - - - + - 添加随行人员 - - - - - 是否驾驶车辆 - - - - - - + + + + 您的姓名 + *必填 - 删除 - - + - 添加车牌号 - - - - 到访单位 - - {{ selectedDeptName || '请选择' }} - > + + 联系方式 + *必填 + - - - 接待人 - *必填 - - {{ selectedUserName || '请选择' }} - > + + 公司名称 + * + - - - 到访时间 - *必填 - - {{ selectedTime || '请选择' }} - > + + 拜访原因* + + + + {{ formData.reasonLabel || '请选择拜访原因' }} + + > + + + + + + 是否有随行人员 + + + + + + + + + + + 删除 + + + + + 添加随行人员 + + + + + 是否驾驶车辆 + + + + + + + + 删除 + + + + + 添加车牌号 + + + + + 到访单位 + + {{ selectedDeptName || '请选择' }} + > + + + + + 接待人 + *必填 + + {{ selectedUserName || '请选择' }} + > + + + + + 到访时间 + *必填 + + {{ selectedTime || '请选择' }} + > + - - - - - - - + + @@ -296,28 +292,33 @@ import deptApi from '@/sheep/api/integrated/dept' // 表单数据 const formData = reactive({ - name: '', - mobile: '', - companyName: '', - isOtherPeople: '0', - isDrive: '0', - deptId: '', + name: '测试访客', + mobile: '13800138000', + companyName: '测试公司', + isOtherPeople: '1', // 默认有随行人员 + isDrive: '1', // 默认有车辆 + deptId: '', // 这个需要等部门列表加载后设置 deptName: '', - userId: '', + userId: '', // 这个需要等用户列表加载后设置 userName: '', - vStartDate: '', - vEndDate: '', + vstartDate: '', // 这个会在页面加载时设置 + vendDate: '', type: '1', checkStatus: '0', - reasonValue: '', + reasonValue: '', // 这个需要等原因列表加载后设置 reasonLabel: '', }) -// 随行人员列表 -const otherPeople = ref>([]) +// 随行人员列表默认数据 +const otherPeople = ref([ + { name: '随行人员1', mobile: '13800138001' }, + { name: '随行人员2', mobile: '13800138002' } +]) -// 车牌列表 -const carList = ref>([]) +// 车牌列表默认数据 +const carList = ref([ + { carNumber: '沪A12345' } +]) // 弹窗控制 const showDeptPopup = ref(false) @@ -451,35 +452,45 @@ const goBack = () => { uni.navigateBack() } -// 提交表单 -const handleSubmit = async () => { - // 表单验证 +// 表单验证 +const validateForm = () => { if (!formData.name) { uni.showToast({ title: '请输入姓名', icon: 'none' }) - return + return false } if (!formData.mobile) { uni.showToast({ title: '请输入联系方式', icon: 'none' }) - return + return false } if (!formData.deptId || !formData.deptName) { uni.showToast({ title: '请选择到访单位', icon: 'none' }) - return + return false } if (!formData.userId || !formData.userName) { uni.showToast({ title: '请选择接待人', icon: 'none' }) - return + return false } - if (!formData.vStartDate || !formData.vEndDate) { + if (!formData.vstartDate || !formData.vendDate) { uni.showToast({ title: '请选择到访时间', icon: 'none' }) - return + return false } if (!formData.reasonValue || !formData.reasonLabel) { uni.showToast({ title: '请选择拜访原因', icon: 'none' }) - return + return false } + return true +} + +// 提交表单 +const handleSubmit = async () => { + if (!validateForm()) return try { + uni.showLoading({ + title: '提交中...', + mask: true + }) + const submitData = { ...formData, peopleNumber: formData.isOtherPeople === '1' ? otherPeople.value.length : 0, @@ -488,16 +499,32 @@ const handleSubmit = async () => { } const { code, msg } = await visitorApi.save(submitData) + + uni.hideLoading() + if (code === 0) { - uni.showToast({ title: '提交成功', icon: 'success' }) + uni.showToast({ + title: '提交成功,请耐心等待您的拜访对象接受此次申请', + icon: 'none', + duration: 3000 + }) + + // 延迟返回,让用户能看到提示 setTimeout(() => { uni.navigateBack() - }, 1500) + }, 2000) } else { - uni.showToast({ title: msg || '提交失败', icon: 'none' }) + uni.showToast({ + title: msg || '提交失败', + icon: 'none' + }) } } catch (error) { - uni.showToast({ title: '提交失败', icon: 'none' }) + uni.hideLoading() + uni.showToast({ + title: '提交失败', + icon: 'none' + }) } } @@ -536,8 +563,8 @@ const confirmTimeSelect = () => { // 更新表单数据 const [startTime, endTime] = selectedTimeRange.split('-') - formData.vStartDate = `${selectedDate.fullDate} ${startTime}:00` - formData.vEndDate = `${selectedDate.fullDate} ${endTime}:00` + formData.vstartDate = `${selectedDate.fullDate} ${startTime}:00` + formData.vendDate = `${selectedDate.fullDate} ${endTime}:00` // 更新显示文本 selectedTime.value = `${selectedDate.weekDay} ${selectedDate.date} ${selectedTimeRange}` @@ -677,10 +704,50 @@ const onReasonChange = (e: any) => { formData.reasonLabel = selected.label } -// 页面加载时获取部门数据 -onMounted(() => { - getDeptList() - getReasonList() +// 在页面加载时设置默认值 +onMounted(async () => { + // 获取部门数据 + await getDeptList() + // 获取拜访原因列表 + await getReasonList() + + // 设置默认的部门(选择第一个部门) + if (flatDeptList.value.length > 0) { + const firstDept = flatDeptList.value[0] + selectedDeptId.value = firstDept.id + selectedDeptName.value = firstDept.name + formData.deptId = firstDept.id + formData.deptName = firstDept.name + + // 获取该部门的用户列表 + await getUserList(firstDept.id) + + // 设置默认的接待人(选择第一个用户) + if (userList.value.length > 0) { + const firstUser = userList.value[0] + selectedUserId.value = firstUser.userId + selectedUserName.value = firstUser.name + formData.userId = firstUser.userId + formData.userName = firstUser.name + } + } + + // 设置默认的拜访原因(选择第一个原因) + if (reasonList.value.length > 0) { + const firstReason = reasonList.value[0] + formData.reasonValue = firstReason.value + formData.reasonLabel = firstReason.label + } + + // 设置默认的时间(选择今天的第一个时间段) + selectedDateIndex.value = 0 + selectedTimeIndex.value = 0 + const selectedDate = dateList.value[0] + const selectedTimeRange = timeList.value[0] + const [startTime, endTime] = selectedTimeRange.split('-') + formData.vstartDate = `${selectedDate.fullDate} ${startTime}:00` + formData.vendDate = `${selectedDate.fullDate} ${endTime}:00` + selectedTime.value = `${selectedDate.weekDay} ${selectedDate.date} ${selectedTimeRange}` }) @@ -690,6 +757,7 @@ onMounted(() => { background: #fff; display: flex; flex-direction: column; + position: relative; font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Segoe UI, Arial, Roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB', 'Microsoft Yahei', sans-serif; } @@ -732,6 +800,12 @@ onMounted(() => { height: 0; } +.content-wrapper { + min-height: 100%; + padding: 0 0 calc(240rpx + env(safe-area-inset-bottom)); + background: #fff; +} + .tips-box { padding: 24rpx 30rpx; background: #FFF7E6; @@ -863,7 +937,7 @@ onMounted(() => { position: fixed; left: 30rpx; right: 30rpx; - bottom: 40rpx; + bottom: calc(120rpx + env(safe-area-inset-bottom)); height: 88rpx; background: #1989FA; border-radius: 44rpx; @@ -875,6 +949,7 @@ onMounted(() => { font-weight: 500; letter-spacing: 1rpx; box-shadow: 0 4rpx 8rpx rgba(25, 137, 250, 0.12); + z-index: 99; } // 优化switch样式 @@ -908,10 +983,12 @@ onMounted(() => { position: absolute; left: 0; right: 0; - bottom: 0; + bottom: 100rpx; background: #fff; border-radius: 24rpx 24rpx 0 0; - padding-bottom: env(safe-area-inset-bottom); + max-height: 80vh; + display: flex; + flex-direction: column; } } @@ -998,8 +1075,11 @@ onMounted(() => { } .popup-footer { + position: relative; padding: 24rpx 32rpx; + background: #fff; border-top: 1rpx solid #f5f5f5; + margin-bottom: env(safe-area-inset-bottom); .confirm-btn { height: 88rpx; @@ -1014,10 +1094,12 @@ onMounted(() => { } } -// 添加部门选择相关样式 .dept-list { + flex: 1; max-height: 60vh; padding: 20rpx 0; + overflow-y: auto; + -webkit-overflow-scrolling: touch; } .dept-item { @@ -1043,6 +1125,14 @@ onMounted(() => { } } +// 增加底部空间 +.dept-list::after { + content: ''; + display: block; + height: 400rpx; // 增加更多的底部空间 + width: 100%; +} + // 添加用户选择相关样式 .search-box { padding: 20rpx 32rpx; @@ -1089,74 +1179,7 @@ onMounted(() => { font-size: 28rpx; } -// 底部占位 -.bottom-space { - height: 180rpx; -} - -.picker-header { - display: flex; - justify-content: space-between; - align-items: center; - padding: 24rpx 32rpx; - background-color: #f7f7f7; - - text { - font-size: 28rpx; - - &:first-child { - color: #666; - } - - &:last-child { - color: #1989fa; - } - } -} - -.picker-view { - width: 100%; - height: 392rpx; - background-color: #fff; -} - -.picker-item { - line-height: 88rpx; - text-align: center; - font-size: 32rpx; -} - -.placeholder { - color: #999; - - &.active { - color: #333; - } -} - -.arrow { - color: #999; - font-size: 28rpx; -} - .bottom-safe-area { - padding: 20rpx 32rpx; - padding-bottom: calc(20rpx + constant(safe-area-inset-bottom)); /* iOS 11.0 */ - padding-bottom: calc(20rpx + env(safe-area-inset-bottom)); /* iOS 11.2 */ - background: #fff; -} - -.submit-btn { - width: 100%; - height: 88rpx; - line-height: 88rpx; - background: #1989fa; - color: #fff; - font-size: 32rpx; - border-radius: 44rpx; - - &:active { - opacity: 0.8; - } + display: none; } diff --git a/src/pages/integrated/visitor/myvisitor.vue b/src/pages/integrated/visitor/myvisitor.vue index fdb0d77..3d1ac70 100644 --- a/src/pages/integrated/visitor/myvisitor.vue +++ b/src/pages/integrated/visitor/myvisitor.vue @@ -26,6 +26,7 @@ v-for="item in visitorList" :key="item.id" class="visitor-item" + @tap="goToDetail(item)" > {{ formatTime(item.vstartDate, item.vendDate) }} @@ -86,7 +87,7 @@ import { ref, onMounted } from 'vue' import visitorApi from '@/sheep/api/integrated/visitors' // 标签页配置 -const tabs = ['全部', '待审核', '待到访', '已到访'] +const tabs = ['全部', '待审核', '待到访', '已到访', '已取消'] const currentTab = ref(0) // 列表数据 @@ -117,7 +118,8 @@ const getStatusText = (status: string) => { const statusMap: Record = { '1': '待审核', '2': '待到访', - '0': '已到访' + '0': '已到访', + '5': '已取消' } return statusMap[status] || status } @@ -127,7 +129,8 @@ const getStatusClass = (status: string) => { const statusMap: Record = { '1': 'status-pending', '2': 'status-waiting', - '0': 'status-visited' + '0': 'status-visited', + '5': 'status-cancelled' } return statusMap[status] || '' } @@ -160,7 +163,7 @@ const getVisitorList = async () => { // 添加状态筛选 if (currentTab.value > 0) { - const statusMap = ['', '1', '2', '0'] + const statusMap = ['', '1', '2', '0', '5'] params.checkStatus = statusMap[currentTab.value] } @@ -206,7 +209,7 @@ const loadMore = () => { // 判断是否可以取消 const canCancel = (status: string) => { - return status === '1' || status === '2' + return status === '1' || status === '2' || status === '5' } // 判断是否可以标记到访 @@ -304,6 +307,13 @@ const handleVisit = (item: any) => { }) } +// 跳转到详情页 +const goToDetail = (item: any) => { + uni.navigateTo({ + url: `/pages/integrated/visitor/visitorDetail?id=${item.id}&token=${item.token}` + }) +} + onMounted(() => { getVisitorList() }) @@ -363,6 +373,9 @@ onMounted(() => { border-radius: 12rpx; padding: 24rpx; margin-bottom: 20rpx; + &:active { + opacity: 0.8; + } } .item-header { @@ -380,22 +393,27 @@ onMounted(() => { .status-tag { font-size: 24rpx; - padding: 4rpx 16rpx; + padding: 4rpx 12rpx; border-radius: 4rpx; &.status-pending { - color: #1989FA; - background: rgba(25, 137, 250, 0.1); + background: #FFF3E0; + color: #FF9800; } &.status-waiting { - color: #FF9900; - background: rgba(255, 153, 0, 0.1); + background: #E3F2FD; + color: #2196F3; } &.status-visited { - color: #07C160; - background: rgba(7, 193, 96, 0.1); + background: #E8F5E9; + color: #4CAF50; + } + + &.status-cancelled { + background: #EEEEEE; + color: #9E9E9E; } } diff --git a/src/pages/integrated/visitor/myyyvisitorlist.vue b/src/pages/integrated/visitor/myyyvisitorlist.vue index 2249e72..bb4b466 100644 --- a/src/pages/integrated/visitor/myyyvisitorlist.vue +++ b/src/pages/integrated/visitor/myyyvisitorlist.vue @@ -2,8 +2,8 @@ - - {{ formatDateTime(item.vStartDate) }} @@ -41,7 +42,7 @@ 拜访时间: - {{ formatDateTime(item.vStartDate) }} - {{ formatDateTime(item.vEndDate) }} + {{ formatDateTime(item.vstartDate) }} - {{ formatDateTime(item.vendDate) }} 拜访原因: @@ -68,6 +69,30 @@ 暂无数据 + + + + + + 访客申请 + + + + 申请记录 + + + + 主动邀约 + + + + 邀约记录 + + + + 我的 + + @@ -76,6 +101,15 @@ import { ref, onMounted } from 'vue' import visitorApi from '@/sheep/api/integrated/visitors' import dayjs from 'dayjs' +// 定义响应式变量 +const visitorList = ref([]) +const loading = ref(false) +const hasMore = ref(true) +const current = ref(1) +const size = ref(10) +const currentTab = ref('') +const reasonDict = ref([]) + const tabs = [ { label: '全部', value: '' }, { label: '待审核', value: '1' }, @@ -83,14 +117,6 @@ const tabs = [ { label: '已取消', value: '5' } ] -const currentTab = ref('') -const visitorList = ref([]) -const loading = ref(false) -const hasMore = ref(true) -const current = ref(1) -const size = ref(10) -const reasonDict = ref([]) - // 获取拜访原因字典 const getReasonDict = async () => { try { @@ -171,14 +197,14 @@ const getVisitorList = async (isRefresh = false) => { size: size.value, checkStatus: currentTab.value || undefined }) - + if (code === 0 && data) { if (isRefresh) { visitorList.value = data.records || [] } else { visitorList.value = [...visitorList.value, ...(data.records || [])] } - + hasMore.value = data.records.length === size.value if (hasMore.value) { current.value++ @@ -299,12 +325,28 @@ const handleReject = async (item: any) => { }) } +// 跳转到详情页 +const goToDetail = (item: any) => { + uni.navigateTo({ + url: `/pages/integrated/visitor/visitorDetail?token=${item.token}` + }) +} + // 页面生命周期钩子 +onMounted(() => { + getReasonDict() + getVisitorList(true) +}) + +// 页面配置 +defineOptions({ + navigationBarTitleText: '我的邀约', + enablePullDownRefresh: true, + backgroundColor: '#f5f5f5' +}) + +// 下拉刷新 defineExpose({ - async onLoad() { - await getReasonDict() - getVisitorList(true) - }, onPullDownRefresh() { getVisitorList(true).then(() => { uni.stopPullDownRefresh() @@ -314,19 +356,13 @@ defineExpose({ getVisitorList() } }) - -// 页面配置 -defineOptions({ - navigationBarTitleText: '我的邀约', - enablePullDownRefresh: true, - backgroundColor: '#f5f5f5' -}) \ No newline at end of file + +.bottom-nav { + position: fixed; + bottom: 0; + left: 0; + right: 0; + height: 100rpx; + background-color: #fff; + display: flex; + justify-content: space-around; + align-items: center; + border-top: 1rpx solid #eee; + padding-bottom: env(safe-area-inset-bottom); // 适配iPhone底部安全区 + + .nav-item { + display: flex; + flex-direction: column; + align-items: center; + padding: 10rpx 0; + + .nav-icon { + width: 44rpx; + height: 44rpx; + margin-bottom: 4rpx; + } + + .nav-text { + font-size: 20rpx; + color: #999; + + &.active { + color: #1777FF; + } + } + } +} + diff --git a/src/pages/tabbar/my.vue b/src/pages/tabbar/my.vue index 573fd5d..ca6598d 100644 --- a/src/pages/tabbar/my.vue +++ b/src/pages/tabbar/my.vue @@ -70,16 +70,18 @@ const state = reactive<{ wallet: [], userInfo: {}, menuList: [ - { text: "扫一扫", icon: "/static/icon/scan.png", router: "" }, - { text: "钱包管理", icon: "/static/icon/service_3.png", router: "/pages/wallet/list" }, + // { text: "扫一扫", icon: "/static/icon/scan.png", router: "" }, + // { text: "钱包管理", icon: "/static/icon/service_3.png", router: "/pages/wallet/list" }, // { text: "包厢预定", icon: "/static/icon/service_4.png", router: "/pages/boxes/apply-list" }, // { text: "外来人员就餐", icon: "/static/icon/service_1.png", router: "/pages/apply/foreign-list" }, // { text: "跨单位就餐", icon: "/static/icon/service_1.png", router: "/pages/apply/stride-list" }, { text: "人脸管理", icon: "/static/icon/service_5.png", router: "/pages/human-face/list" }, - { text: "访客", icon: "/static/icon/service_5.png", router: "/pages/integrated/visitor/index" }, - { text: "访客记录", icon: "/static/icon/service_5.png", router: "/pages/integrated/visitor/myvisitor" }, - { text: "访客邀约", icon: "/static/icon/service_5.png", router: "/pages/integrated/visitor/myyyvisitor" }, - { text: "邀约记录", icon: "/static/icon/service_5.png", router: "/pages/integrated/visitor/myyyvisitorlist" }, + // { text: "访客", icon: "/static/icon/service_5.png", router: "/pages/integrated/visitor/index" }, + // { text: "访客记录", icon: "/static/icon/service_5.png", router: "/pages/integrated/visitor/myvisitor" }, + // { text: "访客邀约", icon: "/static/icon/service_5.png", router: "/pages/integrated/visitor/myyyvisitor" }, + // { text: "邀约记录", icon: "/static/icon/service_5.png", router: "/pages/integrated/visitor/myyyvisitorlist" }, + // { text: "访客核销", icon: "/static/icon/service_5.png", router: "/pages/integrated/visitor/verify" }, + // { text: "意见反馈", icon: "/static/icon/service_5.png", router: "/pages/integrated/feedback/index" } ], appInfo: "", diff --git a/src/sheep/api/integrated/visitors.ts b/src/sheep/api/integrated/visitors.ts index 1446360..9bd7720 100644 --- a/src/sheep/api/integrated/visitors.ts +++ b/src/sheep/api/integrated/visitors.ts @@ -117,6 +117,24 @@ const visitorApi = { showLoading: false, }, }), + + // 获取访客详情 + getVisitorDetail: (params: { token: string }) => { + return request({ + url: '/integrated/visitors/app/get/visitorDetail', + method: 'GET', + params + }) + }, + + // 访客核销 + verifyVisitor: (params: { token: string }) => { + return request({ + url: '/integrated/visitors/app/verify', + method: 'POST', + data: params + }) + } } export default visitorApi