Skip to content

Commit ec03cc2

Browse files
committed
fix: 正确使用对应环境的地址
1 parent 3e28abf commit ec03cc2

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

site/components/Banner/Banner.tsx

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useIntl, useLocale } from 'dumi';
22
import React, { useEffect, useState } from 'react';
3-
import { ActiveIcon } from '../common';
43
import { ANCHORNAME } from '../ProjectCard';
4+
import { getBaseSiteDataUrl } from '@antv/dumi-theme-antv/dist/utils/env';
55

66
import styles from './Banner.module.less';
77
import { HomeDialog } from '@antv/dumi-theme-antv/dist/components/AI/HomeDialog';
@@ -20,7 +20,7 @@ export default () => {
2020
};
2121

2222
useEffect(() => {
23-
fetch('https://site-data-pre.alipay.com/antv/banner-messages.json')
23+
fetch(`${getBaseSiteDataUrl()}/antv/banner-messages.json`)
2424
.then((res) => res.json())
2525
.then((data) => {
2626
setMessage(data);
@@ -77,19 +77,6 @@ export default () => {
7777
promptTextareaStyle={{margin: "0 auto", width: "40vw", minWidth: "300px"}}
7878
recommendCaseClassName={styles.listContainer}
7979
style={{margin: "270px auto", width: "unset"}}/>
80-
{/*<div className={styles.buttons}>*/}
81-
{/* <div className={styles.start} onClick={scrollToAnchor}>*/}
82-
{/* <div className={styles.startIcon} />*/}
83-
{/* {useT('开始使用')}*/}
84-
{/* </div>*/}
85-
{/* <ActiveIcon*/}
86-
{/* href="/specification/principles/basic"*/}
87-
{/* className={styles.design}*/}
88-
{/* img="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*_xFsQbWE_AYAAAAAAAAAAAAADmJ7AQ/original"*/}
89-
{/* activeImg="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*A9VnTpferioAAAAAAAAAAAAADmJ7AQ/original"*/}
90-
{/* text={useT('设计语言')}*/}
91-
{/* />*/}
92-
{/*</div>*/}
9380
<div className={styles.bottom}>
9481
{message.map(({ title, subTitle, img, link }) => {
9582
return (

0 commit comments

Comments
 (0)