测试接单后链路

This commit is contained in:
2026-05-28 15:16:58 +08:00
parent 1bf9d11c35
commit 83be5b3c66
13 changed files with 1437 additions and 93 deletions

View File

@@ -37,6 +37,7 @@
import { ref, onMounted, getCurrentInstance } from 'vue'
import { onShow, onLoad } from '@dcloudio/uni-app'
import { supabaseService, type UserAddress as SupabaseUserAddress } from '@/utils/supabaseService.uts'
import { HomeServiceSelectedAddressType } from '@/types/home-service.uts'
type Address = {
id: string
@@ -170,27 +171,31 @@ const editAddress = (id: string) => {
const selectAddress = (item: Address) => {
if (selectionMode.value) {
uni.$emit('addressSelected', {
id: item.id,
const fullAddressText = getFullAddress(item)
const selectedAddress = {
addressId: item.id,
userId: '',
recipient_name: item.name,
isDefault: item.isDefault,
contactName: item.name,
phone: item.phone,
contactPhone: item.phone,
province: item.province,
city: item.city,
district: item.district,
detail: item.detail,
phone: item.phone,
addressName: `${item.province}${item.city}${item.district}`,
locationName: `${item.province}${item.city}${item.district}`,
addressDetail: item.detail,
locationAddress: `${item.province}${item.city}${item.district}`,
houseNumber: item.detail,
fullAddress: getFullAddress(item),
remark: item.label ?? '',
doorNo: item.detail,
fullAddress: fullAddressText,
latitude: item.latitude ?? 0,
longitude: item.longitude ?? 0,
remark: item.label ?? '',
coordinateType: item.coordinateType ?? 'gcj02',
is_default: item.isDefault
})
createdAt: Date.now(),
updatedAt: Date.now()
} as HomeServiceSelectedAddressType
uni.setStorageSync('hss_selected_service_address', selectedAddress)
uni.$emit('addressSelected', selectedAddress)
uni.navigateBack()
} else {
editAddress(item.id)