diff --git a/src/pages/booking/booking.vue b/src/pages/booking/booking.vue index 3e6faae..03e4ec4 100644 --- a/src/pages/booking/booking.vue +++ b/src/pages/booking/booking.vue @@ -121,12 +121,14 @@ const handleWeightChange = (val) => { activeWeightKey.value = val } // 分类切换选中 -const handleCategoryChange = (val) => { - categoryList.forEach((e) => { - if (val == e.code) { - e.selected = !e.selected - } - }) +const handleCategoryChange = (item) => { + if (!item.disabled) { + categoryList.forEach((e) => { + if (item.code == e.code) { + e.selected = !e.selected + } + }) + } } // 预约回收 const handleBooking = async () => { @@ -232,7 +234,7 @@ const handlePopClose = (item) => { 'category-item', ]" hover-class="none" - @click="handleCategoryChange(item.code)" + @click="handleCategoryChange(item)" > diff --git a/src/utils/http.ts b/src/utils/http.ts index 393a940..4e1f3bb 100644 --- a/src/utils/http.ts +++ b/src/utils/http.ts @@ -11,8 +11,8 @@ * 4. 添加 token 请求头标识 */ import { useMemberStore } from '@/stores' -const baseURL = 'http://192.168.0.166:8808/api' -// 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 = { // 拦截前触发