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",
|
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.Int64("star_id", starID),
|
||||||
zap.Int32("page", req.Page),
|
zap.Int32("page", req.Page),
|
||||||
zap.Int32("page_size", req.PageSize),
|
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 中提取用户信息
|
// extractUserInfo 从 Dubbo attachments 中提取用户信息
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
"appid" : "__UNI__F199FF4",
|
"appid" : "__UNI__F199FF4",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.4",
|
"versionName" : "1.0.4",
|
||||||
"versionCode" : 103,
|
"versionCode" : 104,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="page-container">
|
<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">
|
<view class="nav-bar">
|
||||||
@ -79,10 +79,12 @@
|
|||||||
<scroll-view class="liked-list" scroll-y="true" :show-scrollbar="false">
|
<scroll-view class="liked-list" scroll-y="true" :show-scrollbar="false">
|
||||||
<view v-for="(item, index) in likedWorks" :key="item.id" class="liked-row"
|
<view v-for="(item, index) in likedWorks" :key="item.id" class="liked-row"
|
||||||
@tap="goToAssetDetail(item.id)">
|
@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>
|
<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' : ''" >
|
<view class="liked-cover-wrap" :class="index === 0 ? 'liked-cover-wrap-first' : ''" >
|
||||||
<image class="liked-cover" :src="item.cover_url || '/static/nft/placeholder.png'"
|
<image class="liked-cover" :src="item.cover_url || '/static/nft/placeholder.png'"
|
||||||
@ -123,7 +125,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted } from 'vue';
|
import { ref, onMounted } from 'vue';
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
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 userId = ref('');
|
||||||
const nickname = ref('');
|
const nickname = ref('');
|
||||||
@ -155,9 +157,9 @@ const formatScore = (score) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const rankIcons = [
|
const rankIcons = [
|
||||||
'/static/rank/rank-icon1.png',
|
'/static/square/icon1.png',
|
||||||
'/static/rank/rank-icon2.png',
|
'/static/square/icon2.png',
|
||||||
'/static/rank/rank-icon3.png',
|
'/static/square/icon3.png',
|
||||||
];
|
];
|
||||||
|
|
||||||
// 在展作品列表
|
// 在展作品列表
|
||||||
@ -181,14 +183,16 @@ const switchLikedTab = async (tab) => {
|
|||||||
const loadExhibitedAssets = async () => {
|
const loadExhibitedAssets = async () => {
|
||||||
if (!userId.value) return;
|
if (!userId.value) return;
|
||||||
try {
|
try {
|
||||||
const res = await getUserExhibitedAssetsApi(userId.value, 1, 20);
|
const res = await getUserGalleriesApi(userId.value);
|
||||||
if (res.data && res.data.items) {
|
if (res.data && res.data.slots) {
|
||||||
exhibitionWorks.value = res.data.items.map(item => ({
|
exhibitionWorks.value = res.data.slots
|
||||||
id: item.asset_id,
|
.filter(slot => slot.status === 'OCCUPIED' && slot.asset)
|
||||||
cover_url: item.cover_url,
|
.map(slot => ({
|
||||||
like_count: item.like_count,
|
id: slot.asset.asset_id,
|
||||||
earnings: item.earnings,
|
cover_url: slot.asset.cover_url,
|
||||||
name: item.name,
|
like_count: slot.asset.like_count,
|
||||||
|
earnings: slot.asset.earnings || 0,
|
||||||
|
name: slot.asset.name,
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@ -356,10 +360,14 @@ onMounted(() => {
|
|||||||
.card-tilt-left {
|
.card-tilt-left {
|
||||||
transform: rotate(-4deg) translateY(10rpx);
|
transform: rotate(-4deg) translateY(10rpx);
|
||||||
margin-right: 32rpx;
|
margin-right: 32rpx;
|
||||||
|
border-radius: 32rpx;
|
||||||
|
box-shadow: -16rpx 16rpx 16rpx rgba(229, 76, 93, 0.9);
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-tilt-right {
|
.card-tilt-right {
|
||||||
transform: rotate(4deg) translateY(10rpx);
|
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 {
|
.card-income-row.income-tilt-right {
|
||||||
@ -404,7 +412,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
.card-income-row {
|
.card-income-row {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: -52rpx;
|
bottom: -88rpx;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -508,6 +516,10 @@ onMounted(() => {
|
|||||||
padding: 28rpx 20rpx;
|
padding: 28rpx 20rpx;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
padding-left: 20%;
|
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 {
|
.rank-icon-1 {
|
||||||
width: 72rpx;
|
width: 96rpx;
|
||||||
height: 88rpx;
|
height: 128rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rank-icon-2 {
|
.rank-icon-2 {
|
||||||
width: 64rpx;
|
width: 72rpx;
|
||||||
height: 78rpx;
|
height: 104rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rank-icon-3 {
|
.rank-icon-3 {
|
||||||
width: 56rpx;
|
width: 64rpx;
|
||||||
height: 68rpx;
|
height: 88rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.liked-cover-wrap {
|
.liked-cover-wrap {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// API 基础配置
|
// 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://192.168.110.60:8080'
|
||||||
// const baseURL = 'http://localhost:8080'
|
const baseURL = 'http://localhost:8080'
|
||||||
|
|
||||||
// 是否使用模拟数据(开发调试时设为 true,后端API准备好后改为 false)
|
// 是否使用模拟数据(开发调试时设为 true,后端API准备好后改为 false)
|
||||||
const USE_MOCK_API = false
|
const USE_MOCK_API = false
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user