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
7ee1de0b
Commit
7ee1de0b
authored
Feb 11, 2020
by
sweet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重要公告识别行内样式
parent
e81badee
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
11 deletions
+16
-11
src/app/app.module.ts
+3
-1
src/app/my/important-announcement/important-announcement.component.html
+2
-2
src/app/my/mk-material-detail/mk-material-detail.component.ts
+8
-6
src/app/my/mk-material/mk-material.component.ts
+3
-2
No files found.
src/app/app.module.ts
View file @
7ee1de0b
...
...
@@ -10,11 +10,13 @@ import {HttpClientModule} from '@angular/common/http';
import
{
LifeCommonModule
}
from
'./common/life-common.module'
;
import
{
httpInterceptorProviders
}
from
'./http-interceptors/index'
;
import
{
DatePipe
}
from
"@angular/common"
;
import
{
SafeHtmlPipe
}
from
'./safe-html.pipe'
;
@
NgModule
({
declarations
:
[
AppComponent
,
PageNotFoundComponent
PageNotFoundComponent
,
SafeHtmlPipe
],
imports
:
[
BrowserModule
,
...
...
src/app/my/important-announcement/important-announcement.component.html
View file @
7ee1de0b
<div>
<div
class=
"announcementItem"
*
ngFor=
"let announcementItem of announcementLists"
>
<div
class=
"announcement_title"
><span
class=
"announcement_type"
>
【{{announcementItem.announcementTypeName}}】
</span><span
[
innerHtml
]="
announcementItem
.
title
"
></span></div>
<div
[
innerHtml
]="
announcementItem
.
content
"
class=
"announcement_content"
></div>
<div
class=
"announcement_title"
><span
class=
"announcement_type"
>
【{{announcementItem.announcementTypeName}}】
</span><span
[
innerHtml
]="
announcementItem
.
title
|
safeHtml
"
></span></div>
<div
[
innerHtml
]="
announcementItem
.
content
|
safeHtml
"
class=
"announcement_content"
></div>
<div
class=
"announcement_at"
>
{{announcementItem.announcementAt}}
</div>
</div>
</div>
src/app/my/mk-material-detail/mk-material-detail.component.ts
View file @
7ee1de0b
...
...
@@ -51,8 +51,8 @@ export class MkMaterialDetailComponent implements OnInit {
};
if
(
this
.
productType
===
1
)
{
this
.
shareInfo
.
productId
=
null
;
this
.
shareInfo
.
planId
=
this
.
materialItemId
.
substr
(
2
);
this
.
shareInfo
.
url
=
`
${
environment
.
ORIGINNAME
}
/hProductDetail/
${
this
.
materialItemId
.
substr
(
2
)}
?shareCode=
${
shareCodeUuid
}
&type=9`
;
this
.
shareInfo
.
planId
=
this
.
materialItemId
.
substr
(
2
);
this
.
shareInfo
.
url
=
`
${
environment
.
ORIGINNAME
}
/hProductDetail/
${
this
.
materialItemId
.
substr
(
2
)}
?shareCode=
${
shareCodeUuid
}
&type=9`
;
}
// 发送请求保存分享码
this
.
shareCallBack
();
...
...
@@ -70,6 +70,7 @@ export class MkMaterialDetailComponent implements OnInit {
canvas
.
style
.
width
=
W
+
'px'
;
canvas
.
style
.
height
=
H
+
'px'
;
const
img
=
new
Image
();
img
.
setAttribute
(
'crossOrigin'
,
'anonymous'
);
// 画圆形头像
const
avatarurlWidth
=
50
*
ratio
;
// 绘制的头像宽度
const
avatarurlHeigth
=
50
*
ratio
;
// 绘制的头像高度
...
...
@@ -77,13 +78,14 @@ export class MkMaterialDetailComponent implements OnInit {
const
avatarurlY
=
this
.
canvas
.
nativeElement
.
height
-
(
this
.
contentHeight
+
50
)
/
2
*
ratio
;
// 绘制的头像在画布上的位置
const
avatarImg
=
new
Image
();
avatarImg
.
setAttribute
(
'crossOrigin'
,
'anonymous'
);
// avatarImg.src = `${environment.ORIGINNAME}/assets/img/meng.png`;
if
(
this
.
lifeCustomerInfo
.
practitionerBasicInfo
.
headImagePath
)
{
avatarImg
.
src
=
this
.
lifeCustomerInfo
.
practitionerBasicInfo
.
headImagePath
;
avatarImg
.
src
=
this
.
lifeCustomerInfo
.
practitionerBasicInfo
.
headImagePath
+
'?v='
+
new
Date
().
getTime
()
;
}
else
{
avatarImg
.
src
=
`
${
environment
.
ORIGINNAME
}
/assets/img/meng.png`
;
avatarImg
.
src
=
`
${
environment
.
ORIGINNAME
}
/assets/img/meng.png
?v=
${
new
Date
().
getTime
()}
`
;
}
//
//
这里的第一张图片就是可以是你们的海报 这里注意绘制的顺序 我们要手动控制
img
.
src
=
`
${
environment
.
ORIGINNAME
}
/ydLife/assets/images/mk-material/
${
this
.
materialItemId
}
.jpg`
;
// 这里的第一张图片就是可以是你们的海报 这里注意绘制的顺序 我们要手动控制
img
.
src
=
`
${
environment
.
ORIGINNAME
}
/ydLife/assets/images/mk-material/
${
this
.
materialItemId
}
.jpg
?v=
${
new
Date
().
getTime
()}
`
;
img
.
onload
=
()
=>
{
// 加载海报图
ctx
.
drawImage
(
img
,
0
,
0
,
this
.
canvas
.
nativeElement
.
width
,
this
.
canvas
.
nativeElement
.
height
);
...
...
src/app/my/mk-material/mk-material.component.ts
View file @
7ee1de0b
...
...
@@ -13,6 +13,8 @@ export class MkMaterialComponent implements OnInit {
ngOnInit
()
{
this
.
materialLists
=
[
{
id
:
10
,
itemId
:
'166'
,
title
:
'E生平安.百万医疗'
},
{
id
:
9
,
itemId
:
'ph465'
,
title
:
'E生平安·疾无忧'
},
{
id
:
1
,
itemId
:
'118'
,
title
:
'百年康惠保(旗舰版)重大疾病保险'
},
{
id
:
2
,
itemId
:
'133'
,
title
:
'康乐一生重大疾病保险(C款升级款)'
},
{
id
:
3
,
itemId
:
'131'
,
title
:
'复星联合妈咪宝贝少儿重大疾病保险'
},
...
...
@@ -20,8 +22,7 @@ export class MkMaterialComponent implements OnInit {
{
id
:
5
,
itemId
:
'136'
,
title
:
'中信保诚祯爱两全定期寿险'
},
{
id
:
6
,
itemId
:
'137'
,
title
:
'中信保诚祯爱优选定期寿险'
},
{
id
:
7
,
itemId
:
'138'
,
title
:
'中信保诚祯爱减额定期寿险'
},
{
id
:
8
,
itemId
:
'139'
,
title
:
'中信保诚祯爱增额定期寿险'
},
{
id
:
9
,
itemId
:
'ph465'
,
title
:
'E生平安·疾无忧'
}
{
id
:
8
,
itemId
:
'139'
,
title
:
'中信保诚祯爱增额定期寿险'
}
];
}
...
...
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