Browse Source

点赞

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

1756
components/DynamicIsland.vue

File diff suppressed because it is too large

151
pages/index/iSoul.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="profile-container"> <view class="profile-container">
<BackButton /> <BackButton />
<view <view
class="user-top" class="user-top"
:style="{ :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="header">
<!-- <view class="back-btn" @click="goBack"> <!-- <view class="back-btn" @click="goBack">
@ -62,11 +65,11 @@
<view class="stat-label">关注</view> <view class="stat-label">关注</view>
</view> </view>
<view class="stat-item"> <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 class="stat-label">粉丝</view>
</view> </view>
<view class="stat-item"> <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 class="stat-label">点赞</view>
</view> </view>
<view class="stat-item"> <view class="stat-item">
@ -81,33 +84,39 @@
</view> --> </view> -->
</view> </view>
</view> </view>
<!-- 数字资产权益 --> <!-- 数字资产权益 -->
<view class="digital-assets"> <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-line"></view>
<view class="divider-text">我的数字资产权益</view> <view class="divider-text">我的数字资产权益</view>
<view class="divider-line"></view> <view class="divider-line"></view>
</view> </view>
<view class="action-box"> <view class="action-box">
<image <image
@click="showExchangePopup" @click="showExchangePopup"
src="https://des.dayunyuanjian.cn/data/2025/09/01/3ebc09d5-f526-40ab-b698-d45de81034b7.png" src="https://des.dayunyuanjian.cn/data/2025/09/01/3ebc09d5-f526-40ab-b698-d45de81034b7.png"
style="width: 233rpx; height: 40rpx" style="width: 233rpx; height: 40rpx"
></image> ></image>
<view class="column-divider"></view> <view class="column-divider"></view>
<image <image
@click="showActivateAgentPopup" @click="showActivateAgentPopup"
src="https://des.dayunyuanjian.cn/data/2025/09/01/6215d940-a57d-4a4f-a69b-df6770132d12.png" src="https://des.dayunyuanjian.cn/data/2025/09/01/6215d940-a57d-4a4f-a69b-df6770132d12.png"
style="width: 200rpx; height: 43.6rpx" style="width: 200rpx; height: 43.6rpx"
></image> ></image>
</view> </view>
<!-- 有数据时显示 --> <!-- 有数据时显示 -->
<view v-if="assetList.length > 0" class="asset-content"> <view v-if="assetList.length > 0" class="asset-content">
<!-- 单个数据时铺满显示 --> <!-- 单个数据时铺满显示 -->
<template v-if="assetList.length === 1"> <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"> <view class="single-card-wrapper">
<image <image
:src="showImgJdsz(assetList[0].image)" :src="showImgJdsz(assetList[0].image)"
@ -227,14 +236,17 @@
<!-- 有感商品 --> <!-- 有感商品 -->
<view class="feeling-goods"> <view class="feeling-goods">
<view class="memorial-divider" style="margin-bottom: 0;padding-top: 10rpx;"> <view
<view class="divider-line"></view> class="memorial-divider"
<view class="divider-text">我的有感商品</view> style="margin-bottom: 0; padding-top: 10rpx"
<view class="divider-line"></view> >
</view> <view class="divider-line"></view>
<view class="divider-text">我的有感商品</view>
<view class="divider-line"></view>
</view>
<view class="goods-card"> <view class="goods-card">
<image <image
@click="gotoPath('/subPackages/haveFeeling/list')" @click="gotoPath('/subPackages/haveFeeling/list')"
:src=" :src="
showImg('/uploads/20250729/a010feb51e3f195563fb440f9235cc8b.png') showImg('/uploads/20250729/a010feb51e3f195563fb440f9235cc8b.png')
" "
@ -259,7 +271,7 @@
</view> </view>
<!-- 数字资产纪念册 --> <!-- 数字资产纪念册 -->
<view class="memorial-section" style="padding-top: 10rpx;"> <view class="memorial-section" style="padding-top: 10rpx">
<view class="memorial-divider"> <view class="memorial-divider">
<view class="divider-line"></view> <view class="divider-line"></view>
<view class="divider-text">数字资产收藏夹</view> <view class="divider-text">数字资产收藏夹</view>
@ -395,7 +407,7 @@ export default {
CustomTabBar, CustomTabBar,
MusicControl, MusicControl,
ActivateAgentPopup, ActivateAgentPopup,
BackButton BackButton,
}, },
data() { data() {
return { return {
@ -416,15 +428,15 @@ export default {
title: "购物车", title: "购物车",
icon: "", icon: "",
}, },
{ {
title: "我的收藏", title: "我的收藏",
icon: "", icon: "",
}, },
{ {
title: "我的积分", title: "我的积分",
icon: "", icon: "",
}, },
{ {
title: "地址管理", title: "地址管理",
icon: "", icon: "",
@ -443,14 +455,14 @@ export default {
assetList: [], assetList: [],
agentList: [], agentList: [],
orderStatus: [], orderStatus: [],
statusBarHeight:0 statusBarHeight: 0,
}; };
}, },
onLoad() { onLoad() {
// //
}, },
mounted() { mounted() {
this.setStatusBarHeight() this.setStatusBarHeight();
}, },
onShow() { onShow() {
console.log(uni.getStorageSync("userInfo")); console.log(uni.getStorageSync("userInfo"));
@ -468,15 +480,15 @@ export default {
} }
}, },
methods: { methods: {
setStatusBarHeight() { setStatusBarHeight() {
try { try {
const systemInfo = uni.getSystemInfoSync(); const systemInfo = uni.getSystemInfoSync();
this.statusBarHeight = systemInfo.statusBarHeight || 0; this.statusBarHeight = systemInfo.statusBarHeight || 0;
} catch (e) { } catch (e) {
// 使 // 使
this.statusBarHeight = 0; this.statusBarHeight = 0;
} }
}, },
getOrderStatus() { getOrderStatus() {
this.Post({}, "/framework/order/orderCountByStatus", "DES").then( this.Post({}, "/framework/order/orderCountByStatus", "DES").then(
(res) => { (res) => {
@ -606,13 +618,12 @@ export default {
url: "/subPackages/user/collection", url: "/subPackages/user/collection",
}); });
break; break;
case "我的积分": case "我的积分":
uni.navigateTo({ uni.navigateTo({
url: "/subPackages/points/index", url: "/subPackages/points/index",
}); });
break; break;
case "帮助与客服": case "帮助与客服":
uni.showModal({ uni.showModal({
title: "客服电话", title: "客服电话",
@ -649,21 +660,21 @@ export default {
} }
}, },
handleAction(item) { handleAction(item) {
console.log(item) console.log(item);
if (item.type == 1) { if (item.type == 1) {
uni.navigateTo({ uni.navigateTo({
url: "/subPackages/memorialAlbum/detail?id=" + item.childId, url: "/subPackages/memorialAlbum/detail?id=" + item.childId,
}); });
} else if (item.type == 2) { } else if (item.type == 2) {
if (item.isVerify == 0) { if (item.isVerify == 0) {
uni.navigateTo({ uni.navigateTo({
url: `/subPackages/orderQy/confrim?goodsId=${item.goodsId}&orderChildId=${item.childId}`, url: `/subPackages/orderQy/confrim?goodsId=${item.goodsId}&orderChildId=${item.childId}`,
}); });
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: `/subPackages/orderQy/confrimWriteOff?goodsId=${item.goodsId}&orderChildId=${item.childId}`, url: `/subPackages/orderQy/confrimWriteOff?goodsId=${item.goodsId}&orderChildId=${item.childId}`,
}); });
} }
} else { } else {
this.toJdszWx( this.toJdszWx(
"pages/user/order/sceneOrderInfo/index?id=" + item.thirdOrderId "pages/user/order/sceneOrderInfo/index?id=" + item.thirdOrderId
@ -733,10 +744,10 @@ export default {
}); });
break; break;
default: default:
uni.showToast({ uni.showToast({
title:'功能暂未开放', title: "功能暂未开放",
icon:'none' icon: "none",
}) });
} }
}, },
// //
@ -807,8 +818,8 @@ export default {
::v-deep .uni-popup { ::v-deep .uni-popup {
z-index: 999 !important; z-index: 999 !important;
} }
::v-deep .back-btn{ ::v-deep .back-btn {
background-color: transparent !important; background-color: transparent !important;
} }
view { view {
box-sizing: border-box; box-sizing: border-box;
@ -1296,9 +1307,9 @@ view {
margin-bottom: 16rpx; margin-bottom: 16rpx;
font-weight: bold; font-weight: bold;
line-height: 1.4; line-height: 1.4;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
} }
.asset-action { .asset-action {

136
pages/notes/detail.vue

@ -107,12 +107,12 @@
> >
<image <image
class="comment-avatar" class="comment-avatar"
:src="showImg(comment.user.avatar)" :src="showImg(comment.headImg)"
mode="aspectFill" mode="aspectFill"
/> />
<view class="comment-content"> <view class="comment-content">
<view class="comment-header"> <view class="comment-header">
<text class="comment-user">{{ comment.user.name }}</text> <text class="comment-user">{{ comment.nickname }}</text>
<text class="comment-time">{{ <text class="comment-time">{{
formatTime(comment.createTime) formatTime(comment.createTime)
}}</text> }}</text>
@ -120,6 +120,23 @@
<text class="comment-text">{{ comment.content }}</text> <text class="comment-text">{{ comment.content }}</text>
</view> </view>
</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> </view>
<!-- 底部占位 --> <!-- 底部占位 -->
@ -171,12 +188,22 @@ export default {
components: { components: {
headerVue, headerVue,
}, },
onReachBottom() {
//
if (this.hasMoreComments && !this.loadingComments) {
this.loadCommentList(true);
}
},
data() { data() {
return { return {
noteId: "", noteId: "",
commentText: "", commentText: "",
topBanner: [], topBanner: [],
swiperIndex: 0, swiperIndex: 0,
pageNum: 1,
pageSize: 10,
hasMoreComments: true,
loadingComments: false,
noteDetail: { noteDetail: {
id: "", id: "",
title: "", title: "",
@ -226,6 +253,9 @@ export default {
console.log(this.noteDetail.tagNames); console.log(this.noteDetail.tagNames);
// //
this.topBanner = this.noteDetail.coverImage.split(","); this.topBanner = this.noteDetail.coverImage.split(",");
//
await this.loadCommentList();
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg || "加载失败", title: res.msg || "加载失败",
@ -242,6 +272,70 @@ export default {
uni.hideLoading(); 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) { previewImage(imageUrl) {
uni.previewImage({ uni.previewImage({
@ -321,12 +415,12 @@ export default {
} }
// timeShopBank // timeShopBank
uni.$emit('note-like-change', { uni.$emit("note-like-change", {
noteId: this.noteId, noteId: this.noteId,
isLiked: this.noteDetail.userLiked, isLiked: this.noteDetail.userLiked,
likeCount: this.noteDetail.likeCount likeCount: this.noteDetail.likeCount,
}); });
// //
} else { } else {
// UI // UI
@ -366,19 +460,20 @@ export default {
uni.showLoading({ title: "提交中..." }); uni.showLoading({ title: "提交中..." });
const res = await this.Post( const res = await this.Post(
{ {
method: "POST",
noteId: this.noteId, noteId: this.noteId,
content: this.commentText, content: this.commentText,
method: "POST",
}, },
"/framework/note/comment/add", "/framework/comment/addComment",
"DES" "DES"
); );
if (res.code === 200) { if (res.code === 200) {
// //
this.loadNoteDetail();
this.commentText = ""; this.commentText = "";
//
await this.loadCommentList();
uni.showToast({ uni.showToast({
title: "评论成功", title: "评论成功",
icon: "success", icon: "success",
@ -692,6 +787,27 @@ export default {
padding-bottom: calc(24rpx + constant(safe-area-inset-bottom)); padding-bottom: calc(24rpx + constant(safe-area-inset-bottom));
box-sizing: content-box; 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 { .banner-content {
width: 100%; width: 100%;
height: 1000rpx; height: 1000rpx;

Loading…
Cancel
Save