master
王文杰 8 months ago
parent 436b9e15d7
commit 33e9e4f175

@ -164,27 +164,30 @@ const handleAddressPopChange = (val) => {
const handleSitePopChange = (obj) => { const handleSitePopChange = (obj) => {
isShowSitePop.value = false isShowSitePop.value = false
siteLabel.value ='回收站点: ' + obj.stationName siteLabel.value ='回收站点: ' + obj.stationName
recycleStationId.value = obj.recycleStationId recycleStationId.value = obj.id
} }
// //
const handleBooking = async () => { const handleBooking = async () => {
if (isBooking) { if (!isBooking.value) {
return return
} }
const arr = appointmentTime.value.split(' ') const arr = appointmentTime.value.split(' ')
const yymmdd = arr[0] const yymmdd = arr[0]
const appointmentTimeStart = yymmdd + ' ' + arr[1].split('-')[1] const appointmentTimeStart = yymmdd + ' ' + arr[1].split('-')[0]
const appointmentTimeEnd = yymmdd + ' ' + arr[1].split('-')[0] const appointmentTimeEnd = yymmdd + ' ' + arr[1].split('-')[1]
const params = { const params = {
appointmentTimeStart, appointmentTimeStart,
appointmentTimeEnd, appointmentTimeEnd,
location: { location: {
longitude: longitude.value, // longitude: longitude.value,
latitude: latitude.value, // latitude: latitude.value,
latitude: '31.163973',
longitude: '121.444032',
}, },
recycleAddress: recycleAddress.value, recycleAddress: recycleAddress.value,
recycleStationId: recycleStationId.value recycleStationId: recycleStationId.value,
remark: '请尽快上门'
} }
const res = await postBookingAPI(params) const res = await postBookingAPI(params)
if (res.code == 200) { if (res.code == 200) {
@ -244,7 +247,7 @@ const handleBooking = async () => {
<address-popup v-if="isShowAddressPop" @change="handleAddressPopChange" /> <address-popup v-if="isShowAddressPop" @change="handleAddressPopChange" />
<site-popup v-if="isShowSitePop" @change="handleSitePopChange" /> <site-popup v-if="isShowSitePop" @change="handleSitePopChange" />
<view :class="[isBooking? '':'disabled','submit']" @click="handleBooking"></view> <view :class="[!isBooking ? 'disabled' : '', 'submit']" @click="handleBooking"></view>
<!-- 底部占位空盒子 --> <!-- 底部占位空盒子 -->
<view class="toolbar-height" safe-area-inset-bottom></view> <view class="toolbar-height" safe-area-inset-bottom></view>
</view> </view>

@ -11,8 +11,8 @@
* 4. token * 4. token
*/ */
import { useMemberStore } from '@/stores' 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 = { const httpInterceptor = {
// 拦截前触发 // 拦截前触发

Loading…
Cancel
Save