From f7950b7d9f434888ce8cfcf06d6e4a55d0e28720 Mon Sep 17 00:00:00 2001
From: zheng_hb <19584434@qq.com>
Date: Fri, 27 Dec 2024 23:23:08 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/api.js | 2 +-
api/model/index.js | 5 ++
api/model/order.js | 37 ++++++++++
components/active/active-item.vue | 2 +-
components/cart/CardList.vue | 4 +-
pages/index/cart.vue | 141 ++++++++++++++++++++++----------------
pages/index/index.vue | 16 +++--
pages_order/huodong-detail.vue | 2 +-
8 files changed, 139 insertions(+), 70 deletions(-)
create mode 100644 api/model/order.js
diff --git a/api/api.js b/api/api.js
index 349142f..5096414 100644
--- a/api/api.js
+++ b/api/api.js
@@ -5,7 +5,7 @@ import utils from '../utils/utils.js'
let limit = {}
let debounce = {}
-const models = ['login', 'index', 'vip', 'info']
+const models = ['login', 'index', 'vip', 'info', 'order']
const config = {
// 示例
diff --git a/api/model/index.js b/api/model/index.js
index 9cc4aa3..e8d65d8 100644
--- a/api/model/index.js
+++ b/api/model/index.js
@@ -33,6 +33,11 @@ const api = {
url: '/index_common/getTravelInfo',
method: 'GET',
},
+ // 悦动时刻信息
+ getYueDong: {
+ url: '/index_common/getYueDong',
+ method: 'GET',
+ },
}
export default api
\ No newline at end of file
diff --git a/api/model/order.js b/api/model/order.js
new file mode 100644
index 0000000..9f896ab
--- /dev/null
+++ b/api/model/order.js
@@ -0,0 +1,37 @@
+
+
+// 订单相关接口
+const api = {
+ // 获取订单列表数据带分页
+ orderPageList: {
+ url: '/order_common/getOrderPageList',
+ method: 'GET',
+ },
+ // 取消订单活动
+ cancelOrder: {
+ url: '/order_common/cancelOrder',
+ method: 'POST',
+ },
+ // 订单活动评价
+ evaluate: {
+ url: '/order_common/evaluate',
+ method: 'POST',
+ },
+ // 根据订单标识查询订单信息
+ orderInfo: {
+ url: '/order_common/getOrderInfo',
+ method: 'GET',
+ },
+ // 订单开具发票
+ evaluate: {
+ url: '/order_common/invoice',
+ method: 'POST',
+ },
+ // 订单活动签到
+ signIn: {
+ url: '/order_common/signIn',
+ method: 'POST',
+ },
+}
+
+export default api
\ No newline at end of file
diff --git a/components/active/active-item.vue b/components/active/active-item.vue
index c633c2a..75e3ce8 100644
--- a/components/active/active-item.vue
+++ b/components/active/active-item.vue
@@ -12,7 +12,7 @@
{{item.address}}
- 20/40
+ {{item.num}}/{{item.sum}}
立即报名
diff --git a/components/cart/CardList.vue b/components/cart/CardList.vue
index a3415e3..5596853 100644
--- a/components/cart/CardList.vue
+++ b/components/cart/CardList.vue
@@ -12,10 +12,10 @@
{{item.title}}
- {{item.time}}
+ {{item.startTime}}
{{item.address}}
- 总计¥{{item.totalPrice}}
+ 总计¥{{item.price}}
diff --git a/pages/index/cart.vue b/pages/index/cart.vue
index 658340b..2f754e2 100644
--- a/pages/index/cart.vue
+++ b/pages/index/cart.vue
@@ -33,6 +33,11 @@
},
data() {
return {
+ params:{
+ state:0,
+ pageNo:1,
+ pageSize:10
+ },
tabList: [{
id: 0,
name: '全部'
@@ -51,74 +56,94 @@
},
],
lineBg: require('@/static/image/cart/tabIcon.png'),
- cardListData: [{
- imgUrl: 'https://up.zhuoku.org/22/a4/60/50/fc3bd0b4e656911fccdde4383637c1cd.jpg',
- orderTime: '2024.08.23 12:00',
- state: 'U',
- stateText: '待参加',
- title: '夏日去撒野旅游计划~',
- time: '2024.10.28 10:00',
- address: '成都市东丽湖露营地32号',
- totalPrice: '298.00',
- btnObj: [{
- id: '0',
- btnTitle: '取消活动',
- color: '#AFAFAF',
- bgColor: '#34312E'
- },
- {
- id: '1',
- btnTitle: '活动签到',
- color: '#FF4546',
- bgColor: '#492623'
- }
- ]
- },
- {
- imgUrl: 'https://up.zhuoku.org/22/a4/60/50/fc3bd0b4e656911fccdde4383637c1cd.jpg',
- orderTime: '2024.08.23 12:00',
- state: 'S',
- stateText: '已完成',
- title: '夏日去撒野旅游计划~',
- time: '2024.10.28 10:00',
- address: '成都市东丽湖露营地32号',
- totalPrice: '298.00',
- btnObj: [{
- id: '2',
- btnTitle: '活动评价',
- color: '#FF4546',
- bgColor: '#492623'
- },
- {
- id: '3',
- btnTitle: '开具发票',
- color: '#FFB245',
- bgColor: '#49361D'
- }
- ]
- },
- {
- imgUrl: 'https://up.zhuoku.org/22/a4/60/50/fc3bd0b4e656911fccdde4383637c1cd.jpg',
- orderTime: '2024.08.23 12:00',
- state: 'F',
- stateText: '已完成',
- title: '夏日去撒野旅游计划~',
- time: '2024.10.28 10:00',
- address: '成都市东丽湖露营地32号',
- totalPrice: '298.00',
- btnObj: []
- }
- ]
+ // cardListData: [{
+ // imgUrl: 'https://up.zhuoku.org/22/a4/60/50/fc3bd0b4e656911fccdde4383637c1cd.jpg',
+ // orderTime: '2024.08.23 12:00',
+ // state: 'U',
+ // stateText: '待参加',
+ // title: '夏日去撒野旅游计划~',
+ // time: '2024.10.28 10:00',
+ // address: '成都市东丽湖露营地32号',
+ // totalPrice: '298.00',
+ // btnObj: [{
+ // id: '0',
+ // btnTitle: '取消活动',
+ // color: '#AFAFAF',
+ // bgColor: '#34312E'
+ // },
+ // {
+ // id: '1',
+ // btnTitle: '活动签到',
+ // color: '#FF4546',
+ // bgColor: '#492623'
+ // }
+ // ]
+ // },
+ // {
+ // imgUrl: 'https://up.zhuoku.org/22/a4/60/50/fc3bd0b4e656911fccdde4383637c1cd.jpg',
+ // orderTime: '2024.08.23 12:00',
+ // state: 'S',
+ // stateText: '已完成',
+ // title: '夏日去撒野旅游计划~',
+ // time: '2024.10.28 10:00',
+ // address: '成都市东丽湖露营地32号',
+ // totalPrice: '298.00',
+ // btnObj: [{
+ // id: '2',
+ // btnTitle: '活动评价',
+ // color: '#FF4546',
+ // bgColor: '#492623'
+ // },
+ // {
+ // id: '3',
+ // btnTitle: '开具发票',
+ // color: '#FFB245',
+ // bgColor: '#49361D'
+ // }
+ // ]
+ // },
+ // {
+ // imgUrl: 'https://up.zhuoku.org/22/a4/60/50/fc3bd0b4e656911fccdde4383637c1cd.jpg',
+ // orderTime: '2024.08.23 12:00',
+ // state: 'F',
+ // stateText: '已完成',
+ // title: '夏日去撒野旅游计划~',
+ // time: '2024.10.28 10:00',
+ // address: '成都市东丽湖露营地32号',
+ // totalPrice: '298.00',
+ // btnObj: []
+ // }
+ // ]
+ totalPage:0,
+ cardListData: []
}
},
+ onReachBottom() {
+ if(this.params.pageNo >= this.totalPage) return
+ this.params.pageNo ++
+ this.getOrderPageList()
+ },
+ onLoad() {
+ this.getOrderPageList()
+ },
methods: {
activeList() {
uni.navigateTo({
url: '/pages_my/activeList'
})
},
+ getOrderPageList() {
+ this.$api('orderPageList',this.params,res=>{
+ if(res.code == 200) {
+ this.totalPage = res.result.pages
+ this.cardListData = [...this.cardListData,...res.result.records]
+ }
+ })
+ },
tabs(val) {
console.log(val);
+ this.params.state = val.id
+ this.getOrderPageList()
},
toOrderDetails(val) {
uni.navigateTo({
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 64db541..1816b65 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -20,7 +20,7 @@
悦动时刻
-
+
活动签到
@@ -31,7 +31,7 @@
-
+
活动
@@ -40,7 +40,7 @@
-
+
旅行
@@ -93,7 +93,7 @@
data() {
return {
params:{
- title:'',
+ title:0,
pageNo:1,
pageSize:10
},
@@ -145,11 +145,13 @@
})
},
tabs(val) {
- console.log(val);
+ this.cardListData = []
+ this.params.title = val.id
+ this.getActivityPageList()
},
- travelList() {
+ skip(val) {
uni.navigateTo({
- url: '/pages_my/travelList'
+ url: `/pages_my/${val}`
})
},
}
diff --git a/pages_order/huodong-detail.vue b/pages_order/huodong-detail.vue
index def8976..dfd77e2 100644
--- a/pages_order/huodong-detail.vue
+++ b/pages_order/huodong-detail.vue
@@ -47,7 +47,7 @@
注意事项
- 当金黄的落叶轻柔地铺满了小城的每个角落,我们知道,最温柔的季节已悄然而至。在这个收获的季节里,我们诚挚邀请您加入我们的秋日私旅
+ {{ activityDetails.precautions}}