支持mode配置history(表示去掉地址栏的#)

This commit is contained in:
RuoYi
2019-11-21 09:59:45 +08:00
parent 2c48aedda7
commit b05a539970
4 changed files with 38 additions and 15 deletions

View File

@ -482,9 +482,13 @@ $(function() {
// 设置锚点
function setIframeUrl(href) {
var nowUrl = window.location.href;
var newUrl = nowUrl.substring(0, nowUrl.indexOf("#"));
window.location.href = newUrl + "#" + href;
if($.common.equals("history", mode)) {
storage.set('publicPath', href);
} else {
var nowUrl = window.location.href;
var newUrl = nowUrl.substring(0, nowUrl.indexOf("#"));
window.location.href = newUrl + "#" + href;
}
}
$(window).keydown(function(event) {