将 RTS info 服务地址解析为可用于 fetch 的完整 URL。
支持两种写法:
http://localhost:9009/ts/info/ts01
/ts/info/ts01
http://localhost:29009/ts/info/ts01
相对路径适用于服务与页面同域(或经代理转发)的场景,端口变更后无需修改场景 JSON。
RTS info 地址,绝对或相对均可
完整 URL;空字符串原样返回;无法解析时返回入参
resolveRtsInfoUrl('http://localhost:9009/ts/info/ts01')// => 'http://localhost:9009/ts/info/ts01' 复制
resolveRtsInfoUrl('http://localhost:9009/ts/info/ts01')// => 'http://localhost:9009/ts/info/ts01'
// 页面为 http://localhost:29009 时resolveRtsInfoUrl('/ts/info/ts01')// => 'http://localhost:29009/ts/info/ts01' 复制
// 页面为 http://localhost:29009 时resolveRtsInfoUrl('/ts/info/ts01')// => 'http://localhost:29009/ts/info/ts01'
将 RTS info 服务地址解析为可用于 fetch 的完整 URL。
支持两种写法:
http://localhost:9009/ts/info/ts01→ 原样返回/ts/info/ts01→ 拼接当前页面 origin,如http://localhost:29009/ts/info/ts01相对路径适用于服务与页面同域(或经代理转发)的场景,端口变更后无需修改场景 JSON。