Explorar o código

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

mxd %!s(int64=3) %!d(string=hai) anos
pai
achega
ab9e6a36a6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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
     }