diff --git a/src/App.vue b/src/App.vue
index 6f89a265..03fc49b7 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,631 +1,635 @@
diff --git a/src/pages/profile/components/capsule-cell.vue b/src/pages/profile/components/capsule-cell.vue
new file mode 100644
index 00000000..da75635b
--- /dev/null
+++ b/src/pages/profile/components/capsule-cell.vue
@@ -0,0 +1,16 @@
+
+
+ {{ title }}
+
+ {{ value }}
+
+
+
+
diff --git a/src/pages/profile/face-verify.vue b/src/pages/profile/face-verify.vue
index 06fd8086..1bf23df0 100644
--- a/src/pages/profile/face-verify.vue
+++ b/src/pages/profile/face-verify.vue
@@ -1,7 +1,9 @@
@@ -12,14 +14,13 @@
-
-
+
-
+
完善详细资料(必填)
认真填写,展现你的魅力~
@@ -31,13 +32,7 @@
align-right
:default-value="180"
>
-
+
-
+
-
+
-
+
请上传3-5张最美的照片
请上传本人真实照片,更容易受到男士青睐
@@ -97,7 +80,7 @@
-
+
添加联系方式
我们会保护你的隐私,联系方式只展示给审核人员和付费后的VIP男生
@@ -117,7 +100,11 @@
fileMediatype="image"
limit="1"
mode="grid"
- :imageStyles="{ width: '268rpx', height: '268rpx' }"
+ :imageStyles="{
+ width: '268rpx',
+ height: '268rpx',
+ border: { width: '6rpx', color: '#D29E52', radius: '50rpx' },
+ }"
/>
@@ -126,20 +113,28 @@
匹配不通过将不会认证通过哦~
-
+
基本资料
上传清晰的五官头像,让更多用户发现你~
-
+
- 确保本人头像,才能通过审核
+
+
+ 确保本人头像
+ 才能通过审核哦
+
-
+
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
@@ -194,8 +185,7 @@
-
-
+
基本资料
上传本人头像,女生更放心与你见面~
@@ -237,6 +227,7 @@
import { baseUrl, apiPath, tenantId } from '@/sheep/config';
import { getAccessToken } from '@/sheep/request';
import { formatDate } from '@/sheep/helper/utils';
+ import CapsuleCell from './components/capsule-cell.vue';
const userInfoStore = computed(() => sheep.$store('user').userInfo);
@@ -274,33 +265,25 @@
// #endif
// #ifdef APP-PLUS
+ if (!girlAuthPic.value) return uni.showToast({ title: '请先上传人脸照片', icon: 'error' });
+
const aliyunVerify = uni.requireNativePlugin('AP-FaceDetectModule');
const metaInfo = JSON.stringify(aliyunVerify.getMetaInfo());
- let p = uni.getSystemInfoSync().platform;
- if (p === 'ios') {
- }
- console.log('参数:', {
+ // 创建人脸认证
+ const { code, data } = await RecentApi.createGirlFaceVerify({
+ memberHeight: userinfo.height,
+ memberWeight: userinfo.weight,
+ memberWechatNumber: wxInfo.wechatNum,
+ memberOcc: userinfo.occ,
+ memberDesc: userinfo.description,
authPic: girlAuthPic.value,
metaInfoJson: metaInfo,
});
-
- // const { code, data } = await RecentApi.createGirlFaceVerify({
- // authPic: girlAuthPic.value,
- // metaInfoJson: metaInfo,
- // });
- // console.log('创建人脸认证response:', data);
-
- // aliyunVerify.verify(
- // {
- // certifyId: '<替换生成的certifyId>',
- // extParams: { '<扩展参数key>': '<扩展参数value>' },
- // },
- // function (response: any) {
- // console.log(response);
- // uni.navigateBack();
- // },
- // );
+ console.log('创建人脸认证接口responseData:', code, data);
+ if (code !== 0)
+ return uni.showToast({ title: '请上传包含人脸的头像', icon: 'none', duration: 6000 });
+ verify(data.bizId);
// #endif
};
@@ -316,38 +299,49 @@
const aliyunVerify = uni.requireNativePlugin('AP-FaceDetectModule');
const metaInfo = JSON.stringify(aliyunVerify.getMetaInfo());
- console.log('参数:', {
+ // 查询用户人脸认证
+ // const { code, data } = await RecentApi.getFaceVerify();
+ // if (code !== 0) return uni.showToast({ title: '查询用户人脸认证失败', icon: 'error' });
+
+ // console.log('查询用户人脸认证', code, data);
+
+ // switch (data.authStatus) {
+ // case '1':
+ // // 待认证
+ // break;
+ // case '2':
+ // return uni.showToast({ title: '你的人脸审核中', icon: 'error' });
+ // case '3':
+ // // 审核通过
+ // break;
+ // case '4':
+ // // 审核失败
+ // break;
+ // }
+
+ // 创建人脸认证
+ const { code, data } = await RecentApi.createBoyFaceVerify({
authPic: boyAuthPic.value,
metaInfoJson: metaInfo,
});
-
- // 查询用户人脸认证
- const { code, data } = await RecentApi.getFaceVerify();
- if (code === 0) {
- const { bizId: certifyId } = data;
- verify(certifyId);
- } else {
- // 创建人脸认证
- const {
- code,
- data: { bizId },
- } = await RecentApi.createBoyFaceVerify({
- authPic: boyAuthPic.value,
- metaInfoJson: metaInfo,
- });
- if (code === 0) {
- console.log('创建人脸认证接口response:', data);
- verify(bizId);
- }
- }
+ console.log('创建人脸认证接口responseData:', code, data);
+ if (code !== 0)
+ return uni.showToast({ title: '请上传包含人脸的头像', icon: 'none', duration: 6000 });
+ verify(data.bizId, data.id);
// #endif
};
- const verify = (certifyId: string) => {
+ /**
+ *
+ * @param certifyId 阿里人脸认证id
+ * @param authId 发起认证的id
+ */
+ const verify = (certifyId: string, authId: string) => {
if (!certifyId) return uni.showToast({ title: 'certifyId不存在', icon: 'none' });
const p = uni.getSystemInfoSync().platform;
if (p === 'ios') {
}
+ console.log('certifyId', certifyId);
const aliyunVerify = uni.requireNativePlugin('AP-FaceDetectModule');
aliyunVerify.verify(
@@ -356,7 +350,7 @@
useMsgBox: true,
extParams: null,
},
- function (response: any) {
+ async function (response: any) {
console.log('认证结果', response);
switch (response.code) {
@@ -371,7 +365,8 @@
uni.showToast({ title: '您已认证成功', icon: 'none' });
break;
case 1001:
- uni.showToast({ title: '系统错误', icon: 'none' });
+ await RecentApi.cancelFaceVerify({ authId });
+ // uni.showToast({ title: '系统错误', icon: 'none' });
break;
case 1003:
uni.showToast({ title: '验证中断', icon: 'none' });
diff --git a/src/sheep/api/member/recent.ts b/src/sheep/api/member/recent.ts
index 1facd7e5..f1751b9a 100644
--- a/src/sheep/api/member/recent.ts
+++ b/src/sheep/api/member/recent.ts
@@ -362,18 +362,41 @@ const RecentApi = {
},
});
},
- // 查询用户人脸认证
- getFaceVerify: (params: any) => {
+ // 创建女性人脸认证
+ createGirlFaceVerify: (data: any) => {
return request({
- url: '/member/com-auth/get',
- method: 'GET',
- params,
+ url: '/member/com-auth/create-woman-auth',
+ method: 'POST',
+ data,
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
+ // 查询用户人脸认证
+ getFaceVerify: () => {
+ return request({
+ url: '/member/com-auth/get',
+ method: 'GET',
+ custom: {
+ showLoading: true,
+ loadingMsg: '加载中',
+ },
+ });
+ },
+ // 取消用户人脸认证
+ cancelFaceVerify: (params: { authId: string | number }) => {
+ return request({
+ url: '/member/com-auth/cancel',
+ method: 'GET',
+ params,
+ custom: {
+ showLoading: true,
+ loadingMsg: '正在取消',
+ },
+ });
+ },
};
export default RecentApi;
diff --git a/test.keystore b/test.keystore
deleted file mode 100644
index 23d7a211..00000000
Binary files a/test.keystore and /dev/null differ