39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import { publicPlGet, publicPlPost, publicPlUpload } from '@/utils/http/public-pl'
|
|
|
|
export interface PublicTransportProduct {
|
|
productName: string
|
|
model?: string
|
|
packageSpec?: string
|
|
unit?: string
|
|
quantity?: number
|
|
}
|
|
|
|
export interface PublicTransportPage {
|
|
planNo: string
|
|
planDate?: string
|
|
planType: string
|
|
pickupAddress?: string
|
|
destinationAddress?: string
|
|
licensePlate?: string
|
|
driverName?: string
|
|
driverPhone?: string
|
|
products: PublicTransportProduct[]
|
|
feedbackRemark?: string
|
|
feedbackImages: string[]
|
|
feedbackTime?: string
|
|
planVoided?: boolean
|
|
}
|
|
|
|
export interface PublicUploadResult {
|
|
fileUrl: string
|
|
fileName?: string
|
|
}
|
|
|
|
export const publicTransportApi = {
|
|
getPage: (token: string) => publicPlGet<PublicTransportPage>(`/public/pl/transport/${token}`),
|
|
saveFeedback: (token: string, data: { feedbackImages?: string[]; feedbackRemark?: string }) =>
|
|
publicPlPost<{ success: boolean }>(`/public/pl/transport/${token}/feedback`, data),
|
|
uploadAttachment: (token: string, file: File) =>
|
|
publicPlUpload<PublicUploadResult>(`/public/pl/transport/${token}/attachments`, file)
|
|
}
|