Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
mlaj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-08-26 09:46:30 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
63d739ab802b5099216016ca428c146d9985759b
63d739ab
1 parent
a17d687a
fix(router): 启用微信授权检查导航守卫
恢复微信授权检查功能,确保未授权用户被正确拦截
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
src/router/index.js
src/router/index.js
View file @
63d739a
/*
* @Date: 2025-03-20 20:36:36
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-0
7-07 14:26:52
* @LastEditTime: 2025-0
8-26 09:43:50
* @FilePath: /mlaj/src/router/index.js
* @Description: 路由实例创建和导出
*/
...
...
@@ -22,11 +22,11 @@ const router = createRouter({
// 导航守卫
router
.
beforeEach
(
async
(
to
,
from
,
next
)
=>
{
// 微信授权检查
//
const wxAuthResult = await checkWxAuth()
//
if (wxAuthResult !== true) {
//
next(wxAuthResult)
//
return
//
}
const
wxAuthResult
=
await
checkWxAuth
()
if
(
wxAuthResult
!==
true
)
{
next
(
wxAuthResult
)
return
}
// 检查用户是否已登录
...
...
Please
register
or
login
to post a comment