|
|
@ -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>
|
|
|
|