chore(home, appointment-scan): 移除员工人脸同步调试代码并优化页面样式

- 移除home页员工人脸同步调试相关的工具函数与弹窗逻辑
- 简化预约扫描页的验证重试逻辑,移除冗余的提示弹窗
- 统一并清理页面中的CSS样式,重命名输入框的CSS类名
2个文件已修改
101 ■■■■■ 已修改文件
pages/appointment-scan/n-index.nvue 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/index.vue 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/appointment-scan/n-index.nvue
@@ -112,7 +112,7 @@
          <view class="input-form-card" @click.stop>
            <template v-if="mode === 'online'">
              <view class="input-box" style="height: 118px;" @touchstart.stop="handleNameInputBoxTouchStart" @click.stop>
              <view class="manual-input-box" style="height: 118px;" @touchstart.stop="handleNameInputBoxTouchStart" @click.stop>
                <input
                  type="text"
                  class="input-text real-input"
@@ -127,7 +127,7 @@
              </view>
            </template>
            <view
              class="input-box"
              class="manual-input-box"
              style="height: 118px; position: relative;"
              @touchstart.stop="handleIdInputBoxClick"
            >
@@ -2207,11 +2207,7 @@
};
const retryFaceVerify = () => {
  if (currentStepName.value === 'host') {
    startHostVerify();
  } else {
    startFaceVerify();
  }
  startHostVerify();
};
const handleAppointmentQrcodeValidation = (payload) => {
@@ -2582,7 +2578,6 @@
};
const confirmManualInput = async () => {
    openNoticeDialog('提示', '请先扫描预约码,再进行预约登记');
  if (idNumber.value.length > 0) {
    if (mode.value === 'online' && !manualName.value.trim()) {
      uni.showToast({ title: '请输入姓名', icon: 'none' });
@@ -3249,14 +3244,13 @@
  margin-top: 40px;
}
.input-box {
.manual-input-box {
  width: 768px;
  height: 118px;
  border-radius: 22px;
  background: #FFFFFF;
  border: 1px solid #D9E1F2;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
@@ -3866,6 +3860,7 @@
  display: flex;
  align-items: center;
  flex-direction: row;
  margin-bottom: 24px;
}
.label {
@@ -3890,7 +3885,6 @@
  border: 1px solid #D9E1F2;
  background: #FFFFFF;
  padding: 0 16px;
  display: flex;
  align-items: center;
  flex-direction: row;
@@ -3907,6 +3901,7 @@
}
.time-box {
  width: 200px;
  flex: 1; /* 占据剩余空间 */
  justify-content: space-between;
}
@@ -3917,11 +3912,6 @@
  height: 20px;
  /* flex-shrink: 0; */
  opacity: 0.6; /* 让图标稍微弱化一点,更贴近设计图的灰色线条感 */
}
.time-box {
  width: 200px;
  justify-content: space-between;
}
.full-box {
@@ -4008,7 +3998,7 @@
.tag-x {
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-size: 18px;
  font-weight: 700;
  color: #A0ACC4;
  /* cursor: pointer; */
@@ -4184,7 +4174,7 @@
.primary-area-row,
.secondary-area-row {
  width: 480px;
  height: 56px;
  height: 64px;
  border-radius: 16px;
  padding: 0 16px;
@@ -4249,15 +4239,14 @@
.secondary-area-text {
  font-family: Inter, sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #1F2A44;
}
.primary-area-text { font-weight: 600; color: #1F2A44; }
.secondary-area-row { height: 64px; }
.primary-area-text-active,
.secondary-area-text-active { font-weight: 700; color: #2F6BFF; }
.secondary-area-text { font-weight: 600; color: #1F2A44; }
.sheet-confirm-btn {
  width: 1024px;
pages/home/index.vue
@@ -165,66 +165,6 @@
  noticeDialog.value.visible = false;
};
const isBase64ImageValue = (value = '') => {
  const normalizedValue = String(value || '').trim();
  if (!normalizedValue) {
    return false;
  }
  return /^data:image\/[a-zA-Z0-9+.-]+;base64,/.test(normalizedValue)
    || /^[A-Za-z0-9+/=\r\n]+$/.test(normalizedValue);
};
const isLocalEmployeeFacePath = (value = '') => {
  const normalizedValue = String(value || '').trim();
  if (!normalizedValue) {
    return false;
  }
  return normalizedValue.includes('employee-face-images')
    || normalizedValue.startsWith('_doc/')
    || normalizedValue.startsWith('file:///')
    || normalizedValue.startsWith('/storage/');
};
const formatEmployeeSyncDebugMessage = (employeeList = []) => {
  const list = Array.isArray(employeeList) ? employeeList : [];
  const withFaceEmployees = list.filter((employee) => String(employee?.faceImage || '').trim() !== '');
  const localPathEmployees = withFaceEmployees.filter((employee) => isLocalEmployeeFacePath(employee?.faceImage));
  const base64Employees = withFaceEmployees.filter((employee) => isBase64ImageValue(employee?.faceImage));
  const successLines = localPathEmployees
    .slice(0, 5)
    .map((employee, index) => {
      const faceImage = String(employee?.faceImage || '').trim();
      return `${index + 1}. ${employee?.employeeName || employee?.name || '未命名员工'}: ${faceImage}`;
    });
  const sampleLines = withFaceEmployees
    .filter((employee) => !isLocalEmployeeFacePath(employee?.faceImage))
    .slice(0, 5)
    .map((employee, index) => {
      const faceImage = String(employee?.faceImage || '').trim();
      const previewValue = faceImage ? faceImage.slice(0, 60) : '空';
      return `${index + 1}. ${employee?.employeeName || employee?.name || '未命名员工'}: ${previewValue}`;
    });
  return [
    `员工总数:${list.length}`,
    `有人脸照片:${withFaceEmployees.length}`,
    `已转本地路径:${localPathEmployees.length}`,
    `仍是Base64:${base64Employees.length}`,
    successLines.length > 0 ? `成功样本:\n${successLines.join('\n')}` : '成功样本:无',
    sampleLines.length > 0 ? `异常样本:\n${sampleLines.join('\n')}` : '异常样本:无',
  ].join('\n');
};
const showEmployeeSyncDebugModal = (title, content) => {
  uni.showModal({
    title,
    content,
    showCancel: false,
  });
};
const initHomeScanner = () => {
  homeScanSessionId += 1;
  const currentSessionId = homeScanSessionId;
@@ -307,18 +247,8 @@
  // 员工图片 base64 转本地文件比较重,放到首页后台静默处理,避免阻塞后续 live-pusher 拉起
  setTimeout(() => {
    syncEmployeeVerifyList()
      .then((employeeList) => {
        showEmployeeSyncDebugModal(
          '员工人脸转换结果',
          formatEmployeeSyncDebugMessage(employeeList)
        );
      })
      .catch((error) => {
        console.error('首页后台同步员工验证列表失败:', error);
        showEmployeeSyncDebugModal(
          '员工人脸转换失败',
          String(error?.message || error || '未知错误')
        );
      });
  }, 200);
};