This commit is contained in:
wuzilong committed 2026-09-14 11:57:58 +08:00
1 parent 31d3a044cf
commit b7d0d4a4f8
373 files changed
+103998 -41299

No files matched your search

+14 -12
View File
@@ -49,25 +49,27 @@ export async function fetchProductOptions(keyword) {
return extractOptions(unwrapPortal(res))
}
/** 运输车辆车牌 */
export async function fetchVehicleOptions(q) {
/**
* 运输车辆车牌
* @param {string} [q] 车牌模糊搜索
* @param {{ vehicleType?: string }} [opts] vehicleType: self-自有 / carrier-三方
*/
export async function fetchVehicleOptions(q, opts = {}) {
const params = {
...(q?.trim() ? { q: q.trim() } : {}),
...(opts.vehicleType ? { vehicleType: opts.vehicleType } : {}),
page: 1,
pageSize: 100
}
try {
const data = await db.get('/transport/vehicle', {
...(q?.trim() ? { q: q.trim() } : {}),
page: 1,
pageSize: 100
})
const data = await db.get('/transport/vehicle', params)
return extractOptions(data)
} catch (e) {
// 兼容门户信封
const res = await request({
url: '/transport/vehicle',
method: 'GET',
data: {
...(q?.trim() ? { q: q.trim() } : {}),
page: 1,
pageSize: 100
}
data: params
})
return extractOptions(unwrapPortal(res))
}