From 75753df0bbdb7533bcc67ac5b7b15d46c6bae6ff Mon Sep 17 00:00:00 2001 From: ltx <19304474232@163.com> Date: Fri, 3 Apr 2026 00:47:20 +0800 Subject: [PATCH] =?UTF-8?q?update=EF=BC=9A=E8=AE=A2=E5=8D=95&=E5=9B=A2?= =?UTF-8?q?=E9=98=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 6 +- pages/mine/mine.js | 4 +- subpackages/mine/order-detail/order-detail.js | 43 +++++ .../mine/order-detail/order-detail.json | 6 + .../mine/order-detail/order-detail.wxml | 79 +++++++++ .../mine/order-detail/order-detail.wxss | 162 ++++++++++++++++++ subpackages/mine/order/order.js | 67 ++++++++ subpackages/mine/order/order.json | 7 + subpackages/mine/order/order.wxml | 51 ++++++ subpackages/mine/order/order.wxss | 111 ++++++++++++ subpackages/mine/team-detail/team-detail.js | 31 ++++ subpackages/mine/team-detail/team-detail.json | 6 + subpackages/mine/team-detail/team-detail.wxml | 52 ++++++ subpackages/mine/team-detail/team-detail.wxss | 96 +++++++++++ subpackages/mine/team/team.js | 34 ++++ subpackages/mine/team/team.json | 7 + subpackages/mine/team/team.wxml | 48 ++++++ subpackages/mine/team/team.wxss | 148 ++++++++++++++++ 18 files changed, 955 insertions(+), 3 deletions(-) create mode 100644 subpackages/mine/order-detail/order-detail.js create mode 100644 subpackages/mine/order-detail/order-detail.json create mode 100644 subpackages/mine/order-detail/order-detail.wxml create mode 100644 subpackages/mine/order-detail/order-detail.wxss create mode 100644 subpackages/mine/order/order.js create mode 100644 subpackages/mine/order/order.json create mode 100644 subpackages/mine/order/order.wxml create mode 100644 subpackages/mine/order/order.wxss create mode 100644 subpackages/mine/team-detail/team-detail.js create mode 100644 subpackages/mine/team-detail/team-detail.json create mode 100644 subpackages/mine/team-detail/team-detail.wxml create mode 100644 subpackages/mine/team-detail/team-detail.wxss create mode 100644 subpackages/mine/team/team.js create mode 100644 subpackages/mine/team/team.json create mode 100644 subpackages/mine/team/team.wxml create mode 100644 subpackages/mine/team/team.wxss diff --git a/app.json b/app.json index 94eef8d..870840f 100644 --- a/app.json +++ b/app.json @@ -41,7 +41,11 @@ "points/points", "cert/cert", "records/records", - "auth/auth" + "auth/auth", + "team/team", + "team-detail/team-detail", + "order/order", + "order-detail/order-detail" ] } ], diff --git a/pages/mine/mine.js b/pages/mine/mine.js index 7e103ca..83467d4 100644 --- a/pages/mine/mine.js +++ b/pages/mine/mine.js @@ -73,11 +73,11 @@ Page({ }, goToOrders() { - wx.showToast({ title: '我的订单功能开发中', icon: 'none' }); + wx.navigateTo({ url: '/subpackages/mine/order/order' }); }, goToTeam() { - wx.showToast({ title: '我的团队功能开发中', icon: 'none' }); + wx.navigateTo({ url: '/subpackages/mine/team/team' }); }, onChooseAvatar() { diff --git a/subpackages/mine/order-detail/order-detail.js b/subpackages/mine/order-detail/order-detail.js new file mode 100644 index 0000000..ad33d0e --- /dev/null +++ b/subpackages/mine/order-detail/order-detail.js @@ -0,0 +1,43 @@ +Page({ + data: { + detail: { + eventName: '2024上海市学生运动会跳绳比赛', + statusText: '交易成功', + statusKey: 'success', + payMethod: '线上支付', + actualAmount: '689', + payTimeStr: '2025-08-05 16:26', + refundAmount: '689', + refundTimeStr: '2025-08-05 16:26', + orderNo: '13123421516216512515 1', + items: [ + { id: 1, projectName: '30秒单摇', groupName: '少年儿童组', fee: 23 }, + { id: 2, projectName: '交互绳', groupName: '成年组', fee: 411 }, + { id: 3, projectName: '交互绳', groupName: '少年儿童组', fee: 32 }, + { id: 4, projectName: '交互绳', groupName: '成年组', fee: 12 } + ] + } + }, + + onLoad(options) { + const id = options && options.id; + // TODO: 根据 id 调用接口获取订单详情 + // this.loadDetail(id); + }, + + onBack() { + if (getCurrentPages().length > 1) { + wx.navigateBack(); + } else { + wx.navigateTo({ url: '/subpackages/mine/order/order' }); + } + }, + + onCopyOrderNo() { + const orderNo = this.data.detail.orderNo || ''; + wx.setClipboardData({ + data: orderNo, + success: () => wx.showToast({ title: '已复制', icon: 'success' }) + }); + } +}); diff --git a/subpackages/mine/order-detail/order-detail.json b/subpackages/mine/order-detail/order-detail.json new file mode 100644 index 0000000..b817636 --- /dev/null +++ b/subpackages/mine/order-detail/order-detail.json @@ -0,0 +1,6 @@ +{ + "navigationStyle": "custom", + "usingComponents": { + "mp-navigation-bar": "weui-miniprogram/navigation-bar/navigation-bar" + } +} diff --git a/subpackages/mine/order-detail/order-detail.wxml b/subpackages/mine/order-detail/order-detail.wxml new file mode 100644 index 0000000..dc4ac0e --- /dev/null +++ b/subpackages/mine/order-detail/order-detail.wxml @@ -0,0 +1,79 @@ + + + + + + + {{detail.statusText}} + + + + + + + {{detail.eventName}} + {{detail.statusText}} + + + + + + + 支付方式 + {{detail.payMethod}} + + + + 实付金额 + ¥{{detail.actualAmount}} + + + + 支付时间 + {{detail.payTimeStr}} + + + + 退款金额 + ¥{{detail.refundAmount}} + + + + 退款时间 + {{detail.refundTimeStr}} + + + + 订单编号 + + {{detail.orderNo}} + + ⎘ + + + + + + + + + 项目 + 组别 + 费用(元) + + + + {{item.projectName}} + {{item.groupName}} + {{item.fee}} + + + + + diff --git a/subpackages/mine/order-detail/order-detail.wxss b/subpackages/mine/order-detail/order-detail.wxss new file mode 100644 index 0000000..17cbd28 --- /dev/null +++ b/subpackages/mine/order-detail/order-detail.wxss @@ -0,0 +1,162 @@ +/* ===== 页面 ===== */ +.detail-page { + min-height: 100vh; + background: #f5f7fa; +} + +.scroll { + height: calc(100vh - 88rpx); + padding: 0 32rpx 60rpx; + box-sizing: border-box; +} + +/* ===== 顶部状态标题 ===== */ +.status-header { + padding: 40rpx 8rpx 24rpx; +} + +.status-title { + font-size: 40rpx; + font-weight: 700; +} + +.status-success { + color: #07c160; +} + +.status-cancelled { + color: #ff4d4f; +} + +.status-pending { + color: #fa8c16; +} + +/* ===== 基本信息卡 ===== */ +.info-card { + background: #ffffff; + border-radius: 20rpx; + padding: 0 40rpx; + overflow: hidden; +} + +.info-row { + display: flex; + align-items: center; + justify-content: space-between; + padding: 32rpx 0; + border-bottom: 1rpx solid #f5f5f5; +} + +.info-row--top { + align-items: flex-start; + padding: 36rpx 0 28rpx; +} + +.info-row--last { + border-bottom: none; +} + +.divider { + height: 1rpx; + background: #f0f0f0; +} + +.info-event-name { + flex: 1; + font-size: 30rpx; + color: #1a1a1a; + font-weight: 600; + padding-right: 24rpx; + line-height: 1.4; +} + +.info-status { + flex-shrink: 0; + font-size: 26rpx; + font-weight: 500; +} + +.info-label { + font-size: 28rpx; + color: #666; +} + +.info-value { + font-size: 28rpx; + color: #333; +} + +/* 订单编号行 */ +.order-no-wrap { + display: flex; + align-items: center; + gap: 12rpx; +} + +.order-no { + font-size: 24rpx; + color: #333; +} + +.copy-btn { + width: 44rpx; + height: 44rpx; + display: flex; + align-items: center; + justify-content: center; +} + +.copy-icon { + font-size: 32rpx; + color: #999; +} + +/* ===== 项目表格卡 ===== */ +.table-card { + margin-top: 24rpx; + background: #ffffff; + border-radius: 20rpx; + overflow: hidden; +} + +.table-head { + display: flex; + align-items: center; + background: #1a56db; + padding: 28rpx 0; +} + +.th { + flex: 1; + text-align: center; + font-size: 28rpx; + color: #ffffff; + font-weight: 600; +} + +.th-right { + text-align: center; +} + +.tr { + display: flex; + align-items: center; + padding: 32rpx 0; + border-bottom: 1rpx solid #f5f5f5; +} + +.tr:last-child { + border-bottom: none; +} + +.td { + flex: 1; + text-align: center; + font-size: 28rpx; + color: #333; +} + +.td-right { + text-align: center; +} diff --git a/subpackages/mine/order/order.js b/subpackages/mine/order/order.js new file mode 100644 index 0000000..ced4674 --- /dev/null +++ b/subpackages/mine/order/order.js @@ -0,0 +1,67 @@ +Page({ + data: { + loading: false, + noMore: false, + orders: [ + { + id: 1, + eventName: '2024上海市学生运动会跳绳比赛', + statusText: '交易成功', + statusKey: 'success', + payTimeStr: '2025-08-05 16:26', + actualAmount: '859', + refundAmount: '' + }, + { + id: 2, + eventName: '2024上海市学生运动会跳绳比赛', + statusText: '交易取消', + statusKey: 'cancelled', + payTimeStr: '2025-08-05 16:26', + actualAmount: '859', + refundAmount: '859' + }, + { + id: 3, + eventName: '2024上海市学生运动会跳绳比赛', + statusText: '交易成功', + statusKey: 'success', + payTimeStr: '2025-08-05 16:26', + actualAmount: '859', + refundAmount: '' + }, + { + id: 4, + eventName: '2024上海市学生运动会跳绳比赛', + statusText: '交易成功', + statusKey: 'success', + payTimeStr: '2025-08-05 16:26', + actualAmount: '859', + refundAmount: '' + } + ] + }, + + onLoad() {}, + + onPullDownRefresh() { + wx.stopPullDownRefresh(); + }, + + onBack() { + if (getCurrentPages().length > 1) { + wx.navigateBack(); + } else { + wx.switchTab({ url: '/pages/mine/mine' }); + } + }, + + onOrderTap(e) { + const { id } = e.currentTarget.dataset; + wx.navigateTo({ url: `/subpackages/mine/order-detail/order-detail?id=${id}` }); + }, + + onLoadMore() { + // TODO: 分页加载 + } +}); diff --git a/subpackages/mine/order/order.json b/subpackages/mine/order/order.json new file mode 100644 index 0000000..a5c6c4b --- /dev/null +++ b/subpackages/mine/order/order.json @@ -0,0 +1,7 @@ +{ + "navigationStyle": "custom", + "enablePullDownRefresh": true, + "usingComponents": { + "mp-navigation-bar": "weui-miniprogram/navigation-bar/navigation-bar" + } +} diff --git a/subpackages/mine/order/order.wxml b/subpackages/mine/order/order.wxml new file mode 100644 index 0000000..2025755 --- /dev/null +++ b/subpackages/mine/order/order.wxml @@ -0,0 +1,51 @@ + + + + + + + + + {{item.eventName}} + {{item.statusText}} + + + + 支付时间:{{item.payTimeStr}} + + + + 实付金额:¥{{item.actualAmount}} + 退款金额:¥{{item.refundAmount}} + + + + + + 暂无订单 + + + + + 没有更多了 + 加载中... + + + diff --git a/subpackages/mine/order/order.wxss b/subpackages/mine/order/order.wxss new file mode 100644 index 0000000..13e1f73 --- /dev/null +++ b/subpackages/mine/order/order.wxss @@ -0,0 +1,111 @@ +/* ===== 页面 ===== */ +.order-page { + min-height: 100vh; + background: #f5f7fa; +} + +.list { + height: calc(100vh - 88rpx); + padding: 24rpx 32rpx 40rpx; + box-sizing: border-box; +} + +/* ===== 订单卡片 ===== */ +.order-card { + background: #ffffff; + border-radius: 20rpx; + padding: 36rpx 40rpx; + margin-bottom: 24rpx; +} + +.card-row { + display: flex; + align-items: center; + margin-bottom: 12rpx; +} + +.card-row:last-child { + margin-bottom: 0; +} + +.card-row--top { + justify-content: space-between; + align-items: flex-start; + margin-bottom: 16rpx; +} + +.card-row--amount { + display: flex; + flex-direction: column; + align-items: flex-end; + gap: 6rpx; + margin-top: 4rpx; +} + +.event-name { + flex: 1; + font-size: 30rpx; + color: #1a1a1a; + font-weight: 600; + padding-right: 24rpx; + line-height: 1.4; +} + +/* 状态文字颜色 */ +.order-status { + flex-shrink: 0; + font-size: 26rpx; + font-weight: 500; +} + +.status-success { + color: #07c160; +} + +.status-cancelled { + color: #ff4d4f; +} + +.status-pending { + color: #fa8c16; +} + +.pay-time { + font-size: 24rpx; + color: #999; +} + +.amount-item { + font-size: 24rpx; + color: #999; +} + +.amount-val { + color: #333; + font-weight: 500; +} + +/* ===== 空状态 ===== */ +.empty { + display: flex; + flex-direction: column; + align-items: center; + padding-top: 200rpx; +} + +.empty-text { + font-size: 28rpx; + color: #999; + margin-top: 24rpx; +} + +/* ===== 列表底部 ===== */ +.list-footer { + text-align: center; + padding: 24rpx 0 40rpx; +} + +.footer-text { + font-size: 24rpx; + color: #c0c4cc; +} diff --git a/subpackages/mine/team-detail/team-detail.js b/subpackages/mine/team-detail/team-detail.js new file mode 100644 index 0000000..a8dfcdf --- /dev/null +++ b/subpackages/mine/team-detail/team-detail.js @@ -0,0 +1,31 @@ +Page({ + data: { + detail: { + name: '队伍名称', + memberCount: 9, + leaderName: '此文为/1234145121', + coachName: '此为/1234213211', + createdTimeStr: '2025-08-05 16:26', + members: [ + { id: 1, name: '我121', gender: '男', age: 23 }, + { id: 2, name: '我121', gender: '女', age: 12 }, + { id: 3, name: '我121', gender: '女', age: 32 }, + { id: 4, name: '我121', gender: '女', age: 12 } + ] + } + }, + + onLoad(options) { + const id = options && options.id; + // TODO: 根据 id 调用接口获取团队详情 + // this.loadDetail(id); + }, + + onBack() { + if (getCurrentPages().length > 1) { + wx.navigateBack(); + } else { + wx.navigateTo({ url: '/subpackages/mine/team/team' }); + } + } +}); diff --git a/subpackages/mine/team-detail/team-detail.json b/subpackages/mine/team-detail/team-detail.json new file mode 100644 index 0000000..b817636 --- /dev/null +++ b/subpackages/mine/team-detail/team-detail.json @@ -0,0 +1,6 @@ +{ + "navigationStyle": "custom", + "usingComponents": { + "mp-navigation-bar": "weui-miniprogram/navigation-bar/navigation-bar" + } +} diff --git a/subpackages/mine/team-detail/team-detail.wxml b/subpackages/mine/team-detail/team-detail.wxml new file mode 100644 index 0000000..694ff97 --- /dev/null +++ b/subpackages/mine/team-detail/team-detail.wxml @@ -0,0 +1,52 @@ + + + + + + + + 队伍名称 + {{detail.memberCount}}人 + + + 领队 + {{detail.leaderName || '—'}} + + + 教练 + {{detail.coachName || '—'}} + + + 创建时间 + {{detail.createdTimeStr || '—'}} + + + + + + + + 姓名 + 性别 + 年龄 + + + + + {{item.name}} + {{item.gender}} + {{item.age}} + + + + 暂无成员 + + + + diff --git a/subpackages/mine/team-detail/team-detail.wxss b/subpackages/mine/team-detail/team-detail.wxss new file mode 100644 index 0000000..2e8eabc --- /dev/null +++ b/subpackages/mine/team-detail/team-detail.wxss @@ -0,0 +1,96 @@ +/* ===== 页面 ===== */ +.detail-page { + min-height: 100vh; + background: #f5f7fa; +} + +/* ===== 基本信息卡 ===== */ +.info-card { + margin: 24rpx 32rpx 0; + background: #ffffff; + border-radius: 20rpx; + padding: 0 40rpx; + overflow: hidden; +} + +.info-row { + display: flex; + align-items: center; + justify-content: space-between; + padding: 36rpx 0; + border-bottom: 1rpx solid #f0f0f0; +} + +.info-row.last { + border-bottom: none; +} + +.info-label { + font-size: 28rpx; + color: #666; +} + +.info-value { + font-size: 28rpx; + color: #333; +} + +.info-value.highlight { + color: #1a56db; + font-weight: 600; +} + +/* ===== 成员表格卡 ===== */ +.member-card { + margin: 24rpx 32rpx 48rpx; + background: #ffffff; + border-radius: 20rpx; + overflow: hidden; +} + +/* 表头 */ +.table-head { + display: flex; + align-items: center; + background: #1a56db; + padding: 28rpx 0; +} + +.th { + flex: 1; + text-align: center; + font-size: 28rpx; + color: #ffffff; + font-weight: 600; +} + +/* 表体行 */ +.tr { + display: flex; + align-items: center; + padding: 32rpx 0; + border-bottom: 1rpx solid #f5f5f5; +} + +.tr:last-child { + border-bottom: none; +} + +.td { + flex: 1; + text-align: center; + font-size: 28rpx; + color: #333; +} + +/* 空状态 */ +.table-empty { + display: flex; + justify-content: center; + padding: 80rpx 0; +} + +.table-empty-text { + font-size: 28rpx; + color: #999; +} diff --git a/subpackages/mine/team/team.js b/subpackages/mine/team/team.js new file mode 100644 index 0000000..064ddd4 --- /dev/null +++ b/subpackages/mine/team/team.js @@ -0,0 +1,34 @@ +Page({ + data: { + orgName: '上海市跳绳键球协会', // 所在单位,后续接口替换 + loading: false, + teams: [ + { id: 1, name: '队伍名称', memberCount: 9, pendingCount: 0 }, + { id: 2, name: '队伍名称', memberCount: 91, pendingCount: 0 }, + { id: 3, name: '队伍名称', memberCount: 9, pendingCount: 3 } + ] + }, + + onLoad() {}, + + onPullDownRefresh() { + wx.stopPullDownRefresh(); + }, + + onBack() { + if (getCurrentPages().length > 1) { + wx.navigateBack(); + } else { + wx.switchTab({ url: '/pages/mine/mine' }); + } + }, + + onViewOrgPoints() { + wx.showToast({ title: '单位积分功能开发中', icon: 'none' }); + }, + + onTeamTap(e) { + const { id } = e.currentTarget.dataset; + wx.navigateTo({ url: `/subpackages/mine/team-detail/team-detail?id=${id}` }); + } +}); diff --git a/subpackages/mine/team/team.json b/subpackages/mine/team/team.json new file mode 100644 index 0000000..a5c6c4b --- /dev/null +++ b/subpackages/mine/team/team.json @@ -0,0 +1,7 @@ +{ + "navigationStyle": "custom", + "enablePullDownRefresh": true, + "usingComponents": { + "mp-navigation-bar": "weui-miniprogram/navigation-bar/navigation-bar" + } +} diff --git a/subpackages/mine/team/team.wxml b/subpackages/mine/team/team.wxml new file mode 100644 index 0000000..7ef6242 --- /dev/null +++ b/subpackages/mine/team/team.wxml @@ -0,0 +1,48 @@ + + + + + + + + + + {{orgName}} + 所在单位 + + + ○ + 查看单位积分 + + + + + + + + {{item.name}} + + {{item.memberCount}}人{{item.pendingCount ? item.pendingCount : ''}} + › + + + + + + 暂无团队 + + + diff --git a/subpackages/mine/team/team.wxss b/subpackages/mine/team/team.wxss new file mode 100644 index 0000000..5a0363e --- /dev/null +++ b/subpackages/mine/team/team.wxss @@ -0,0 +1,148 @@ +/* ===== 页面 ===== */ +.team-page { + min-height: 100vh; + background: #f5f7fa; +} + +/* ===== 单位卡片 ===== */ +.org-card { + position: relative; + margin: 24rpx 32rpx 0; + border-radius: 20rpx; + overflow: hidden; + height: 160rpx; +} + +.org-bg { + position: absolute; + inset: 0; + background: linear-gradient(135deg, #1a3a8a 0%, #1a56db 100%); +} + +/* 背景纹理点缀 */ +.org-bg::before, +.org-bg::after { + content: ''; + position: absolute; + border-radius: 50%; + background: rgba(255, 255, 255, 0.08); +} + +.org-bg::before { + width: 200rpx; + height: 200rpx; + top: -60rpx; + right: 40rpx; +} + +.org-bg::after { + width: 140rpx; + height: 140rpx; + bottom: -50rpx; + right: 160rpx; +} + +.org-content { + position: relative; + z-index: 1; + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 40rpx; + height: 100%; +} + +.org-info { + display: flex; + flex-direction: column; + gap: 8rpx; +} + +.org-name { + font-size: 32rpx; + font-weight: 700; + color: #ffffff; +} + +.org-label { + font-size: 22rpx; + color: rgba(255, 255, 255, 0.7); +} + +.org-btn { + display: flex; + align-items: center; + gap: 8rpx; + background: rgba(255, 255, 255, 0.15); + border: 2rpx solid rgba(255, 255, 255, 0.4); + border-radius: 40rpx; + padding: 12rpx 28rpx; +} + +.org-btn-icon { + font-size: 24rpx; + color: #ffffff; +} + +.org-btn-text { + font-size: 24rpx; + color: #ffffff; +} + +/* ===== 团队列表 ===== */ +.list-wrap { + margin: 24rpx 32rpx 0; + background: #ffffff; + border-radius: 20rpx; + overflow: hidden; +} + +.team-item { + display: flex; + align-items: center; + justify-content: space-between; + padding: 40rpx 40rpx; + border-bottom: 1rpx solid #f0f0f0; +} + +.team-item:last-child { + border-bottom: none; +} + +.team-name { + font-size: 30rpx; + color: #1a1a1a; + font-weight: 500; +} + +.team-right { + display: flex; + align-items: center; + gap: 12rpx; +} + +.team-count { + font-size: 28rpx; + color: #1a56db; + font-weight: 500; +} + +.team-arrow { + font-size: 36rpx; + color: #c0c4cc; + line-height: 1; +} + +/* ===== 空状态 ===== */ +.empty { + display: flex; + flex-direction: column; + align-items: center; + padding: 120rpx 0; +} + +.empty-text { + font-size: 28rpx; + color: #999; + margin-top: 24rpx; +}