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 {