dev #2

Merged
yrk merged 4 commits from dev into main 2026-02-28 07:44:48 +00:00
2 changed files with 22 additions and 6 deletions
Showing only changes of commit bc8cbe5e8d - Show all commits

View File

@ -12,8 +12,8 @@
<view class="map_container">
<map-exhibition
:map-location="{
latitude: routeQuery.startLocation?.latitude,
longitude: routeQuery.startLocation?.longitude,
latitude: bikeDetails.location?.latitude,
longitude: bikeDetails.location?.longitude,
}"
/>
</view>
@ -63,6 +63,7 @@
<script setup lang="ts">
import { onLoad } from '@dcloudio/uni-app'
import { getEbikeDetailForWorkAPI } from '@/api/operator'
import { changePriceApi } from '@/api/order-manage'
import MapExhibition from '@/components/mapExhibition/mapExhibition.vue'
import { systemInfo } from '@/utils/systemInfo'
@ -103,11 +104,14 @@ const btnConfig = reactive({
btnLoadingText: '正在提交',
})
const bikeDetails = ref<any>({})
const routeQuery = ref<any>({})
onLoad((options) => {
onLoad(async (options) => {
const data = JSON.parse(decodeURIComponent(options.data))
routeQuery.value = data
formData.bikeCode = data.bikeCode
bikeDetails.value = await getBikeDetails(data.bikeCode)
console.log(bikeDetails.value, 'bikeDetails.value')
})
const form = ref<any>(null)
@ -133,6 +137,10 @@ async function submitForm() {
btnConfig.btnLoading = false
}
}
async function getBikeDetails(bikeCode: string) {
return await getEbikeDetailForWorkAPI(bikeCode)
}
</script>
<style lang="scss" scoped>

View File

@ -12,8 +12,8 @@
<view class="map_container">
<map-exhibition
:map-location="{
latitude: routeQuery.startLocation?.latitude,
longitude: routeQuery.startLocation?.longitude,
latitude: bikeDetails.location?.latitude,
longitude: bikeDetails.location?.longitude,
}"
/>
</view>
@ -53,6 +53,7 @@
<script setup lang="ts">
import { onLoad } from '@dcloudio/uni-app'
import { getEbikeDetailForWorkAPI } from '@/api/operator'
import { lockBikeApi } from '@/api/order-manage'
import MapExhibition from '@/components/mapExhibition/mapExhibition.vue'
import { systemInfo } from '@/utils/systemInfo'
@ -81,12 +82,19 @@ const btnConfig = reactive({
btnLoadingText: '正在锁车中...',
})
const bikeDetails = ref<any>({})
const routeQuery = ref<any>({})
onLoad((options) => {
onLoad(async (options) => {
const data = JSON.parse(decodeURIComponent(options.data))
routeQuery.value = data
bikeDetails.value = await getBikeDetails(data.bikeCode)
console.log(bikeDetails.value, 'bikeDetails.value')
})
async function getBikeDetails(bikeCode: string) {
return await getEbikeDetailForWorkAPI(bikeCode)
}
const form = ref<any>(null)
async function submitForm() {
await form.value.validate()