Files
cg d335ec290a refactor(app): 重构应用主题和页面结构
- 移除动态主题切换功能,改为全局统一深色主题
- 实现自定义TabBar组件替换原生tabBar,解决iOS闪白问题
- 创建main容器页面统一管理三个tab页面的生命周期和状态
- 将所有页面的onShow/onHide等生命周期方法迁移到子组件内部
- 更新页面路径从index改为main,并调整路由跳转逻辑
- 移除theme-mixin和相关主题工具函数
- 统一页面背景色设置,优化用户体验一致性
2026-09-23 20:56:14 +08:00

288 lines
11 KiB
Vue
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<view class="page-container agreement-page">
<!-- 自定义导航栏(避让胶囊) -->
<view class="agree-nav" :style="{ paddingTop: navPaddingTop }">
<view class="agree-nav-row" :style="{ paddingRight: navPaddingRight }">
<view class="agree-back" @click="goBack">
<text class="agree-back-icon">‹</text>
</view>
<text class="agree-nav-title">{{ title }}</text>
<view class="agree-back agree-back-ph"></view>
</view>
</view>
<scroll-view class="agree-scroll" scroll-y :show-scrollbar="false">
<view class="agree-content">
<text class="agree-update">更新日期:2026年8月1日 生效日期:2026年8月1日</text>
<view v-for="(sec, i) in sections" :key="i" class="agree-section">
<text class="agree-section-title">{{ sec.title }}</text>
<text v-for="(p, j) in sec.paras" :key="j" class="agree-p">{{ p }}</text>
</view>
<view class="agree-footer">
<text class="agree-footer-text">碰盏日记团队</text>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
export default {
data() {
const menuBtn = uni.getMenuButtonBoundingClientRect()
const sysInfo = uni.getSystemInfoSync()
return {
type: 'user',
navPaddingTop: menuBtn.top + 'px',
navPaddingRight: (sysInfo.windowWidth - menuBtn.left + 8) + 'px',
sections: []
}
},
computed: {
title() {
return this.type === 'privacy' ? '隐私政策' : '用户协议'
}
},
onLoad(options) {
this.type = options && options.type === 'privacy' ? 'privacy' : 'user'
this.sections = this.type === 'privacy' ? this.privacySections() : this.userSections()
uni.setNavigationBarTitle({ title: this.title })
},
methods: {
goBack() {
const pages = getCurrentPages()
if (pages.length > 1) {
uni.navigateBack()
} else {
uni.reLaunch({ url: '/pages/main/main?tab=0' })
}
},
userSections() {
return [
{
title: '一、服务说明',
paras: [
'「碰盏日记」是一款个人饮酒记录与生活管理工具,为用户提供饮酒打卡、日历回顾、统计成就、酒友圈动态、私聊互动等功能。',
'本小程序仅提供记录与社交工具,不从事任何酒类的销售、推广或推荐行为,亦不接受任何形式的酒类广告投放。',
'我们倡导理性饮酒。过量饮酒有害健康,请您在记录的同时关注自身身体状况,未成年人请勿饮酒。'
]
},
{
title: '二、账号注册与使用',
paras: [
'您通过微信授权登录并填写昵称、头像完成注册。您应保证所填资料真实、合法,不使用他人身份或侵权内容。',
'您应妥善保管自己的账号。因您个人原因导致的账号信息泄露,由您自行承担相应责任。',
'本小程序面向年满18周岁的成年人提供服务。若您未满18周岁,请勿注册和使用。'
]
},
{
title: '三、用户行为规范',
paras: [
'您在酒友圈发布的动态、评论、图片及私聊内容,应遵守国家法律法规,不得包含色情、暴力、赌博、欺诈、侵权或其他违法和不良信息。',
'您不得发布诱导饮酒、劝酒、拼酒等可能对他人造成伤害的内容,不得向未成年人传播任何饮酒相关信息。',
'您不得利用本小程序从事任何干扰服务正常运行、侵害他人合法权益的行为。若违反上述约定,我们有权对相关内容进行处理,并视情况暂停或终止您的账号。'
]
},
{
title: '四、知识产权',
paras: [
'本小程序的软件、界面设计、图标、文案等知识产权归开发者所有,未经许可不得复制、传播或用于商业用途。',
'您发布的内容(文字、图片等)著作权归您所有。您同意授予我们在提供服务所必需的范围内(如向您的酒友展示动态)使用上述内容。'
]
},
{
title: '五、免责声明',
paras: [
'本小程序记录的饮酒数据仅作为个人生活记录参考,不构成任何医疗、健康或营养建议。如您有饮酒相关的健康困扰,请咨询专业医疗机构。',
'因不可抗力、网络故障、微信平台服务调整等非我们可控因素导致的服务中断或数据延迟,我们不承担责任,但会尽力恢复服务。',
'请您自行备份重要记录。因您主动删除或账号注销导致的数据丢失,由您自行承担。'
]
},
{
title: '六、协议的变更与终止',
paras: [
'我们可能根据法律法规变化或功能调整修订本协议,修订后将在小程序内公示。若您继续使用,视为接受修订后的协议。',
'您可随时停止使用本小程序。我们也可在法律法规允许的范围内终止提供服务。'
]
},
{
title: '七、其他',
paras: [
'本协议的订立、执行与解释均适用中华人民共和国法律。因本协议产生的争议,双方应友好协商解决。',
'如您对本协议有任何疑问,可通过小程序内的意见反馈渠道与我们联系。'
]
}
]
},
privacySections() {
return [
{
title: '引言',
paras: [
'「碰盏日记」(以下简称"我们")深知个人信息对您的重要性,将严格遵守法律法规,审慎处理您的个人信息。本政策将说明我们如何收集、使用、存储和保护您的信息,请您仔细阅读。'
]
},
{
title: '一、我们收集的信息',
paras: [
'1. 注册资料:您主动填写的昵称、头像,用于展示您的个人身份。',
'2. 打卡记录:您记录的日期、饮酒/戒酒状态、酒水种类与用量、配餐、感受、酒言酒语等,用于日历展示、统计与成就功能。',
'3. 图片信息:您主动上传的饮酒照片,仅随对应记录存储展示。',
'4. 位置信息:仅在您创建酒局并主动选择地点时,经您授权获取位置用于酒局展示;我们不会持续追踪您的位置。',
'5. 社交信息:您添加酒友、发布动态、发送私信时产生的关系与内容数据。',
'6. 设备与日志信息:微信登录产生的必要标识(如 openid),用于识别您的账号身份,我们不会获取您的微信号、手机号等额外信息。'
]
},
{
title: '二、我们如何使用信息',
paras: [
'您的信息仅用于提供本小程序的核心功能:记录打卡、日历回顾、统计成就、酒友圈展示与私信互动。',
'动态可见范围由您控制:设为"仅酒友可见"的内容只有与您互加酒友的用户可见。',
'我们不会将您的信息用于酒类营销、广告推送或任何商业推广。'
]
},
{
title: '三、信息的共享与披露',
paras: [
'我们不会向任何第三方出售您的个人信息。',
'除以下情形外,我们不会向第三方提供您的信息:(1)经您明确同意;(2)根据法律法规或主管部门要求;(3)为保护用户或公众的人身财产安全所必需。',
'分享名片功能会生成您主动选择的公开信息(昵称、统计数字等),是否分享由您自行决定。'
]
},
{
title: '四、信息的存储与保护',
paras: [
'您的数据存储于服务器,传输过程采用加密方式。我们采取访问控制、安全审计等措施保护数据安全。',
'我们仅在实现服务目的所必需的期限内保存您的信息。账号注销后,我们将删除或匿名化处理您的个人信息,法律法规另有规定的除外。'
]
},
{
title: '五、您的权利',
paras: [
'您可以随时查看、修改自己的资料与记录;可以删除任意一条打卡记录或动态。',
'您可以删除与酒友的关系、撤回不当内容。',
'如需注销账号或删除全部数据,请通过小程序内的反馈渠道联系我们,我们将在核实身份后15个工作日内处理。'
]
},
{
title: '六、未成年人保护',
paras: [
'本小程序不面向未成年人提供服务。若我们发现误收了未成年人的个人信息,将及时删除。'
]
},
{
title: '七、政策更新与联系我们',
paras: [
'本政策可能随功能调整而更新,更新后将在小程序内公示。',
'如您对本政策或个人信息处理有任何疑问、投诉,可通过小程序内的意见反馈渠道与我们联系,我们将尽快答复。'
]
}
]
}
}
}
</script>
<style lang="scss" scoped>
.agreement-page {
display: flex;
flex-direction: column;
height: 100vh;
overflow: hidden;
}
.agree-nav {
background: $bg-base;
position: relative;
z-index: 10;
padding-left: $sp-lg;
padding-right: $sp-lg;
}
.agree-nav-row {
display: flex;
align-items: center;
justify-content: space-between;
height: 88rpx;
}
.agree-back {
width: 64rpx;
height: 64rpx;
border-radius: 50%;
background: $bg-card;
border: 1rpx solid var(--border-faint, rgba(255,255,255,0.08));
display: flex;
align-items: center;
justify-content: center;
&:active {
background: $bg-card-alt;
}
}
.agree-back-ph {
visibility: hidden;
}
.agree-back-icon {
font-size: 48rpx;
color: $text-primary;
line-height: 1;
margin-top: -6rpx;
}
.agree-nav-title {
font-size: $fs-lg;
font-weight: $fw-bold;
color: $text-primary;
}
.agree-scroll {
flex: 1;
height: 0;
}
.agree-content {
padding: $sp-lg;
padding-bottom: calc(env(safe-area-inset-bottom) + 64rpx);
}
.agree-update {
display: block;
font-size: $fs-xs;
color: $text-tertiary;
margin-bottom: $sp-lg;
}
.agree-section {
margin-bottom: $sp-xl;
}
.agree-section-title {
display: block;
font-size: $fs-md;
font-weight: $fw-bold;
color: $text-primary;
margin-bottom: $sp-sm;
}
.agree-p {
display: block;
font-size: $fs-sm;
color: $text-secondary;
line-height: $lh-loose;
margin-bottom: $sp-sm;
}
.agree-footer {
padding: $sp-xl 0 $sp-lg;
text-align: center;
}
.agree-footer-text {
font-size: $fs-xs;
color: $text-tertiary;
}
</style>