Browse Source

点赞

dev_des
1054425342@qq.com 4 weeks ago
parent
commit
1951e9da29
  1. 220
      components/DynamicIsland.vue
  2. 43
      pages/index/iSoul.vue
  3. 134
      pages/notes/detail.vue

220
components/DynamicIsland.vue

@ -1,10 +1,19 @@
<template>
<!-- 灵动岛占位区域 - 始终存在但控制可见性 -->
<view class="dynamic-island-placeholder" :class="{ visible: isScrolled }" :style="{ height: 216 + 'rpx' }">
<view class="dynamic-island" :class="{
<view
class="dynamic-island-placeholder"
:class="{ visible: isScrolled }"
:style="{ height: 216 + 'rpx' }"
>
<view
class="dynamic-island"
:class="{
compact: actualCompactState,
fixed: isFixed,
}" :style="{ top: isFixed ? fixedTopPosition + 'px' : 0 }" @click="handleToggle">
}"
:style="{ top: isFixed ? fixedTopPosition + 'px' : 0 }"
@click="handleToggle"
>
<!-- 展开状态 -->
<view v-if="!actualCompactState" class="expanded-content">
<template>
@ -14,19 +23,29 @@
<!-- 右侧头像和链接 -->
<view class="right-section">
<view class="avatar-container" @click="toWebView">
<image class="avatar"
<image
class="avatar"
src="https://epic.js-dyyj.com/uploads/20250826/92b0a21e9125fc21ca294a408bf3508f.png"
mode="aspectFill"></image>
mode="aspectFill"
></image>
<view class="ai-label">智能体</view>
</view>
<view class=""
style="display: flex;flex-direction: column;justify-content: space-between;height: 100%;">
<view
class=""
style="
display: flex;
flex-direction: column;
justify-content: space-between;
height: 100%;
"
>
<view class="profile-info">
<text class="profile-title">数字领航员</text>
<text class="profile-name">EVITA</text>
</view>
<view class="platform-link">
<view class="link-text" @click="toDesInfo">交响介绍 >>
<view class="link-text" @click="toDesInfo"
>交响介绍 >>
</view>
<!-- <view class="link-text">DES广播 >></view> -->
</view>
@ -37,102 +56,168 @@
<!-- 左侧欢迎信息 -->
<view class="left-section">
<view class="welcome-message">
<view class="welcome-text">Hi! {{
<view class="welcome-text"
>Hi!
{{
userInfo && userInfo.token ? userInfo.nickname : "用户"
}}欢迎回来~</view>
}}欢迎回来~</view
>
</view>
<view class="" style="font-size: 24rpx;font-weight: bold;color: #000000;">
<view
class=""
style="font-size: 24rpx; font-weight: bold; color: #000000"
>
查看您的交响数据文化资产行
</view>
<view class=""
style="display: flex;align-items: flex-end;justify-content: space-between;">
<view
class=""
style="
display: flex;
align-items: flex-end;
justify-content: space-between;
"
>
<view class="" @click="toOrder">
<view class="stats-info">
<text
class="stats-number">{{userInfo&&userInfo.unUseOrderQuantity||0}}</text>
<text class="stats-number">{{
(userInfo && userInfo.unUseOrderQuantity) || 0
}}</text>
<text class="stats-unit"></text>
</view>
<view class="stats-label">交响权益行</view>
</view>
<div @click="toTime">
<view class="stats-info">
<text class="stats-number">{{userInfo&&userInfo.ipQuantity||0}}</text>
<text class="stats-number">{{
(userInfo && userInfo.ipQuantity) || 0
}}</text>
<text class="stats-unit"></text>
</view>
<view class="stats-label">交响资产行</view>
</div>
<view class="middle-section">
<view class="time-reward-container" @click="toPoint">
<text class="time-reward-title" style="margin-bottom: 5rpx;">时间奖励</text>
<text
class="time-reward-title"
style="margin-bottom: 5rpx"
>时间奖励</text
>
<view class="time-reward-stats">
<text class="time-reward-number">{{ userInfo && userInfo.token ? userInfo.hourValue||0:0}}</text>
<text class="time-reward-number">{{
userInfo && userInfo.token
? userInfo.hourValue || 0
: 0
}}</text>
<text class="time-reward-unit"></text>
</view>
<text class="time-reward-label" style="font-weight: bold;">交响时间行</text>
<text class="time-reward-label" style="font-weight: bold"
>交响时间行</text
>
</view>
</view>
</view>
</view>
</view>
</template>
<template v-if="styleType == 'timeShop'">
<view class="bottom-section">
<view class="" style="flex:1;">
<view class="" style="display: flex;">
<view class="time-reward-container" style="width: 200rpx;" @click="toPoint">
<view class="" style="flex: 1">
<view class="" style="display: flex">
<view
class="time-reward-container"
style="width: 200rpx"
@click="toPoint"
>
<text class="time-reward-title">时间奖励</text>
<view class="time-reward-stats">
<text class="time-reward-number">{{
userInfo && userInfo.token ? (userInfo.hourValue||0):0
userInfo && userInfo.token ? userInfo.hourValue || 0 : 0
}}</text>
<text class="time-reward-unit"></text>
</view>
<text class="time-reward-label"
style="font-size: 24rpx;font-weight: bold;">交响时间行</text>
<text
class="time-reward-label"
style="font-size: 24rpx; font-weight: bold"
>交响时间行</text
>
</view>
<view class="">
<view class="time-reward-number" style="font-size: 34rpx;">
<view class="time-reward-number" style="font-size: 34rpx">
{{
userInfo && userInfo.token ? userInfo.nickname : "用户"
}}
</view>
<view class="time-reward-label" @click="toPoint"
style="margin-top: 15rpx;font-weight: bold;font-size: 26rpx;">
积分:{{totalPoints||0}}<text
<view
class="time-reward-label"
@click="toPoint"
style="
margin-top: 15rpx;
font-weight: bold;
font-size: 26rpx;
"
>
积分:{{ totalPoints || 0
}}<text
@click.stop="pointDetail"
style="color: #999999;font-size: 22rpx;margin-left: 10rpx;">积分获取规则</text>
style="
color: #999999;
font-size: 22rpx;
margin-left: 10rpx;
"
>积分获取规则</text
>
</view>
</view>
</view>
<view class=""
style="display: flex;align-items: center;font-size: 26rpx;font-weight: bold;display: flex;align-items: center;margin-top: 20rpx;">
<view class="" style="width: 200rpx;">
<view
class=""
style="
display: flex;
align-items: center;
font-size: 26rpx;
font-weight: bold;
display: flex;
align-items: center;
margin-top: 20rpx;
"
>
<view class="" style="width: 200rpx">
时长:{{
userInfo && userInfo.token ? userInfo.hour || 0 : 0
}}h
</view>
<view class="">
<image style="width: 22rpx;height: 22rpx;margin-right: 15rpx;"
:src="showImg('/uploads/20250822/c8ee7615823a1ffaba400a4d5746de9a.png')">
<image
style="width: 22rpx; height: 22rpx; margin-right: 15rpx"
:src="
showImg(
'/uploads/20250822/c8ee7615823a1ffaba400a4d5746de9a.png'
)
"
>
</image>
点赞:0
点赞:{{ (userInfo && userInfo.likeCount) || 0 }}
</view>
<view class="">
<image style="width: 22rpx;height: 22rpx;margin: 0 15rpx;"
:src="showImg('/uploads/20250822/84c49f78f1c86b7340aaaa391bd4b7cf.png')">
<image
style="width: 22rpx; height: 22rpx; margin: 0 15rpx"
:src="
showImg(
'/uploads/20250822/84c49f78f1c86b7340aaaa391bd4b7cf.png'
)
"
>
</image>
留言:0
</view>
</view>
</view>
<image class="avatar" @click="toWebView"
<image
class="avatar"
@click="toWebView"
src="https://epic.js-dyyj.com/uploads/20250826/92b0a21e9125fc21ca294a408bf3508f.png"
mode="aspectFill"></image>
mode="aspectFill"
></image>
</view>
</template>
</template>
@ -141,9 +226,11 @@
<!-- 紧凑状态 -->
<view v-else class="compact-content">
<text class="compact-name">{{ getCompactName() }}</text>
<image class="compact-avatar"
<image
class="compact-avatar"
src="https://epic.js-dyyj.com/uploads/20250826/92b0a21e9125fc21ca294a408bf3508f.png"
mode="aspectFill"></image>
mode="aspectFill"
></image>
</view>
</view>
</view>
@ -196,7 +283,7 @@
currentAvatar: "https://picsum.photos/80/80",
currentAction: "激活你的Agent",
userInfo: {},
totalPoints: 0
totalPoints: 0,
};
},
computed: {
@ -307,13 +394,13 @@
},
toOrder() {
uni.switchTab({
url: '/pages/index/iSoul'
})
url: "/pages/index/iSoul",
});
},
toTime() {
uni.switchTab({
url: '/pages/index/timeShopBank'
})
url: "/pages/index/timeShopBank",
});
},
getCompactName() {
//
@ -324,8 +411,8 @@
},
toPoint() {
uni.navigateTo({
url: '/subPackages/points/index'
})
url: "/subPackages/points/index",
});
},
getStatNumber(type) {
//
@ -356,18 +443,20 @@
this.userInfo =
(uni.getStorageSync("userInfo") &&
JSON.parse(uni.getStorageSync("userInfo"))) ||
this.$store.state.user.userInfo || {};
this.$store.state.user.userInfo ||
{};
console.log(this.userInfo, "this.userInfo");
//
if (this.userInfo && this.userInfo.nickname) {
this.currentTitle = `Hi!${this.userInfo.nickname},欢迎回来~`;
this.Post({}, '/framework/points/getLastBalance', 'DES').then(res => {
this.Post({}, "/framework/points/getLastBalance", "DES").then(
(res) => {
if (res.code === 200) {
this.totalPoints = res.data.balance || 0;
}
})
}
);
}
} catch (e) {
console.warn("获取用户信息失败:", e);
this.userInfo = {};
@ -379,21 +468,20 @@
// "https://des.dayunyuanjian.cn/dist/#/",
// });
uni.navigateTo({
url: '/subPackages/other/evita?id=0'
})
url: "/subPackages/other/evita?id=0",
});
},
toDesInfo() {
uni.navigateTo({
url: '/subPackages/other/introduction'
})
url: "/subPackages/other/introduction",
});
},
pointDetail() {
uni.navigateTo({
url:'/subPackages/user/privacyInfo?id=10222'
})
}
url: "/subPackages/user/privacyInfo?id=10222",
});
},
},
};
</script>

