Bladeren bron

修复在配置`baseURL`为`/`开头时的拼接错误

mxd 3 jaren geleden
bovenliggende
commit
ab9e6a36a6
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      magic-editor/src/console/src/components/magic-editor.vue

+ 1 - 1
magic-editor/src/console/src/components/magic-editor.vue

@@ -105,7 +105,7 @@ export default {
     if (contants.BASE_URL.startsWith('http')) { // http开头
       link = contants.BASE_URL
     } else if (contants.BASE_URL.startsWith('/')) { // / 开头的
-      link = link + contants.BASE_URL
+      link = `${location.protocol}/${location.host}${contants.BASE_URL}`
     } else {
       link = link + '/' + contants.BASE_URL
     }