wupengfei
20 小时以前 cc9f7e7a6281e6dc951bbc26bcbcdec55563c3b4
fix: bug
1个文件已添加
5个文件已修改
292 ■■■■ 已修改文件
apps/cMiniApp/src/subpackages/authentication/authenticationHome/InnerPage.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/cMiniApp/src/subpackages/authentication/authenticationRealName/InnerPage.vue 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/constants/apiEnum.ts 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/services/apiV2/electronSign.ts 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/services/apiV2/index.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/services/apiV2/typings.d.ts 92 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/cMiniApp/src/subpackages/authentication/authenticationHome/InnerPage.vue
@@ -5,14 +5,14 @@
      title="个人实名认证"
      :icon="IconFaren"
      :info="[['身份证照片'], ['手机号码(接收短信验证码进行短信核验)']]"
      @click="goRealName"
      @click="goRealName('realName')"
    ></authenticationHomeItem>
    <authenticationHomeItem
      title="实人认证"
      isJBR
      :icon="IconJBR"
      :info="[['实人扫脸认证']]"
      @click="goFace"
      @click="goFace('face')"
    >
    </authenticationHomeItem>
  </ContentScrollView>
@@ -28,12 +28,12 @@
  name: 'InnerPage',
});
function goRealName() {
  Taro.navigateTo({ url: RouterPath.authenticationRealName });
function goRealName(type: string) {
  Taro.navigateTo({ url: `${RouterPath.authenticationRealName}?type=${type}` });
}
function goFace() {
  Taro.navigateTo({ url: RouterPath.authenticationFace });
function goFace(type: string) {
  Taro.navigateTo({ url: `${RouterPath.authenticationRealName}?type=${type}` });
}
</script>
apps/cMiniApp/src/subpackages/authentication/authenticationRealName/InnerPage.vue
@@ -58,38 +58,40 @@
          type="text"
        />
      </nut-form-item>
      <nut-form-item label="身份证号:" class="bole-form-item" prop="idNumber" required>
      <nut-form-item label="身份证号:" class="bole-form-item" prop="identity" required>
        <nut-input
          v-model.trim="form.idNumber"
          v-model.trim="form.identity"
          class="nut-input-text bole-input-text"
          placeholder="请填写身份证号码"
          type="text"
        />
      </nut-form-item>
      <nut-form-item label="手机号:" class="bole-form-item" prop="contactPhone" required>
        <nut-input
          v-model.trim="form.contactPhone"
          class="nut-input-text bole-input-text"
          placeholder="请填写手机号码"
          type="text"
        >
          <template #right>
            <ProFormCaptcha
              :onGetCaptcha="() => onGetCaptcha(form.contactPhone)"
              :phonePropName="['contactPhone', 'name', 'idNumber']"
              :validateField="formRef?.validate"
            ></ProFormCaptcha>
          </template>
        </nut-input>
      </nut-form-item>
      <nut-form-item label="短信验证码:" class="bole-form-item" prop="verificationCode" required>
        <nut-input
          v-model.trim="form.verificationCode"
          class="nut-input-text bole-input-text"
          placeholder="请输入验证码"
          type="number"
        />
      </nut-form-item>
      <template v-if="type === 'realName'">
        <nut-form-item label="手机号:" class="bole-form-item" prop="phoneNumber" required>
          <nut-input
            v-model.trim="form.phoneNumber"
            class="nut-input-text bole-input-text"
            placeholder="请填写手机号码"
            type="text"
          >
            <template #right>
              <ProFormCaptcha
                :onGetCaptcha="() => onGetCaptcha(form.phoneNumber)"
                :phonePropName="['phoneNumber', 'name', 'identity']"
                :validateField="formRef?.validate"
              ></ProFormCaptcha>
            </template>
          </nut-input>
        </nut-form-item>
        <nut-form-item label="短信验证码:" class="bole-form-item" prop="verificationCode" required>
          <nut-input
            v-model.trim="form.verificationCode"
            class="nut-input-text bole-input-text"
            placeholder="请输入验证码"
            type="number"
          />
        </nut-form-item>
      </template>
    </nut-form>
  </ContentScrollView>
  <PageFooter :isOnlyAction="false">
@@ -102,22 +104,26 @@
<script setup lang="ts">
import { VerificationCodeBusinessType } from '@12333/constants';
import { ProFormCaptcha, ProFormItemCell } from 'senin-mini/components';
import * as commonServices from '@12333/services/api/Common';
import * as electronSignServices from '@12333/services/apiV2/electronSign';
import { FileItem } from '@nutui/nutui-taro/dist/types/__VUE/uploader/type';
import { Photograph } from '@nutui/icons-vue-taro';
import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types';
import { FormValidator } from '@12333/utils';
import Taro from '@tarojs/taro';
defineOptions({
  name: 'InnerPage',
});
const router = Taro.useRouter();
const type = router.params?.type ?? '';
const form = reactive({
  legalPersonIdFrontImgUrl: [] as FileItem[],
  legalPersonIdBackImgUrl: [] as FileItem[],
  name: '',
  idNumber: '',
  contactPhone: '',
  identity: '',
  phoneNumber: '',
  verificationCode: '',
});
@@ -132,7 +138,7 @@
  legalPersonIdBackImgUrl: [
    { required: true, message: '请上传身份证国徽面', validator: FormValidator.validatorArray },
  ],
  idNumber: [
  identity: [
    { required: true, message: '请填写身份证号码' },
    { message: '请输入正确的身份证号码', validator: FormValidator.validatorIDCard },
  ],
@@ -144,12 +150,11 @@
};
async function onGetCaptcha(phoneNumber: string) {
  await commonServices.sendPhoneCertificationVerificationCode(
  await electronSignServices.sendPersonalUserIdentity3RealSms(
    {
      name: form.name,
      identity: form.idNumber,
      mobile: form.contactPhone,
      businessType: VerificationCodeBusinessType.UserCertificationPhoneCertification,
      identity: form.identity,
      phoneNumber: form.phoneNumber,
    },
    { showLoading: false }
  );
@@ -168,10 +173,22 @@
  if (!formRef.value) return;
  formRef.value.validate().then(({ valid, errors }: any) => {
    if (valid) {
      // submit();
      submit();
    }
  });
}
function submit() {
  if (type === 'realName') {
    personalUserIdentity3Real();
  }
  if (type === 'face') {
    personalUserFaceReal();
  }
}
async function personalUserFaceReal() {}
async function personalUserIdentity3Real() {}
</script>
<style lang="scss">
packages/constants/apiEnum.ts
@@ -136,35 +136,39 @@
/** 资源控制器 */
export enum EnumResourceController {
  /**数据字典 */
  Dictionary = 0,
  FlexJobServerDictionary = 0,
  /**任务 */
  Task = 1,
  FlexJobServerTask = 1,
  /**任务人员 */
  TaskUser = 2,
  FlexJobServerTaskUser = 2,
  /**任务验收 */
  TaskCheckReceive = 3,
  FlexJobServerTaskCheckReceive = 3,
  /**文件 */
  CommonServerFileUtils = 4,
  /**文字识别 */
  FileUtils = 4,
  /**文字识别 */
  OcrUtils = 5,
  CommonServerOcrUtils = 5,
  /**日志记录 */
  LogRecords = 6,
  CommonServerLogRecords = 6,
  /**用户认证 */
  Auth = 7,
  UserServerAuth = 7,
  /**用户菜单 */
  Menu = 8,
  UserServerMenu = 8,
  /**用户资源 */
  Resource = 9,
  UserServerResource = 9,
  /**用户角色 */
  Role = 10,
  UserServerRole = 10,
  /**用户信息 */
  User = 11,
  UserServerUser = 11,
  /**电子签 */
  UserServerElectronSign = 12,
  /**用户简历 */
  UserResume = 12,
  UserServerUserResume = 13,
  /**企业信息 */
  Enterprise = 13,
  UserServerEnterprise = 14,
  /**灵工信息 */
  EnterpriseEmployee = 14,
  UserServerEnterpriseEmployee = 15,
  /**电子签 */
  ElectronSignServerElectronSign = 16,
}
/** 资源请求方式 */
packages/services/apiV2/electronSign.ts
New file
@@ -0,0 +1,63 @@
/* eslint-disable */
// @ts-ignore
import { request } from '@/utils/request';
/** 电子签回传 POST /api/user/electronSign/electronSignCallback */
export async function electronSignCallback(
  body: API.ElectronSignCallbackCommand,
  options?: API.RequestConfig
) {
  return request<boolean>('/api/user/electronSign/electronSignCallback', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json-patch+json',
    },
    data: body,
    ...(options || {}),
  });
}
/** 个人人脸实名认证 POST /api/user/electronSign/personalUserFaceReal */
export async function personalUserFaceReal(
  body: API.PersonalUserFaceRealCommand,
  options?: API.RequestConfig
) {
  return request<string>('/api/user/electronSign/personalUserFaceReal', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json-patch+json',
    },
    data: body,
    ...(options || {}),
  });
}
/** 个人三要素实名认证 POST /api/user/electronSign/personalUserIdentity3Real */
export async function personalUserIdentity3Real(
  body: API.PersonalUserIdentity3RealCommand,
  options?: API.RequestConfig
) {
  return request<string>('/api/user/electronSign/personalUserIdentity3Real', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json-patch+json',
    },
    data: body,
    ...(options || {}),
  });
}
/** 发送个人三要素实名短信 POST /api/user/electronSign/sendPersonalUserIdentity3RealSms */
export async function sendPersonalUserIdentity3RealSms(
  body: API.SendPersonalUserIdentity3RealSmsCommand,
  options?: API.RequestConfig
) {
  return request<string>('/api/user/electronSign/sendPersonalUserIdentity3RealSms', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json-patch+json',
    },
    data: body,
    ...(options || {}),
  });
}
packages/services/apiV2/index.ts
@@ -13,6 +13,7 @@
import * as userResume from './userResume';
import * as auth from './auth';
import * as taskCheckReceive from './taskCheckReceive';
import * as electronSign from './electronSign';
import * as taskUser from './taskUser';
import * as menu from './menu';
import * as logRecords from './logRecords';
@@ -29,6 +30,7 @@
  userResume,
  auth,
  taskCheckReceive,
  electronSign,
  taskUser,
  menu,
  logRecords,
