feat:访客记录
This commit is contained in:
1 parent
aeafc90ddc
commit
8b1c50e7fc
7 files changed
+91
-31
No files matched your search
@@ -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();
|
||||
});
|
||||
</script>
|
||||
@@ -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':
|
||||
// 待认证
|
||||
|
||||
@@ -41,11 +41,15 @@
|
||||
<!-- 我喜欢和钱包 -->
|
||||
<view class="flex justify-around my-4 text-base">
|
||||
<view class="flex flex-col items-center" @click="goLike(0)">
|
||||
<text class="text-color-theme font-600 text-lg">{{ recentTotal.userLikeItTotal }}</text>
|
||||
<text class="text-color-theme font-600 text-lg">
|
||||
{{ recentTotal.userLikeItTotal || 0 }}
|
||||
</text>
|
||||
<text class="text-color-theme text-sm">我喜欢</text>
|
||||
</view>
|
||||
<view class="flex flex-col items-center" @click="goLike(1)">
|
||||
<text class="text-color-theme font-600 text-lg">{{ recentTotal.userLikeMeTotal }}</text>
|
||||
<text class="text-color-theme font-600 text-lg">
|
||||
{{ recentTotal.userLikeMeTotal || 0 }}
|
||||
</text>
|
||||
<text class="text-color-theme text-sm">喜欢我</text>
|
||||
</view>
|
||||
<navigator url="/pages/profile/recharge" open-type="navigate" hover-class="navigator-hover">
|
||||
@@ -92,7 +96,7 @@
|
||||
is-link
|
||||
ellipsis
|
||||
:to="item.to"
|
||||
@click="item.click"
|
||||
@click="item.onClick"
|
||||
/>
|
||||
</wd-cell-group>
|
||||
</view>
|
||||
@@ -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' },
|
||||
];
|
||||
</script>
|
||||
@@ -10,32 +10,56 @@
|
||||
|
||||
<wd-tabs v-model="activeTab">
|
||||
<wd-tab title="我看过的">
|
||||
<view>1</view>
|
||||
<scroll-list
|
||||
style="height: calc(100dvh - 44px - 42px)"
|
||||
:loadMoreStatus="loadMoreStatus_seenIt"
|
||||
@refresh="refreshList_seenIt"
|
||||
@loadMore="listLoadMore_seenIt"
|
||||
>
|
||||
<moment-card v-if="listData_seenIt.length" v-for="item in 4" :data="item" />
|
||||
<wd-status-tip v-else image="content" tip="暂无内容" />
|
||||
</scroll-list>
|
||||
</wd-tab>
|
||||
|
||||
<wd-tab title="看过我的">
|
||||
<view>2</view>
|
||||
<scroll-list
|
||||
style="height: calc(100dvh - 44px - 42px)"
|
||||
:loadMoreStatus="loadMoreStatus_seenMe"
|
||||
@refresh="refreshList_seenMe"
|
||||
@loadMore="listLoadMore_seenMe"
|
||||
>
|
||||
<moment-card v-if="listData_seenMe.length" v-for="item in 4" :data="item" />
|
||||
<wd-status-tip v-else image="content" tip="暂无内容" />
|
||||
</scroll-list>
|
||||
</wd-tab>
|
||||
</wd-tabs>
|
||||
|
||||
<scroll-list style="height: calc(100dvh - 44px - 42px)" :loadMoreStatus="loadMoreStatus" @refresh="refreshList"
|
||||
@loadMore="listLoadMore">
|
||||
<moment-card v-if="listData.length" v-for="item in 4" :data="item" />
|
||||
<view v-else class="flex px-4 py-4" v-for="index in 4" :key="index">
|
||||
<wd-skeleton :row-col="[{ size: '50px', type: 'circle' }]" animation="flashed" />
|
||||
<wd-skeleton :custom-style="{ width: '100%', marginLeft: '12px' }" animation="flashed" theme="paragraph" />
|
||||
</view>
|
||||
</scroll-list>
|
||||
</wd-config-provider>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import MomentCard from '@/sheep/components/moment-card/moment-card.vue';
|
||||
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 { ref, reactive } from 'vue';
|
||||
import MomentCard from '@/sheep/components/moment-card/moment-card.vue';
|
||||
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 { ref } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
|
||||
const activeTab = ref();
|
||||
const params = reactive({});
|
||||
const { listData, loadMoreStatus, refreshList, listLoadMore } = useScroll(RecentApi.xxx, params);
|
||||
const activeTab = ref();
|
||||
const {
|
||||
listData: listData_seenIt,
|
||||
loadMoreStatus: loadMoreStatus_seenIt,
|
||||
refreshList: refreshList_seenIt,
|
||||
listLoadMore: listLoadMore_seenIt,
|
||||
} = useScroll(RecentApi.getSeenIt);
|
||||
const {
|
||||
listData: listData_seenMe,
|
||||
loadMoreStatus: loadMoreStatus_seenMe,
|
||||
refreshList: refreshList_seenMe,
|
||||
listLoadMore: listLoadMore_seenMe,
|
||||
} = useScroll(RecentApi.getSeenMe);
|
||||
|
||||
onLoad(async () => {
|
||||
refreshList_seenIt();
|
||||
refreshList_seenMe();
|
||||
});
|
||||
</script>
|
||||
@@ -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({
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
@click="handleunLike"
|
||||
/>
|
||||
<uni-icons v-else type="heart" size="22" color="#B5B4BC" @click="handleLike" />
|
||||
<text>{{ operationTotal.recentLikeTotal || 0 }} 喜欢</text>
|
||||
<text>{{ operationTotal?.recentLikeTotal || 0 }} 喜欢</text>
|
||||
</view>
|
||||
<view v-if="props.showChat" class="flex items-center gap-10rpx text-sm" @click="goChat">
|
||||
<uni-icons type="chat" size="22" color="#B5B4BC" />
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<view
|
||||
v-if="items.length"
|
||||
class="flex items-center relative mx-auto border-1 border-solid border-#666 bg-#333 rounded-full overflow-hidden p-1"
|
||||
:style="segmentedWidth"
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user