diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 034bbc6..27009e8 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -14,7 +14,7 @@ jobs: uses: actions/checkout@v2 - name: 'Set pnpm' - uses: pnpm/action-setup@v2.2.2 + uses: pnpm/action-setup@v4.0.0 with: version: 6.32.20 @@ -54,7 +54,7 @@ jobs: - uses: actions/checkout@v2 - name: 'Set pnpm' - uses: pnpm/action-setup@v2.2.2 + uses: pnpm/action-setup@v4.0.0 with: version: 6.32.20 @@ -80,7 +80,7 @@ jobs: - uses: actions/checkout@v2 - name: 'Set pnpm' - uses: pnpm/action-setup@v2.2.2 + uses: pnpm/action-setup@v4.0.0 with: version: 6.32.20 diff --git a/src/data/config.ts b/src/data/config.ts index 727a087..07efcf6 100644 --- a/src/data/config.ts +++ b/src/data/config.ts @@ -4,6 +4,7 @@ const APP_CONF = { COMPONENT: 'https://dtstack.github.io/dt-react-component/?path=/story/*', TAIER: 'https://dtstack.github.io/Taier/', DT_UTILS: 'https://dtstack.github.io/dt-utils/#/', + YI_CE: 'https://github.com/DTStack/yice-performance', DT_SQL_PARSER: 'https://dtstack.github.io/monaco-sql-languages/', DORAEMON: 'https://dtstack.github.io/doraemon/docsify/#/', IMAGE_DOMAIN: 'http://assets.dtstack.com', diff --git a/src/data/doc.ts b/src/data/doc.ts index 934af92..fb65ef5 100644 --- a/src/data/doc.ts +++ b/src/data/doc.ts @@ -79,12 +79,19 @@ export const OriginList = [ jump_url: APP_CONF.KO, }, { - key: 'dt-utils', - imgUrl: `${APP_CONF.IMAGE_DOMAIN}/UEDLanding/Home/dt-utils.png`, - title: 'dt-utils', - subTitle: '袋鼠云实用工具库', - jump_url: APP_CONF.DT_UTILS + key: 'yice-performance', + imgUrl: `${APP_CONF.IMAGE_DOMAIN}/UEDLanding/Home/yice.png`, + title: '易测', + subTitle: '易测性能检测平台', + jump_url: APP_CONF.YI_CE }, + // { + // key: 'dt-utils', + // imgUrl: `${APP_CONF.IMAGE_DOMAIN}/UEDLanding/Home/yice.png`, + // title: 'dt-utils', + // subTitle: '袋鼠云实用工具库', + // jump_url: APP_CONF.DT_UTILS + // }, { key: 'Doraemon', imgUrl: `${APP_CONF.IMAGE_DOMAIN}/UEDLanding/Home/doraemon.png`, diff --git a/src/data/menu.ts b/src/data/menu.ts index 8c71721..5d3bbc8 100644 --- a/src/data/menu.ts +++ b/src/data/menu.ts @@ -46,7 +46,7 @@ const menu = [ label: 'dt-sql-parser', jump_url: APP_CONF.DT_SQL_PARSER }, - { + { key: 'code-review-practices', name: 'code-review-practices', label: 'code-review-practices', @@ -76,6 +76,12 @@ const menu = [ label: 'dt-utils', jump_url: APP_CONF.DT_UTILS }, + { + key: 'yice-performance', + name: '易测性能检测平台', + label: '易测性能检测平台', + jump_url: APP_CONF.YI_CE + }, { key: 'Doraemon', name: 'Doraemon', diff --git a/src/pages/article/index.tsx b/src/pages/article/index.tsx index f9c9d41..ee5dd62 100644 --- a/src/pages/article/index.tsx +++ b/src/pages/article/index.tsx @@ -29,10 +29,12 @@ const Article = (data) => { ] const {title, description, keywords} = seo || {}; const sortTag = tagList?.find(item => item.key === tag_type)?.label; + const env = process.env.NODE_ENV || 'development'; + const fetchUrl = env === 'development' ? 'http://localhost:3002' : ''; useEffect(() => { setMobile(isMobile(window)); - fetch('/api/getTagList') + fetch(`${fetchUrl}/api/getTagList`) .then(res => res.json()) .then(res => { const tagList = res.data?.map((item) => { @@ -75,7 +77,7 @@ const Article = (data) => { sort_type, } setSpinning(true) - fetch(`/api/getArticleList?${new URLSearchParams(params).toString()}`) + fetch(`${fetchUrl}/api/getArticleList?${new URLSearchParams(params).toString()}`) .then(res => res.json()) .then(res => { handleArticleList(res.data)