提交 b717b406 authored 作者: fit2cloud-chenyw's avatar fit2cloud-chenyw

fix: 仪表盘分享公共连接地址为localhost,无法访问

上级 0142ec49
......@@ -24,8 +24,7 @@ import java.util.Map;
@Service
public class PanelLinkService {
@Value("${public-link-url:http://localhost:9528/link.html?link=}")
private String baseUrl;
private static final String baseUrl = "/link.html?link=";
@Value("${public-link-salt:DataEaseLinkSalt}")
private String salt;
......
......@@ -66,6 +66,11 @@ export default {
defaultForm: { enablePwd: false, pwd: null, uri: null }
}
},
computed: {
origin() {
return window.location.origin
}
},
created() {
this.form = this.defaultForm
this.currentGenerate()
......@@ -76,7 +81,7 @@ export default {
const { valid, enablePwd, pwd, uri } = res.data
this.valid = valid
this.form.enablePwd = enablePwd
this.form.uri = uri
this.form.uri = uri ? (this.origin + uri) : uri
// 返回的密码是共钥加密后的 所以展示需要私钥解密一波
pwd && (this.form.pwd = decrypt(pwd))
})
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论