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
b1bbcab6
Commit
b1bbcab6
authored
Nov 25, 2025
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微信登录
parent
f60782be
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
36 additions
and
22 deletions
+36
-22
OtaRequest.ts
src/api/OtaRequest.ts
+2
-8
Headers.vue
src/layouts/components/Headers.vue
+1
-1
index.ts
src/router/index.ts
+1
-1
user.ts
src/stores/user.ts
+0
-1
Login.vue
src/views/auth/Login.vue
+1
-1
forgePassword.vue
src/views/auth/forgePassword.vue
+13
-3
register.vue
src/views/auth/register.vue
+17
-6
LeftView.vue
src/views/personalCenter/components/LeftView.vue
+1
-1
No files found.
src/api/OtaRequest.ts
View file @
b1bbcab6
...
...
@@ -67,20 +67,14 @@ service.interceptors.response.use(
// 处理 401 错误(临时令牌过期)
if
(
error
.
response
?.
status
===
401
)
{
const
tempToken
=
sessionStorage
.
getItem
(
'tempToken'
);
console
.
log
(
'临时令牌过期:'
,
tempToken
);
if
(
tempToken
)
{
// 清除临时令牌和 OTA 用户信息
sessionStorage
.
removeItem
(
'tempToken'
);
sessionStorage
.
removeItem
(
'otaUserInfo'
);
useUserStore
().
signOutAsync
();
location
.
href
=
'/login'
;
// 返回更友好的错误信息
// const customError = new Error('授权已过期,请重新从 OTA 平台进入');
// (customError as any).response = error.response;
// (customError as any).config = error.config;
// (customError as any).isAuthExpired = true;
// return Promise.reject(customError);
}
location
.
href
=
'/login'
;
}
// 如果有响应数据,尝试提取错误信息
...
...
src/layouts/components/Headers.vue
View file @
b1bbcab6
...
...
@@ -36,7 +36,7 @@
/>
</a-avatar>
<
template
#
content
>
<a-doption
@
click=
"goPage('/
personalCenter/
myOrder')"
>
<a-doption
@
click=
"goPage('/myOrder')"
>
<template
#
icon
>
<icon-user
/>
</
template
>
...
...
src/router/index.ts
View file @
b1bbcab6
...
...
@@ -15,7 +15,7 @@ const router = createRouter({
component
:
()
=>
import
(
'../views/home/index.vue'
)
},
{
path
:
''
,
path
:
'
/personalCenter
'
,
meta
:
{
title
:
"page.profile"
},
component
:
()
=>
import
(
'../views/personalCenter/index.vue'
),
children
:
[{
...
...
src/stores/user.ts
View file @
b1bbcab6
...
...
@@ -198,7 +198,6 @@ export const useUserStore = defineStore('user', {
async
registerDistributorAsync
(
data
:
DistributorSelfRegisterDto
):
Promise
<
UserLoginResult
>
{
try
{
const
response
=
await
UserService
.
distributorSelfRegisterAsync
(
data
)
console
.
log
(
'Register response:'
,
response
)
this
.
token
=
response
.
token
||
''
this
.
userInfo
=
response
.
userInfo
||
{}
this
.
memberData
=
response
.
memberData
...
...
src/views/auth/Login.vue
View file @
b1bbcab6
...
...
@@ -157,7 +157,7 @@ const loginMsg = reactive({
reType
:
0
,
//登录方式 0账号密码 1谷歌授权 3LINE授权 7FaceBook授权
openId
:
""
,
email
:
"2310721242@qq.com"
,
//
password
:
'yj
950815
'
,
//123456
password
:
'yj
123456
'
,
//123456
distributorId
:
systemConfigStore
.
distributorId
as
any
,
parentId
:
null
,
redirectUri
:
''
,
...
...
src/views/auth/forgePassword.vue
View file @
b1bbcab6
...
...
@@ -439,6 +439,16 @@ watch(()=>currentStep.value,(newVal,oldVal)=>{
}
}
)
// 初始化
const
init
=
async
()
=>
{
// 如果已经登录且是正常用户,直接跳转到首页
if
(
userStore
.
getUserToken
&&
userStore
.
getUser
)
{
router
.
replace
(
'/'
)
}
}
init
()
<
/script
>
<
style
scoped
lang
=
"scss"
>
.
light
-
login
-
bg
{
...
...
@@ -457,7 +467,7 @@ watch(()=>currentStep.value,(newVal,oldVal)=>{
height
:
46
px
;
border
-
radius
:
12
px
!
important
;
background
-
color
:
#
EEEFEB
;
border
:
2
px
solid
#
FFFFFF
;
border
:
2
px
solid
rgba
(
225
,
225
,
225
,
0
)
;
}
:
deep
(.
arco
-
input
-
focus
){
border
-
radius
:
12
px
;
...
...
@@ -527,9 +537,9 @@ watch(()=>currentStep.value,(newVal,oldVal)=>{
opacity
:
0
!
important
;
}
:
deep
(.
arco
-
btn
-
text
.
arco
-
btn
-
disabled
){
background
-
color
:
#
EEEEEB
;
background
-
color
:
rgba
(
225
,
225
,
225
,
0
)
;
}
:
deep
(.
arco
-
btn
-
text
.
arco
-
btn
-
loading
){
background
-
color
:
#
dddddd
;
background
-
color
:
rgba
(
225
,
225
,
225
,
0
)
;
}
<
/style
>
src/views/auth/register.vue
View file @
b1bbcab6
...
...
@@ -64,7 +64,7 @@
size
=
"large"
:
placeholder
=
"t('login.setPasswordRequired')"
:
maxLength
=
"8"
:
defaultVisibility
=
"
fals
e"
:
defaultVisibility
=
"
tru
e"
:
invisible
-
button
=
"false"
>
<!--
<
template
#
prefix
>
...
...
@@ -113,7 +113,8 @@
@
click
.
stop
=
"handleAreaCodeChange(option.value)"
>
<
div
class
=
"flex items-center space-x-3 px-2 py-1"
>
<!--
<
span
class
=
"text-lg"
>
{{
option
.
flag
}}
<
/span> --
>
<
span
class
=
"font-medium"
>
{{
option
.
label
}}
({{
option
.
value
}}
)
<
/span
>
<
span
class
=
"font-medium"
>
{{
option
.
label
}}
<
/span
>
<
span
class
=
"text-[#A3A4A0] font-light"
>
({{
option
.
value
}}
)
<
/span
>
<
/div
>
<
/a-doption
>
<
/template
>
...
...
@@ -377,7 +378,7 @@ const getSimples = async () => {
if
(
result
&&
result
.
length
>
0
){
AreaCodeList
.
value
=
result
.
map
((
item
:
any
)
=>
({
label
:
item
.
name
,
value
:
item
.
phoneCode
value
:
`+${item.phoneCode
}
`
}
))
}
}
...
...
@@ -672,6 +673,16 @@ watch(()=>currentStep.value,(newVal,oldVal)=>{
}
}
)
// 初始化
const
init
=
async
()
=>
{
// 如果已经登录且是正常用户,直接跳转到首页
if
(
userStore
.
getUserToken
&&
userStore
.
getUser
)
{
router
.
replace
(
'/'
)
}
}
init
()
getSimples
()
<
/script
>
...
...
@@ -694,7 +705,7 @@ getSimples()
height
:
46
px
;
border
-
radius
:
12
px
!
important
;
background
-
color
:
#
EEEFEB
;
border
:
2
px
solid
#
FFFFFF
;
border
:
2
px
solid
rgba
(
225
,
225
,
225
,
0
)
;
}
:
deep
(.
arco
-
input
-
focus
){
border
-
radius
:
12
px
;
...
...
@@ -766,9 +777,9 @@ getSimples()
opacity
:
0
!
important
;
}
:
deep
(.
arco
-
btn
-
text
.
arco
-
btn
-
disabled
){
background
-
color
:
#
EEEEEB
;
background
-
color
:
rgba
(
225
,
225
,
225
,
0
)
;
}
:
deep
(.
arco
-
btn
-
text
.
arco
-
btn
-
loading
){
background
-
color
:
#
dddddd
;
background
-
color
:
rgba
(
225
,
225
,
225
,
0
)
;
}
<
/style
>
src/views/personalCenter/components/LeftView.vue
View file @
b1bbcab6
...
...
@@ -11,7 +11,7 @@
</div>
<div
class=
"mt-[13px] text-lg font-medium text-center truncate"
>
{{
userInfo
.
name
}}
</div>
<div
class=
"flex justify-center items-center mt-[10px] cursor-pointer"
>
<span
v-if=
"
userInfo.externalLoginList?.length==0
"
class=
"LeftViewTisp w-[6px] h-[6px] rounded-full"
></span>
<span
v-if=
"
!userInfo.IsComplete
"
class=
"LeftViewTisp w-[6px] h-[6px] rounded-full"
></span>
<span
class=
"LeftViewData ml-[5px] text-sm font-medium text-[#666]"
>
{{
t
(
'personal.completeProfile'
)
}}
>>
...
...
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