Skip to content

Commit

Permalink
修复一个小bug: 无法回到homePage
Browse files Browse the repository at this point in the history
  • Loading branch information
click33 committed May 15, 2019
1 parent c58ff66 commit 6fe0e14
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sa-html/cfg/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
</style>
</head>
<body>
<a href="javascript: parent.sp.selectMenu(0);" class="xiaoxi">返回首页</a>
<a href="javascript: parent.sp.showHome();" class="xiaoxi">返回首页</a>
</body>
</html>
2 changes: 1 addition & 1 deletion sa-html/cfg/500.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
</style>
</head>
<body>
<a href="javascript: parent.sp.selectMenu(0);" class="xiaoxi">返回首页</a>
<a href="javascript: parent.sp.showHome();" class="xiaoxi">返回首页</a>
</body>
</html>
4 changes: 4 additions & 0 deletions sa-resources/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ var sp = new Vue({
this.showPage(menu);
}
},
// 显示homePage
showHome: function(id) {
this.showPage(homePage);
},
// js关闭某个page, 根据id
closePageById: function(id) {
var page = this.getPageById(id);
Expand Down

0 comments on commit 6fe0e14

Please sign in to comment.