From 6186c7723ce33f2538d30aaec5af35dfa0b86263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E6=A2=93=E5=BD=AD?= Date: Mon, 30 Mar 2026 22:32:22 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9F=AD=E4=BF=A1=E5=92=8CORC=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/match/appuser.js | 18 ------------- src/api/match/common.js | 30 ++++++++++++++++++++++ src/api/match/merchantcertification.js | 9 ------- src/views/marchant/certification/index.vue | 5 ++-- src/views/team/athlete/index.vue | 7 ++--- src/views/team/trainer/index.vue | 7 ++--- 6 files changed, 41 insertions(+), 35 deletions(-) create mode 100644 src/api/match/common.js diff --git a/src/api/match/appuser.js b/src/api/match/appuser.js index 34d3c27..66ede87 100644 --- a/src/api/match/appuser.js +++ b/src/api/match/appuser.js @@ -167,24 +167,6 @@ export const appuserAthleteUpdatePut = (data) => { return http.post('/appuser/member/save', { ...data, personType: 1 }); }; -/** - * 识别身份证信息 - * @param {Object} data - OCR请求 - * @param {string} data.imageUrl - 身份证图片URL - */ -export const appuserAthleteOcrPost = (data) => { - return http.post('/appuser/member/recognize/idcard', { imageUrl: data}); -}; - -/** - * 识别护照信息 - * @param {Object} data - OCR请求 - * @param {string} data.imageUrl - 护照图片URL - */ -export const appuserAthletePassportOcrPost = (data) => { - return http.post('/appuser/member/recognize/passport', { imageUrl: data}); -}; - /** * 批量删除运动员 * @param {Array} data - 运动员ID数组 diff --git a/src/api/match/common.js b/src/api/match/common.js new file mode 100644 index 0000000..90b146c --- /dev/null +++ b/src/api/match/common.js @@ -0,0 +1,30 @@ +import { http } from '../../utils/request'; + +// ==================== 通用服务 ==================== + +/** + * OCR识别身份证 + * @param {Object} data - OCR请求 + * @param {string} data.imageUrl - 图片URL + */ +export const commonOcrRecognizeIdcardPost = (data) => { + return http.post('/ocr/recognize/idcard', data); +}; + +/** + * OCR识别护照 + * @param {Object} data - OCR请求 + * @param {string} data.imageUrl - 图片URL + */ +export const commonOcrRecognizePassportPost = (data) => { + return http.post('/ocr/recognize/passport', data); +}; + +/** + * 发送短信验证码 + * @param {Object} data - 验证码请求 + * @param {string} data.phone - 手机号 + */ +export const commonSmsSendVerificationCodePost = (data) => { + return http.post('/sms/sendVerificationCode', data); +}; diff --git a/src/api/match/merchantcertification.js b/src/api/match/merchantcertification.js index 9a8959f..7229d9d 100644 --- a/src/api/match/merchantcertification.js +++ b/src/api/match/merchantcertification.js @@ -2,15 +2,6 @@ import { http } from '../../utils/request'; // ==================== 单位认证管理 ==================== -/** - * 发送验证码 - * @param {Object} params - 查询参数 - * @param {string} params.phone - 手机号码 - */ -export const merchantcertificationSendVerificationCodePost = (params) => { - return http.post('/merchantcertification/sendVerificationCode', null, { params }); -}; - /** * 提交单位认证 * @param {Object} data - 认证信息 diff --git a/src/views/marchant/certification/index.vue b/src/views/marchant/certification/index.vue index 3e7e737..23e7560 100644 --- a/src/views/marchant/certification/index.vue +++ b/src/views/marchant/certification/index.vue @@ -52,7 +52,8 @@