Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
boyueCEnd
Project
Project
Details
Activity
Releases
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
游洁
boyueCEnd
Commits
14c8bc4f
Commit
14c8bc4f
authored
Dec 02, 2025
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
8bab1c35
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
41 deletions
+50
-41
Login.vue
src/views/auth/Login.vue
+28
-23
account.vue
...views/personalCenter/components/accountCenter/account.vue
+22
-18
No files found.
src/views/auth/Login.vue
View file @
14c8bc4f
...
...
@@ -229,7 +229,9 @@ const useLineLogin = async(code:string) => {
router
.
push
({
path
:
forward
?
forward
:
'/'
,
})
}
}
else
if
(
response
.
status
==
'ERROR'
){
router
.
push
(
'/login'
)
}
}
catch
(
error
:
any
)
{
Message
.
error
(
error
.
message
)
}
finally
{
...
...
@@ -243,6 +245,28 @@ const loginWechat = () => {
window
.
location
.
href
=
url
;
}
// 微信登录
const
useWechatLogin
=
async
(
code
:
string
)
=>
{
loading
.
value
=
true
try
{
const
response
=
await
userStore
.
setUserWechatLoginAsync
(
loginMsg
.
tenantId
?.
toString
()
||
''
,
code
,
loginMsg
.
distributorId
,
loginMsg
.
parentId
,
loginMsg
.
redirectUri
)
if
(
response
.
status
==
'SUCCESS'
)
{
userStore
.
setLoginType
(
loginMsg
.
reType
||
0
)
Message
.
success
(
t
(
'login.loginSuccess'
))
const
forward
=
localStorage
.
getItem
(
'forward'
)
localStorage
.
removeItem
(
'forward'
)
router
.
push
({
path
:
forward
?
forward
:
'/'
,
})
}
else
if
(
response
.
status
==
'ERROR'
){
router
.
push
(
'/login'
)
}
}
catch
(
error
:
any
)
{
Message
.
error
(
error
.
message
)
}
finally
{
loading
.
value
=
false
}
}
// 获取AppID 域名 重定向页面
const
getAppIdRedirectUri
=
async
(
providerType
:
string
)
=>
{
// const { AppID, State, OpenRedirectUri } = openInfo.value;
...
...
@@ -272,27 +296,6 @@ const getAppIdRedirectUri = async (providerType: string) => {
}
}
// 微信登录
const
useWechatLogin
=
async
(
code
:
string
)
=>
{
loading
.
value
=
true
try
{
const
response
=
await
userStore
.
setUserWechatLoginAsync
(
loginMsg
.
tenantId
?.
toString
()
||
''
,
code
,
loginMsg
.
distributorId
,
loginMsg
.
parentId
,
loginMsg
.
redirectUri
)
if
(
response
.
status
==
'SUCCESS'
)
{
userStore
.
setLoginType
(
loginMsg
.
reType
||
0
)
Message
.
success
(
t
(
'login.loginSuccess'
))
const
forward
=
localStorage
.
getItem
(
'forward'
)
localStorage
.
removeItem
(
'forward'
)
router
.
push
({
path
:
forward
?
forward
:
'/'
,
})
}
}
catch
(
error
:
any
)
{
Message
.
error
(
error
.
message
)
}
finally
{
loading
.
value
=
false
}
}
const
handleClick
=
(
path
:
string
)
=>
{
router
.
push
(
path
)
}
...
...
@@ -361,7 +364,9 @@ const handleSignInSuccess = async (googleUser:any) => {
router
.
push
({
path
:
forward
?
forward
:
'/'
,
})
}
}
else
if
(
response
.
status
==
'ERROR'
){
router
.
push
(
'/login'
)
}
}
catch
(
error
:
any
)
{
Message
.
error
(
error
.
message
||
t
(
'login.googleLoginFailed'
))
}
finally
{
...
...
src/views/personalCenter/components/accountCenter/account.vue
View file @
14c8bc4f
...
...
@@ -255,7 +255,7 @@ const loginWithLine = () => {
// 跳转到 LINE 登录页面
window
.
location
.
href
=
lineLoginUrl
;
}
//
微信
绑定
//
line
绑定
const
useLineBind
=
async
(
code
:
string
)
=>
{
loading
.
value
=
true
try
{
...
...
@@ -263,9 +263,11 @@ const useLineBind = async(code:string) => {
if
(
response
.
status
==
'SUCCESS'
)
{
Message
.
success
(
t
(
'personal.bindWechatSuccess'
))
getPersonalInfor
()
}
else
if
(
response
.
status
==
'ERROR'
){
router
.
push
(
'/accountCenter/2'
)
}
}
catch
(
error
:
any
)
{
Message
.
error
(
error
.
message
)
Message
.
error
(
error
.
message
)
}
finally
{
loading
.
value
=
false
}
...
...
@@ -276,6 +278,24 @@ const loginWechat = () => {
const
url
=
`https://open.weixin.qq.com/connect/qrconnect?appid=
${
openInfo
.
value
.
appId
}
&redirect_uri=
${
encodeURIComponent
(
redirect_url
)}
&response_type=code&scope=snsapi_login&state=
${
1
}
&wechat_redirect=
${
redirect_url
}
`
;
window
.
location
.
href
=
url
;
}
// 微信绑定
const
useWechatBind
=
async
(
code
:
string
)
=>
{
loading
.
value
=
true
try
{
const
response
=
await
userStore
.
setUserWechatBindAsync
(
systemConfig
.
tenantId
?.
toString
()
||
''
,
code
,
systemConfig
.
distributorId
,
null
,
''
)
if
(
response
.
status
==
'SUCCESS'
)
{
Message
.
success
(
t
(
'personal.bindWechatSuccess'
))
getPersonalInfor
()
}
else
if
(
response
.
status
==
'ERROR'
){
router
.
push
(
'/accountCenter/2'
)
}
}
catch
(
error
:
any
)
{
Message
.
error
(
error
.
message
)
}
finally
{
loading
.
value
=
false
}
}
// 获取AppID 域名 重定向页面
const
getAppIdRedirectUri
=
async
(
providerType
:
string
)
=>
{
// const { AppID, State, OpenRedirectUri } = openInfo.value;
...
...
@@ -305,22 +325,6 @@ const getAppIdRedirectUri = async (providerType: string) => {
}
}
// 微信绑定
const
useWechatBind
=
async
(
code
:
string
)
=>
{
loading
.
value
=
true
try
{
const
response
=
await
userStore
.
setUserWechatBindAsync
(
systemConfig
.
tenantId
?.
toString
()
||
''
,
code
,
systemConfig
.
distributorId
,
null
,
''
)
if
(
response
.
status
==
'SUCCESS'
)
{
Message
.
success
(
t
(
'personal.bindWechatSuccess'
))
getPersonalInfor
()
}
}
catch
(
error
:
any
)
{
Message
.
error
(
error
.
message
)
}
finally
{
loading
.
value
=
false
}
}
// 渲染 Google 按钮
const
renderGoogleButton
=
()
=>
{
try
{
...
...
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