Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 2169 #2507

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/frontend/devops-repository/src/AppMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default {
},
watch: {
'$route.fullPath' (val) { // 同步地址到蓝鲸Devops
this.$syncUrl?.(val.replace(/^\/[a-zA-Z0-9]+\//, '/'))
this.$syncUrl?.(val)
}
},
created () {
Expand Down Expand Up @@ -53,7 +53,7 @@ export default {
script.src = src
document.getElementsByTagName('head')[0].appendChild(script)
script.onload = () => {
this.$syncUrl?.(this.$route.fullPath.replace(/^\/[a-zA-Z0-9]+\//, '/'))
this.$syncUrl?.(this.$route.fullPath.replace(routeBase, '/'))
this.$changeActiveRoutes?.(this.$route?.meta?.breadcrumb?.map(v => v.name) || [])
window.globalVue.$on('change::$currentProjectId', data => { // 蓝鲸Devops选择项目时切换
localStorage.setItem('projectId', data.currentProjectId)
Expand All @@ -64,7 +64,7 @@ export default {

window.globalVue.$on('change::$routePath', data => { // 蓝鲸Devops切换路径
console.log('change::$routePath', data)
this.$router.push({ name: data.routePath.englishName, path: data.routePath.path.replace(/^\/[a-zA-Z]+/, routeBase) })
this.$router.push({ name: data.routePath.englishName, path: data.routePath.path.replace(/^\/[a-z]+/i, routeBase) })
})

window.globalVue.$on('order::backHome', data => { // 蓝鲸Devops选择项目时切换
Expand Down
Loading