Files
medical-mall/utils/deliveryRoute.uts

21 lines
388 B
Plaintext

export function getDeliveryRouteParam(options: UTSJSONObject | null, key: string): string {
if (options == null || key == '') {
return ''
}
try {
const value = options.getString(key)
if (value != null && value != '') {
return value
}
} catch (e) {}
try {
const rawValue = options[key]
if (rawValue != null) {
return '' + rawValue
}
} catch (e) {}
return ''
}