From 5769349d08c6e7426de3b8b6b93b9a36d6ef8b53 Mon Sep 17 00:00:00 2001
From: Sun_sun <469361609@qq.com>
Date: Fri, 24 Oct 2025 15:56:41 +0800
Subject: [PATCH] =?UTF-8?q?2025-10-24=20=E6=88=91=E7=9A=84=E8=AE=A2?=
=?UTF-8?q?=E5=8D=95=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/my/order.vue | 217 +++++++++++++++++++++++++++------------------
1 file changed, 131 insertions(+), 86 deletions(-)
diff --git a/pages/my/order.vue b/pages/my/order.vue
index 643052c..8251101 100644
--- a/pages/my/order.vue
+++ b/pages/my/order.vue
@@ -14,77 +14,93 @@
-
- 订单号:{{orderItem.order_no}}
-
-
-
-
+
+ 111
+
+
+
+ 订单号:{{orderItem.order_no}}
+
+
+
+
+
+
+
+
+ {{item.product_name}}
+
+
+ {{item.rongdou_price}}
+
+
+
+ {{item.points_price}}
+
+
+
+ X{{item.quantity}}
+
+
+
-
-
-
- {{item.product_name}}
-
-
- {{item.rongdou_price}}
-
-
-
- {{item.points_price}}
-
-
-
- X{{item.quantity}}
-
-
-
-
-
-
-
+
+
+
+ 取消订单
+
+
+
+
+
+ 确认收货
+
+
+
+
+
+ 取消订单
+ 立即支付
+
+
+
取消订单
-
-
-
-
-
- 确认收货
-
-
-
-
-
- 取消订单
- 立即支付
-
-
-
- 查看详情
+ @click="handleOrderDetail(orderItem)">查看详情
+
-
-
-
+
+
+
+
+ 222
+
@@ -117,7 +133,6 @@
订单状态
-
@@ -164,14 +179,18 @@
商品总计
- {{allPay}}
+ {{detailInfo.total_rongdou}}
实付
-
+
- {{detailInfo.total_rongdou}}
+ {{detailInfo.real_rongdou}}
+
+
+
+ {{detailInfo.real_points}}
@@ -185,7 +204,8 @@
ref,
onMounted,
getCurrentInstance,
- computed
+ computed,
+ watch
} from 'vue';
import {
onLoad,
@@ -225,7 +245,9 @@
}
const handleSearch = () => {
-
+ msgRef.value.show({
+ title: '暂无功能,请期待~'
+ })
}
const tabList = ref([{
@@ -235,11 +257,25 @@
}, {
name: '理财产品',
}])
- const currentTab = ref(0)
+ const currentTab = ref(1)
const currentMenu = ref(0)
+ watch(currentTab, (val) => {
+ if (val == 0 || val === 2) {
+ msgRef.value.show({
+ title: '暂无功能,请期待~'
+ })
+ currentTab.value = 1
+ return
+ }
+ loadData()
+ })
+
const handleChangeMenu = (val) => {
currentMenu.value = val
+ clearData()
+ params.value.status = val
+ loadData()
}
// 取消订单
@@ -290,9 +326,9 @@
// 详情
const showDetail = ref(false)
const detailInfo = ref({})
- const allPay = computed(()=>{
+ const allPay = computed(() => {
let data = 0
- detailInfo.value.items.forEach(item=>{
+ detailInfo.value.items.forEach(item => {
data += item.rongdou_price * item.quantity
})
return data
@@ -308,22 +344,30 @@
page: 1,
limit: 10,
search: '',
+ status: ''
})
const loadStatus = ref('loadmore')
const maxPage = ref(1)
const orderList = ref([])
const loadData = () => {
- if (loadStatus.value == 'nomore') return
- mallAPI.getOrderList(params.value).then(res => {
- orderList.value = orderList.value.concat(res.data.orders)
- maxPage.value = res.data.pagination.pages
- params.value.page++
- console.log(orderList.value);
- if (maxPage.value < params.value.page) {
- loadStatus.value = 'nomore'
- }
- })
+ if (currentTab.value == 0) {
+ // 项目订单
+ } else if (currentTab.value == 1) {
+ // 商品订单
+ if (loadStatus.value == 'nomore') return
+ mallAPI.getOrderList(params.value).then(res => {
+ orderList.value = orderList.value.concat(res.data.orders)
+ maxPage.value = res.data.pagination.pages
+ params.value.page++
+ if (maxPage.value < params.value.page) {
+ loadStatus.value = 'nomore'
+ }
+ })
+ } else if (currentTab.value == 2) {
+ // 理财产品
+ }
+
}
const clearData = () => {
@@ -364,15 +408,16 @@
font-weight: 400;
font-size: 26rpx;
line-height: 100%;
- justify-content: space-between;
padding: 20rpx 20rpx;
-
+ overflow-x: auto;
+ white-space: nowrap;
+
.menu-item {
background: #DFDFDF;
border-radius: 12rpx;
padding: 12rpx 20rpx;
color: #676767;
-
+ margin: 0 10rpx;
}
.active {
@@ -469,7 +514,7 @@
font-weight: 400;
font-size: 24rpx;
line-height: 100%;
-
+
display: flex;
align-items: center;
}