Commit 7ee1de0b by sweet

重要公告识别行内样式

parent e81badee
......@@ -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,
......
<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>
......@@ -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);
......
......@@ -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: '中信保诚祯爱增额定期寿险'}
];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment