feat:用户详情

This commit is contained in:
ctw committed 2025-12-02 15:44:35 +08:00
1 parent 6c78e14257
commit ec07bc5804
2 files changed
+25 -9

No files matched your search

+13 -9
View File
@@ -173,27 +173,30 @@
import request from '@/common/request';
const userCity = computed(() => sheep.$store('user').userCity);
const scrollTop = ref(0);
const userDetail = ref<any>({});
const actionShow = ref(false);
const params = reactive({
scene: 'DYNAMIC_RECOMMEND',
province: '',
city: userCity.value.t,
memberId: '',
});
const scrollTop = ref(0);
const userDetail = ref<any>({});
const actionShow = ref(false);
onLoad((options: any) => {
onLoad(async (options: any) => {
const { memberId } = options;
if (!memberId) return uni.showToast({ title: '参数错误', icon: 'none' });
params.memberId = memberId;
const { data = null } = await RecentApi.getRecentDetail({ id: memberId });
userDetail.value = data ?? {};
const instance: any = getCurrentInstance()?.proxy;
const eventChannel = instance.getOpenerEventChannel();
// const instance: any = getCurrentInstance()?.proxy;
// const eventChannel = instance.getOpenerEventChannel();
eventChannel.on('recentDetail', function (user: any) {
userDetail.value = user;
});
// eventChannel.on('recentDetail', function (user: any) {
// userDetail.value = user;
// });
});
onMounted(() => {
@@ -292,6 +295,7 @@
});
};
// 拉黑 举报
async function actionSelect({ item, index }) {
if (index === 0) {
await RecentApi.recentOperate({
+12
View File
@@ -58,6 +58,18 @@ const RecentApi = {
},
});
},
// 获取用户详情页
getRecentDetail: (params: { id: string | number }) => {
return request({
url: '/member/recent/getById',
method: 'GET',
params,
custom: {
showLoading: true,
loadingMsg: '加载中',
},
});
},
// 查看我喜欢
likeIt: (data: any) => {
return request({