43
pages/index/iSoul.vue

@ -10,7 +10,10 @@
}"
>
<!-- 状态栏占位 -->
<view class="status-bar-placeholder" :style="{ paddingTop: statusBarHeight + 'px' }"></view>
<view
class="status-bar-placeholder"
:style="{ paddingTop: statusBarHeight + 'px' }"
></view>
<!-- 顶部导航 -->
<view class="header">
<!-- <view class="back-btn" @click="goBack">
@ -62,11 +65,11 @@
<view class="stat-label">关注</view>
</view>
<view class="stat-item">
<view class="stat-number">{{ userStats.followers || "0" }}</view>
<view class="stat-number">{{ userInfo.followers || "0" }}</view>
<view class="stat-label">粉丝</view>
</view>
<view class="stat-item">
<view class="stat-number">{{ userStats.likes || "0" }}</view>
<view class="stat-number">{{ userInfo.likeCount || "0" }}</view>
<view class="stat-label">点赞</view>
</view>
<view class="stat-item">
@ -82,10 +85,12 @@
</view>
</view>
<!-- 数字资产权益 -->
<view class="digital-assets">
<view class="memorial-divider" style="margin-bottom: 0;padding-top: 60rpx;">
<view
class="memorial-divider"
style="margin-bottom: 0; padding-top: 60rpx"
>
<view class="divider-line"></view>
<view class="divider-text">我的数字资产权益</view>
<view class="divider-line"></view>
@ -107,7 +112,11 @@
<view v-if="assetList.length > 0" class="asset-content">
<!-- 单个数据时铺满显示 -->
<template v-if="assetList.length === 1">
<view style="margin-bottom: 20rpx;" class="asset-card-single" @click="handleAction(assetList[0])">
<view
style="margin-bottom: 20rpx"
class="asset-card-single"
@click="handleAction(assetList[0])"
>
<view class="single-card-wrapper">
<image
:src="showImgJdsz(assetList[0].image)"
@ -227,7 +236,10 @@
<!-- 有感商品 -->
<view class="feeling-goods">
<view class="memorial-divider" style="margin-bottom: 0;padding-top: 10rpx;">
<view
class="memorial-divider"
style="margin-bottom: 0; padding-top: 10rpx"
>
<view class="divider-line"></view>
<view class="divider-text">我的有感商品</view>
<view class="divider-line"></view>
@ -259,7 +271,7 @@
</view>
<!-- 数字资产纪念册 -->
<view class="memorial-section" style="padding-top: 10rpx;">
<view class="memorial-section" style="padding-top: 10rpx">
<view class="memorial-divider">
<view class="divider-line"></view>
<view class="divider-text">数字资产收藏夹</view>
@ -395,7 +407,7 @@ export default {
CustomTabBar,
MusicControl,
ActivateAgentPopup,
BackButton
BackButton,
},
data() {
return {
@ -443,14 +455,14 @@ export default {
assetList: [],
agentList: [],
orderStatus: [],
statusBarHeight:0
statusBarHeight: 0,
};
},
onLoad() {
//
},
mounted() {
this.setStatusBarHeight()
this.setStatusBarHeight();
},
onShow() {
console.log(uni.getStorageSync("userInfo"));
@ -612,7 +624,6 @@ export default {
});
break;
case "帮助与客服":
uni.showModal({
title: "客服电话",
@ -649,7 +660,7 @@ export default {
}
},
handleAction(item) {
console.log(item)
console.log(item);
if (item.type == 1) {
uni.navigateTo({
url: "/subPackages/memorialAlbum/detail?id=" + item.childId,
@ -734,9 +745,9 @@ export default {
break;
default:
uni.showToast({
title:'功能暂未开放',
icon:'none'
})
title: "功能暂未开放",
icon: "none",
});
}
},
//

134
pages/notes/detail.vue

@ -107,12 +107,12 @@
>
<image
class="comment-avatar"
:src="showImg(comment.user.avatar)"
:src="showImg(comment.headImg)"
mode="aspectFill"
/>
<view class="comment-content">
<view class="comment-header">
<text class="comment-user">{{ comment.user.name }}</text>
<text class="comment-user">{{ comment.nickname }}</text>
<text class="comment-time">{{
formatTime(comment.createTime)
}}</text>
@ -120,6 +120,23 @@
<text class="comment-text">{{ comment.content }}</text>
</view>
</view>
<!-- 加载更多提示 -->
<view class="loading-more" v-if="loadingComments">
<text>加载中...</text>
</view>
<view
class="no-more-comments"
v-if="!hasMoreComments && noteDetail.comments.length > 0"
>
<text>没有更多评论了</text>
</view>
<view
class="no-comments"
v-if="!hasMoreComments && noteDetail.comments.length === 0"
>
<text>暂无评论快来发表第一条评论吧</text>
</view>
</view>
<!-- 底部占位 -->
@ -171,12 +188,22 @@ export default {
components: {
headerVue,
},
onReachBottom() {
//
if (this.hasMoreComments && !this.loadingComments) {
this.loadCommentList(true);
}
},
data() {
return {
noteId: "",
commentText: "",
topBanner: [],
swiperIndex: 0,
pageNum: 1,
pageSize: 10,
hasMoreComments: true,
loadingComments: false,
noteDetail: {
id: "",
title: "",
@ -226,6 +253,9 @@ export default {
console.log(this.noteDetail.tagNames);
//
this.topBanner = this.noteDetail.coverImage.split(",");
//
await this.loadCommentList();
} else {
uni.showToast({
title: res.msg || "加载失败",
@ -242,6 +272,70 @@ export default {
uni.hideLoading();
}
},
//
async loadCommentList(isLoadMore = false) {
if (this.loadingComments) return;
try {
this.loadingComments = true;
//
if (!isLoadMore) {
this.pageNum = 1;
this.hasMoreComments = true;
}
const res = await this.Post(
{
pageSize: this.pageSize,
pageNum: this.pageNum,
noteId: this.noteId,
},
"/framework/comment/pageList",
"DES"
);
if (res.code === 200) {
//
if (isLoadMore) {
//
this.noteDetail.comments = [
...this.noteDetail.comments,
...(res.rows || []),
];
} else {
//
this.noteDetail.comments = res.rows || [];
}
//
this.noteDetail.commentCount = res.total || 0;
//
this.hasMoreComments = this.noteDetail.comments.length < res.total;
// 1
if (this.hasMoreComments) {
this.pageNum++;
}
} else {
console.error("加载评论列表失败:", res.msg);
uni.showToast({
title: res.msg || "加载评论失败",
icon: "none",
});
}
} catch (error) {
console.error("加载评论列表失败:", error);
uni.showToast({
title: "加载评论失败",
icon: "none",
});
} finally {
this.loadingComments = false;
}
},
//
previewImage(imageUrl) {
uni.previewImage({
@ -321,10 +415,10 @@ export default {
}
// timeShopBank
uni.$emit('note-like-change', {
uni.$emit("note-like-change", {
noteId: this.noteId,
isLiked: this.noteDetail.userLiked,
likeCount: this.noteDetail.likeCount
likeCount: this.noteDetail.likeCount,
});
//
@ -366,19 +460,20 @@ export default {
uni.showLoading({ title: "提交中..." });
const res = await this.Post(
{
method: "POST",
noteId: this.noteId,
content: this.commentText,
method: "POST",
},
"/framework/note/comment/add",
"/framework/comment/addComment",
"DES"
);
if (res.code === 200) {
//
this.loadNoteDetail();
//
this.commentText = "";
//
await this.loadCommentList();
uni.showToast({
title: "评论成功",
icon: "success",
@ -692,6 +787,27 @@ export default {
padding-bottom: calc(24rpx + constant(safe-area-inset-bottom));
box-sizing: content-box;
}
//
.loading-more,
.no-more-comments,
.no-comments {
text-align: center;
padding: 30rpx 0;
text {
font-size: 28rpx;
color: #999;
}
}
.no-comments {
padding: 60rpx 0;
text {
font-size: 30rpx;
}
}
.banner-content {
width: 100%;
height: 1000rpx;

Loading…
Cancel
Save