Merge branch 'master' of https://gitea.zianxin.com/zax/Friendship-and-chat-uniapp
This commit is contained in:
commit
d2cc1e3d3d
5 files changed
+37
-12
No files matched your search
@@ -78,7 +78,7 @@
|
||||
uni.navigateTo({
|
||||
url: `/pages/home/detail?memberId=${user.memberId}`,
|
||||
success: function (res) {
|
||||
res.eventChannel.emit('recentDetail', user);
|
||||
res.eventChannel.emit('viewRecordType', 'USER');
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
@@ -177,6 +177,7 @@
|
||||
import useChatStore from '@/chat-store/chatStore.js';
|
||||
import useFriendStore from '@/chat-store/friendStore.js';
|
||||
import request from '@/common/request';
|
||||
import { formatDate } from '@/sheep/helper/utils';
|
||||
|
||||
const userCity = computed(() => sheep.$store('user').userCity);
|
||||
|
||||
@@ -196,6 +197,11 @@
|
||||
scoreSk: 0, // 爽快评分
|
||||
scoreYq: 0, // 有趣评分
|
||||
});
|
||||
const viewRecord = reactive({
|
||||
bizType: '',
|
||||
viewStartTime: formatDate(new Date()),
|
||||
viewEndTime: '',
|
||||
});
|
||||
|
||||
const photoListUrls = computed(
|
||||
() =>
|
||||
@@ -209,11 +215,6 @@
|
||||
if (!memberId) return uni.showToast({ title: '参数错误', icon: 'none' });
|
||||
params.memberId = memberId;
|
||||
await getDetail();
|
||||
// const instance: any = getCurrentInstance()?.proxy;
|
||||
// const eventChannel = instance.getOpenerEventChannel();
|
||||
// eventChannel.on('recentDetail', function (user: any) {
|
||||
// userDetail.value = user;
|
||||
// });
|
||||
});
|
||||
|
||||
// 获取用户详情
|
||||
@@ -361,10 +362,26 @@
|
||||
// });
|
||||
// };
|
||||
|
||||
const instance: any = getCurrentInstance()?.proxy;
|
||||
const eventChannel = instance.getOpenerEventChannel();
|
||||
eventChannel.on('viewRecordType', function (bizType: 'CLASSIFY' | 'RECENT' | 'USER') {
|
||||
viewRecord.bizType = bizType;
|
||||
});
|
||||
|
||||
// 添加用户详情页面的查看和访问记录
|
||||
const createViewRecord = () => {
|
||||
if (!viewRecord.bizType) return;
|
||||
|
||||
RecentApi.createViewRecord({
|
||||
...viewRecord,
|
||||
viewEndTime: formatDate(new Date()),
|
||||
});
|
||||
};
|
||||
|
||||
onHide(() => {
|
||||
rate();
|
||||
createViewRecord();
|
||||
});
|
||||
onUnload(() => {
|
||||
rate();
|
||||
createViewRecord();
|
||||
});
|
||||
</script>
|
||||
@@ -91,7 +91,7 @@
|
||||
uni.navigateTo({
|
||||
url: `/pages/home/detail?memberId=${user.memberId}`,
|
||||
success: function (res) {
|
||||
res.eventChannel.emit('recentDetail', user);
|
||||
res.eventChannel.emit('viewRecordType', 'RECENT');
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
@refresh="refreshList_seenIt"
|
||||
@loadMore="listLoadMore_seenIt"
|
||||
>
|
||||
<moment-card v-if="listData_seenIt.length" v-for="item in 4" :data="item" />
|
||||
<moment-card v-if="listData_seenIt.length" v-for="item in listData_seenIt" :data="item" />
|
||||
<wd-status-tip v-else image="content" tip="暂无内容" />
|
||||
</scroll-list>
|
||||
</wd-tab>
|
||||
@@ -28,7 +28,7 @@
|
||||
@refresh="refreshList_seenMe"
|
||||
@loadMore="listLoadMore_seenMe"
|
||||
>
|
||||
<moment-card v-if="listData_seenMe.length" v-for="item in 4" :data="item" />
|
||||
<moment-card v-if="listData_seenMe.length" v-for="item in listData_seenMe" :data="item" />
|
||||
<wd-status-tip v-else image="content" tip="暂无内容" />
|
||||
</scroll-list>
|
||||
</wd-tab>
|
||||
@@ -63,3 +63,11 @@
|
||||
refreshList_seenMe();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* #ifdef APP-PLUS */
|
||||
page {
|
||||
overflow: hidden;
|
||||
}
|
||||
/* #endif */
|
||||
</style>
|
||||
@@ -210,7 +210,7 @@ const RecentApi = {
|
||||
},
|
||||
});
|
||||
},
|
||||
// 添加朋友圈或用户详情页面的查看和访问记录
|
||||
// 添加用户详情页面的查看和访问记录
|
||||
createViewRecord: (data: {
|
||||
bizType: 'CLASSIFY' | 'RECENT' | 'USER';
|
||||
viewStartTime: string;
|
||||
|
||||
Reference in new issue
Block a user