diff --git a/src/pages/booking/booking.vue b/src/pages/booking/booking.vue
index cfd09cc..4010279 100644
--- a/src/pages/booking/booking.vue
+++ b/src/pages/booking/booking.vue
@@ -26,7 +26,7 @@ const recycleStationId = ref('521632060801030597')
// 是否可以预约
const isBooking = computed(()=>{
return appointmentTime.value && recycleAddress.value && siteLabel.value
-})
+})
// 获取订单列表
@@ -164,27 +164,30 @@ const handleAddressPopChange = (val) => {
const handleSitePopChange = (obj) => {
isShowSitePop.value = false
siteLabel.value ='回收站点: ' + obj.stationName
- recycleStationId.value = obj.recycleStationId
+ recycleStationId.value = obj.id
}
// 预约回收
const handleBooking = async () => {
- if (isBooking) {
+ if (!isBooking.value) {
return
}
const arr = appointmentTime.value.split(' ')
const yymmdd = arr[0]
- const appointmentTimeStart = yymmdd + ' ' + arr[1].split('-')[1]
- const appointmentTimeEnd = yymmdd + ' ' + arr[1].split('-')[0]
+ const appointmentTimeStart = yymmdd + ' ' + arr[1].split('-')[0]
+ const appointmentTimeEnd = yymmdd + ' ' + arr[1].split('-')[1]
const params = {
appointmentTimeStart,
appointmentTimeEnd,
location: {
- longitude: longitude.value,
- latitude: latitude.value,
+ // longitude: longitude.value,
+ // latitude: latitude.value,
+ latitude: '31.163973',
+ longitude: '121.444032',
},
recycleAddress: recycleAddress.value,
- recycleStationId: recycleStationId.value
+ recycleStationId: recycleStationId.value,
+ remark: '请尽快上门'
}
const res = await postBookingAPI(params)
if (res.code == 200) {
@@ -244,7 +247,7 @@ const handleBooking = async () => {
- 立即预约回收
+ 立即预约回收
diff --git a/src/utils/http.ts b/src/utils/http.ts
index 8ae184d..8cb9a33 100644
--- a/src/utils/http.ts
+++ b/src/utils/http.ts
@@ -11,8 +11,8 @@
* 4. 添加 token 请求头标识
*/
import { useMemberStore } from '@/stores'
-const baseURL = 'http://222.71.165.188:8808/api'
-
+const baseURL = 'http://192.168.0.166:8808/api'
+// const baseURL = 'http://222.71.165.188:8808/api'
// 添加拦截器
const httpInterceptor = {
// 拦截前触发