feat(home): 实现游客模式与登录流程优化

- 添加游客模式,展示公共内容无需强制登录
- 实现游客模块展示打卡、计划、关于我们等功能介绍
- 添加产品介绍页面显示学习成长工具详情
- 优化登录流程,添加用户协议和隐私政策同意选项
- 更新角色标签将老师改为管理员,学员改为成员
- 添加注销账号功能替代退出登录
- 实现webview页面域名白名单安全验证
- 添加隐私政策和用户协议页面
- 优化页面跳转逻辑和错误提示信息
- 统一项目名称从明缘进阶场改为明缘云道场
This commit is contained in:
王宏豪
2026-09-03 18:57:47 +08:00
parent d7fc8c8982
commit 1dd4fa3f41
20 changed files with 588 additions and 57 deletions

View File

@@ -20,8 +20,8 @@
<view class="login-wrap">
<view class="login-card">
<view class="login-icon">👤</view>
<view class="login-title">微信手机号一键登录</view>
<view class="login-desc">未找到你的账号,请使用微信手机号登录。手机号仅用于账号绑定,不会公开展示。</view>
<view class="login-title">手机号快捷登录</view>
<view class="login-desc">未找到你的账号,请使用手机号登录。手机号仅用于账号绑定,不会公开展示。</view>
<button
class="btn-phone btn-primary"
open-type="getPhoneNumber"
@@ -29,7 +29,18 @@
loading="{{phoneLoading}}"
disabled="{{phoneLoading}}"
hover-class="btn-hover"
>{{phoneLoading ? '登录中...' : '微信手机号一键登录'}}</button>
>{{phoneLoading ? '登录中...' : '手机号快捷登录'}}</button>
<view class="privacy-row">
<view class="checkbox {{privacyAgreed ? 'checked' : ''}}" bindtap="togglePrivacy">
<text wx:if="{{privacyAgreed}}" class="check-icon">✓</text>
</view>
<view class="privacy-text">
我已阅读并同意
<text class="link" data-type="agreement" catchtap="openPrivacy">《用户协议》</text>
和
<text class="link" data-type="privacy" catchtap="openPrivacy">《隐私政策》</text>
</view>
</view>
<view class="error" wx:if="{{phoneError}}">{{phoneError}}</view>
</view>
</view>
@@ -91,7 +102,7 @@
</view>
<view class="card classlist-card" wx:if="{{classGroups.length}}">
<view class="info-title">班级分组</view>
<view class="info-title">小组分组</view>
<view class="class-row" wx:for="{{classGroups}}" wx:key="class_id">
<text class="info-label">{{item.period || item.class_code}}</text>
<text class="info-value">{{item.group}} · {{item.role}}</text>
@@ -99,7 +110,8 @@
</view>
<view class="bottom-actions">
<button class="btn-logout" hover-class="btn-hover" bindtap="logout">退出登录</button>
<button class="btn-delete" hover-class="btn-hover" bindtap="deleteAccount">注销账号</button>
</view>
</view>
</block>