Browse Source

点赞

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

1754
components/DynamicIsland.vue

File diff suppressed because it is too large

147
pages/index/iSoul.vue

@ -1,6 +1,6 @@
<template>
<view class="profile-container">
<BackButton />
<BackButton />
<view
class="user-top"
:style="{
@ -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,32 +85,38 @@
</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>
</view>
<view class="action-box">
<image
@click="showExchangePopup"
src="https://des.dayunyuanjian.cn/data/2025/09/01/3ebc09d5-f526-40ab-b698-d45de81034b7.png"
style="width: 233rpx; height: 40rpx"
></image>
<view class="column-divider"></view>
<image
@click="showActivateAgentPopup"
src="https://des.dayunyuanjian.cn/data/2025/09/01/6215d940-a57d-4a4f-a69b-df6770132d12.png"
style="width: 200rpx; height: 43.6rpx"
></image>
</view>
<view class="action-box">
<image
@click="showExchangePopup"
src="https://des.dayunyuanjian.cn/data/2025/09/01/3ebc09d5-f526-40ab-b698-d45de81034b7.png"
style="width: 233rpx; height: 40rpx"
></image>
<view class="column-divider"></view>
<image
@click="showActivateAgentPopup"
src="https://des.dayunyuanjian.cn/data/2025/09/01/6215d940-a57d-4a4f-a69b-df6770132d12.png"
style="width: 200rpx; height: 43.6rpx"
></image>
</view>
<!-- 有数据时显示 -->
<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,14 +236,17 @@
<!-- 有感商品 -->
<view class="feeling-goods">
<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>
</view>
<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>
</view>
<view class="goods-card">
<image
@click="gotoPath('/subPackages/haveFeeling/list')"
@click="gotoPath('/subPackages/haveFeeling/list')"
:src="
showImg('/uploads/20250729/a010feb51e3f195563fb440f9235cc8b.png')
"
@ -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 {
@ -421,10 +433,10 @@ export default {
title: "我的收藏",
icon: "",
},
{
title: "我的积分",
icon: "",
},
{
title: "我的积分",
icon: "",
},
{
title: "地址管理",
icon: "",
@ -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"));
@ -468,15 +480,15 @@ export default {
}
},
methods: {
setStatusBarHeight() {
try {
const systemInfo = uni.getSystemInfoSync();
this.statusBarHeight = systemInfo.statusBarHeight || 0;
} catch (e) {
// 使
this.statusBarHeight = 0;
}
},
setStatusBarHeight() {
try {
const systemInfo = uni.getSystemInfoSync();
this.statusBarHeight = systemInfo.statusBarHeight || 0;
} catch (e) {
// 使
this.statusBarHeight = 0;
}
},
getOrderStatus() {
this.Post({}, "/framework/order/orderCountByStatus", "DES").then(
(res) => {
@ -606,12 +618,11 @@ export default {
url: "/subPackages/user/collection",
});
break;
case "我的积分":
uni.navigateTo({
url: "/subPackages/points/index",
});
break;
case "我的积分":
uni.navigateTo({
url: "/subPackages/points/index",
});
break;
case "帮助与客服":
uni.showModal({
@ -649,21 +660,21 @@ export default {
}
},
handleAction(item) {
console.log(item)
console.log(item);
if (item.type == 1) {
uni.navigateTo({
url: "/subPackages/memorialAlbum/detail?id=" + item.childId,
});
} else if (item.type == 2) {
if (item.isVerify == 0) {
uni.navigateTo({
url: `/subPackages/orderQy/confrim?goodsId=${item.goodsId}&orderChildId=${item.childId}`,
});
} else {
uni.navigateTo({
url: `/subPackages/orderQy/confrimWriteOff?goodsId=${item.goodsId}&orderChildId=${item.childId}`,
});
}
if (item.isVerify == 0) {
uni.navigateTo({
url: `/subPackages/orderQy/confrim?goodsId=${item.goodsId}&orderChildId=${item.childId}`,
});
} else {
uni.navigateTo({
url: `/subPackages/orderQy/confrimWriteOff?goodsId=${item.goodsId}&orderChildId=${item.childId}`,
});
}
} else {
this.toJdszWx(
"pages/user/order/sceneOrderInfo/index?id=" + item.thirdOrderId
@ -733,10 +744,10 @@ export default {
});
break;
default:
uni.showToast({
title:'功能暂未开放',
icon:'none'
})
uni.showToast({
title: "功能暂未开放",
icon: "none",
});
}
},
//
@ -807,8 +818,8 @@ export default {
::v-deep .uni-popup {
z-index: 999 !important;
}
::v-deep .back-btn{
background-color: transparent !important;
::v-deep .back-btn {
background-color: transparent !important;
}
view {
box-sizing: border-box;
@ -1296,9 +1307,9 @@ view {
margin-bottom: 16rpx;
font-weight: bold;
line-height: 1.4;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.asset-action {

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