packages/services/apiV2/typings.d.ts
@@ -324,6 +324,23 @@
    id?: string;
  }
  interface ElectronSignCallbackCommand {
    /** 客户Id */
    customerId?: string;
    /** 方法名称 */
    action?: string;
    /** 是否成功 */
    success?: boolean;
    /** 回调码 */
    code?: string;
    /** 回调消息 */
    message?: string;
    /** 关联Id */
    relationId?: string;
    /** 回传数据 */
    data?: any;
  }
  enum EnumBillingMethod {
    /**按月 */
    Month = 10,
@@ -444,35 +461,39 @@
  enum EnumResourceController {
    /**数据字典 */
    Dictionary = 0,
    FlexJobServerDictionary = 0,
    /**任务 */
    Task = 1,
    FlexJobServerTask = 1,
    /**任务人员 */
    TaskUser = 2,
    FlexJobServerTaskUser = 2,
    /**任务验收 */
    TaskCheckReceive = 3,
    FlexJobServerTaskCheckReceive = 3,
    /**文件 */
    CommonServerFileUtils = 4,
    /**文字识别 */
    FileUtils = 4,
    /**文字识别 */
    OcrUtils = 5,
    CommonServerOcrUtils = 5,
    /**日志记录 */
    LogRecords = 6,
    CommonServerLogRecords = 6,
    /**用户认证 */
    Auth = 7,
    UserServerAuth = 7,
    /**用户菜单 */
    Menu = 8,
    UserServerMenu = 8,
    /**用户资源 */
    Resource = 9,
    UserServerResource = 9,
    /**用户角色 */
    Role = 10,
    UserServerRole = 10,
    /**用户信息 */
    User = 11,
    UserServerUser = 11,
    /**电子签 */
    UserServerElectronSign = 12,
    /**用户简历 */
    UserResume = 12,
    UserServerUserResume = 13,
    /**企业信息 */
    Enterprise = 13,
    UserServerEnterprise = 14,
    /**灵工信息 */
    EnterpriseEmployee = 14,
    UserServerEnterpriseEmployee = 15,
    /**电子签 */
    ElectronSignServerElectronSign = 16,
  }
  enum EnumResourceMethod {
@@ -3049,6 +3070,10 @@
    name: string;
    /** 任务单号 */
    code?: string;
    /** 企业全称 */
    enterpriseName?: string;
    /** 用户名 */
    userName?: string;
    billingMethod?: EnumBillingMethod;
    /** 服务费 */
    serviceFee?: number;
@@ -3545,6 +3570,32 @@
    clientType?: EnumClientType;
  }
  interface PersonalUserFaceRealCommand {
    /** 姓名 */
    name: string;
    /** 身份证号 */
    identity: string;
    /** 身份证人像面 */
    identityImg: string;
    /** 身份证国徽面 */
    identityBackImg: string;
  }
  interface PersonalUserIdentity3RealCommand {
    /** 姓名 */
    name: string;
    /** 手机号 */
    phoneNumber: string;
    /** 身份证号 */
    identity: string;
    /** 身份证人像面 */
    identityImg: string;
    /** 身份证国徽面 */
    identityBackImg: string;
    /** 验证码 */
    verifyCode: string;
  }
  interface RegisterPersonalUserCommand {
    /** 手机号码 */
    phoneNumber: string;
@@ -3889,6 +3940,15 @@
    phoneNumber: string;
  }
  interface SendPersonalUserIdentity3RealSmsCommand {
    /** 姓名 */
    name: string;
    /** 手机号 */
    phoneNumber: string;
    /** 身份证号 */
    identity: string;
  }
  interface SetDictionaryDataIsDisabledCommand {
    ids?: string[];
    /** 是否已禁用 */