Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
corporateCulture-qd
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王立鹏
corporateCulture-qd
Commits
2a7fbb51
Commit
2a7fbb51
authored
Feb 13, 2026
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【需求 20331】 perf: 优化code跳转相关
parent
aca22208
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
index.ts
src/utils/index.ts
+1
-0
wxLogin.ts
src/utils/wxUtil/wxLogin.ts
+5
-2
No files found.
src/utils/index.ts
View file @
2a7fbb51
export
*
from
'./app'
export
*
from
'./wxUtil'
export
*
from
'./excel'
src/utils/wxUtil/wxLogin.ts
View file @
2a7fbb51
import
{
app_config
}
from
'@/config'
import
{
localCache
}
from
'@/utils/storage'
import
{
useUserStore
}
from
'@/stores'
// import { localCache } from '@/utils/storage'
/**
* 跳转企业微信获取最新code
...
...
@@ -7,7 +8,9 @@ import { localCache } from '@/utils/storage'
*/
export
function
wxLogin
(
fullPath
:
string
)
{
const
wxRedirect
=
app_config
[
import
.
meta
.
env
.
MODE
]?.
wxRedirect
localCache
.
removeCache
(
'token'
)
const
userStore
=
useUserStore
()
userStore
.
clearAllUserInfo
()
// localCache.removeCache('token')
const
wxUrl
=
'https://open.weixin.qq.com/connect/oauth2/authorize'
const
redirect
=
encodeURIComponent
(
'http://'
+
wxRedirect
+
fullPath
)
const
wxParams
=
`?appid=ww42a2d34b42b8d721&redirect_uri=
${
redirect
}
&response_type=code&scope=snsapi_base&state=#wechat_redirect`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment