Skip to content

Commit

Permalink
修改 路由重复导致报错问题
Browse files Browse the repository at this point in the history
  • Loading branch information
liufei-ereach committed Jul 1, 2024
1 parent 4b33125 commit 0127345
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
(new Extend\Frontend('forum'))
->js(__DIR__.'/js/dist/forum.js')
->css(__DIR__.'/less/forum.less')
->route('/store', 'mattoid-store.forum.tital'),
->route('/super/store', 'mattoid-store.forum.tital'),
(new Extend\Frontend('admin'))
->js(__DIR__.'/js/dist/admin.js')
->css(__DIR__.'/less/admin.less'),
Expand Down
8 changes: 4 additions & 4 deletions js/src/forum/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import LinkButton from 'flarum/common/components/LinkButton';
import StorePage from "./components/StorePage";

app.initializers.add('mattoid/store', () => {
app.routes.store = {
path: '/store',
app.routes.superStore = {
path: '/super/store',
component: StorePage,
};

Expand All @@ -15,8 +15,8 @@ app.initializers.add('mattoid/store', () => {
return false;
}

items.add('store', LinkButton.component({
href: app.route('store'),
items.add('superStore', LinkButton.component({
href: app.route('superStore'),
icon: 'fas fa-store',
}, app.forum.attribute("storeName") || app.translator.trans('mattoid-store.forum.tital')));
});
Expand Down

0 comments on commit 0127345

Please sign in to comment.