From ca86d667d5348e19a0857a9ffb9c856ff0b1c785 Mon Sep 17 00:00:00 2001 From: "1054425342@qq.com" <1054425342@qq.com> Date: Tue, 26 Aug 2025 14:20:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E6=B3=A8=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/DynamicIsland.vue | 8 +- components/ProductSection.vue | 6 +- components/WaterfallLayout.vue | 2 + pages/index/components/FollowTab.vue | 553 +++++++++++ pages/index/iSoul.vue | 13 +- pages/index/timeShopBank.vue | 146 ++- pages/notes/detail.vue | 568 +++++------ static/image/empty-cart.png | 3 + static/image/search.png | 2 + static/js/CommonFunction.js | 13 + subPackages/equityGoods/detail.vue | 28 +- subPackages/orderQy/detail.vue | 5 +- subPackages/orderQy/list.vue | 5 +- subPackages/user/gwc.vue | 1377 ++++++++++++++++---------- 14 files changed, 1810 insertions(+), 919 deletions(-) create mode 100644 pages/index/components/FollowTab.vue create mode 100644 static/image/empty-cart.png create mode 100644 static/image/search.png diff --git a/components/DynamicIsland.vue b/components/DynamicIsland.vue index 7231fc2..9af0a91 100644 --- a/components/DynamicIsland.vue +++ b/components/DynamicIsland.vue @@ -62,7 +62,7 @@ 时间奖励 - 120 + 0 旅行时间行 @@ -84,7 +84,7 @@ 时间奖励 - 120 + 0 - 点赞:120 + 点赞:0 - 留言:120 + 留言:0 diff --git a/components/ProductSection.vue b/components/ProductSection.vue index a3799b5..7406beb 100644 --- a/components/ProductSection.vue +++ b/components/ProductSection.vue @@ -50,6 +50,7 @@ {{ item.title }} ¥{{ item.price }} + + + + + diff --git a/pages/index/iSoul.vue b/pages/index/iSoul.vue index c7744bb..591cdd4 100644 --- a/pages/index/iSoul.vue +++ b/pages/index/iSoul.vue @@ -43,19 +43,19 @@ - {{ userStats.following || "140" }} + {{ userStats.following || "0" }} 关注 - {{ userStats.followers || "2462" }} + {{ userStats.followers || "0" }} 粉丝 - {{ userStats.likes || "5.4万" }} + {{ userStats.likes || "0" }} 点赞 - {{ userStats.likes || "5.4万" }} + {{ userStats.likes || "0" }} 收藏 @@ -501,10 +501,7 @@ url: `/subPackages/orderQy/confrim?goodsId=${item.goodsId}&orderChildId=${item.childId}`, }); } else { - uni.showToast({ - title: "使用门票", - icon: "none", - }); + this.toJdszWx('pages/user/order/sceneOrderInfo/index??id='+item.thirdOrderId) } }, diff --git a/pages/index/timeShopBank.vue b/pages/index/timeShopBank.vue index dd72872..0fcc782 100644 --- a/pages/index/timeShopBank.vue +++ b/pages/index/timeShopBank.vue @@ -4,7 +4,11 @@ - + @@ -22,23 +26,41 @@ - - - - - + + + + + + + + - - + + + + + + + + + + 推荐功能开发中... + + - - - - - - {{ noteDetail.user.name }} - {{ - formatTime(noteDetail.createTime) - }} - - - - - - - {{ noteDetail.title }} - - - - - - - - - - {{ noteDetail.content }} - - - - - - #{{ tag }} + + + + + + + - - - - - {{ noteDetail.likes }} + + + + + + + + + {{ noteDetail.user.name }} + + + + + + {{ noteDetail.title }} - - - {{ noteDetail.collects }} + + + + + #{{ tag }} + - - - 分享 + + + + {{ noteDetail.content }} + + + @@ -91,7 +92,7 @@ > @@ -102,14 +103,6 @@ }} {{ comment.content }} - - - - - - @@ -119,20 +112,32 @@ - - - + + + + + + @@ -149,6 +154,8 @@ export default { return { noteId: "", commentText: "", + topBanner: ["/uploads/20250826/17356ed4dcdeedcd13de60ca28909d22.png"], + swiperIndex: 0, noteDetail: { id: "", title: "", @@ -156,9 +163,7 @@ export default { image: "", tags: [], likes: 0, - collects: 0, isLiked: false, - isCollected: false, createTime: "", user: { id: "", @@ -179,6 +184,9 @@ export default { } }, methods: { + swiperChange(e) { + this.swiperIndex = e.detail.current; + }, // 加载笔记详情 async loadNoteDetail() { try { @@ -201,48 +209,43 @@ export default { loadMockData() { this.noteDetail = { id: "mock001", - title: "这里是用户发布内容的标题", + title: "首期「桃园山河令」", content: - "这里是用户发布的内容这里是用户发布的内容这里是用户发布的内容这里是用户发布的内容这里是用户发布的内容这里是用户发布的内容这里是用户发布的内容这里是用户发布的内容这里是用户发布的内容这里是用户发布的内容这里是用户发布的内容这里是用户发布的内容这里是用户发布的内容这里是用户发布的内容这里是用户发布的内容这里是用户发布的内容这里是用户发布的内容这里是用户发布的内容这里是用户发布的内容", - image: "https://picsum.photos/800/600", - tags: ["时间力", "阅读体验"], - likes: 128, - collects: 64, + "一周前,我们种下了一片想象中的桃园,并向江湖发出了一封「桃园山河令」,邀请你来分享属于自己的“桃园时刻”。未曾想到,这片初生的桃园,会迎来五湖四海如此多的“桃园客”——这是我们想送给每一位「EpicSoul交响」星球上「三个桃子」粉丝的名字。这些回响,来自每一位被「三个桃子」IP故事所触动的你。因为是你们,用一个个真实、温暖的故事,让我们想象中的那片桃园,迅速地枝繁叶茂,长满了沉甸甸的果实。", + image: "https://static.ticket.sz-trip.com/epicSoul/canal-town.jpg", + tags: ["时间里的约定", "审美", "治愈系调色"], + likes: 30, isLiked: false, - isCollected: false, - createTime: "2024-01-15 14:30:00", + createTime: "2025-08-20 14:30:00", user: { id: "user001", - name: "杨璐摄影", - avatar: - "https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?auto=format&fit=crop&w=100", + name: "发布者", + avatar: "/uploads/20250826/b4b7c64ce37481e75742454c037e6407.png", isFollowed: false, }, comments: [ { id: "comment001", - content: "很棒的分享,学到了很多!", - likes: 5, - isLiked: false, - createTime: "2024-01-15 15:00:00", + content: + "我的「桃园时刻」是和发小一起玩耍,阳光透过桃叶洒下斑驳光影,空气中弥漫着桃子的香甜。我们一起摘桃子,分享秘密,笑声在桃园里回荡。", + createTime: "2025-08-20 15:00:00", user: { id: "user002", - name: "读书爱好者", + name: "@小新", avatar: - "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?auto=format&fit=crop&w=100", + "/uploads/20250826/d68433653e8b8cceba9bc4a6ab2a394d.png", }, }, { id: "comment002", - content: "感谢分享,很有启发性的内容", - likes: 3, - isLiked: false, - createTime: "2024-01-15 16:20:00", + content: + "我的「桃园时刻」是和家人一起野餐,在桃树下享受美食,孩子们在周围嬉戏,欢声笑语让时光变得缓慢而美好。", + createTime: "2025-08-20 16:20:00", user: { id: "user003", - name: "时间管理达人", + name: "Mr.曾", avatar: - "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?auto=format&fit=crop&w=100", + "/uploads/20250826/d68433653e8b8cceba9bc4a6ab2a394d.png", }, }, ], @@ -272,31 +275,6 @@ export default { this.noteDetail.likes += this.noteDetail.isLiked ? 1 : -1; }, - // 切换收藏状态 - toggleCollect() { - this.noteDetail.isCollected = !this.noteDetail.isCollected; - this.noteDetail.collects += this.noteDetail.isCollected ? 1 : -1; - }, - - // 显示分享菜单 - showShareMenu() { - uni.share({ - provider: "weixin", - scene: "WXSceneSession", - type: 0, - href: `https://example.com/notes/${this.noteDetail.id}`, - title: this.noteDetail.title, - summary: this.noteDetail.content.substring(0, 100), - imageUrl: this.noteDetail.image, - }); - }, - - // 切换评论点赞 - toggleCommentLike(comment) { - comment.isLiked = !comment.isLiked; - comment.likes += comment.isLiked ? 1 : -1; - }, - // 提交评论 async submitComment() { if (!this.commentText.trim()) { @@ -306,14 +284,12 @@ export default { const newComment = { id: "comment" + Date.now(), content: this.commentText, - likes: 0, - isLiked: false, createTime: new Date().toISOString(), user: { id: "current_user", - name: "当前用户", + name: "我", avatar: - "https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?auto=format&fit=crop&w=100", + "https://static.ticket.sz-trip.com/epicSoul/avatar-current.png", }, }; @@ -329,18 +305,10 @@ export default { // 格式化时间 formatTime(timeString) { const time = new Date(timeString); - const now = new Date(); - const diff = now.getTime() - time.getTime(); - - if (diff < 60 * 1000) { - return "刚刚"; - } else if (diff < 60 * 60 * 1000) { - return Math.floor(diff / (60 * 1000)) + "分钟前"; - } else if (diff < 24 * 60 * 60 * 1000) { - return Math.floor(diff / (60 * 60 * 1000)) + "小时前"; - } else { - return time.toLocaleDateString(); - } + const year = time.getFullYear(); + const month = String(time.getMonth() + 1).padStart(2, "0"); + const day = String(time.getDate()).padStart(2, "0"); + return `${year}/${month}/${day}`; }, // 模拟API - 获取笔记详情 @@ -352,7 +320,7 @@ export default { code: 200, data: this.noteDetail, }); - }, 500); + }, 100); }); }, }, @@ -362,27 +330,39 @@ export default { diff --git a/static/image/empty-cart.png b/static/image/empty-cart.png new file mode 100644 index 0000000..16100ce --- /dev/null +++ b/static/image/empty-cart.png @@ -0,0 +1,3 @@ +# 这是一个空购物车图标的占位文件 +# 在实际项目中,请替换为真实的空购物车图标图片文件 +# 建议使用简洁的购物车图标,颜色为灰色或浅色 diff --git a/static/image/search.png b/static/image/search.png new file mode 100644 index 0000000..c695db4 --- /dev/null +++ b/static/image/search.png @@ -0,0 +1,2 @@ +# 这是一个搜索图标的占位文件 +# 在实际项目中,请替换为真实的搜索图标图片文件 diff --git a/static/js/CommonFunction.js b/static/js/CommonFunction.js index fa1a141..768bf04 100644 --- a/static/js/CommonFunction.js +++ b/static/js/CommonFunction.js @@ -415,4 +415,17 @@ Vue.prototype.addImgStyleToHtml = (htmlStr) => { return ``; } }); + } +Vue.prototype.toJdszWx = (path) => { + wx.navigateToMiniProgram({ + appId: 'wx4bb7b6050831f585', + path: path, + envVersion: process.env.NODE_ENV === 'development'?'trial':'release', + success(res) { + // 打开成功 + }, + fail(e){ + console.log(e) + } + }) } \ No newline at end of file diff --git a/subPackages/equityGoods/detail.vue b/subPackages/equityGoods/detail.vue index ca22bdc..1fdddb3 100644 --- a/subPackages/equityGoods/detail.vue +++ b/subPackages/equityGoods/detail.vue @@ -29,10 +29,12 @@ - - {{ swiperIndex + 1 }}/{{ topBanner.length }} + + @@ -280,18 +282,7 @@ export default { // 处理购买点击 handlePurchase() { let id = this.goodsInfo.sku&&this.goodsInfo.sku.product.sceneId - wx.navigateToMiniProgram({ - appId: 'wx4bb7b6050831f585', - path: 'pages/info/sceneProductInfo/index?id='+id, - envVersion: process.env.NODE_ENV === 'development'?'trial':'release', - success(res) { - // 打开成功 - }, - fail(e){ - console.log(e) - } - }) - + this.toJdszWx('pages/info/sceneProductInfo/index?id='+id) // 这里可以添加购买逻辑 }, @@ -817,4 +808,9 @@ export default { .detail-container { padding-bottom: 140rpx; } +.avatar{ + width: 119rpx; + height: 119rpx; + border-radius: 50%; +} diff --git a/subPackages/orderQy/detail.vue b/subPackages/orderQy/detail.vue index c07521b..0a2b4d2 100644 --- a/subPackages/orderQy/detail.vue +++ b/subPackages/orderQy/detail.vue @@ -639,10 +639,7 @@ export default { // 使用门票 useTicket(goods) { // 处理使用门票逻辑 - uni.showToast({ - title: "使用门票", - icon: "none", - }); + this.toJdszWx('pages/user/order/sceneOrderInfo/index??id='+goods.thirdOrderId) }, // 显示物流信息 diff --git a/subPackages/orderQy/list.vue b/subPackages/orderQy/list.vue index a02e8b1..763c079 100644 --- a/subPackages/orderQy/list.vue +++ b/subPackages/orderQy/list.vue @@ -440,10 +440,7 @@ export default { // 使用门票 useTicket(goods) { // 处理使用门票逻辑 - uni.showToast({ - title: "使用门票", - icon: "none", - }); + this.toJdszWx('pages/user/order/sceneOrderInfo/index??id='+goods.thirdOrderId) }, // 跳转到订单详情页面 diff --git a/subPackages/user/gwc.vue b/subPackages/user/gwc.vue index 74de912..c84aaef 100644 --- a/subPackages/user/gwc.vue +++ b/subPackages/user/gwc.vue @@ -1,556 +1,841 @@ \ No newline at end of file +.bg { + width: 100%; + min-height: 100vh; + padding: 0 27rpx 200rpx; + box-sizing: border-box; + background-color: #f8f8f8; +} + +.guanli { + height: 76rpx; + text-align: right; + font-size: 32rpx; + font-family: PingFang SC; + font-weight: 500; + color: #6ca5aa; + line-height: 76rpx; + padding: 0 20rpx; + border-radius: 20rpx; + transition: all 0.3s ease; + + &:active { + background: rgba(108, 165, 170, 0.1); + transform: scale(0.95); + } +} + +.goodBox { + width: 697rpx; + height: auto; + background: #ffffff; + border-radius: 20rpx; + margin: 0 auto 27rpx; + padding: 25rpx 20rpx; + box-sizing: border-box; + + .title { + font-size: 35rpx; + font-family: PingFang SC; + font-weight: 500; + color: #000000; + } + + .goodItem { + width: 100%; + height: 173rpx; + margin-top: 46rpx; + display: flex; + + .noSelect { + width: 37rpx; + height: 37rpx; + border-radius: 50%; + border: 2rpx solid #666666; + box-sizing: border-box; + margin-right: 25rpx; + margin-top: 68rpx; + } + + .selectBox { + width: 37rpx; + height: 37rpx; + // background: linear-gradient(90deg, #FA2B66, #FF9834); + // border-radius: 50%; + margin-right: 25rpx; + margin-top: 68rpx; + + img { + width: 100%; + height: 100%; + } + } + + image { + width: 173rpx; + height: 173rpx; + border-radius: 13rpx; + } + + .contentBox { + width: 400rpx; + height: 173rpx; + margin-left: 23rpx; + + .title { + font-size: 31rpx; + font-family: PingFang SC; + font-weight: 500; + color: #000000; + } + + .subTitle { + font-size: 27rpx; + font-family: PingFang SC; + font-weight: 400; + color: #7c7c7c; + margin-top: 13rpx; + } + + .priceBox { + margin-top: 35rpx; + + .price { + font-size: 40rpx; + font-family: PingFang SC; + font-weight: 500; + color: #ff2d3b; + } + + .price:before { + content: "¥"; + font-size: 27rpx; + } + + .quantity-control { + display: flex; + align-items: center; + border: 2rpx solid #e5e5e5; + border-radius: 25rpx; + overflow: hidden; + + .quantity-btn { + width: 60rpx; + height: 50rpx; + display: flex; + align-items: center; + justify-content: center; + background: #f8f9fa; + transition: all 0.3s ease; + + &.minus-btn { + border-right: 1rpx solid #e5e5e5; + } + + &.plus-btn { + border-left: 1rpx solid #e5e5e5; + } + + &.disabled { + background: #f1f1f1; + color: #ccc; + } + + &:not(.disabled):active { + background: #e9ecef; + } + font-size: 50rpx; + font-weight: 500; + color: #333; + .btn-text { + + } + } + + .quantity-input { + width: 80rpx; + height: 50rpx; + display: flex; + align-items: center; + justify-content: center; + background: #fff; + font-size: 28rpx; + color: #333; + font-weight: 500; + } + } + } + } + } +} + +.loseGood { + width: 697rpx; + height: auto; + background: #ffffff; + border-radius: 20rpx; + margin: 0 auto 27rpx; + padding: 25rpx 20rpx; + box-sizing: border-box; + + .title { + font-size: 35rpx; + font-family: PingFang SC; + font-weight: 500; + color: #666666; + + span { + font-size: 32rpx; + font-family: PingFang SC; + font-weight: 400; + color: #2791f7; + } + } + + .goodItem { + width: 100%; + height: 173rpx; + margin-top: 46rpx; + display: flex; + color: #999999; + + .noSelect { + width: 37rpx; + height: 37rpx; + border-radius: 50%; + border: 2rpx solid #cccccc; + background: #f1f1f1; + box-sizing: border-box; + margin-right: 25rpx; + margin-top: 68rpx; + } + + image { + width: 173rpx; + height: 173rpx; + border-radius: 13rpx; + margin-right: 23rpx; + } + + .contentBox { + width: 421rpx; + height: 173rpx; + + .title { + font-size: 31rpx; + font-family: PingFang SC; + font-weight: 500; + } + + .subTitle { + font-size: 27rpx; + font-family: PingFang SC; + font-weight: 400; + } + + .priceBox { + margin-top: 35rpx; + + .price { + font-size: 40rpx; + font-family: PingFang SC; + font-weight: 500; + } + + .price:before { + content: "¥"; + font-size: 27rpx; + } + + .btn { + width: 125rpx; + height: 53rpx; + background: #999999; + border-radius: 13rpx; + text-align: center; + line-height: 53rpx; + font-size: 29rpx; + font-family: PingFang SC; + font-weight: 500; + color: #ffffff; + } + } + } + } +} + +/* 空状态样式 */ +.empty-state { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 200rpx 0; + + .empty-icon { + width: 200rpx; + height: 200rpx; + margin-bottom: 40rpx; + opacity: 0.6; + } + + .empty-title { + font-size: 36rpx; + color: #333; + font-weight: 500; + margin-bottom: 20rpx; + } + + .empty-desc { + font-size: 28rpx; + color: #999; + margin-bottom: 60rpx; + } + + .empty-btn { + width: 240rpx; + height: 80rpx; + background: #6ca5aa; + border-radius: 40rpx; + display: flex; + align-items: center; + justify-content: center; + color: #fff; + font-size: 30rpx; + font-weight: 500; + box-shadow: 0 8rpx 20rpx rgba(108, 165, 170, 0.3); + transition: all 0.3s ease; + + &:active { + transform: scale(0.95); + box-shadow: 0 4rpx 10rpx rgba(108, 165, 170, 0.2); + } + } +} + +.orderBox { + width: 750rpx; + height: 151rpx; + background: #ffffff; + box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1); + padding: 0 27rpx; + box-sizing: border-box; + position: fixed; + left: 0; + bottom: 0; + + .priceBox { + display: flex; + font-size: 27rpx; + font-family: PingFang SC; + font-weight: 400; + color: #666666; + + span { + font-size: 27rpx; + font-family: PingFang SC; + font-weight: 400; + color: #333333; + margin-left: 20rpx; + } + + p { + font-size: 36rpx; + font-family: PingFang SC; + font-weight: 500; + color: #ff2d3b; + margin-top: -5rpx; + } + + .noSelect { + width: 41rpx; + height: 41rpx; + border-radius: 50%; + border: 2rpx solid #666666; + box-sizing: border-box; + margin-right: 10rpx; + } + + .selectBox { + width: 41rpx; + height: 41rpx; + // background: linear-gradient(90deg, #FA2B66, #FF9834); + border-radius: 50%; + margin-right: 10rpx; + + img { + width: 100%; + height: 100%; + } + } + } + + .btn { + width: 219rpx; + height: 77rpx; + background: #6ca5aa; + border-radius: 39rpx; + text-align: center; + line-height: 77rpx; + font-size: 33rpx; + font-family: PingFang SC; + font-weight: 500; + color: #ffffff; + } +} + +/* 移除旧的样式 */ +.zhihui { + background: #e8e8e8 !important; + color: #999999 !important; +} + +/* 优化商品卡片样式 */ +.goodBox { + box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08); + transition: all 0.3s ease; + + &:hover { + transform: translateY(-2rpx); + box-shadow: 0 8rpx 30rpx rgba(0, 0, 0, 0.12); + } +} + +/* 优化选择框样式 */ +.noSelect { + transition: all 0.3s ease; + + &:active { + transform: scale(0.9); + } +} + +.selectBox { + transition: all 0.3s ease; + + &:active { + transform: scale(0.9); + } +} +