fix:修改查询他人展示页面的bug
This commit is contained in:
parent
b4c5f28a06
commit
a671cb7a89
@ -463,13 +463,14 @@ func (p *SocialProvider) GetUserLikedAssets(ctx context.Context, req *pb.GetUser
|
||||
}
|
||||
|
||||
logger.Logger.Debug("GetUserLikedAssets called",
|
||||
zap.Int64("user_id", userID),
|
||||
zap.Int64("target_user_id", req.UserId),
|
||||
zap.Int64("caller_user_id", userID),
|
||||
zap.Int64("star_id", starID),
|
||||
zap.Int32("page", req.Page),
|
||||
zap.Int32("page_size", req.PageSize),
|
||||
)
|
||||
|
||||
return p.assetLikeService.GetUserLikedAssets(ctx, req, userID, starID)
|
||||
return p.assetLikeService.GetUserLikedAssets(ctx, req, req.UserId, starID)
|
||||
}
|
||||
|
||||
// extractUserInfo 从 Dubbo attachments 中提取用户信息
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"appid" : "__UNI__F199FF4",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.4",
|
||||
"versionCode" : 103,
|
||||
"versionCode" : 104,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="page-container">
|
||||
<!-- 背景图片 -->
|
||||
<image class="bg-image" src="/static/square/beijingban.png" mode="aspectFill"></image>
|
||||
<image class="bg-image" src="/static/square/squearbj.png" mode="aspectFill"></image>
|
||||
|
||||
<!-- 顶部导航 -->
|
||||
<view class="nav-bar">
|
||||
@ -79,10 +79,12 @@
|
||||
<scroll-view class="liked-list" scroll-y="true" :show-scrollbar="false">
|
||||
<view v-for="(item, index) in likedWorks" :key="item.id" class="liked-row"
|
||||
@tap="goToAssetDetail(item.id)">
|
||||
<!-- 卡片主体 -->
|
||||
<view class="liked-item" :class="index === 0 ? 'liked-item-first' : ''">
|
||||
<!-- 排名图标 -->
|
||||
<!-- 排名图标,绝对定位在卡片左侧 -->
|
||||
<image v-if="index < 3" :src="rankIcons[index]" :class="'rank-icon rank-icon-' + (index + 1)" mode="aspectFit"></image>
|
||||
|
||||
<!-- 卡片主体 -->
|
||||
|
||||
<view class="liked-item" :class="index === 0 ? 'liked-item-first' : ''">
|
||||
<!-- 作品封面 -->
|
||||
<view class="liked-cover-wrap" :class="index === 0 ? 'liked-cover-wrap-first' : ''" >
|
||||
<image class="liked-cover" :src="item.cover_url || '/static/nft/placeholder.png'"
|
||||
@ -123,7 +125,7 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { getUserExhibitedAssetsApi, getUserLikedAssetsApi, getUserProfileApi } from '@/utils/api.js';
|
||||
import { getUserGalleriesApi, getUserLikedAssetsApi, getUserProfileApi } from '@/utils/api.js';
|
||||
|
||||
const userId = ref('');
|
||||
const nickname = ref('');
|
||||
@ -155,9 +157,9 @@ const formatScore = (score) => {
|
||||
};
|
||||
|
||||
const rankIcons = [
|
||||
'/static/rank/rank-icon1.png',
|
||||
'/static/rank/rank-icon2.png',
|
||||
'/static/rank/rank-icon3.png',
|
||||
'/static/square/icon1.png',
|
||||
'/static/square/icon2.png',
|
||||
'/static/square/icon3.png',
|
||||
];
|
||||
|
||||
// 在展作品列表
|
||||
@ -181,14 +183,16 @@ const switchLikedTab = async (tab) => {
|
||||
const loadExhibitedAssets = async () => {
|
||||
if (!userId.value) return;
|
||||
try {
|
||||
const res = await getUserExhibitedAssetsApi(userId.value, 1, 20);
|
||||
if (res.data && res.data.items) {
|
||||
exhibitionWorks.value = res.data.items.map(item => ({
|
||||
id: item.asset_id,
|
||||
cover_url: item.cover_url,
|
||||
like_count: item.like_count,
|
||||
earnings: item.earnings,
|
||||
name: item.name,
|
||||
const res = await getUserGalleriesApi(userId.value);
|
||||
if (res.data && res.data.slots) {
|
||||
exhibitionWorks.value = res.data.slots
|
||||
.filter(slot => slot.status === 'OCCUPIED' && slot.asset)
|
||||
.map(slot => ({
|
||||
id: slot.asset.asset_id,
|
||||
cover_url: slot.asset.cover_url,
|
||||
like_count: slot.asset.like_count,
|
||||
earnings: slot.asset.earnings || 0,
|
||||
name: slot.asset.name,
|
||||
}));
|
||||
}
|
||||
} catch (err) {
|
||||
@ -356,10 +360,14 @@ onMounted(() => {
|
||||
.card-tilt-left {
|
||||
transform: rotate(-4deg) translateY(10rpx);
|
||||
margin-right: 32rpx;
|
||||
border-radius: 32rpx;
|
||||
box-shadow: -16rpx 16rpx 16rpx rgba(229, 76, 93, 0.9);
|
||||
}
|
||||
|
||||
.card-tilt-right {
|
||||
transform: rotate(4deg) translateY(10rpx);
|
||||
border-radius: 32rpx;
|
||||
box-shadow: 16rpx 16rpx 16rpx rgba(229, 76, 93, 0.9);
|
||||
}
|
||||
|
||||
.card-income-row.income-tilt-right {
|
||||
@ -404,7 +412,7 @@ onMounted(() => {
|
||||
|
||||
.card-income-row {
|
||||
position: absolute;
|
||||
bottom: -52rpx;
|
||||
bottom: -88rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
display: flex;
|
||||
@ -508,6 +516,10 @@ onMounted(() => {
|
||||
padding: 28rpx 20rpx;
|
||||
width: 90%;
|
||||
padding-left: 20%;
|
||||
background-image: url(/static/square/diyi.png);
|
||||
background-size: 102%;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
/* 排名图标 - 排名越靠前越大 */
|
||||
@ -519,18 +531,18 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.rank-icon-1 {
|
||||
width: 72rpx;
|
||||
height: 88rpx;
|
||||
width: 96rpx;
|
||||
height: 128rpx;
|
||||
}
|
||||
|
||||
.rank-icon-2 {
|
||||
width: 64rpx;
|
||||
height: 78rpx;
|
||||
width: 72rpx;
|
||||
height: 104rpx;
|
||||
}
|
||||
|
||||
.rank-icon-3 {
|
||||
width: 56rpx;
|
||||
height: 68rpx;
|
||||
width: 64rpx;
|
||||
height: 88rpx;
|
||||
}
|
||||
|
||||
.liked-cover-wrap {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// API 基础配置
|
||||
const baseURL = 'http://101.132.250.62:8080'
|
||||
// const baseURL = 'http://101.132.250.62:8080'
|
||||
// const baseURL = 'http://192.168.110.60:8080'
|
||||
// const baseURL = 'http://localhost:8080'
|
||||
const baseURL = 'http://localhost:8080'
|
||||
|
||||
// 是否使用模拟数据(开发调试时设为 true,后端API准备好后改为 false)
|
||||
const USE_MOCK_API = false
|
||||
|
||||
Loading…
Reference in New Issue
Block a user