refactor: 统一术语「成员」→「用户」,代码格式化

- 页面文案、注释、Toast 提示统一改为"用户"
- lefu 模块缩进格式化(空格→Tab)
- selectMemberDrawer 组件注释统一

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
17792275749
2026-06-10 15:18:58 +08:00
co-authored by Claude Opus 4.7
parent 97c135786c
commit 485725a486
15 changed files with 443 additions and 445 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
{
"navigationBarTitleText": "添加成员",
"navigationBarTitleText": "添加用户",
"usingComponents": {
"select-member-drawer": "/components/selectMemberDrawer/selectMemberDrawer",
"user-info-confirm-modal": "/components/userInfoConfirmModal/userInfoConfirmModal"
+1 -1
View File
@@ -167,7 +167,7 @@
}
}
/* 从已有成员中选择(蓝色描边幽灵按钮) */
/* 从已有用户中选择(蓝色描边幽灵按钮) */
.ghost-btn {
color: #1385FA;
width: 580rpx;
+5 -5
View File
@@ -64,7 +64,7 @@ interface IdCardParsed {
birthday: string
}
/** 从抽屉组件 select 事件接收的成员数据(完整 item */
/** 从抽屉组件 select 事件接收的用户数据(完整 item */
interface ExistingMember {
id: string
name: string
@@ -78,8 +78,8 @@ interface ExistingMember {
}
/**
* 添加/编辑成员
* URL 参数含 userId 时为编辑模式,隐藏「从已有成员中选择」按钮并预填表单
* 添加/编辑用户
* URL 参数含 userId 时为编辑模式,隐藏「从已有用户中选择」按钮并预填表单
*/
Page({
data: {
@@ -97,7 +97,7 @@ Page({
weight: ''
} as MemberForm,
/** 从抽屉选中的完整成员数据,提交时作为 base spread */
/** 从抽屉选中的完整用户数据,提交时作为 base spread */
selectedMember: null as ExistingMember | null,
showSelectDrawer: false,
/** 正在请求身份证查询接口 */
@@ -391,7 +391,7 @@ Page({
.then(() => {
wx.showToast({ title: successMsg, icon: 'success' })
setTimeout(() => {
// 通知上一页(equipmentMember)刷新成员列表
// 通知上一页(equipmentMember)刷新用户列表
const pages = getCurrentPages()
const prevPage = pages[pages.length - 2] as any
if (prevPage && prevPage.data?.sn) {
+6 -6
View File
@@ -3,7 +3,7 @@
<!-- 顶部浅蓝提示条 -->
<view class="tips">
<view class="tips-icon">!</view>
<text class="tips-text">最多支持 10 位成员</text>
<text class="tips-text">最多支持 10 位用户</text>
</view>
<view class="form">
@@ -126,21 +126,21 @@
</view>
</view>
<!-- 从已有成员中选择(编辑模式隐藏) -->
<!-- 从已有用户中选择(编辑模式隐藏) -->
<block wx:if="{{ !isEdit }}">
<view class="ghost-btn" bind:tap="onTapSelectExisting">从已有成员中选择</view>
<view class="ghost-btn" bind:tap="onTapSelectExisting">从已有用户中选择</view>
</block>
</view>
</scroll-view>
</view>
<!-- 底部双按钮:取消 / 保存成员信息 -->
<!-- 底部双按钮:取消 / 保存用户信息 -->
<view class="actions">
<view class="btn-cancel" bind:tap="onCancel">取消</view>
<view class="btn-primary" bind:tap="onSubmit">保存成员信息</view>
<view class="btn-primary" bind:tap="onSubmit">保存用户信息</view>
</view>
<!-- 选择已有成员抽屉 -->
<!-- 选择已有用户抽屉 -->
<select-member-drawer
show="{{ showSelectDrawer }}"
bind:close="onSelectMemberClose"
+2 -2
View File
@@ -25,7 +25,7 @@
}
/* 成员信息行 */
/* 用户信息行 */
.userInfo {
position: relative;
z-index: 2;
@@ -100,7 +100,7 @@
}
}
/* 切换成员按钮 */
/* 切换用户按钮 */
.btn {
color: #1385FA;
width: 120rpx;
+2 -2
View File
@@ -208,7 +208,7 @@ Page({
})
},
/** 打开切换成员抽屉 */
/** 打开切换用户抽屉 */
onTapSwitchMember() {
this.setData({ showSelectDrawer: true })
},
@@ -218,7 +218,7 @@ Page({
this.setData({ showSelectDrawer: false })
},
/** 选中成员后更新 userInfo 并重新请求数据 */
/** 选中用户后更新 userInfo 并重新请求数据 */
onSelectMember(e: WechatMiniprogram.CustomEvent) {
const m = e.detail as {
userId?: string
+3 -3
View File
@@ -8,10 +8,10 @@
>
<view class="scrollViewContent">
<!-- 数据卡(成员信息 + 时间 Tab + 统计) -->
<!-- 数据卡(用户信息 + 时间 Tab + 统计) -->
<view class="data-card">
<!-- 成员信息 -->
<!-- 用户信息 -->
<view class="userInfo">
<view class="avatar">{{ userInfo.realname[0] }}</view>
<view class="info">
@@ -29,7 +29,7 @@
<view class="meta-text">{{ userInfo.height }}cm</view>
</view>
</view>
<view class="btn" bind:tap="onTapSwitchMember">切换成员</view>
<view class="btn" bind:tap="onTapSwitchMember">切换用户</view>
</view>
<view class="card-divider"></view>
+1 -1
View File
@@ -184,7 +184,7 @@ Page({
})
},
/* 点击「成员管理」→ 跳转成员管理页,sn 由目标页从缓存读取 */
/* 点击「用户管理」→ 跳转用户管理页,sn 由目标页从缓存读取 */
onTapMember() {
wx.navigateTo({ url: '/pages/equipmentMember/equipmentMember' })
},
+2 -4
View File
@@ -37,15 +37,13 @@
<block wx:if="{{ item.connected }}">
<!-- 已连接:单按钮居中 -->
<view class="card-actions card-actions-single">
<view class="btn-ghost-full" bind:tap="onTapMember">成员管理</view>
<view class="btn-ghost-full" bind:tap="onTapMember">用户管理</view>
</view>
</block>
<block wx:else>
<!-- 未连接:双按钮 连接 / 成员管理 -->
<!-- 未连接:双按钮 连接 / 用户管理 -->
<view class="card-actions card-actions-single">
<view class="btn-ghost-full" data-connect-device-info="{{ item.connectDeviceInfo }}" data-user-info="{{ item }}" bind:tap="onTapConnect">连接</view>
<!-- <view class="btn-ghost-half" data-connect-device-info="{{ item.connectDeviceInfo }}" data-user-info="{{ item }}" bind:tap="onTapConnect">连接</view>-->
<!-- <view class="btn-ghost-half" bind:tap="onTapMember">成员管理</view>-->
</view>
</block>
</view>
@@ -1,4 +1,4 @@
{
"navigationBarTitleText": "设备成员",
"navigationBarTitleText": "设备用户",
"usingComponents": {}
}