Commit 6a2e8f1f by sweet

增加疾无忧产品海报

parent c4201a53
......@@ -4,8 +4,10 @@ import {environment} from '../../../environments/environment';
import {LifeCommonService} from '../../common/life-common.service';
import {MyService} from '../my.service';
import {Buffer} from 'buffer';
declare var QRCode: any;
import * as uuid from 'uuid';
@Component({
selector: 'ydlife-mk-material-detail',
templateUrl: './mk-material-detail.component.html',
......@@ -13,6 +15,8 @@ import * as uuid from 'uuid';
})
export class MkMaterialDetailComponent implements OnInit {
@ViewChild('canvas') canvas: ElementRef<any>;
// 区分险种 1.产险-健康险
productType: number;
materialItemId: string;
lifeCustomerInfo: any;
shareInfo: any;
......@@ -32,6 +36,9 @@ export class MkMaterialDetailComponent implements OnInit {
ngOnInit() {
this.materialItemId = this.activateRoute.snapshot.paramMap.get('itemId');
if (this.materialItemId.substr(0, 2) === 'ph') {
this.productType = 1;
}
this.lifeCustomerInfo = localStorage.getItem('lifeCustomerInfo') ? JSON.parse(localStorage.getItem('lifeCustomerInfo')) : null;
// 分享信息
const shareCodeUuid = uuid.v4();
......@@ -42,6 +49,11 @@ export class MkMaterialDetailComponent implements OnInit {
productId: this.materialItemId,
url: `${environment.ORIGINNAME}/life/${this.materialItemId}?shareCode=${shareCodeUuid}`
};
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.shareCallBack();
}
......
......@@ -21,6 +21,7 @@ export class MkMaterialComponent implements OnInit {
{id: 6, itemId: '137', title: '中信保诚祯爱优选定期寿险'},
{id: 7, itemId: '138', title: '中信保诚祯爱减额定期寿险'},
{id: 8, itemId: '139', title: '中信保诚祯爱增额定期寿险'},
{id: 9, itemId: 'ph465', title: 'E生平安·疾无忧'}
];
}
......
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