Skip to content

Commit

Permalink
chore: use window.location to get current origin
Browse files Browse the repository at this point in the history
Signed-off-by: Miles Zhang <[email protected]>
  • Loading branch information
zmcNotafraid committed Mar 20, 2024
1 parent 4fa8914 commit 5ab1def
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { DATA_ZOOM_CONFIG } from '../../../utils/chart'
import { SmartChartPage } from '../common'
import { ChartItem, explorerService } from '../../../services/ExplorerService'
import { ChartColorConfig } from '../../../constants/common'
import config from '../../../config'

const useOption = (
statisticContractResourceDistributed: ChartItem.ContractResourceDistributed[],
Expand Down Expand Up @@ -50,7 +49,7 @@ const useOption = (
position: 'top',
enterable: true,
formatter: (params: any) => {
return `<a href=https://${config.BASE_URL}/script/${params.value[3]}/${params.value[5]} target=_blank>${
return `<a href=${window.location.origin}/script/${params.value[3]}/${params.value[5]} target=_blank>${
params.value[4] || params.value[3]
}</a>`
},
Expand Down

0 comments on commit 5ab1def

Please sign in to comment.