hookehuyr

feat(scan-checkin-list): 为扫码签到列表添加阶段编码展示功能

- 补充API返回数据的类型定义,新增stages的code字段
- 新增编码文本样式优化展示效果
- 更新列表数据映射逻辑携带code字段
- 在列表项中按需渲染编码文本
...@@ -103,6 +103,7 @@ export const listAPI = params => fn(fetch.get(Api.List, params)) ...@@ -103,6 +103,7 @@ export const listAPI = params => fn(fetch.get(Api.List, params))
103 * data: { 103 * data: {
104 * stages: Array<{ 104 * stages: Array<{
105 * id: number; 105 * id: number;
106 + * code: string;
106 * title: string; 107 * title: string;
107 * is_checked: boolean; 108 * is_checked: boolean;
108 * }>; 109 * }>;
......
...@@ -58,9 +58,22 @@ ...@@ -58,9 +58,22 @@
58 .scan-checkin-list-content { 58 .scan-checkin-list-content {
59 flex: 1; 59 flex: 1;
60 min-width: 0; 60 min-width: 0;
61 + display: flex;
62 + flex-direction: column;
63 + align-items: flex-start;
64 + justify-content: center;
61 cursor: pointer; 65 cursor: pointer;
62 } 66 }
63 67
68 +.scan-checkin-list-code {
69 + display: block;
70 + margin-bottom: 6rpx;
71 + font-size: 22rpx;
72 + line-height: 1.3;
73 + color: #36b5bb;
74 + letter-spacing: 2rpx;
75 +}
76 +
64 .scan-checkin-list-name { 77 .scan-checkin-list-name {
65 display: block; 78 display: block;
66 font-size: 32rpx; 79 font-size: 32rpx;
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
22 </view> 22 </view>
23 23
24 <view class="scan-checkin-list-content" @click="goToDetail(point)"> 24 <view class="scan-checkin-list-content" @click="goToDetail(point)">
25 + <text v-if="point.code" class="scan-checkin-list-code">{{ point.code }}</text>
25 <text class="scan-checkin-list-name">{{ point.title }}</text> 26 <text class="scan-checkin-list-name">{{ point.title }}</text>
26 </view> 27 </view>
27 28
...@@ -88,6 +89,7 @@ const pageSize = ref(10) ...@@ -88,6 +89,7 @@ const pageSize = ref(10)
88 const mapStageList = stageList => 89 const mapStageList = stageList =>
89 stageList.map(stage => ({ 90 stageList.map(stage => ({
90 id: stage.id, 91 id: stage.id,
92 + code: stage.code,
91 title: stage.title, 93 title: stage.title,
92 isChecked: stage.is_checked, 94 isChecked: stage.is_checked,
93 })) 95 }))
......