测试接单后链路
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user