File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
packages/site-components/src/components/td-doc-changelog Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ const locale = getLocale();
1313
1414const OFFICIAL_DOMAINS = [ 'tencent.com' , 'woa.com' ] ;
1515
16+ // 静态资源统一的地址,支持tencent.com 和 woa.com的跨域请求
17+ const OFFICIAL_STATIC_DOMAINS = 'static.tdesign.tencent.com' ;
1618const SPECIAL_NAME_MAP = {
1719 qrcode : 'QRCode' ,
1820} ;
@@ -21,7 +23,9 @@ function getLogUrlPrefix() {
2123 const currentUrl = window . location . href ;
2224 const framework = currentUrl . split ( '/' ) [ 3 ] ;
2325 const isOfficial = OFFICIAL_DOMAINS . some ( ( domain ) => location . hostname . includes ( domain ) ) ;
24- return `${ location . origin } ${ isOfficial ? `/${ framework } ` : '' } ` ;
26+ if ( isOfficial ) return OFFICIAL_STATIC_DOMAINS + `/${ framework } ` ;
27+
28+ return location . origin ;
2529}
2630
2731function getCompName ( ) {
You can’t perform that action at this time.
0 commit comments