Commit 73a535d2 by sweet

增加教育培训

parent 7625427c
import {Component, OnInit} from '@angular/core';
import {LifeCommonService} from "../../common/life-common.service";
import {MyService} from "../my.service";
import {ActivatedRoute} from "@angular/router";
@Component({
selector: 'ydlife-file-upload',
......@@ -9,12 +10,20 @@ import {MyService} from "../my.service";
})
export class FileUploadComponent implements OnInit {
fileUploadItemList: Array<any>;
// 判断是文件下载还是教育培训
type: string;
constructor(private myService: MyService) {
constructor(private myService: MyService, private activatedRoute: ActivatedRoute) {
}
ngOnInit() {
this.fileUpload(3, 0, 19);
this.type = this.activatedRoute.snapshot.data[0]['type'];
if (this.type === 'fileUpload') {
this.fileUpload(3, 0, 19);
} else if (this.type === 'training') {
this.fileUpload(3, 0, 23);
}
}
// 文件下载
......
......@@ -211,7 +211,8 @@ export class MkMaterialDetailComponent implements OnInit {
this.shareInfo.productId = null;
this.shareInfo.planId = this.materialItemId;
}
if (!posterInfo.noPlanProduct) {
// 0是有plan,1是无plan
if (posterInfo.isPlan == '0') {
if (posterInfo.productCategoryId == '2') {
this.shareInfo.url = `${environment.ORIGINNAME}/hProductDetail/${this.materialItemId}?shareCode=${shareCodeUuid}&type=7`;
} else if (posterInfo.productCategoryId == '5') {
......
......@@ -8,25 +8,12 @@ import {MyService} from "../my.service";
styleUrls: ['./mk-material.component.scss']
})
export class MkMaterialComponent implements OnInit {
materialLists: Array<any>;
posterInfos: Array<any>;
constructor(private router: Router, private myService: MyService) {
}
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: '复星联合妈咪宝贝少儿重大疾病保险'},
{id: 4, itemId: '117', title: '百年定惠保'},
{id: 5, itemId: '136', title: '中信保诚祯爱两全定期寿险'},
{id: 6, itemId: '137', title: '中信保诚祯爱优选定期寿险'},
{id: 7, itemId: '138', title: '中信保诚祯爱减额定期寿险'},
{id: 8, itemId: '139', title: '中信保诚祯爱增额定期寿险'}
];
this.posterQuery();
}
......
......@@ -32,7 +32,7 @@ export class MyCenterHomeComponent implements OnInit {
{no: 2, title: '业绩资讯', path: '', icon: 'icon-icon-test', routerLink: ''},
{no: 3, title: '我的客户', path: '', icon: 'icon-kehu', routerLink: ''},
{no: 4, title: '保单查询', path: '', icon: 'icon-baodanyangben', routerLink: ''},
{no: 5, title: '教育训练', path: '', icon: 'icon-jiaoyu', routerLink: ''},
{no: 5, title: '教育训练', path: '', icon: 'icon-jiaoyu', routerLink: 'training'},
{
no: 6,
title: '文件下载',
......
......@@ -5,12 +5,14 @@ import {AuthGuard} from '../auth/auth.guard';
import {MkMaterialComponent} from './mk-material/mk-material.component';
import {MkMaterialDetailComponent} from './mk-material-detail/mk-material-detail.component';
import {FileUploadComponent} from './file-upload/file-upload.component';
import {ImportantAnnouncementComponent} from "./important-announcement/important-announcement.component";
import {ImportantAnnouncementComponent} from './important-announcement/important-announcement.component';
const myRoutes: Routes = [
{path: '', component: MyCenterHomeComponent, canActivate: [AuthGuard]},
{path: 'material', component: MkMaterialComponent, canActivate: [AuthGuard]},
{path: 'material/:itemId', component: MkMaterialDetailComponent, canActivate: [AuthGuard]},
{path: 'fileUpload', component: FileUploadComponent, canActivate: [AuthGuard]},
{path: 'fileUpload', component: FileUploadComponent, canActivate: [AuthGuard], data: [{type: 'fileUpload'}]},
{path: 'training', component: FileUploadComponent, canActivate: [AuthGuard], data: [{type: 'training'}]},
{path: 'importantAnnouncement', component: ImportantAnnouncementComponent, canActivate: [AuthGuard]},
];
......
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