+
{{foodNameConcat(item.FoodList)}}
@@ -14,10 +14,16 @@
-
+
@@ -49,15 +55,41 @@ export default {
components:{
Coupon
},
+ computed:{
+ filterList(){
+ return (index)=>{
+ let list=['all','topay','complated','cancelled']
+ let state=list[index]
+ return this.ordersList.filter((item)=>{
+ return state=="all"||item.orderSrate==state
+ })
+ }
+
+ }
+ },
methods:{
dateFormat(date){
return date.getFullYear()+"-"+date.getMonth()+"-"+date.getDate()
},
foodNameConcat(list){
return list.reduce((total,item)=>{
+ let arr=['topay','cancelled','complated']
return total+" "+item.foodName
},"")
+ },
+ onDeleteOrder(item){
+ let order=item
+ let index=this.ordersList.indexOf(item)
+ this.$delete(this.ordersList,index)
+ },
+ onCancelOrder(item){
+ item.orderSrate='cancelled'
+ },
+ toDefail(item){
+ console.log(this.$router);
+ this.$router.push({name:'myorderdetail',params:{orderList:item}})
}
+
},
created(){
this.$http.get("https://www.fastmock.site/mock/0986597585a34d83a11da7a620d2fec3/food/myorder")
@@ -69,59 +101,100 @@ export default {
\ No newline at end of file
--
Gitee
From cf28e6c880943a393fbe8b258c93f89d7c1abadb Mon Sep 17 00:00:00 2001
From: GuoQiYu <2478948023@qq.com>
Date: Sun, 11 Apr 2021 15:44:33 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E9=A2=84=E7=BA=A6=E8=AF=A6=E6=83=85?=
=?UTF-8?q?=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/router/index.js | 3 -
src/router/modules/center.js | 6 +
.../Center/MyBooking/MyBookingCancelled.vue | 6 -
.../Center/MyBooking/MyBookingComplated.vue | 6 -
.../Center/MyBooking/MyBookingDetail.vue | 123 ++++++++++++++++++
.../Center/MyBooking/MyBookingSuccess.vue | 6 -
src/views/Center/MyBooking/MyBookingWait.vue | 6 -
src/views/Center/MyOrder/MyOrderDetail.vue | 5 +-
8 files changed, 132 insertions(+), 29 deletions(-)
delete mode 100644 src/views/Center/MyBooking/MyBookingCancelled.vue
delete mode 100644 src/views/Center/MyBooking/MyBookingComplated.vue
create mode 100644 src/views/Center/MyBooking/MyBookingDetail.vue
delete mode 100644 src/views/Center/MyBooking/MyBookingSuccess.vue
delete mode 100644 src/views/Center/MyBooking/MyBookingWait.vue
diff --git a/src/router/index.js b/src/router/index.js
index 5d85f59..03b8dc9 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -3,7 +3,6 @@ import VueRouter from 'vue-router'
import Index from "./modules/index.js"
import Center from "./modules/center.js"
-import MyBooking from "./modules/myBooking.js"
import OrderConfirm from "./modules/orderConfirm.js"
Vue.use(VueRouter)
@@ -12,8 +11,6 @@ const routes = [
...Index,
// 我的模块
...Center,
- // 我的餐桌预定模块
- ...MyBooking,
// 订单确认模块
...OrderConfirm,
// 重定向
diff --git a/src/router/modules/center.js b/src/router/modules/center.js
index d13d0e9..9c60a42 100644
--- a/src/router/modules/center.js
+++ b/src/router/modules/center.js
@@ -4,6 +4,7 @@ import MyBookings from "@/views/Center/MyBooking/MyBookings.vue"
import MyCoupons from "@/views/Center/MyCoupons.vue"
import MyOrders from "@/views/Center/MyOrder/MyOrders.vue"
import MyOrderDetail from "@/views/Center/MyOrder/MyOrderDetail.vue"
+import MyBookingDetail from "@/views/Center/MyBooking/MyBookingDetail.vue"
export default [
{
@@ -26,5 +27,10 @@ export default [
path:"/myorderdetail",
name:"myorderdetail",
component:MyOrderDetail
+ },
+ {
+ path:"/mybookingdetail",
+ name:"mybookingdetail",
+ component:MyBookingDetail
}
]
\ No newline at end of file
diff --git a/src/views/Center/MyBooking/MyBookingCancelled.vue b/src/views/Center/MyBooking/MyBookingCancelled.vue
deleted file mode 100644
index 712892b..0000000
--- a/src/views/Center/MyBooking/MyBookingCancelled.vue
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- MyBookingCancelled
- 我的餐桌预定=>已取消的餐桌预定
-
-
\ No newline at end of file
diff --git a/src/views/Center/MyBooking/MyBookingComplated.vue b/src/views/Center/MyBooking/MyBookingComplated.vue
deleted file mode 100644
index 61c7cc2..0000000
--- a/src/views/Center/MyBooking/MyBookingComplated.vue
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- MyBookingComplated
- 我的餐桌预定=>已完成的餐桌预定
-
-
\ No newline at end of file
diff --git a/src/views/Center/MyBooking/MyBookingDetail.vue b/src/views/Center/MyBooking/MyBookingDetail.vue
new file mode 100644
index 0000000..708b6fa
--- /dev/null
+++ b/src/views/Center/MyBooking/MyBookingDetail.vue
@@ -0,0 +1,123 @@
+
+
+
+
+
等待商家确认
+
预定已提交等待商家确认
+
+
+
+ 预约信息
+
+
+ 预约时间:
+ 20134234234
+
+
+ 餐桌类型:
+ 大厅 1-2人桌
+
+
+ 就餐人数:
+ 6人
+
+
+
+
+ 联系人信息
+
+
+ 联系人:
+ 20134234234
+
+
+ 手机号:
+ 20134234234
+
+
+ 备注:
+ 无
+
+
+
+
+ 提交预约时间:
+ 20134234234
+
+
+ 取消预约时间:
+ 2010233323
+
+
+
+
+ 取消订单
+
+
+
+
\ No newline at end of file
diff --git a/src/views/Center/MyBooking/MyBookingSuccess.vue b/src/views/Center/MyBooking/MyBookingSuccess.vue
deleted file mode 100644
index 20a7e32..0000000
--- a/src/views/Center/MyBooking/MyBookingSuccess.vue
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- MyBookingSuccess
- 我的餐桌预定=>成功的餐桌预定
-
-
\ No newline at end of file
diff --git a/src/views/Center/MyBooking/MyBookingWait.vue b/src/views/Center/MyBooking/MyBookingWait.vue
deleted file mode 100644
index 7ba76ad..0000000
--- a/src/views/Center/MyBooking/MyBookingWait.vue
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- MyBookingWait
- 我的餐桌预定=>等待中的餐桌
-
-
\ No newline at end of file
diff --git a/src/views/Center/MyOrder/MyOrderDetail.vue b/src/views/Center/MyOrder/MyOrderDetail.vue
index f8985e3..d92254c 100644
--- a/src/views/Center/MyOrder/MyOrderDetail.vue
+++ b/src/views/Center/MyOrder/MyOrderDetail.vue
@@ -58,8 +58,9 @@