Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ydLife
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sweet Zhang
ydLife
Commits
15737d2e
Commit
15737d2e
authored
Aug 24, 2022
by
Sweet Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页增加未读消息
parent
97fb086d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
3 deletions
+43
-3
src/app/my/course-detail/course-detail.component.ts
+7
-1
src/app/my/my-center-home/my-center-home.component.html
+1
-0
src/app/my/my-center-home/my-center-home.component.scss
+17
-0
src/app/my/my-center-home/my-center-home.component.ts
+16
-0
src/app/my/news-detail/news-detail.component.html
+1
-1
src/app/my/training-records/training-records.component.scss
+1
-1
No files found.
src/app/my/course-detail/course-detail.component.ts
View file @
15737d2e
...
...
@@ -98,7 +98,9 @@ export class CourseDetailComponent implements OnInit,OnDestroy {
}
else
{
this
.
fileUploadItemList
=
res
[
'data'
][
'fileUploadItemList'
];
}
}
else
{
clearInterval
(
this
.
timer
);
clearInterval
(
this
.
timer2
);
}
})
}
...
...
@@ -140,6 +142,9 @@ export class CourseDetailComponent implements OnInit,OnDestroy {
param
[
'totalTime'
]
=
this
.
video
.
nativeElement
.
duration
;
param
[
'viewTime'
]
=
this
.
video
.
nativeElement
.
currentTime
;
param
[
'playbackStatus'
]
=
this
.
video
.
nativeElement
.
currentTime
>=
this
.
video
.
nativeElement
.
duration
?
2
:
1
;
if
(
param
[
'totalTime'
]
==
param
[
'viewTime'
]){
clearInterval
()
}
}
this
.
myService
.
saveVideoPlayback
(
param
).
subscribe
(
res
=>
{
...
...
@@ -187,6 +192,7 @@ export class CourseDetailComponent implements OnInit,OnDestroy {
}
selectVideo
(
val
)
{
clearInterval
();
if
(
val
.
learningStatus
==
'3'
)
{
this
.
state
.
modal1
=
true
;
}
else
{
...
...
src/app/my/my-center-home/my-center-home.component.html
View file @
15737d2e
...
...
@@ -14,6 +14,7 @@
></SearchBar>
<i
[
routerLink
]="'/
news
'"
>
<img
src=
"assets/images/indexIcons/news.png"
alt=
""
srcset=
""
>
<span
*
ngIf=
"messageUnreadCount"
>
{{messageUnreadCount}}
</span>
</i>
</section>
<section
style=
"margin-top:-85px;"
>
...
...
src/app/my/my-center-home/my-center-home.component.scss
View file @
15737d2e
...
...
@@ -13,6 +13,23 @@
padding
:
7px
10px
90px
;
i
{
flex-basis
:
24px
;
position
:
relative
;
span
{
position
:
absolute
;
right
:
-4px
;
top
:
-8px
;
width
:
18px
;
height
:
18px
;
border-radius
:
50%
;
background
:
#EF6C40
;
color
:
#fff
;
font-size
:
10px
;
text-align
:
center
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
font-style
:
normal
;
}
}
.indexSearchBar
{
flex
:
auto
;
...
...
src/app/my/my-center-home/my-center-home.component.ts
View file @
15737d2e
...
...
@@ -9,6 +9,7 @@ declare var wx: any;
styleUrls
:
[
'./my-center-home.component.scss'
],
})
export
class
MyCenterHomeComponent
implements
OnInit
{
messageUnreadCount
:
string
;
productInfo
:
any
;
inquiry
:
any
;
public
announcementInfo
:
string
;
...
...
@@ -38,6 +39,19 @@ export class MyCenterHomeComponent implements OnInit {
this
.
router
.
navigate
([
'/product'
,
{
queryName
:
value
.
trim
()
}])
}
}
querySystemMessage
(){
this
.
myService
.
querySystemMessage
({
practitionerId
:
localStorage
.
getItem
(
'lifeCustomerInfo'
)
?
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
)).
practitionerId
:
null
}).
subscribe
(
res
=>
{
if
(
res
[
'success'
]){
this
.
messageUnreadCount
=
res
[
'data'
][
'unReadcount'
];
if
(
Number
(
this
.
messageUnreadCount
)
>
99
){
this
.
messageUnreadCount
=
'99+'
;
}
}
else
{
this
.
messageUnreadCount
=
null
;
}
})
}
searchProduct
()
{
// 查询互联网产品
...
...
@@ -140,6 +154,8 @@ export class MyCenterHomeComponent implements OnInit {
this
.
queryproductlistbytag
(
119
,
'hotProductLists'
);
// 查询最新一条公告
this
.
announcementQuery
();
// 查询未读消息总数
this
.
querySystemMessage
();
}
}
...
...
src/app/my/news-detail/news-detail.component.html
View file @
15737d2e
...
...
@@ -13,7 +13,7 @@
<p>
{{systemMessageInfo?.createdAt}}
</p>
</div>
<div
class=
"contentDetail"
>
<div
[
innerHTML
]="
systemMessageInfo
?.
conte
n
t
"
></div>
<div
[
innerHTML
]="
systemMessageInfo
?.
conte
x
t
"
></div>
</div>
</div>
</div>
...
...
src/app/my/training-records/training-records.component.scss
View file @
15737d2e
...
...
@@ -11,7 +11,7 @@
>
div
:first-child
{
margin-right
:
7px
;
width
:
0
;
height
:
1
0
4px
;
height
:
1
1
4px
;
background-color
:
#ccc
;
overflow
:
hidden
;
flex
:
0
0
114px
;
...
...
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