Skip to content

Commit

Permalink
[fix]删除编辑页跳转404的逻辑 review by qiwei
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxianhuii committed Sep 1, 2023
1 parent 8c91620 commit 8f3e44f
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions examples/js/editor.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.*/
var exampleNameList = [];

$(document).ready(function () {
window.initI18N(function(){
generateExampleNameList();
initPage();
bindEvents();
sidebarScrollFix();
Expand All @@ -18,16 +15,6 @@ function initPage() {
screenResize();
}

function generateExampleNameList() {
var config = window.exampleConfig;
Object.keys(config).forEach((menuItem) => {
config[menuItem].content && Object.keys(config[menuItem].content).forEach((secondMenuItem) => {
config[menuItem].content[secondMenuItem].content && config[menuItem].content[secondMenuItem].content.forEach((exampleInfo) => {
exampleNameList.push(exampleInfo.fileName);
});
});
});
}


//获取示例页面的配置信息
Expand Down Expand Up @@ -102,10 +89,6 @@ function loadExampleHtml() {
if (!locationParam) {
return;
}
if (exampleNameList.indexOf(locationParam) === -1) {
window.location.href = window.location.origin + '/web/404.html';
return;
}
var href = window.location.toString();
var mapUrl = href.substr(0, href.lastIndexOf('/') + 1);
mapUrl = mapUrl + locationParam + ".html";
Expand Down

0 comments on commit 8f3e44f

Please sign in to comment.