diff --git a/auto-imports.d.ts b/auto-imports.d.ts index 9d24007..17379a7 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -6,5 +6,5 @@ // biome-ignore lint: disable export {} declare global { - + const showToast: typeof import('vant/es').showToast } diff --git a/package.json b/package.json index 2d6faf7..c8824fa 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "vant": "^4.9.24", "vue": "^3.5.13", "vue-i18n": "11.4.4", - "vue-router": "^4.5.1" + "vue-router": "^4.5.1", + "vue3-markdown-it": "^1.0.10" }, "devDependencies": { "@tailwindcss/vite": "^4.1.12", diff --git a/src/pages/login/components/AgreePopup/README.md b/src/pages/login/components/AgreePopup/README.md deleted file mode 100644 index 90df96f..0000000 --- a/src/pages/login/components/AgreePopup/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# AgreePopup 用户协议同意弹窗组件 - -## 组件概述 - -AgreePopup 是一个用于登录流程中的用户协议同意弹窗组件,用于向用户展示隐私政策和用户协议,并获取用户的同意确认。 - -## 功能需求 - -### 界面设计 -- **弹窗标题**:显示"温馨提示"标题,居中显示 -- **关闭按钮**:右上角显示"×"关闭按钮,点击可关闭弹窗 -- **内容区域**: - - 主要说明文字:"您在使用朵花温泉服务前,请仔细阅读用户隐私条款及用户注册须知,当您点击同意,即表示您已经理解并同意该条款,该条款将构成对您具有法律约束力的文件。" - - 注意事项:"请您注意:如果您不同意上述用户注册须知、隐私政策或其中任何约定,请您停止注册。如您阅读并点击同意即表示您已充分阅读理解并接受其全部内容,并表明您也同意朵花温泉可以依据以上隐私政策来处理您的个人信息。" - -### 交互功能 -- **复选框**: - - 显示蓝色勾选框 - - 文字说明:"本人已仔细阅读《用户协议》和《隐私协议》,知悉并诺遵守该内容。" - - 支持点击切换选中/未选中状态 -- **确认按钮**: - - 显示"我知道了"按钮 - - 蓝色背景,白色文字 - - 圆角设计 - - 点击后触发同意事件并关闭弹窗 - -### 技术要求 -- 使用 Vue 3 Composition API -- 支持弹窗显示/隐藏控制 -- 提供事件回调:同意、关闭 -- 响应式设计,适配移动端 -- 使用 uni-app 框架 - -### 样式规范 -- 弹窗背景:白色 -- 圆角设计 -- 文字颜色:深灰色 -- 按钮:蓝色主题色 -- 复选框:蓝色选中状态 -- 适当的内边距和间距 - -### 使用场景 -- 用户首次登录时显示 -- 隐私政策更新后重新确认 -- 注册流程中的协议确认 - -## 组件接口 - -### Props -- `visible`: Boolean - 控制弹窗显示/隐藏 -- `title`: String - 弹窗标题,默认"温馨提示" - -### Events -- `@agree`: 用户点击同意时触发 -- `@close`: 用户关闭弹窗时触发 -- `@cancel`: 用户取消操作时触发 - -### Methods -- `show()`: 显示弹窗 -- `hide()`: 隐藏弹窗 - -## 文件结构 -``` -AgreePopup/ -├── README.md # 组件说明文档 -├── index.vue # 组件主文件 -├── styles/ -│ └── index.scss # 组件样式文件 -└── images/ - └── 登录授权1.png # 设计稿参考图 -``` \ No newline at end of file diff --git a/src/pages/login/components/AgreePopup/demo.vue b/src/pages/login/components/AgreePopup/demo.vue deleted file mode 100644 index 1d54ca0..0000000 --- a/src/pages/login/components/AgreePopup/demo.vue +++ /dev/null @@ -1,127 +0,0 @@ - - - - - diff --git a/src/pages/login/components/AgreePopup/images/登录授权1.png b/src/pages/login/components/AgreePopup/images/登录授权1.png deleted file mode 100644 index dc5c8dd..0000000 Binary files a/src/pages/login/components/AgreePopup/images/登录授权1.png and /dev/null differ diff --git a/src/pages/login/components/AgreePopup/index.vue b/src/pages/login/components/AgreePopup/index.vue index 655d2e9..a3a6da0 100644 --- a/src/pages/login/components/AgreePopup/index.vue +++ b/src/pages/login/components/AgreePopup/index.vue @@ -1,31 +1,35 @@ - - diff --git a/src/pages/login/components/AgreePopup/styles/index.scss b/src/pages/login/components/AgreePopup/styles/index.scss deleted file mode 100644 index a9004f0..0000000 --- a/src/pages/login/components/AgreePopup/styles/index.scss +++ /dev/null @@ -1,83 +0,0 @@ -// AgreePopup 组件样式 -.agree-popup { - width: 327px; - background-color: #fff; - border-radius: 12px; - overflow: hidden; - box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); - - // 弹窗头部 - .popup-header { - position: relative; - padding: 20px 20px 0 20px; - - .popup-title { - font-size: 18px; - font-weight: 600; - color: #333; - text-align: center; - line-height: 24px; - } - - .close-btn { - position: absolute; - top: 16px; - right: 16px; - width: 28px; - height: 28px; - display: flex; - align-items: center; - justify-content: center; - cursor: pointer; - - &:hover { - background: #f5f5f5; - border-radius: 50%; - } - } - } - - // 弹窗内容 - .popup-content { - padding: 12px; - max-height: 400px; // 设置最大高度 - overflow-y: auto; // 启用垂直滚动 - - // 自定义滚动条样式 - &::-webkit-scrollbar { - display: none; - } - } - - // 按钮区域 - .button-area { - padding: 20px; - box-sizing: border-box; - display: flex; - justify-content: center; - align-items: center; - - .confirm-btn { - width: 148px; - height: 44px; - background: linear-gradient(90deg, #22a7ff 0%, #2567ff 100%); - display: flex; - align-items: center; - justify-content: center; - color: #ffffff; - border-radius: 50px; - font-size: 16px; - font-weight: 500; - transition: all 0.3s ease; - - &:hover { - background: #0056cc; - } - - &:active { - background: #004499; - transform: scale(0.98); - } - } - } -} diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index 9055286..786f04a 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -1,62 +1,36 @@ - - diff --git a/src/pages/login/styles/index.scss b/src/pages/login/styles/index.scss deleted file mode 100644 index 880a570..0000000 --- a/src/pages/login/styles/index.scss +++ /dev/null @@ -1,43 +0,0 @@ -.login-wrapper { - display: flex; - flex-direction: column; - align-items: center; - box-sizing: border-box; - height: 100vh; - padding-top: 100px; - position: relative; - - .back-btn { - position: absolute; - top: 44px; - left: 4px; - width: 44px; - height: 44px; - display: flex; - align-items: center; - justify-content: center; - z-index: 10; - } - - .login-header { - margin-top: 40px; - width: 200px; - height: 200px; - } - - .login-btn-area { - margin-top: 20px; - width: 304px; - - .login-btn { - background: #0ccd58; - width: 100%; - border-radius: 10px; - } - } - - .login-agreement { - margin-top: 80px; - width: 304px; - } -} diff --git a/yarn.lock b/yarn.lock index 135f3d5..5ccf837 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1665,6 +1665,11 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: dependencies: color-convert "^2.0.1" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -1910,6 +1915,11 @@ entities@^7.0.1: resolved "https://registry.npmmirror.com/entities/-/entities-7.0.1.tgz#26e8a88889db63417dcb9a1e79a3f1bc92b5976b" integrity sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA== +entities@~2.1.0: + version "2.1.0" + resolved "https://registry.npmmirror.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" + integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== + es-define-property@^1.0.1: version "1.0.1" resolved "https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" @@ -2105,6 +2115,11 @@ he@^1.2.0: resolved "https://registry.npmmirror.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== +highlight.js@^11.3.1: + version "11.11.1" + resolved "https://registry.npmmirror.com/highlight.js/-/highlight.js-11.11.1.tgz#fca06fa0e5aeecf6c4d437239135fabc15213585" + integrity sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w== + hookable@^5.5.3: version "5.5.3" resolved "https://registry.npmmirror.com/hookable/-/hookable-5.5.3.tgz#6cfc358984a1ef991e2518cb9ed4a778bbd3215d" @@ -2251,6 +2266,13 @@ lightningcss@1.32.0: lightningcss-win32-arm64-msvc "1.32.0" lightningcss-win32-x64-msvc "1.32.0" +linkify-it@^3.0.1: + version "3.0.3" + resolved "https://registry.npmmirror.com/linkify-it/-/linkify-it-3.0.3.tgz#a98baf44ce45a550efb4d49c769d07524cc2fa2e" + integrity sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ== + dependencies: + uc.micro "^1.0.1" + local-pkg@^1.1.2, local-pkg@^1.2.0: version "1.2.1" resolved "https://registry.npmmirror.com/local-pkg/-/local-pkg-1.2.1.tgz#9628389399851d78f3b50c9236eddb02f0c31b2b" @@ -2265,6 +2287,11 @@ lodash.debounce@^4.0.8: resolved "https://registry.npmmirror.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== +lodash.flow@^3.5.0: + version "3.5.0" + resolved "https://registry.npmmirror.com/lodash.flow/-/lodash.flow-3.5.0.tgz#87bf40292b8cf83e4e8ce1a3ae4209e20071675a" + integrity sha512-ff3BX/tSioo+XojX4MOsOMhJw0nZoUEF011LX8g8d3gvjVbxd89cCio4BCXronjxcTUIJUoqKEUA+n4CqvvRPw== + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.npmmirror.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -2279,11 +2306,90 @@ magic-string@^0.30.17, magic-string@^0.30.21: dependencies: "@jridgewell/sourcemap-codec" "^1.5.5" +markdown-it-abbr@^1.0.4: + version "1.0.4" + resolved "https://registry.npmmirror.com/markdown-it-abbr/-/markdown-it-abbr-1.0.4.tgz#d66b5364521cbb3dd8aa59dadfba2fb6865c8fd8" + integrity sha512-ZeA4Z4SaBbYysZap5iZcxKmlPL6bYA8grqhzJIHB1ikn7njnzaP8uwbtuXc4YXD5LicI4/2Xmc0VwmSiFV04gg== + +markdown-it-anchor@^8.4.1: + version "8.6.7" + resolved "https://registry.npmmirror.com/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz#ee6926daf3ad1ed5e4e3968b1740eef1c6399634" + integrity sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA== + +markdown-it-deflist@^2.1.0: + version "2.1.0" + resolved "https://registry.npmmirror.com/markdown-it-deflist/-/markdown-it-deflist-2.1.0.tgz#50d7a56b9544cd81252f7623bd785e28a8dcef5c" + integrity sha512-3OuqoRUlSxJiuQYu0cWTLHNhhq2xtoSFqsZK8plANg91+RJQU1ziQ6lA2LzmFAEes18uPBsHZpcX6We5l76Nzg== + +markdown-it-emoji@^2.0.0: + version "2.0.2" + resolved "https://registry.npmmirror.com/markdown-it-emoji/-/markdown-it-emoji-2.0.2.tgz#cd42421c2fda1537d9cc12b9923f5c8aeb9029c8" + integrity sha512-zLftSaNrKuYl0kR5zm4gxXjHaOI3FAOEaloKmRA5hijmJZvSjmxcokOLlzycb/HXlUFWzXqpIEoyEMCE4i9MvQ== + +markdown-it-footnote@^3.0.3: + version "3.0.3" + resolved "https://registry.npmmirror.com/markdown-it-footnote/-/markdown-it-footnote-3.0.3.tgz#e0e4c0d67390a4c5f0c75f73be605c7c190ca4d8" + integrity sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w== + +markdown-it-highlightjs@^3.6.0: + version "3.6.0" + resolved "https://registry.npmmirror.com/markdown-it-highlightjs/-/markdown-it-highlightjs-3.6.0.tgz#b567408c633d71e5e4cc33e1d0121a44447d2f29" + integrity sha512-ex+Lq3cVkprh0GpGwFyc53A/rqY6GGzopPCG1xMsf8Ya3XtGC8Uw9tChN1rWbpyDae7tBBhVHVcMM29h4Btamw== + dependencies: + highlight.js "^11.3.1" + lodash.flow "^3.5.0" + +markdown-it-ins@^3.0.1: + version "3.0.1" + resolved "https://registry.npmmirror.com/markdown-it-ins/-/markdown-it-ins-3.0.1.tgz#c09356b917cf1dbf73add0b275d67ab8c73d4b4d" + integrity sha512-32SSfZqSzqyAmmQ4SHvhxbFqSzPDqsZgMHDwxqPzp+v+t8RsmqsBZRG+RfRQskJko9PfKC2/oxyOs4Yg/CfiRw== + +markdown-it-mark@^3.0.1: + version "3.0.1" + resolved "https://registry.npmmirror.com/markdown-it-mark/-/markdown-it-mark-3.0.1.tgz#51257db58787d78aaf46dc13418d99a9f3f0ebd3" + integrity sha512-HyxjAu6BRsdt6Xcv6TKVQnkz/E70TdGXEFHRYBGLncRE9lBFwDNLVtFojKxjJWgJ+5XxUwLaHXy+2sGBbDn+4A== + +markdown-it-sub@^1.0.0: + version "1.0.0" + resolved "https://registry.npmmirror.com/markdown-it-sub/-/markdown-it-sub-1.0.0.tgz#375fd6026eae7ddcb012497f6411195ea1e3afe8" + integrity sha512-z2Rm/LzEE1wzwTSDrI+FlPEveAAbgdAdPhdWarq/ZGJrGW/uCQbKAnhoCsE4hAbc3SEym26+W2z/VQB0cQiA9Q== + +markdown-it-sup@^1.0.0: + version "1.0.0" + resolved "https://registry.npmmirror.com/markdown-it-sup/-/markdown-it-sup-1.0.0.tgz#cb9c9ff91a5255ac08f3fd3d63286e15df0a1fc3" + integrity sha512-E32m0nV9iyhRR7CrhnzL5msqic7rL1juWre6TQNxsnApg7Uf+F97JOKxUijg5YwXz86lZ0mqfOnutoryyNdntQ== + +markdown-it-task-lists@^2.1.1: + version "2.1.1" + resolved "https://registry.npmmirror.com/markdown-it-task-lists/-/markdown-it-task-lists-2.1.1.tgz#f68f4d2ac2bad5a2c373ba93081a1a6848417088" + integrity sha512-TxFAc76Jnhb2OUu+n3yz9RMu4CwGfaT788br6HhEDlvWfdeJcLUsxk1Hgw2yJio0OXsxv7pyIPmvECY7bMbluA== + +markdown-it-toc-done-right@^4.2.0: + version "4.2.0" + resolved "https://registry.npmmirror.com/markdown-it-toc-done-right/-/markdown-it-toc-done-right-4.2.0.tgz#3ccdce22d5022ffae7b991d07261b1b1de5459d0" + integrity sha512-UB/IbzjWazwTlNAX0pvWNlJS8NKsOQ4syrXZQ/C72j+jirrsjVRT627lCaylrKJFBQWfRsPmIVQie8x38DEhAQ== + +markdown-it@^12.3.2: + version "12.3.2" + resolved "https://registry.npmmirror.com/markdown-it/-/markdown-it-12.3.2.tgz#bf92ac92283fe983fe4de8ff8abfb5ad72cd0c90" + integrity sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg== + dependencies: + argparse "^2.0.1" + entities "~2.1.0" + linkify-it "^3.0.1" + mdurl "^1.0.1" + uc.micro "^1.0.5" + math-intrinsics@^1.1.0: version "1.1.0" resolved "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== +mdurl@^1.0.1: + version "1.0.1" + resolved "https://registry.npmmirror.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" + integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g== + meow@^13.0.0: version "13.2.0" resolved "https://registry.npmmirror.com/meow/-/meow-13.2.0.tgz#6b7d63f913f984063b3cc261b6e8800c4cd3474f" @@ -2662,6 +2768,11 @@ typescript@^5.8.3: resolved "https://registry.npmmirror.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f" integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw== +uc.micro@^1.0.1, uc.micro@^1.0.5: + version "1.0.6" + resolved "https://registry.npmmirror.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" + integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== + ufo@^1.6.3: version "1.6.4" resolved "https://registry.npmmirror.com/ufo/-/ufo-1.6.4.tgz#7a8fb875fcc6382d2c7d0b3692738b0500a92467" @@ -2840,6 +2951,25 @@ vue-tsc@^2.1.10: "@volar/typescript" "2.4.15" "@vue/language-core" "2.2.12" +vue3-markdown-it@^1.0.10: + version "1.0.10" + resolved "https://registry.npmmirror.com/vue3-markdown-it/-/vue3-markdown-it-1.0.10.tgz#c4b0e94990b3f9d66123ef5b775cd7ea177c609b" + integrity sha512-mTvHu0zl7jrh7ojgaZ+tTpCLiS4CVg4bTgTu4KGhw/cRRY5YgIG8QgFAPu6kCzSW6Znc9a52Beb6hFvF4hSMkQ== + dependencies: + markdown-it "^12.3.2" + markdown-it-abbr "^1.0.4" + markdown-it-anchor "^8.4.1" + markdown-it-deflist "^2.1.0" + markdown-it-emoji "^2.0.0" + markdown-it-footnote "^3.0.3" + markdown-it-highlightjs "^3.6.0" + markdown-it-ins "^3.0.1" + markdown-it-mark "^3.0.1" + markdown-it-sub "^1.0.0" + markdown-it-sup "^1.0.0" + markdown-it-task-lists "^2.1.1" + markdown-it-toc-done-right "^4.2.0" + vue@^3.5.13: version "3.5.34" resolved "https://registry.npmmirror.com/vue/-/vue-3.5.34.tgz#3b256eb30964416af6406a795fcfd7a5773a93c5"