diff --git a/package.json b/package.json index 482fb6eba826f78aaacae489d2f0cdd12591bfb7..99075045764e902c65717b0e9665249359c298db 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "dependencies": { "axios": "^0.21.1", "core-js": "^3.6.5", + "moment": "^2.29.1", "vant": "^2.12.11", "vue": "^2.6.11", "vue-router": "^3.2.0", diff --git a/src/api/http.js b/src/api/http.js index 3b4a5f38c3dc097dbdddd7105d8d2de4a2cac2d9..4fdc20668d488973ee88786dd07e8890a5b69453 100644 --- a/src/api/http.js +++ b/src/api/http.js @@ -1,5 +1,17 @@ import axios from "axios" +import store from '@/store/index' + +axios.interceptors.request.use((config) => { + // config参数:请求发送时需要的信息对象 + // 常用场景:为部分/所有的请求添加特定的请求头信息(例如有些接口需要做token鉴权的) + // 在这里添加jwt到请求头中 + config.headers["authorization"] = store.state._token; + return config; +}); axios.interceptors.response.use(res=>{ + let _token =res.data._token?res.data._token:"" + store.commit("setToken",_token) + return res.data||res }) export default axios \ No newline at end of file diff --git a/src/components/FootBar.vue b/src/components/FootBar.vue index 46da0b301f802a2bda138cd3debd95d6da3650ad..74bae66b973453eac31e678e4a26807ede676d1b 100644 --- a/src/components/FootBar.vue +++ b/src/components/FootBar.vue @@ -1,6 +1,6 @@ + + \ No newline at end of file diff --git a/src/views/Center/Login.vue b/src/views/Center/Login.vue new file mode 100644 index 0000000000000000000000000000000000000000..65847b8cb02728a31f63df8da47d6e3c084882df --- /dev/null +++ b/src/views/Center/Login.vue @@ -0,0 +1,88 @@ + + + \ No newline at end of file diff --git a/src/views/Center/MyBooking/MyBookingWait.vue b/src/views/Center/MyBooking/MyBookingWait.vue index 7ba76ad5e49c9e2a13f87b7509d314e3944ffff0..8b87c896a8e0368c76715bb34251cadf1e788fe8 100644 --- a/src/views/Center/MyBooking/MyBookingWait.vue +++ b/src/views/Center/MyBooking/MyBookingWait.vue @@ -3,4 +3,19 @@ MyBookingWait 我的餐桌预定=>等待中的餐桌 - \ No newline at end of file + + \ No newline at end of file diff --git a/src/views/Index/Booking/Booking.vue b/src/views/Index/Booking/Booking.vue index 70a4fe11fca52f5aea56a4ce7d4b68990468bbf7..76c77717fa6023dc853ccecb55653eee9d4c6a53 100644 --- a/src/views/Index/Booking/Booking.vue +++ b/src/views/Index/Booking/Booking.vue @@ -1,6 +1,424 @@ \ No newline at end of file +
+ +
+
+

今天{{ time(Date.now(), 0) }}

+
+
+

明天{{ time(Date.now(), 1) }}

+
+
+

后天{{ time(Date.now(), 2) }}

+
+
+

+ {{ e() }}{{ time(Date.now(), 3) }} +

+
+
+ +
+ + +
+
+
+ + + + +
+
+

餐桌类型

+
+
+

{{data.dating}}

+

{{data.people}}

+
+ +
+
+
+

可预订时间

+
+
+

{{data.time}}

+
+
+ +
+ + + + + + diff --git a/src/views/Index/Booking/BookingConfirm.vue b/src/views/Index/Booking/BookingConfirm.vue index 236d59c365084d21343cfa89aaa8a72ab253f5bd..726c0cf603b5fde08fd245c08717987e03886553 100644 --- a/src/views/Index/Booking/BookingConfirm.vue +++ b/src/views/Index/Booking/BookingConfirm.vue @@ -1,6 +1,162 @@ \ No newline at end of file +
+

预约信息

+
+

预定时间 : {{list.data}}

+

餐桌类型 : {{list.type}}

+

就餐人数 : {{list.peopleNum}}

+
+
+
+
联系人信息
+
+

联系人:

+

性别:

+

手机号:

+
+

备注:

+
+ + + + + + \ No newline at end of file diff --git a/src/views/Index/Index.vue b/src/views/Index/Index.vue index 2a8b3e7a0bc82ab39d31faab040cde6081e7da5c..30c71fd9493bbc1cb2bf59eed1c1ba94ed3e00e9 100644 --- a/src/views/Index/Index.vue +++ b/src/views/Index/Index.vue @@ -49,7 +49,7 @@