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
cb398c89
Commit
cb398c89
authored
Nov 09, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
匿名登出,清除信息
parent
74745214
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
HomePage.ts
assets/middleLayer_for_kyxq/script/HomePage.ts
+18
-5
No files found.
assets/middleLayer_for_kyxq/script/HomePage.ts
View file @
cb398c89
...
@@ -34,6 +34,17 @@ export default class NewClass extends cc.Component {
...
@@ -34,6 +34,17 @@ export default class NewClass extends cc.Component {
// 点击左上角登录
// 点击左上角登录
handleClickLogin
()
{
handleClickLogin
()
{
global
.
middleLayer
.
isLogin
=
false
;
this
.
Viewer
.
getComponent
(
"
PageViewer
"
).
setUserInfo
({
phone
:
""
,
isAnonymous
:
false
,
isIOSReview
:
false
,
});
// 清空信息
cc
.
sys
.
localStorage
.
setItem
(
'
token
'
,
""
);
cc
.
sys
.
localStorage
.
setItem
(
'
phone
'
,
""
);
const
vc
=
this
.
Viewer
.
getComponent
(
"
PageViewer
"
);
const
vc
=
this
.
Viewer
.
getComponent
(
"
PageViewer
"
);
vc
.
toView
(
"
LoginPage
"
,
"
leftIn
"
)
vc
.
toView
(
"
LoginPage
"
,
"
leftIn
"
)
}
}
...
@@ -56,7 +67,6 @@ export default class NewClass extends cc.Component {
...
@@ -56,7 +67,6 @@ export default class NewClass extends cc.Component {
this
.
userPageClass
=
cc
.
find
(
"
right_part/class/label
"
,
this
.
userPagePanel
).
getComponent
(
cc
.
Label
);
this
.
userPageClass
=
cc
.
find
(
"
right_part/class/label
"
,
this
.
userPagePanel
).
getComponent
(
cc
.
Label
);
this
.
userPageTeacher
=
cc
.
find
(
"
right_part/teacher/label
"
,
this
.
userPagePanel
).
getComponent
(
cc
.
Label
);
this
.
userPageTeacher
=
cc
.
find
(
"
right_part/teacher/label
"
,
this
.
userPagePanel
).
getComponent
(
cc
.
Label
);
this
.
userPageTime
=
cc
.
find
(
"
right_part/time/label
"
,
this
.
userPagePanel
).
getComponent
(
cc
.
Label
);
this
.
userPageTime
=
cc
.
find
(
"
right_part/time/label
"
,
this
.
userPagePanel
).
getComponent
(
cc
.
Label
);
}
}
this
.
userPageName
.
string
=
this
.
userInfo
.
nick_name
;
this
.
userPageName
.
string
=
this
.
userInfo
.
nick_name
;
...
@@ -96,6 +106,12 @@ export default class NewClass extends cc.Component {
...
@@ -96,6 +106,12 @@ export default class NewClass extends cc.Component {
jc_arr
:
userInfo
.
jc_arr
,
jc_arr
:
userInfo
.
jc_arr
,
});
});
// 无数据
if
(
rows
&&
rows
.
length
==
0
)
{
this
.
loading
.
active
=
false
;
return
}
const
canvas
=
cc
.
find
(
"
Canvas
"
);
const
canvas
=
cc
.
find
(
"
Canvas
"
);
this
.
SvContent
.
opacity
=
0
;
this
.
SvContent
.
opacity
=
0
;
if
(
!
this
.
SvContent
[
'
baseH
'
])
{
if
(
!
this
.
SvContent
[
'
baseH
'
])
{
...
@@ -162,10 +178,7 @@ export default class NewClass extends cc.Component {
...
@@ -162,10 +178,7 @@ export default class NewClass extends cc.Component {
this
.
SvContent
.
addChild
(
ci
);
this
.
SvContent
.
addChild
(
ci
);
}
}
// 防止在没有数据情况下 加载动画不消失
if
(
rows
.
length
==
0
)
{
this
.
loading
.
active
=
false
;
}
// this.loading.active = false;
// this.loading.active = false;
}
}
// onLoad () {}
// onLoad () {}
...
...
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