Explorar el Código

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

mxd hace 3 años
padre
commit
ab9e6a36a6
Se han modificado 1 ficheros con 1 adiciones y 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
     }