forked from github/dataease
fix: 仪表盘分享公共连接地址为localhost,无法访问
This commit is contained in:
parent
0142ec49e5
commit
b717b406b2
@ -24,8 +24,7 @@ import java.util.Map;
|
|||||||
@Service
|
@Service
|
||||||
public class PanelLinkService {
|
public class PanelLinkService {
|
||||||
|
|
||||||
@Value("${public-link-url:http://localhost:9528/link.html?link=}")
|
private static final String baseUrl = "/link.html?link=";
|
||||||
private String baseUrl;
|
|
||||||
|
|
||||||
@Value("${public-link-salt:DataEaseLinkSalt}")
|
@Value("${public-link-salt:DataEaseLinkSalt}")
|
||||||
private String salt;
|
private String salt;
|
||||||
|
@ -66,6 +66,11 @@ export default {
|
|||||||
defaultForm: { enablePwd: false, pwd: null, uri: null }
|
defaultForm: { enablePwd: false, pwd: null, uri: null }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
origin() {
|
||||||
|
return window.location.origin
|
||||||
|
}
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.form = this.defaultForm
|
this.form = this.defaultForm
|
||||||
this.currentGenerate()
|
this.currentGenerate()
|
||||||
@ -76,7 +81,7 @@ export default {
|
|||||||
const { valid, enablePwd, pwd, uri } = res.data
|
const { valid, enablePwd, pwd, uri } = res.data
|
||||||
this.valid = valid
|
this.valid = valid
|
||||||
this.form.enablePwd = enablePwd
|
this.form.enablePwd = enablePwd
|
||||||
this.form.uri = uri
|
this.form.uri = uri ? (this.origin + uri) : uri
|
||||||
// 返回的密码是共钥加密后的 所以展示需要私钥解密一波
|
// 返回的密码是共钥加密后的 所以展示需要私钥解密一波
|
||||||
pwd && (this.form.pwd = decrypt(pwd))
|
pwd && (this.form.pwd = decrypt(pwd))
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user