diff --git a/schoolNewsServ/.bin/mysql/sql/initConfigData.sql b/schoolNewsServ/.bin/mysql/sql/initConfigData.sql index 204a498..3c6fa68 100644 --- a/schoolNewsServ/.bin/mysql/sql/initConfigData.sql +++ b/schoolNewsServ/.bin/mysql/sql/initConfigData.sql @@ -28,6 +28,9 @@ INSERT INTO `tb_sys_config` (`id`, `config_key`, `config_name`, `config_value`, ('103', 'system.logo.home', '首页Logo', '', 'string', 'imgupload', '基础配置', '首页Logo', NULL, '存储文件ID,建议尺寸:36x36px', NULL, NULL, NULL, NULL, NULL, 103, 1, '1', now()), ('104', 'system.logo.admin', '管理后台Logo', '', 'string', 'imgupload', '基础配置', '管理后台Logo', NULL, '存储文件ID,建议尺寸:36x36px', NULL, NULL, NULL, NULL, NULL, 104, 1, '1', now()), ('105', 'system.favicon', '网站图标', '', 'string', 'imgupload', '基础配置', '网站图标', NULL, '存储文件ID,建议格式:ico/png,尺寸:36x36px', NULL, NULL, NULL, NULL, NULL, 105, 1, '1', now()), +('106', 'system.agreement.platform', '平台协议', '', 'string', 'fileupload', '基础配置', '平台协议文件', NULL, '支持PDF、TXT格式,用户点击后新开页面查看', NULL, NULL, NULL, NULL, NULL, 106, 1, '1', now()), +('107', 'system.agreement.user', '用户协议', '', 'string', 'fileupload', '基础配置', '用户协议文件', NULL, '支持PDF、TXT格式,用户点击后新开页面查看', NULL, NULL, NULL, NULL, NULL, 107, 1, '1', now()), +('108', 'system.agreement.privacy', '隐私协议', '', 'string', 'fileupload', '基础配置', '隐私协议文件', NULL, '支持PDF、TXT格式,用户点击后新开页面查看', NULL, NULL, NULL, NULL, NULL, 108, 1, '1', now()), -- 邮件配置 ('40', 'email.login.enabled', '启用邮箱登录', 'false', 'boolean', 'switch', '邮件配置', '是否启用邮箱登录', NULL, '关闭后登录页将不显示邮箱登录选项', NULL, NULL, NULL, NULL, NULL, 40, 1, '1', now()), diff --git a/schoolNewsServ/system/src/main/java/org/xyzh/system/service/config/impl/SysConfigServiceImpl.java b/schoolNewsServ/system/src/main/java/org/xyzh/system/service/config/impl/SysConfigServiceImpl.java index b144122..7168946 100644 --- a/schoolNewsServ/system/src/main/java/org/xyzh/system/service/config/impl/SysConfigServiceImpl.java +++ b/schoolNewsServ/system/src/main/java/org/xyzh/system/service/config/impl/SysConfigServiceImpl.java @@ -387,6 +387,11 @@ public class SysConfigServiceImpl implements SysConfigService { baseInfo.put("adminLogo", getStringConfig("system.logo.admin")); baseInfo.put("favicon", getStringConfig("system.favicon")); + // 登录协议文件ID + baseInfo.put("platformAgreement", getStringConfig("system.agreement.platform")); + baseInfo.put("userAgreement", getStringConfig("system.agreement.user")); + baseInfo.put("privacyAgreement", getStringConfig("system.agreement.privacy")); + // 登录相关开关(从各自分组获取) baseInfo.put("smsLoginEnabled", getBooleanConfig("sms.login.enabled")); baseInfo.put("emailLoginEnabled", getBooleanConfig("email.login.enabled")); diff --git a/schoolNewsWeb/package-lock.json b/schoolNewsWeb/package-lock.json index d510f87..d05580a 100644 --- a/schoolNewsWeb/package-lock.json +++ b/schoolNewsWeb/package-lock.json @@ -12,9 +12,11 @@ "core-js": "^3.8.3", "echarts": "^6.0.0", "element-plus": "^2.11.4", + "pdfjs-dist": "^5.4.530", "quill": "^2.0.3", "register-service-worker": "^1.7.2", "vue": "^3.5.22", + "vue-pdf-embed": "^2.1.3", "vue-router": "^4.5.1", "vuex": "^4.1.0" }, @@ -2269,6 +2271,256 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@napi-rs/canvas": { + "version": "0.1.88", + "resolved": "https://registry.npmmirror.com/@napi-rs/canvas/-/canvas-0.1.88.tgz", + "integrity": "sha512-/p08f93LEbsL5mDZFQ3DBxcPv/I4QG9EDYRRq1WNlCOXVfAHBTHMSVMwxlqG/AtnSfUr9+vgfN7MKiyDo0+Weg==", + "license": "MIT", + "optional": true, + "workspaces": [ + "e2e/*" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "optionalDependencies": { + "@napi-rs/canvas-android-arm64": "0.1.88", + "@napi-rs/canvas-darwin-arm64": "0.1.88", + "@napi-rs/canvas-darwin-x64": "0.1.88", + "@napi-rs/canvas-linux-arm-gnueabihf": "0.1.88", + "@napi-rs/canvas-linux-arm64-gnu": "0.1.88", + "@napi-rs/canvas-linux-arm64-musl": "0.1.88", + "@napi-rs/canvas-linux-riscv64-gnu": "0.1.88", + "@napi-rs/canvas-linux-x64-gnu": "0.1.88", + "@napi-rs/canvas-linux-x64-musl": "0.1.88", + "@napi-rs/canvas-win32-arm64-msvc": "0.1.88", + "@napi-rs/canvas-win32-x64-msvc": "0.1.88" + } + }, + "node_modules/@napi-rs/canvas-android-arm64": { + "version": "0.1.88", + "resolved": "https://registry.npmmirror.com/@napi-rs/canvas-android-arm64/-/canvas-android-arm64-0.1.88.tgz", + "integrity": "sha512-KEaClPnZuVxJ8smUWjV1wWFkByBO/D+vy4lN+Dm5DFH514oqwukxKGeck9xcKJhaWJGjfruGmYGiwRe//+/zQQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + } + }, + "node_modules/@napi-rs/canvas-darwin-arm64": { + "version": "0.1.88", + "resolved": "https://registry.npmmirror.com/@napi-rs/canvas-darwin-arm64/-/canvas-darwin-arm64-0.1.88.tgz", + "integrity": "sha512-Xgywz0dDxOKSgx3eZnK85WgGMmGrQEW7ZLA/E7raZdlEE+xXCozobgqz2ZvYigpB6DJFYkqnwHjqCOTSDGlFdg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + } + }, + "node_modules/@napi-rs/canvas-darwin-x64": { + "version": "0.1.88", + "resolved": "https://registry.npmmirror.com/@napi-rs/canvas-darwin-x64/-/canvas-darwin-x64-0.1.88.tgz", + "integrity": "sha512-Yz4wSCIQOUgNucgk+8NFtQxQxZV5NO8VKRl9ePKE6XoNyNVC8JDqtvhh3b3TPqKK8W5p2EQpAr1rjjm0mfBxdg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + } + }, + "node_modules/@napi-rs/canvas-linux-arm-gnueabihf": { + "version": "0.1.88", + "resolved": "https://registry.npmmirror.com/@napi-rs/canvas-linux-arm-gnueabihf/-/canvas-linux-arm-gnueabihf-0.1.88.tgz", + "integrity": "sha512-9gQM2SlTo76hYhxHi2XxWTAqpTOb+JtxMPEIr+H5nAhHhyEtNmTSDRtz93SP7mGd2G3Ojf2oF5tP9OdgtgXyKg==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + } + }, + "node_modules/@napi-rs/canvas-linux-arm64-gnu": { + "version": "0.1.88", + "resolved": "https://registry.npmmirror.com/@napi-rs/canvas-linux-arm64-gnu/-/canvas-linux-arm64-gnu-0.1.88.tgz", + "integrity": "sha512-7qgaOBMXuVRk9Fzztzr3BchQKXDxGbY+nwsovD3I/Sx81e+sX0ReEDYHTItNb0Je4NHbAl7D0MKyd4SvUc04sg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + } + }, + "node_modules/@napi-rs/canvas-linux-arm64-musl": { + "version": "0.1.88", + "resolved": "https://registry.npmmirror.com/@napi-rs/canvas-linux-arm64-musl/-/canvas-linux-arm64-musl-0.1.88.tgz", + "integrity": "sha512-kYyNrUsHLkoGHBc77u4Unh067GrfiCUMbGHC2+OTxbeWfZkPt2o32UOQkhnSswKd9Fko/wSqqGkY956bIUzruA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + } + }, + "node_modules/@napi-rs/canvas-linux-riscv64-gnu": { + "version": "0.1.88", + "resolved": "https://registry.npmmirror.com/@napi-rs/canvas-linux-riscv64-gnu/-/canvas-linux-riscv64-gnu-0.1.88.tgz", + "integrity": "sha512-HVuH7QgzB0yavYdNZDRyAsn/ejoXB0hn8twwFnOqUbCCdkV+REna7RXjSR7+PdfW0qMQ2YYWsLvVBT5iL/mGpw==", + "cpu": [ + "riscv64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + } + }, + "node_modules/@napi-rs/canvas-linux-x64-gnu": { + "version": "0.1.88", + "resolved": "https://registry.npmmirror.com/@napi-rs/canvas-linux-x64-gnu/-/canvas-linux-x64-gnu-0.1.88.tgz", + "integrity": "sha512-hvcvKIcPEQrvvJtJnwD35B3qk6umFJ8dFIr8bSymfrSMem0EQsfn1ztys8ETIFndTwdNWJKWluvxztA41ivsEw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + } + }, + "node_modules/@napi-rs/canvas-linux-x64-musl": { + "version": "0.1.88", + "resolved": "https://registry.npmmirror.com/@napi-rs/canvas-linux-x64-musl/-/canvas-linux-x64-musl-0.1.88.tgz", + "integrity": "sha512-eSMpGYY2xnZSQ6UxYJ6plDboxq4KeJ4zT5HaVkUnbObNN6DlbJe0Mclh3wifAmquXfrlgTZt6zhHsUgz++AK6g==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + } + }, + "node_modules/@napi-rs/canvas-win32-arm64-msvc": { + "version": "0.1.88", + "resolved": "https://registry.npmmirror.com/@napi-rs/canvas-win32-arm64-msvc/-/canvas-win32-arm64-msvc-0.1.88.tgz", + "integrity": "sha512-qcIFfEgHrchyYqRrxsCeTQgpJZ/GqHiqPcU/Fvw/ARVlQeDX1VyFH+X+0gCR2tca6UJrq96vnW+5o7buCq+erA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + } + }, + "node_modules/@napi-rs/canvas-win32-x64-msvc": { + "version": "0.1.88", + "resolved": "https://registry.npmmirror.com/@napi-rs/canvas-win32-x64-msvc/-/canvas-win32-x64-msvc-0.1.88.tgz", + "integrity": "sha512-ROVqbfS4QyZxYkqmaIBBpbz/BQvAR+05FXM5PAtTYVc0uyY8Y4BHJSMdGAaMf6TdIVRsQsiq+FG/dH9XhvWCFQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -6286,6 +6538,18 @@ "node": ">=8" } }, + "node_modules/pdfjs-dist": { + "version": "5.4.530", + "resolved": "https://registry.npmmirror.com/pdfjs-dist/-/pdfjs-dist-5.4.530.tgz", + "integrity": "sha512-r1hWsSIGGmyYUAHR26zSXkxYWLXLMd6AwqcaFYG9YUZ0GBf5GvcjJSeo512tabM4GYFhxhl5pMCmPr7Q72Rq2Q==", + "license": "Apache-2.0", + "engines": { + "node": ">=20.16.0 || >=22.3.0" + }, + "optionalDependencies": { + "@napi-rs/canvas": "^0.1.84" + } + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz", @@ -8305,6 +8569,30 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/vue-pdf-embed": { + "version": "2.1.3", + "resolved": "https://registry.npmmirror.com/vue-pdf-embed/-/vue-pdf-embed-2.1.3.tgz", + "integrity": "sha512-EGgZNb8HRrAloBpb8p8CugDpJpoPbQ8CFfAYdWZgq2e5qBMP9JSeLzVQIAJkXsclHXRIS3O9fp3WQbP9T5Inwg==", + "license": "MIT", + "dependencies": { + "pdfjs-dist": "^4.10.38" + }, + "peerDependencies": { + "vue": "^3.3.0" + } + }, + "node_modules/vue-pdf-embed/node_modules/pdfjs-dist": { + "version": "4.10.38", + "resolved": "https://registry.npmmirror.com/pdfjs-dist/-/pdfjs-dist-4.10.38.tgz", + "integrity": "sha512-/Y3fcFrXEAsMjJXeL9J8+ZG9U01LbuWaYypvDW2ycW1jL269L3js3DVBjDJ0Up9Np1uqDXsDrRihHANhZOlwdQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=20" + }, + "optionalDependencies": { + "@napi-rs/canvas": "^0.1.65" + } + }, "node_modules/vue-router": { "version": "4.5.1", "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-4.5.1.tgz", diff --git a/schoolNewsWeb/package.json b/schoolNewsWeb/package.json index cc5a600..46c82db 100644 --- a/schoolNewsWeb/package.json +++ b/schoolNewsWeb/package.json @@ -15,9 +15,11 @@ "core-js": "^3.8.3", "echarts": "^6.0.0", "element-plus": "^2.11.4", + "pdfjs-dist": "^5.4.530", "quill": "^2.0.3", "register-service-worker": "^1.7.2", "vue": "^3.5.22", + "vue-pdf-embed": "^2.1.3", "vue-router": "^4.5.1", "vuex": "^4.1.0" }, diff --git a/schoolNewsWeb/src/components/file/FileUpload.vue b/schoolNewsWeb/src/components/file/FileUpload.vue index aff083c..9ba9ab5 100644 --- a/schoolNewsWeb/src/components/file/FileUpload.vue +++ b/schoolNewsWeb/src/components/file/FileUpload.vue @@ -122,18 +122,6 @@ - - -
- - {{ uploading ? '上传中...' : '确定上传' }} - -
.blank-layout { - width: 100vw; + width: 100%; height: 100vh; display: flex; flex-direction: column; + overflow-x: hidden; } diff --git a/schoolNewsWeb/src/router/index.ts b/schoolNewsWeb/src/router/index.ts index 44ec207..fb410a2 100644 --- a/schoolNewsWeb/src/router/index.ts +++ b/schoolNewsWeb/src/router/index.ts @@ -24,6 +24,23 @@ export const routes: Array = [ requiresAuth: false, menuType: 3, }), + // 协议预览页面 + { + path: "/agreement/:type", + component: () => import("@/layouts/BlankLayout.vue"), + children: [ + { + path: "", + name: "Agreement", + component: () => import("@/views/public/agreement/AgreementView.vue"), + meta: { + title: "协议", + requiresAuth: false, + menuType: 3, + }, + } + ], + }, // 首页(显示在导航栏) // { // path: "/home", diff --git a/schoolNewsWeb/src/store/modules/system.ts b/schoolNewsWeb/src/store/modules/system.ts index 7375a5b..97e8c6b 100644 --- a/schoolNewsWeb/src/store/modules/system.ts +++ b/schoolNewsWeb/src/store/modules/system.ts @@ -47,6 +47,22 @@ export default { faviconUrl: (state: SystemState) => { const fileId = state.baseInfo?.favicon; return (fileId && fileId.trim()) ? `${FILE_DOWNLOAD_URL}${fileId}` : '/favicon.ico'; + }, + + // 协议文件URL + platformAgreementUrl: (state: SystemState) => { + const fileId = state.baseInfo?.platformAgreement; + return (fileId && fileId.trim()) ? `${FILE_DOWNLOAD_URL}${fileId}` : ''; + }, + + userAgreementUrl: (state: SystemState) => { + const fileId = state.baseInfo?.userAgreement; + return (fileId && fileId.trim()) ? `${FILE_DOWNLOAD_URL}${fileId}` : ''; + }, + + privacyAgreementUrl: (state: SystemState) => { + const fileId = state.baseInfo?.privacyAgreement; + return (fileId && fileId.trim()) ? `${FILE_DOWNLOAD_URL}${fileId}` : ''; } }, diff --git a/schoolNewsWeb/src/types/system/baseinfo.ts b/schoolNewsWeb/src/types/system/baseinfo.ts index e32a499..63a3a22 100644 --- a/schoolNewsWeb/src/types/system/baseinfo.ts +++ b/schoolNewsWeb/src/types/system/baseinfo.ts @@ -10,6 +10,11 @@ export interface SystemBaseInfo { adminLogo: string; // 管理后台Logo(fileId) favicon: string; // 网站图标(fileId) + // 登录协议文件ID + platformAgreement: string; // 平台协议(fileId) + userAgreement: string; // 用户协议(fileId) + privacyAgreement: string; // 隐私协议(fileId) + // 登录开关(来自不同分组) smsLoginEnabled: boolean; // 短信登录开关(sms分组) emailLoginEnabled: boolean; // 邮箱登录开关(email分组) diff --git a/schoolNewsWeb/src/views/admin/manage/system/SystemConfigView.vue b/schoolNewsWeb/src/views/admin/manage/system/SystemConfigView.vue index 2926e5b..7198aad 100644 --- a/schoolNewsWeb/src/views/admin/manage/system/SystemConfigView.vue +++ b/schoolNewsWeb/src/views/admin/manage/system/SystemConfigView.vue @@ -122,6 +122,44 @@ :tip="item.remark || '点击上传图片,支持jpg、png格式'" /> + + + +
+ +
+ 已上传 + + 预览文件 + + + 删除 + +
+
+
@@ -149,7 +187,6 @@ import { ElMessage } from 'element-plus'; import { configApi } from '@/apis/system'; import type { ConfigItem } from '@/types/system/config'; import FileUpload from '@/components/file/FileUpload.vue'; - defineOptions({ name: 'SystemConfigView' }); @@ -358,6 +395,26 @@ function handleCoverUpdate(url: string, groupKey: string, configKey: string) { configData[groupKey][configKey] = url; } +/** + * 处理文件上传成功(协议文档等) + */ +function handleFileUploadSuccess(files: any[], groupKey: string, configKey: string) { + if (files && files.length > 0) { + configData[groupKey][configKey] = files[0].fileID || ''; + } +} + +/** + * 预览协议文件(新开tab页) + */ +function previewAgreementFile(fileId: string) { + if (fileId) { + // 使用文件下载URL在新标签页打开 + const url = `${import.meta.env.VITE_API_BASE_URL || ''}/api/file/preview/${fileId}`; + window.open(url, '_blank'); + } +} + /** * 保存指定分组的配置 */ @@ -440,5 +497,16 @@ async function saveConfig(groupKey: string) { color: #606266; font-size: 14px; } + + .file-upload-wrapper { + width: 100%; + + .uploaded-file-info { + margin-top: 10px; + display: flex; + align-items: center; + gap: 12px; + } + } } diff --git a/schoolNewsWeb/src/views/public/agreement/AgreementView.vue b/schoolNewsWeb/src/views/public/agreement/AgreementView.vue new file mode 100644 index 0000000..e26d638 --- /dev/null +++ b/schoolNewsWeb/src/views/public/agreement/AgreementView.vue @@ -0,0 +1,230 @@ + + + + + diff --git a/schoolNewsWeb/src/views/public/login/Login.mobile.vue b/schoolNewsWeb/src/views/public/login/Login.mobile.vue index a6bee82..cf7ef2c 100644 --- a/schoolNewsWeb/src/views/public/login/Login.mobile.vue +++ b/schoolNewsWeb/src/views/public/login/Login.mobile.vue @@ -181,8 +181,8 @@
- 登录即为同意 《红色思政智能体平台》《用户协议》 - 《隐私协议》 + 登录即为同意 《红色思政智能体平台》《用户协议》 + 《隐私协议》
@@ -519,6 +519,15 @@ function goToForgotPassword() { router.push('/forgot-password'); } +/** + * 打开协议文件(新标签页) + */ +function openAgreement(type: 'platform' | 'user' | 'privacy') { + // 跳转到协议预览页面 + const url = router.resolve({ path: `/agreement/${type}` }).href; + window.open(url, '_blank'); +} + // 组件挂载时检查是否需要显示验证码 onMounted(() => { // 可以根据需要决定是否默认显示验证码 diff --git a/schoolNewsWeb/src/views/public/login/Login.vue b/schoolNewsWeb/src/views/public/login/Login.vue index 543687d..c4b1a79 100644 --- a/schoolNewsWeb/src/views/public/login/Login.vue +++ b/schoolNewsWeb/src/views/public/login/Login.vue @@ -181,9 +181,9 @@
- 登录即为同意 《红色思政智能体平台》 - 《用户协议》 - 《隐私协议》 + 登录即为同意 《红色思政智能体平台》 + 《用户协议》 + 《隐私协议》
@@ -521,6 +521,15 @@ function goToForgotPassword() { router.push('/forgot-password'); } +/** + * 打开协议文件(新标签页) + */ +function openAgreement(type: 'platform' | 'user' | 'privacy') { + // 跳转到协议预览页面 + const url = router.resolve({ path: `/agreement/${type}` }).href; + window.open(url, '_blank'); +} + // 组件挂载时检查是否需要显示验证码 onMounted(() => { // 可以根据需要决定是否默认显示验证码 diff --git a/schoolNewsWeb/src/views/public/login/Register.mobile.vue b/schoolNewsWeb/src/views/public/login/Register.mobile.vue index 50b6706..920e877 100644 --- a/schoolNewsWeb/src/views/public/login/Register.mobile.vue +++ b/schoolNewsWeb/src/views/public/login/Register.mobile.vue @@ -167,8 +167,8 @@
- 注册即为同意 《红色思政智能体平台》《用户协议》 - 《隐私协议》 + 注册即为同意 《红色思政智能体平台》《用户协议》 + 《隐私协议》
@@ -515,6 +515,15 @@ onUnmounted(() => { clearInterval(emailTimer); } }); + +/** + * 打开协议文件(新标签页) + */ +function openAgreement(type: 'platform' | 'user' | 'privacy') { + // 跳转到协议预览页面 + const url = router.resolve({ path: `/agreement/${type}` }).href; + window.open(url, '_blank'); +}