diff --git a/src/pages/home/detail.vue b/src/pages/home/detail.vue
index 179792b5..0f1fa012 100644
--- a/src/pages/home/detail.vue
+++ b/src/pages/home/detail.vue
@@ -170,7 +170,7 @@
import ScrollList from '@/sheep/components/scroll-list/scroll-list.vue';
import useScroll from '@/sheep/hooks/use-scroll';
import RecentApi from '@/sheep/api/member/recent';
- import { onLoad } from '@dcloudio/uni-app';
+ import { onHide, onUnload, onLoad } from '@dcloudio/uni-app';
import { getGender } from '@/sheep/util/index';
import sheep from '@/sheep';
import useConfigStore from '@/chat-store/configStore.js';
@@ -360,4 +360,11 @@
// ...rating,
// });
// };
+
+ onHide(() => {
+ rate();
+ });
+ onUnload(() => {
+ rate();
+ });
diff --git a/src/pages/profile/face-verify.vue b/src/pages/profile/face-verify.vue
index 4d02a41b..d0a5dc48 100644
--- a/src/pages/profile/face-verify.vue
+++ b/src/pages/profile/face-verify.vue
@@ -265,10 +265,10 @@
// 查询用户人脸认证状态
const getFaceVerify = async () => {
const { code, data } = await RecentApi.getFaceVerify();
- if (code !== 0) return uni.showToast({ title: '查询用户人脸认证失败', icon: 'error' });
console.log('查询用户人脸认证状态', code, data);
+ if (code !== 0) return uni.showToast({ title: '查询用户人脸认证失败', icon: 'none' });
switch (data.authStatus) {
case '1':
// 待认证
diff --git a/src/pages/profile/profile.vue b/src/pages/profile/profile.vue
index cbc092a1..53757042 100644
--- a/src/pages/profile/profile.vue
+++ b/src/pages/profile/profile.vue
@@ -41,11 +41,15 @@
- {{ recentTotal.userLikeItTotal }}
+
+ {{ recentTotal.userLikeItTotal || 0 }}
+
我喜欢
- {{ recentTotal.userLikeMeTotal }}
+
+ {{ recentTotal.userLikeMeTotal || 0 }}
+
喜欢我
@@ -92,7 +96,7 @@
is-link
ellipsis
:to="item.to"
- @click="item.click"
+ @click="item.onClick"
/>
@@ -237,16 +241,16 @@
});
};
- // cell菜单
+ // 菜单
const MenuCellList = [
{ title: '我的收益', value: '', icon: 'wallet', to: '/pages/wechat/index' },
- { title: '访客记录', value: '', icon: 'dong', to: '/pages/profile/view-record' },
+ { title: '访客记录', value: '', icon: 'browse', 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: 'backtop-rectangle', to: '', click: goFeedback },
+ { title: '我的评价√', value: '', icon: 'view-module', to: '', onClick: lookMyEvaluation },
+ { title: '问题反馈√', value: '', icon: 'backtop-rectangle', to: '', onClick: goFeedback },
// { title: '客服助手', value: '', icon: 'service', to: '' },
- { title: '关注公众号√', value: '获取最新消息', icon: 'qrcode', to: '', click: subOfficial },
+ { title: '关注公众号√', value: '获取最新消息', icon: 'qrcode', to: '', onClick: subOfficial },
{ title: '设置√', value: '', icon: 'setting1', to: '/pages/profile/setting' },
];
diff --git a/src/pages/profile/view-record.vue b/src/pages/profile/view-record.vue
index ee334140..e0112e56 100644
--- a/src/pages/profile/view-record.vue
+++ b/src/pages/profile/view-record.vue
@@ -10,32 +10,56 @@
- 1
+
+
+
+
+
- 2
+
+
+
+
-
-
-
-
-
-
-
-
diff --git a/src/sheep/api/member/recent.ts b/src/sheep/api/member/recent.ts
index 4f50da1a..a7773768 100644
--- a/src/sheep/api/member/recent.ts
+++ b/src/sheep/api/member/recent.ts
@@ -212,7 +212,7 @@ const RecentApi = {
},
// 添加朋友圈或用户详情页面的查看和访问记录
createViewRecord: (data: {
- bizType: 'CLASSIFY' | 'RECENT';
+ bizType: 'CLASSIFY' | 'RECENT' | 'USER';
viewStartTime: string;
viewEndTime: string;
}) => {
@@ -225,6 +225,30 @@ const RecentApi = {
},
});
},
+ // 查询我看过的
+ getSeenIt: (data: any) => {
+ return request({
+ url: '/member/recent/look/it-page',
+ method: 'POST',
+ data,
+ custom: {
+ showLoading: true,
+ loadingMsg: '加载中',
+ },
+ });
+ },
+ // 查询看过我的
+ getSeenMe: (data: any) => {
+ return request({
+ url: '/member/recent/look/me-page',
+ method: 'POST',
+ data,
+ custom: {
+ showLoading: true,
+ loadingMsg: '加载中',
+ },
+ });
+ },
// 获得用户协议或隐私政策文章
getPromotionArticle: (params: any) => {
return request({
diff --git a/src/sheep/components/moment-card/moment-card.vue b/src/sheep/components/moment-card/moment-card.vue
index 118cb1f1..2a8fd429 100644
--- a/src/sheep/components/moment-card/moment-card.vue
+++ b/src/sheep/components/moment-card/moment-card.vue
@@ -65,7 +65,7 @@
@click="handleunLike"
/>
- {{ operationTotal.recentLikeTotal || 0 }} 喜欢
+ {{ operationTotal?.recentLikeTotal || 0 }} 喜欢
diff --git a/src/sheep/components/segmented/segmented.vue b/src/sheep/components/segmented/segmented.vue
index 5deb2212..f67122ef 100644
--- a/src/sheep/components/segmented/segmented.vue
+++ b/src/sheep/components/segmented/segmented.vue
@@ -1,5 +1,6 @@