会诊管理中 门诊会诊申请确认和门诊会诊申请管理模块全部功能的实现。包括数据库设计,前端UI设计,后端接口开发。
This commit is contained in:
@@ -86,6 +86,19 @@ function resolvePath(routePath, routeQuery) {
|
||||
return props.basePath
|
||||
}
|
||||
if (routeQuery) {
|
||||
try {
|
||||
// 检查 routeQuery 是否已经是对象
|
||||
if (typeof routeQuery === 'object') {
|
||||
return { path: getNormalPath(props.basePath + '/' + routePath), query: routeQuery }
|
||||
}
|
||||
// 尝试解析 JSON 字符串
|
||||
let query = JSON.parse(routeQuery);
|
||||
return { path: getNormalPath(props.basePath + '/' + routePath), query: query }
|
||||
} catch (e) {
|
||||
// 如果解析失败,将其作为普通字符串处理
|
||||
console.warn('Failed to parse routeQuery as JSON:', routeQuery, e);
|
||||
return getNormalPath(props.basePath + '/' + routePath)
|
||||
}
|
||||
try {
|
||||
let query = JSON.parse(routeQuery);
|
||||
return { path: getNormalPath(props.basePath + '/' + routePath), query: query }
|
||||
@@ -93,6 +106,19 @@ function resolvePath(routePath, routeQuery) {
|
||||
console.error('Failed to parse routeQuery:', routeQuery, e);
|
||||
return getNormalPath(props.basePath + '/' + routePath)
|
||||
}
|
||||
try {
|
||||
// 检查 routeQuery 是否已经是对象
|
||||
if (typeof routeQuery === 'object') {
|
||||
return { path: getNormalPath(props.basePath + '/' + routePath), query: routeQuery }
|
||||
}
|
||||
// 尝试解析 JSON 字符串
|
||||
let query = JSON.parse(routeQuery);
|
||||
return { path: getNormalPath(props.basePath + '/' + routePath), query: query }
|
||||
} catch (e) {
|
||||
// 如果解析失败,将其作为普通字符串处理
|
||||
console.warn('Failed to parse routeQuery as JSON:', routeQuery, e);
|
||||
return getNormalPath(props.basePath + '/' + routePath)
|
||||
}
|
||||
}
|
||||
return getNormalPath(props.basePath + '/' + routePath)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user