From 1cad4d5b874c5b34e80d5abc64b756596263a96c Mon Sep 17 00:00:00 2001 From: ctw Date: Tue, 9 Dec 2025 16:36:37 +0800 Subject: [PATCH] feat --- src/pages.json | 7 +++ .../moments/components/scroll-moment.vue | 19 +++++- src/pages/profile/face-verify.vue | 36 +++--------- src/pages/profile/profile.vue | 2 +- src/pages/profile/verify-status.vue | 55 ++++++++++++++++++ .../components/scroll-list/scroll-list.vue | 4 +- src/static/has-auth.png | Bin 0 -> 6450 bytes src/static/no-auth.png | Bin 0 -> 5357 bytes 8 files changed, 89 insertions(+), 34 deletions(-) create mode 100644 src/pages/profile/verify-status.vue create mode 100644 src/static/has-auth.png create mode 100644 src/static/no-auth.png diff --git a/src/pages.json b/src/pages.json index dd9cbea8..7c111be2 100644 --- a/src/pages.json +++ b/src/pages.json @@ -233,6 +233,13 @@ "navigationStyle": "custom" } }, + { + "path": "verify-status", + "style": { + "navigationBarTitleText": "人脸认证", + "navigationStyle": "custom" + } + }, { "path": "face-verify", "style": { diff --git a/src/pages/moments/components/scroll-moment.vue b/src/pages/moments/components/scroll-moment.vue index 6982a53f..38c008a2 100644 --- a/src/pages/moments/components/scroll-moment.vue +++ b/src/pages/moments/components/scroll-moment.vue @@ -9,13 +9,18 @@ - + @@ -69,6 +74,7 @@ getBannerList(); }); + // 获取轮播图 const getBannerList = async () => { const { code, data = null } = await RecentApi.getBannerList(); if (code !== 0) return; @@ -84,6 +90,13 @@ }, ); + // 点击轮播图 + const clickSwiperImage = (url: string) => { + uni.navigateTo({ + url, + }); + }; + // 查看用户详情 const goDetail = (user: any) => { uni.navigateTo({ diff --git a/src/pages/profile/face-verify.vue b/src/pages/profile/face-verify.vue index 99a30c9b..cf652a21 100644 --- a/src/pages/profile/face-verify.vue +++ b/src/pages/profile/face-verify.vue @@ -5,7 +5,10 @@ userInfoStore.sex == 2 ? '魅力女生认证' : userInfoStore.sex == 1 ? '精英男士认证' : '' " safeAreaInsetTop + fixed + placeholder :bordered="false" + style="z-index: 999" > - + @@ -185,7 +188,7 @@ - + 基本资料 上传本人头像,女生更放心与你见面~ @@ -262,30 +265,7 @@ Authorization: 'Bearer ' + getAccessToken(), }; - // 查询用户人脸认证状态 - const getFaceVerify = async () => { - const { code, data } = await RecentApi.getFaceVerify(); - - console.log('查询用户人脸认证状态', code, data); - - if (code !== 0) return uni.showToast({ title: '查询用户人脸认证失败', icon: 'none' }); - switch (data?.authStatus) { - case '1': - // 待认证 - break; - case '2': - return uni.showToast({ title: '你的人脸审核中', icon: 'error' }); - case '3': - // 审核通过 - break; - case '4': - // 审核失败 - break; - } - }; - onLoad(async () => { - await getFaceVerify(); const { data } = await UserApi.getUserInfo(); Object.assign(userinfo, { avatar: data.avatar, @@ -359,7 +339,6 @@ }; /** - * * @param certifyId 阿里人脸认证id * @param authId 发起认证的id */ @@ -392,6 +371,9 @@ UserApi.updateUser(userinfo).then(() => { sheep.$store('user').getInfo(); uni.showToast({ title: '您已认证成功', icon: 'none' }); + setTimeout(() => { + uni.navigateBack(); + }, 300); }); break; case 1001: @@ -428,7 +410,7 @@ if (imageFileList.value.length > 2 && imageFileList.value.length < 6) { return true; } else { - uni.showToast({ title: '请上传3~5张最美的图片', icon: 'none' }); + uni.showToast({ title: '请上传照片', icon: 'none' }); return false; } case 2: diff --git a/src/pages/profile/profile.vue b/src/pages/profile/profile.vue index c1627b5f..3c54ccf2 100644 --- a/src/pages/profile/profile.vue +++ b/src/pages/profile/profile.vue @@ -271,7 +271,7 @@ const MenuCellList = [ { title: '我的收益', value: '', icon: 'wallet', to: '/pages/wechat/index' }, { title: '访客记录√', value: '', icon: 'browse', to: '/pages/profile/view-record' }, - { title: '认证中心', value: '', icon: 'user', to: '/pages/profile/face-verify' }, + { title: '认证中心', value: '', icon: 'user', to: '/pages/profile/verify-status' }, { title: '我的动态√', value: '', icon: 'star', to: '/pages/profile/my-moment' }, { title: '我的评价√', value: '', icon: 'view-module', to: '', onClick: lookMyEvaluation }, { title: '问题反馈√', value: '', icon: 'backtop-rectangle', to: '', onClick: goFeedback }, diff --git a/src/pages/profile/verify-status.vue b/src/pages/profile/verify-status.vue new file mode 100644 index 00000000..536df64f --- /dev/null +++ b/src/pages/profile/verify-status.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/sheep/components/scroll-list/scroll-list.vue b/src/sheep/components/scroll-list/scroll-list.vue index b3c295b3..a9afd5ca 100644 --- a/src/sheep/components/scroll-list/scroll-list.vue +++ b/src/sheep/components/scroll-list/scroll-list.vue @@ -10,7 +10,6 @@ @refresherrefresh="onRefresherRefresh" @scrolltolower="onScrollToLower" @scroll="scroll" - v-bind="attrs" >