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
@@ -108,14 +108,14 @@
flex-shrink: 0;
}
/* 成员滚动列表 */
/* 用户滚动列表 */
.drawer-list {
flex: 1;
overflow: hidden;
padding-bottom: env(safe-area-inset-bottom);
}
/* 成员行 */
/* 用户行 */
.member-item {
width: 100%;
height: 90rpx;
@@ -25,7 +25,7 @@ interface HistoryApiItem {
relationType: number | string | null
}
/** 抽屉内部成员项(含回填所需全量字段) */
/** 抽屉内部用户项(含回填所需全量字段) */
interface ExistingMember {
id: string
name: string
@@ -44,9 +44,9 @@ interface ExistingMember {
}
/**
* 选择已有成员抽屉组件
* 选择已有用户抽屉组件
* Properties: show(控制显示)
* Events: close(关闭), select(选中成员,携带 ExistingMember)
* Events: close(关闭), select(选中用户,携带 ExistingMember)
*/
Component({
properties: {
@@ -55,12 +55,12 @@ Component({
type: Boolean,
value: false
},
/** 数据来源模式:addMember=新增成员选择 / history=历史数据切换成员 */
/** 数据来源模式:addMember=新增用户选择 / history=历史数据切换用户 */
source: {
type: String,
value: 'addMember'
},
/** 需要排除的用户 ID(history 模式下排除当前查看的成员 */
/** 需要排除的用户 ID(history 模式下排除当前查看的用户 */
excludeUserId: {
type: String,
value: ''
@@ -72,7 +72,7 @@ Component({
innerShow: false,
/** 控制 --visible 类,触发 CSS transition */
animVisible: false,
/** 成员列表(组件内部拉取) */
/** 用户列表(组件内部拉取) */
members: [] as ExistingMember[]
},
@@ -109,7 +109,7 @@ Component({
return Math.max(0, age)
},
/** 调接口获取可选成员列表,根据 source 调不同接口 */
/** 调接口获取可选用户列表,根据 source 调不同接口 */
_fetchMembers() {
const userInfo = wx.getStorageSync('userInfo') as { userId?: string } | null
const userId = userInfo?.userId ?? ''
@@ -175,7 +175,7 @@ Component({
},
/**
* 点击成员行,触发 select 事件
* 点击用户行,触发 select 事件
* @param e 携带 data-member 的点击事件
*/
onTapMember(e: WechatMiniprogram.TouchEvent) {
@@ -1,4 +1,4 @@
<!-- 选择已有成员抽屉 -->
<!-- 选择已有用户抽屉 -->
<block wx:if="{{ innerShow }}">
<!-- 遮罩 -->
<view class="drawer-mask {{ animVisible ? 'drawer-mask--visible' : '' }}" bind:tap="onTapMask"></view>
@@ -11,7 +11,7 @@
<!-- 标题栏 -->
<view class="drawer-header">
<text class="drawer-title">选择已有成员</text>
<text class="drawer-title">选择已有用户</text>
<view class="drawer-close" bind:tap="onTapClose">
<view class="drawer-close-icon"></view>
</view>
@@ -20,7 +20,7 @@
<!-- 分隔线 -->
<view class="drawer-divider"></view>
<!-- 成员列表 -->
<!-- 用户列表 -->
<block wx:if="{{ members.length }}">
<scroll-view class="drawer-list" scroll-y>
<block wx:for="{{ members }}" wx:key="id">
@@ -52,11 +52,11 @@
</scroll-view>
</block>
<!-- 无成员:占位 -->
<!-- 无用户:占位 -->
<block wx:else>
<view class="drawer-empty">
<image class="drawer-empty-icon" src="/images/selectMemberDrawer/noData.png" mode="aspectFit"/>
<text class="drawer-empty-text">暂无可选成员</text>
<text class="drawer-empty-text">暂无可选用户</text>
</view>
</block>
</view>