chore: v1 整理 — 清理历史文件、DDL 合并、文档归档
- 清理 1155 个已删除的历史文件(废弃 prompt_logs、tmp、旧 ops 脚本) - export/ 数据文件从 git 移除(已在 .gitignore) - demo-miniprogram 从 tmp/ 移入 apps/,添加 CLAUDE.md 注解 - DDL 合并:完整 schema 定义填充到 db/*/schemas/(从 docs/database/ddl/ 复制) - 39 个 v1 迁移脚本归档到 db/_archived/migrations_v1_merged/ - 4 个迁移变更类 BD_Manual 文档归档到 docs/database/_archived/ - .gitignore 补充 .vite/ 和 apps/*.zip - settings.json 添加 effortLevel 默认配置 - scripts/ops/ 新增运维脚本入库 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
109
apps/demo-miniprogram/miniprogram/pages/dev-tools/dev-tools.wxml
Normal file
109
apps/demo-miniprogram/miniprogram/pages/dev-tools/dev-tools.wxml
Normal file
@@ -0,0 +1,109 @@
|
||||
<!--
|
||||
开发调试面板 — 页面跳转、角色切换、状态切换、绑定切换、上下文展示
|
||||
-->
|
||||
<view class="container">
|
||||
|
||||
<!-- 当前上下文信息 -->
|
||||
<view class="section">
|
||||
<view class="section-title">当前上下文</view>
|
||||
<view class="info-card" wx:if="{{ctx}}">
|
||||
<view class="info-row"><text class="label">user_id</text><text class="value">{{ctx.user_id}}</text></view>
|
||||
<view class="info-row"><text class="label">openid</text><text class="value ellipsis">{{ctx.openid || '-'}}</text></view>
|
||||
<view class="info-row"><text class="label">状态</text><text class="value tag tag-{{ctx.status}}">{{ctx.status}}</text></view>
|
||||
<view class="info-row"><text class="label">昵称</text><text class="value">{{ctx.nickname || '-'}}</text></view>
|
||||
<view class="info-row"><text class="label">门店</text><text class="value">{{ctx.site_name || '-'}} ({{ctx.site_id || '-'}})</text></view>
|
||||
<view class="info-row"><text class="label">角色</text><text class="value">{{rolesText}}</text></view>
|
||||
<view class="info-row"><text class="label">权限</text><text class="value ellipsis">{{permissionsText}}</text></view>
|
||||
<view class="info-row"><text class="label">绑定</text><text class="value">{{bindingText}}</text></view>
|
||||
</view>
|
||||
<view class="info-card" wx:else>
|
||||
<text class="hint">{{loading ? '加载中...' : '未登录或无法获取上下文'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 角色切换 -->
|
||||
<view class="section">
|
||||
<view class="section-title">角色切换</view>
|
||||
<view class="btn-group">
|
||||
<view
|
||||
wx:for="{{roles}}"
|
||||
wx:key="code"
|
||||
class="btn {{currentRole === item.code ? 'btn-active' : ''}}"
|
||||
bindtap="switchRole"
|
||||
data-code="{{item.code}}"
|
||||
>{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 用户状态切换 -->
|
||||
<view class="section">
|
||||
<view class="section-title">用户状态切换</view>
|
||||
<view class="btn-group">
|
||||
<view
|
||||
wx:for="{{statuses}}"
|
||||
wx:key="*this"
|
||||
class="btn {{ctx.status === item ? 'btn-active' : ''}}"
|
||||
bindtap="switchStatus"
|
||||
data-status="{{item}}"
|
||||
>{{item}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 页面跳转 -->
|
||||
<view class="section">
|
||||
<view class="section-title">🔧 正在迁移</view>
|
||||
<view class="page-list">
|
||||
<view
|
||||
wx:for="{{migratingPages}}"
|
||||
wx:key="path"
|
||||
class="page-item page-item--migrating"
|
||||
bindtap="goPage"
|
||||
data-url="{{item.path}}"
|
||||
>
|
||||
<text class="page-name">{{item.name}}</text>
|
||||
<text class="page-path">/{{item.path}}</text>
|
||||
</view>
|
||||
<view class="page-item page-item--empty" wx:if="{{migratingPages.length === 0}}">
|
||||
<text class="hint">暂无</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<view class="section-title">✅ 已完成</view>
|
||||
<view class="page-list">
|
||||
<view
|
||||
wx:for="{{donePages}}"
|
||||
wx:key="path"
|
||||
class="page-item page-item--done"
|
||||
bindtap="goPage"
|
||||
data-url="{{item.path}}"
|
||||
>
|
||||
<text class="page-name">{{item.name}}</text>
|
||||
<text class="page-path">/{{item.path}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<view class="section-title">⏳ 未完成</view>
|
||||
<view class="page-list">
|
||||
<view
|
||||
wx:for="{{todoPages}}"
|
||||
wx:key="path"
|
||||
class="page-item page-item--todo"
|
||||
bindtap="goPage"
|
||||
data-url="{{item.path}}"
|
||||
>
|
||||
<text class="page-name">{{item.name}}</text>
|
||||
<text class="page-path">/{{item.path}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 操作提示 -->
|
||||
<view class="section" wx:if="{{message}}">
|
||||
<view class="message {{messageType}}">{{message}}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
Reference in New Issue
Block a user