\flarum-beta4\vendor\flarum\core\js\forum\dist\app.js 29916行,去掉 slug
相关:
app.route.discussion = function (discussion, near) {
return app.route(near && near !== 1 ? 'discussion.near' : 'discussion', {
id: discussion.id(),
near: near && near !== 1 ? near : undefined
});
};
\flarum-beta4\vendor\flarum\core\js\forum\src\initializers\routes.js 和上一个文件类似
\flarum-beta4\vendor\flarum\core\src\Forum\ForumServiceProvider.php 68行,修改路由相关(这个不确定应该怎么改):
$routes->get(
'/d/{id:\d+(?:-[^/]*)?}[/{near:[^/]*}]',
'discussion',
$toController('Flarum\Forum\Controller\DiscussionController')
);
另直接修改代码实在是比较危险的做法,不建议不懂代码的修改,出问题不管修。