From 6d80f02d07d3de7b7582b7807c1a7485e0d99ab3 Mon Sep 17 00:00:00 2001 From: minimaxagent1 Date: Wed, 6 Aug 2025 16:00:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2=E6=9D=A1?= =?UTF-8?q?=E6=AC=BE=E5=BC=B9=E7=AA=97=E7=9A=84=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/future/future.vue | 70 ++++++++++++++++++++++++++++++++++++----- pages/login/login.vue | 44 ++++++++++++++++++++++---- 2 files changed, 101 insertions(+), 13 deletions(-) diff --git a/pages/future/future.vue b/pages/future/future.vue index bb787c0..44e03ff 100644 --- a/pages/future/future.vue +++ b/pages/future/future.vue @@ -1,13 +1,69 @@ - +.page { + background: #F5F0E7; +} +.header { + width: 100%; + min-height: 100vh; + display: flex; + align-items: flex-start; + flex-direction: column; + padding: 0 15rpx; + padding-bottom: 40rpx; +} + \ No newline at end of file diff --git a/pages/login/login.vue b/pages/login/login.vue index e756b88..c688068 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -27,8 +27,10 @@ 服务条款 × - - + + + + 请仔细阅读服务条款,阅读完毕后点击同意 @@ -44,8 +46,10 @@ 法律条款及隐私政策 × - - + + + + 请仔细阅读隐私政策,阅读完毕后点击同意 @@ -79,6 +83,7 @@ export default { showPrivacyPolicyPopup: false, // 隐私政策弹窗 serviceTermsContent: '', // 服务条款内容 privacyPolicyContent: '', // 隐私政策内容 + scrollTop: 0, // 滚动位置 } }, onLoad() { @@ -118,8 +123,16 @@ export default { try { const res = await getServiceTerms(); if (res.code === 200 && res.data) { - this.serviceTermsContent = res.data.content || '暂无服务条款内容'; + // 处理文本内容,确保正确换行和样式 + let content = res.data.content || '暂无服务条款内容'; + // 将换行符转换为HTML换行标签 + content = content.replace(/\n/g, '
'); + // 添加基本样式 + content = `
${content}
`; + this.serviceTermsContent = content; this.showServiceTermsPopup = true; + // 重置滚动位置 + this.scrollTop = 0; } else { uni.showToast({ title: '获取服务条款失败', @@ -139,8 +152,16 @@ export default { try { const res = await getPrivacyPolicy(); if (res.code === 200 && res.data) { - this.privacyPolicyContent = res.data.content || '暂无隐私政策内容'; + // 处理文本内容,确保正确换行和样式 + let content = res.data.content || '暂无隐私政策内容'; + // 将换行符转换为HTML换行标签 + content = content.replace(/\n/g, '
'); + // 添加基本样式 + content = `
${content}
`; + this.privacyPolicyContent = content; this.showPrivacyPolicyPopup = true; + // 重置滚动位置 + this.scrollTop = 0; } else { uni.showToast({ title: '获取隐私政策失败', @@ -420,6 +441,17 @@ page{ line-height: 1.6; font-size: 28rpx; color: #333; + height: 0; /* 确保scroll-view有固定高度 */ +} + +.terms-content { + word-wrap: break-word; + word-break: break-all; + line-height: 1.6; + font-size: 28rpx; + color: #333; + padding-bottom: 20rpx; /* 底部留白 */ + padding-right: 30rpx; /* 右边距 */ } .popup-footer {