Skip to content

Commit d4000a6

Browse files
authored
fix: Modify the help center redirection document (#38)
1 parent 5f23855 commit d4000a6

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

  • packages/tiny-engine-portal/src/help/home

packages/tiny-engine-portal/src/help/home/Main.vue

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ export default {
122122
],
123123
videoVisibility: false,
124124
videoData: {},
125-
imgPre: `${import.meta.env.BASE_URL}`
125+
imgPre: `${import.meta.env.BASE_URL}`,
126+
docsUrl: 'https://docs.opentiny.design/tiny-engine/'
126127
})
127128
128129
const getData = () => {
@@ -143,15 +144,18 @@ export default {
143144
if (item.value === TYPE_MAP.video) {
144145
window.open(item.moreLink)
145146
} else {
146-
router.push(item.moreLink)
147+
import.meta.env.MODE?.includes('open')
148+
? window.open(state.docsUrl)
149+
: router.push(item.moreLink)
147150
}
148151
}
149152
150153
const navItemClick = (item) => {
151154
if (item.type && item.name) {
152155
const data = docsTimeData.find((i) => i.subName === item.name.replace(/\.md$/, ''))
153-
154-
router.push(`/help-center/course/${data.type}/${data.subName.replace(/\.md$/, '')}`)
156+
import.meta.env.MODE?.includes('open')
157+
? window.open(`${state.docsUrl}${data.type}/${data.subName.replace(/\.md$/, '')}`)
158+
: router.push(`/help-center/course/${data.type}/${data.subName.replace(/\.md$/, '')}`)
155159
}
156160
}
157161

0 commit comments

Comments
 (0)