Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_kyxq
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
middleLayer_for_kyxq
Commits
02e023e2
Commit
02e023e2
authored
Nov 09, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
在心跳请求中,增加登录状态判断,实现单点登录
parent
cb398c89
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
110 additions
and
91 deletions
+110
-91
PageViewer.ts
assets/middleLayer_for_kyxq/script/PageViewer.ts
+24
-27
middleLayerBase.ts
assets/middleLayer_for_kyxq/script/middleLayerBase.ts
+86
-64
No files found.
assets/middleLayer_for_kyxq/script/PageViewer.ts
View file @
02e023e2
...
@@ -81,6 +81,9 @@ export default class NewClass extends cc.Component {
...
@@ -81,6 +81,9 @@ export default class NewClass extends cc.Component {
isAnonymous
:
false
,
isAnonymous
:
false
,
isIOSReview
:
false
,
isIOSReview
:
false
,
})
})
// 清空信息
cc
.
sys
.
localStorage
.
setItem
(
'
token
'
,
""
);
cc
.
sys
.
localStorage
.
setItem
(
'
phone
'
,
""
);
}
}
return
this
.
getStatus
(
"
userInfo
"
)
return
this
.
getStatus
(
"
userInfo
"
)
}
}
...
@@ -238,39 +241,33 @@ export default class NewClass extends cc.Component {
...
@@ -238,39 +241,33 @@ export default class NewClass extends cc.Component {
.
start
();
.
start
();
})
})
}
else
{
}
else
{
inPage
.
opacity
=
0
;
if
(
outPage
)
{
outPage
.
opacity
=
255
;
outPage
.
active
=
false
;
}
else
{
// 未传移除页面 则全部移除
this
.
justShowView
(
""
)
}
inPage
.
active
=
true
;
inPage
.
active
=
true
;
cc
.
tween
(
inPage
)
inPage
.
x
=
0
;
.
to
(
0.1
,
{
inPage
.
y
=
0
;
opacity
:
255
})
.
start
();
return
new
Promise
((
resovle
,
reject
)
=>
{
return
new
Promise
((
resovle
,
reject
)
=>
{
cc
.
tween
(
outPage
)
setTimeout
(()
=>
{
.
to
(
0.1
,
{
resovle
(
true
)
opacity
:
0
},
1
)
})
.
call
(()
=>
{
outPage
.
active
=
false
;
resovle
(
true
)
})
.
start
();
})
})
}
}
}
}
justShowView
(
viewName
){
justShowView
(
viewName
)
{
this
.
loginPage
.
active
=
viewName
==
"
LoginPage
"
this
.
loginPage
.
active
=
viewName
==
"
LoginPage
"
this
.
homePage
.
active
=
viewName
==
"
homePage
"
this
.
homePage
.
active
=
viewName
==
"
homePage
"
this
.
libraryPage
.
active
=
viewName
==
"
libraryPage
"
this
.
libraryPage
.
active
=
viewName
==
"
libraryPage
"
this
.
libraryReadPage
.
active
=
viewName
==
"
libraryReadPage
"
this
.
libraryReadPage
.
active
=
viewName
==
"
libraryReadPage
"
this
.
libraryAudioPage
.
active
=
viewName
==
"
libraryAudioPage
"
this
.
libraryAudioPage
.
active
=
viewName
==
"
libraryAudioPage
"
this
.
libraryVideoPage
.
active
=
viewName
==
"
libraryVideoPage
"
this
.
libraryVideoPage
.
active
=
viewName
==
"
libraryVideoPage
"
this
.
libraryReadDetailPage
.
active
=
viewName
==
"
libraryReadDetailPage
"
this
.
libraryReadDetailPage
.
active
=
viewName
==
"
libraryReadDetailPage
"
this
.
unitPage
.
active
=
viewName
==
"
unitPage
"
this
.
unitPage
.
active
=
viewName
==
"
unitPage
"
this
.
missionPage
.
active
=
viewName
==
"
missionPage
"
this
.
missionPage
.
active
=
viewName
==
"
missionPage
"
}
}
// update (dt) {}
// update (dt) {}
}
}
assets/middleLayer_for_kyxq/script/middleLayerBase.ts
View file @
02e023e2
This diff is collapsed.
Click to expand it.
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