From f07a41e5cceac79e8ff1bad62b804d913ada74f4 Mon Sep 17 00:00:00 2001 From: ctw Date: Tue, 2 Dec 2025 17:01:03 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BA=BA=E8=84=B8=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/home/detail.vue | 23 ++++++++++++---- src/pages/profile/face-verify.vue | 45 ++++++++++++++++++++++--------- src/pages/profile/profile.vue | 13 +++++++-- src/pages/profile/view-record.vue | 5 +--- src/sheep/api/member/recent.ts | 39 ++++++++++++++++++--------- 5 files changed, 89 insertions(+), 36 deletions(-) diff --git a/src/pages/home/detail.vue b/src/pages/home/detail.vue index 4e51f0d2..2b7c0199 100644 --- a/src/pages/home/detail.vue +++ b/src/pages/home/detail.vue @@ -83,11 +83,11 @@ 相册 @@ -142,7 +142,13 @@ class="text-base py-2 px-10 rounded-full bg-white c-black flex gap-2" @click="handleLike" > - + + 喜欢 @@ -184,6 +190,12 @@ memberId: '', }); + const photoListUrls = computed(() => + userDetail.value.memberPhotoList + ?.filter((i) => i.resourceType === 'IMAGE') + .map((item) => item.address), + ); + onLoad(async (options: any) => { const { memberId } = options; if (!memberId) return uni.showToast({ title: '参数错误', icon: 'none' }); @@ -237,10 +249,11 @@ scrollTop.value = e.detail.scrollTop; } - const previewPhoto = (urls: string[], current: number) => { + // 相册预览 + const previewPhoto = (current: number) => { uni.previewImage({ current, - urls, + urls: photoListUrls.value, indicator: 'number', }); }; diff --git a/src/pages/profile/face-verify.vue b/src/pages/profile/face-verify.vue index 7fed3298..3557d972 100644 --- a/src/pages/profile/face-verify.vue +++ b/src/pages/profile/face-verify.vue @@ -8,30 +8,49 @@ - 人脸认证 + + 人脸认证 + diff --git a/src/pages/profile/profile.vue b/src/pages/profile/profile.vue index b1aa3d56..3c5e2bc8 100644 --- a/src/pages/profile/profile.vue +++ b/src/pages/profile/profile.vue @@ -25,7 +25,10 @@ /> {{ userInfo.nickname }} - ID: {{ userInfo.id }} + + ID: {{ userInfo.id }} + + sheep.$store('user').userInfo); const userCity = computed(() => sheep.$store('user').userCity); const userWallet = computed(() => sheep.$store('user').userWallet); + const userGenderImageSrc = computed(() => { + const sex = userInfo.value.sex; + if (sex === 1) return '/static/gender-man.png'; + if (sex === 2) return '/static/gender-woman.png'; + return ''; + }); onLoad(async () => { const { data: totalData } = await RecentApi.recentTotal(); @@ -226,7 +235,7 @@ { title: '访客记录', value: '', icon: 'dong', to: '/pages/profile/view-record' }, { title: '认证中心', value: '', icon: 'user', to: '/pages/profile/face-verify' }, { title: '我的动态√', value: '', icon: 'star', to: '/pages/profile/my-moment' }, - { title: '我的评价', value: '', icon: 'view-module', to: '', click: lookMyEvaluation }, + { title: '我的评价√', value: '', icon: 'view-module', to: '', click: lookMyEvaluation }, { title: '问题反馈√', value: '', icon: 'backtop-rectangle', to: '', click: goFeedback }, // { title: '客服助手', value: '', icon: 'service', to: '' }, { title: '关注公众号√', value: '获取最新消息', icon: 'qrcode', to: '', click: subOfficial }, diff --git a/src/pages/profile/view-record.vue b/src/pages/profile/view-record.vue index a854e8ca..27b66563 100644 --- a/src/pages/profile/view-record.vue +++ b/src/pages/profile/view-record.vue @@ -45,8 +45,5 @@ const activeTab = ref(); const params = reactive({}); - const { listData, loadMoreStatus, refreshList, listLoadMore } = useScroll( - RecentApi.viewRecord, - params, - ); + const { listData, loadMoreStatus, refreshList, listLoadMore } = useScroll(RecentApi.xxx, params); diff --git a/src/sheep/api/member/recent.ts b/src/sheep/api/member/recent.ts index 784985ae..5afbe0b3 100644 --- a/src/sheep/api/member/recent.ts +++ b/src/sheep/api/member/recent.ts @@ -116,18 +116,6 @@ const RecentApi = { }, }); }, - // 查看访客记录 - viewRecord: (data: any) => { - return request({ - url: '/member/recent/xxx/xxx', - method: 'POST', - data, - custom: { - showLoading: true, - loadingMsg: '加载中', - }, - }); - }, // 查看我的评价 myEvaluate: () => { return request({ @@ -221,6 +209,21 @@ const RecentApi = { }, }); }, + // 添加朋友圈或用户详情页面的查看和访问记录 + createViewRecord: (data: { + bizType: 'CLASSIFY' | 'RECENT'; + viewStartTime: string; + viewEndTime: string; + }) => { + return request({ + url: '/member/recent/create/view-record', + method: 'POST', + data, + custom: { + showLoading: false, + }, + }); + }, // 获得用户协议或隐私政策文章 getPromotionArticle: (params: any) => { return request({ @@ -347,6 +350,18 @@ const RecentApi = { }, }); }, + // 创建男性人脸认证 + createManFaceVerify: (data: any) => { + return request({ + url: '/member/com-auth/create-man-auth', + method: 'POST', + data, + custom: { + showLoading: true, + loadingMsg: '加载中', + }, + }); + }, }; export default RecentApi;