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

@ -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 () => {
<address-popup v-if="isShowAddressPop" @change="handleAddressPopChange" />
<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>

@ -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 = {
// 拦截前触发

Loading…
Cancel
Save