Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mocp-uniapp
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
pangchong
mocp-uniapp
Commits
c1e29238
Commit
c1e29238
authored
Dec 27, 2024
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 调整
parent
28d02d1c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
src/manifest.json
+3
-0
src/mocp/store/user.js
+5
-4
src/pages/modules/mocp/login/index.vue
+4
-1
No files found.
src/manifest.json
View file @
c1e29238
...
...
@@ -7,6 +7,9 @@
"transformPx"
:
false
,
/*
5
+App特有相关
*/
"app-plus"
:
{
"compatible"
:
{
"ignoreVersion"
:
true
//true表示忽略版本检查提示框,HBuilderX
1.9
.
0
及以上版本支持
},
"usingComponents"
:
true
,
"nvueStyleCompiler"
:
"uni-app"
,
"compilerVersion"
:
3
,
...
...
src/mocp/store/user.js
View file @
c1e29238
...
...
@@ -77,13 +77,14 @@ const useUserStore = defineStore('mocpUser', {
},
//退出登录
handleLogOut
()
{
this
.
token
=
''
this
.
userInfo
=
undefined
this
.
resetUserInfo
()
//返回登录页面
uni
.
$mocpJump
.
redirectTo
(
'/login/index'
)
},
//重置席位权限
resetSeat
()
{
//重置用户信息
resetUserInfo
()
{
this
.
token
=
''
this
.
userInfo
=
undefined
this
.
seatId
=
''
this
.
seatPermission
=
[
'all'
]
this
.
configData
=
[]
...
...
src/pages/modules/mocp/login/index.vue
View file @
c1e29238
...
...
@@ -58,7 +58,7 @@ watch(
)
const
userStore
=
useUserStore
()
onLoad
(()
=>
{
userStore
.
reset
Seat
()
userStore
.
reset
UserInfo
()
loginForm
.
verifyCode
=
''
getGifCaptcha
()
loginAmms
()
...
...
@@ -75,6 +75,7 @@ const handleLogin = async () => {
})
loading
.
value
=
true
await
login
()
if
(
userStore
.
token
)
{
//加入席位权限
await
getUserSeatList
()
if
(
userStore
.
seatId
)
{
...
...
@@ -84,6 +85,7 @@ const handleLogin = async () => {
}
//跳转工作台
uni
.
$mocpJump
.
redirectTo
(
'/tab/index'
)
}
}
catch
(
error
)
{
uni
.
$mocpMessage
.
error
(
'登录失败'
)
}
finally
{
...
...
@@ -96,6 +98,7 @@ const login = async () => {
const
res
=
await
loginApi
(
toRaw
(
loginForm
))
if
(
res
.
code
==
200
)
{
userStore
.
setUserInfo
(
res
.
data
)
return
true
}
else
{
uni
.
$mocpMessage
.
error
(
res
.
message
)
}
...
...
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