diff --git a/src/modules/app.provider.ts b/src/modules/app.provider.ts index c1b83e2..4ed6284 100644 --- a/src/modules/app.provider.ts +++ b/src/modules/app.provider.ts @@ -92,13 +92,13 @@ BI.provider('dec.connection.provider.datebase', function () { } // 处理SAP HANA数据连接url - const sapHanaUrl = url.match(/^jdbc:(sap):(thin:([0-9a-zA-Z/]*)?@|thin:([0-9a-zA-Z/]*)?@\/\/|\/\/|)([0-9a-zA-Z_\\.-]+)(:([0-9|port]+))?([^]+)?(.*)/i); + const sapHanaUrl = url.match(/^jdbc:(sap):(thin:([0-9a-zA-Z/]*)?@|thin:([0-9a-zA-Z/]*)?@\/\/|\/\/|)([0-9a-zA-Z_\\.-]+)(:([0-9|port]+))?(\?databaseName=)?([^&]+)([^]+)?(.*)/i); if (sapHanaUrl) { return { host: sapHanaUrl[5], port: sapHanaUrl[7] === 'port' ? '' : sapHanaUrl[7], - databaseName: '', - urlInfo: sapHanaUrl[9], + databaseName: sapHanaUrl[9] || '', + urlInfo: sapHanaUrl[10], }; }