Commit 5af53ab5 by Chao Sun

添加公告页分类和详情

parent 2850fb13
......@@ -3,7 +3,7 @@
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --host 192.168.68.102",
"start": "ng serve --host 192.168.1.25",
"build": "ng build -c=dev --prod",
"test": "ng test",
"lint": "ng lint",
......@@ -48,4 +48,4 @@
"tslint": "~5.11.0",
"typescript": "~3.2.2"
}
}
}
\ No newline at end of file
import {Component, OnInit} from '@angular/core';
import {LifeCommonService} from "../life-common.service";
import { Component, OnInit } from '@angular/core';
import { LifeCommonService } from "../life-common.service";
@Component({
selector: 'ydlife-guide-page',
......
import {Injectable} from '@angular/core';
import {DatePipe} from '@angular/common';
import {Meta, Title} from '@angular/platform-browser';
import {Subject} from "rxjs/index";
import { Injectable } from '@angular/core';
import { DatePipe } from '@angular/common';
import { Meta, Title } from '@angular/platform-browser';
import { Subject } from "rxjs/index";
declare var wx: any;
@Injectable({
providedIn: 'root'
......@@ -11,8 +11,8 @@ export class LifeCommonService {
shareStatus$ = this.shareStatusSource.asObservable();
constructor(private datePipe: DatePipe,
private titleService: Title,
private metaService: Meta) {
private titleService: Title,
private metaService: Meta) {
}
// 向订阅者发布分享结果
......@@ -93,8 +93,8 @@ export class LifeCommonService {
// 更新meta标签
updateMeta(keywords, description) {
this.metaService.updateTag({content: keywords}, 'name=keywords');
this.metaService.updateTag({content: description}, 'name=description');
this.metaService.updateTag({ content: keywords }, 'name=keywords');
this.metaService.updateTag({ content: description }, 'name=description');
}
wxShare(title: string, desc: string, link: string, imgUrl: string) {
......@@ -132,8 +132,8 @@ export class LifeCommonService {
return date;
}
// 判断一年是365还是366
yearDayCount(days, disableCalc?: boolean) {
// 判断一年是365还是366
yearDayCount(days, disableCalc?: boolean) {
if (days === 365 || days === 366) {
const y = new Date().getFullYear();
const isLeap = (0 === y % 4) && (0 !== y % 100) || (0 === y % 400);
......@@ -148,4 +148,8 @@ export class LifeCommonService {
dateFormat(date: any, format?: string) {
return this.datePipe.transform(date, format);
}
delHtmlTag(str) {
return str.replace(/<[^>]+>/g, "");//去掉所有的html标记
}
}
<div class="wrapper">
<div class="headWrapper">
<div class="title">
{{titleDeatil}}
</div>
<div class="announcement_at_top">
上海银盾保险经纪有限公司&nbsp;&nbsp;
{{announcementLists?.announcementAt}}
</div>
</div>
<div class="announcementItem">
<div class="announcement_title"><span
class="announcement_type">【{{announcementLists?.announcementTypeName}}】</span><span
[innerHtml]="announcementLists?.title |safeHtml"></span></div>
<div [innerHtml]="announcementLists?.content | safeHtml" class="announcement_content"></div>
<div class="announcement_at">上海银盾保险经纪有限公司 &nbsp;&nbsp;{{announcementLists?.announcementAt}}</div>
</div>
</div>
\ No newline at end of file
.wrapper{
padding: 10px 8px;
.headWrapper{
.title{
text-align: center;
font-size: 24px;
}
.announcement_at_top{
color: #8d9599;
}
}
.announcementItem {
padding: 10px 0;
.announcement_type {
color: #ff3500;
}
.announcement_at {
display: flex;
justify-content: flex-end;
margin-top: 20px;
}
}
}
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AnnouncementDetailComponent } from './announcement-detail.component';
describe('AnnouncementDetailComponent', () => {
let component: AnnouncementDetailComponent;
let fixture: ComponentFixture<AnnouncementDetailComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AnnouncementDetailComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AnnouncementDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { MyService } from "../my.service";
import { ActivatedRoute } from '@angular/router';
import { LifeCommonService } from '../../common/life-common.service';
@Component({
selector: 'ydlife-announcement-detail',
templateUrl: './announcement-detail.component.html',
styleUrls: ['./announcement-detail.component.scss']
})
export class AnnouncementDetailComponent implements OnInit {
announcementId: string;
announcementLists: Array<any>;
titleDeatil: string;
constructor(private activateRoute: ActivatedRoute,
private myService: MyService,
public lifeCommonService: LifeCommonService) { }
ngOnInit() {
this.announcementId = this.activateRoute.snapshot.paramMap.get('id');
this.announcementQuery(this.announcementId, null)
}
announcementQuery(id, announcementType) {
this.myService.announcementQuery(id, announcementType).subscribe(res => {
if (res['success']) {
this.announcementLists = res['data']['announcementInfoList'][0];
this.titleDeatil = this.lifeCommonService.delHtmlTag(this.announcementLists['title'])
}
});
}
}
<div class="fileUploadLists">
<ul class="left">
<li *ngFor="let categoryItem of categoryList"
(click)="switchCategory(categoryItem.dropOptionOrder)"
[ngClass]="{'actived':selectedCategoryId===categoryItem.dropOptionOrder}">
{{categoryItem.dropOptionName}}
<li *ngFor="let categoryItem of categoryList" (click)="switchCategory(categoryItem.dropOptionOrder)"
[ngClass]="{'actived':selectedCategoryId===categoryItem.dropOptionOrder}">
{{categoryItem.dropOptionName}}
</li>
</ul>
<div class="contentList">
......@@ -12,10 +11,9 @@
<a href="{{fileUploadItem.filePath}}" download="{{fileUploadItem.itemName}}" target="_blank">
<div><i class="iconfont icon-pdf"></i></div>
<div title="{{fileUploadItem.itemName}}">{{fileUploadItem.itemName}}</div>
<div style="position: absolute;right: 5px;top: 6px;"><i class="iconfont icon-xiazai" ></i></div>
<div style="position: absolute;right: 5px;top: 6px;"><i class="iconfont icon-xiazai"></i></div>
</a>
</li>
</ul>
</div>
</div>
</div>
\ No newline at end of file
<div>
<div class="announcementItem" *ngFor="let announcementItem of announcementLists">
<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">上海银盾保险经纪有限公司 &nbsp;&nbsp;{{announcementItem.announcementAt}}</div>
<ul class="left">
<li *ngFor="let categoryItem of importantAnnouncementLists" (click)="switchCategory(categoryItem.id)"
[ngClass]="{'actived':selectedCategoryId===categoryItem.id}">
{{categoryItem.dropOptionName}}
</li>
</ul>
<div #hide class="materialContainer">
<div class="materialItem" *ngFor="let announcementInfo of announcementLists;index as i"
[routerLink]="['/importantAnnouncement',announcementInfo.id]">
<!-- <div class="title" [innerHtml]="announcementInfo.title"></div> -->
<div class="title">{{this.lifeCommonService.delHtmlTag(announcementInfo.title)}}</div>
<div class="date">
<span> 上海银盾保险经纪有限公司</span>
<span>{{announcementInfo.createdAt}}</span>
</div>
</div>
</div>
</div>
\ No newline at end of file
.announcementItem {
padding: 10px 8px;
border-bottom: 1px solid #dcdcdc;
.announcement_type {
color: #ff3500;
.left{
display: flex;
padding: 10px 2px;
// border-bottom: 3px #3784ca solid;
background: #f0f0f0;
margin-bottom: 10px;
list-style: none;
li{
width: 19%;
border: 1px #a9aabb solid;
text-align: center;
font-size: 14px;
height: 30px;
line-height: 30px;
border-radius: 20px;
margin: 0px 2px;
}
.announcement_at {
font-size: 12px;
padding-left: 17px;
li.actived{
background-color: #ff5a32;
color: #fff;
border: 1px #f0f0f0 solid;
}
.announcement_title {
margin-left: 17px;
}
.materialContainer{
.materialItem{
padding: 5px 10px;
border-bottom: 1px #ddd solid;
margin-bottom: 8px;
.title{
margin-bottom: 8px;
}
.date{
color: #737272;
font-size: 14px;
display: flex;
justify-content: space-between;
}
}
.announcement_content {
padding-left: 17px;
.materialItem:last-child{
border-bottom: none;
}
}
import {Component, OnInit} from '@angular/core';
import {MyService} from "../my.service";
import { Component, OnInit, ViewChild, ElementRef, AfterViewInit } from '@angular/core';
import { MyService } from "../my.service";
import { Router } from "@angular/router";
import { LifeCommonService } from '../../common/life-common.service';
@Component({
selector: 'ydlife-important-announcement',
templateUrl: './important-announcement.component.html',
styleUrls: ['./important-announcement.component.scss']
})
export class ImportantAnnouncementComponent implements OnInit {
export class ImportantAnnouncementComponent implements OnInit, AfterViewInit {
@ViewChild('hide') hide: ElementRef
announcementLists: Array<any>;
constructor(private myService: MyService) {
importantAnnouncementLists: Array<any>;
selectedCategoryId: any;
titleList: Array<any> = [];
constructor(
private myService: MyService,
private router: Router,
public lifeCommonService: LifeCommonService) {
}
ngOnInit() {
this.announcementQuery();
this.dropOptionsQuery();
}
ngAfterViewInit() {
setTimeout(() => {
this.switchCategory(this.selectedCategoryId)
}, 500);
}
// 获取所有的公告类型
dropOptionsQuery() {
this.myService.dropOptionsQuery({ code: 'yd_mkt_announcement_type' }).subscribe(res => {
if (res['success']) {
this.importantAnnouncementLists = res['data']['dropMasterInfoList'][0]['dropOptionsInfoList'];
if (this.importantAnnouncementLists.length > 0) {
this.selectedCategoryId = res['data']['dropMasterInfoList'][0]['dropOptionsInfoList'][0]['id'];
this.announcementQuery(null, this.selectedCategoryId);
}
}
})
}
announcementQuery() {
this.myService.announcementQuery(null, null).subscribe(res => {
announcementQuery(id, announcementType) {
this.myService.announcementQuery(id, announcementType).subscribe(res => {
if (res['success']) {
this.announcementLists = res['data']['announcementInfoList'];
}
});
}
switchCategory(e) {
this.selectedCategoryId = e;
this.announcementQuery(null, this.selectedCategoryId);
}
}
<ul class="left">
<li *ngFor="let categoryItem of categoryList"
(click)="switchCategory(categoryItem.dropOptionOrder)"
[ngClass]="{'actived':selectedCategoryId===categoryItem.dropOptionOrder}">
{{categoryItem.dropOptionName}}
<li *ngFor="let categoryItem of categoryList" (click)="switchCategory(categoryItem.dropOptionOrder)"
[ngClass]="{'actived':selectedCategoryId===categoryItem.dropOptionOrder}">
{{categoryItem.dropOptionName}}
</li>
</ul>
<div class="materialContainer">
<div class="materialItem" *ngFor="let posterInfo of posterInfos;index as i"
[routerLink]="['/material',posterInfo.itemId]" [queryParams]="{itemType:posterInfo.itemType}">
[routerLink]="['/material',posterInfo.itemId]" [queryParams]="{itemType:posterInfo.itemType}">
<div>
<img src="{{posterInfo.thumbnailPath}}" alt="" class="img-responsive">
<img src="{{posterInfo.productPosterPath}}" alt="" class="img-responsive">
</div>
<div class="title">{{posterInfo.title}}</div>
</div>
</div>
</div>
\ No newline at end of file
......@@ -9,7 +9,8 @@
<div class="brokerInfo">
<div class="brokerName">
<div style="letter-spacing: 2px"><span>{{lifeCustomerInfo?.practitionerBasicInfo?.name}}</span></div>
<div style="color: #fff;font-weight: normal;color: #fff;font-weight: normal;position: relative;top: -5px;" (click)="getOut()">
<div style="color: #fff;font-weight: normal;color: #fff;font-weight: normal;position: relative;top: -5px;"
(click)="getOut()">
<i class="iconfont icon-tuichu" style="font-size: 12px;"></i>
<span style="margin-left: 5px;font-size: 12px;">退出</span>
</div>
......@@ -26,74 +27,70 @@
</div>
<!--头部经纪人信息END-->
</div>
<div class="weui-panel__bd">
<div class="performance_wrapper">
<!-- <img class="bg" src="assets/images/sales__bg.png" > -->
<div class="content">
<span class="detail" (click)="jumpToDetail()">明细<i class="iconfont icon-ar-r"
<div class="performance_wrapper">
<!-- <img class="bg" src="assets/images/sales__bg.png" > -->
<div class="content">
<span class="detail" (click)="jumpToDetail()">明细<i class="iconfont icon-ar-r"
style="font-size:12px;"></i></span>
<ul class="tab">
<li *ngFor="let item of performanceList"
(click)="selectRang(item.type)"
[ngClass]="{selected:performanceSelectedFlag==item.type}"
>
<ul class="tab">
<li *ngFor="let item of performanceList" (click)="selectRang(item.type)"
[ngClass]="{selected:performanceSelectedFlag==item.type}">
<div style="position: relative;">
<h3>{{item.name}}
<i class="line" *ngIf="performanceSelectedFlag==item.type"
[ngStyle]="{'left':leftWidth}"
></i>
<i class="line" *ngIf="performanceSelectedFlag==item.type" [ngStyle]="{'left':leftWidth}"></i>
</h3>
</div>
</li>
</ul>
<ul class="performance_list title">
<li></li>
<li>FYP</li>
<li>FYC</li>
<li>完成率</li>
<li>排名</li>
</ul>
<ul class="performance_list">
<li>线上</li>
<li class="mark" style="margin-left: 7px;">
¥{{performanceInfo?.onlineInfo['fyp'] | number: "1.2-2"}}
</li>
<li class="mark">
¥{{performanceInfo?.onlineInfo['fyc'] | number: "1.2-2"}}
</li>
</ul>
<ul class="performance_list">
<li>线下</li>
</ul>
</div>
</ul>
<ul class="performance_list title">
<li></li>
<li>FYP</li>
<li>FYC</li>
<li>完成率</li>
<li>排名</li>
</ul>
<ul class="performance_list">
<li>线上</li>
<li class="mark" style="margin-left: 7px;">
¥{{performanceInfo?.onlineInfo['fyp'] | number: "1.2-2"}}
</li>
<li class="mark">
¥{{performanceInfo?.onlineInfo['fyc'] | number: "1.2-2"}}
</li>
</ul>
<ul class="performance_list">
<li>线下</li>
</ul>
</div>
</div>
<div class="performance_wrapper notice">
<div style="position: relative;">
<h3 style="font-size: 16px;color: #ff002a;">公告</h3><i class="iconfont" style="color: #ff002a;">&#xe645;</i>
<div #hide style="font-size: 14px;position: absolute;z-index:-100" [innerHtml]="firstAnnouncement" ></div>
<div #hide style="font-size: 14px;position: absolute;z-index:-100" [innerHtml]="firstAnnouncement"></div>
<div>{{this.firstAnnouncementTitle}}</div>
<span style="position:absolute;right:5px;font-size: 12px;color:#408dc9;" routerLink="importantAnnouncement">更多</span>
<span style="position:absolute;right:5px;font-size: 12px;color:#408dc9;"
routerLink="importantAnnouncement">更多</span>
</div>
</div>
<div class="tool_wrapper">
<div class="tool_item" *ngFor="let menuItem of menuLists;">
<h3>{{menuItem.title}}</h3>
<div class="tool_content">
<div class="content_item" *ngFor="let menuItemContent of menuItem['content']"
href="javascript:;" (click)="menuNavigation(menuItemContent)"
>
<div class="content_item" *ngFor="let menuItemContent of menuItem['content']" href="javascript:;"
(click)="menuNavigation(menuItemContent)">
<span class="iconfont" [ngClass]="menuItemContent.icon"></span>
<div style="font-size: 12px;">{{menuItemContent.subtitle}}</div>
</div>
</div>
</div>
</div>
<hr style="border-top: 1px solid #ddd;border-left: none;border-right: none;border-bottom: none;"/>
<hr style="border-top: 1px solid #ddd;border-left: none;border-right: none;border-bottom: none;" />
<div class="hotProduct">
<div style="margin-bottom: 10px;">
<h3>热销产品</h3>
......@@ -117,7 +114,7 @@
<div class="summaryBox">
<div class="summaryContent" *ngFor="let label of product.labels">
<div class="summaryIcon"><i class="iconfont icon-gou"></i></div>
<div class="summaryLabel" >{{label}}</div>
<div class="summaryLabel">{{label}}</div>
</div>
</div>
<div class="priceContainer">
......@@ -129,27 +126,29 @@
style="font-size:12px;font-weight: normal;margin-left: 2px;">/年 起</small></span>
<span style="color:#4a4a4a;font-weight:lighter;white-space: nowrap">{{product.feedbackCount}}条评价</span>
</div>
<div><span style="font-size: 16px;padding-right: 18px;color:#4a4a4a" class="iconfont icon-ar-r"></span></div>
<div><span style="font-size: 16px;padding-right: 18px;color:#4a4a4a" class="iconfont icon-ar-r"></span>
</div>
</div>
</div>
</div>
</div>
<hr style="border-top: 1px solid #ddd;border-left: none;border-right: none;border-bottom: none;"/>
<hr style="border-top: 1px solid #ddd;border-left: none;border-right: none;border-bottom: none;" />
<div class="health_wrapper">
<h3>医疗服务</h3>
<img style="border-radius: 10px;width: 48%;margin-right: 10px;" src="assets/images/yindunvipmember.jpg" (click)="jumpUrl()">
<!-- <img style="border-radius: 10px;width: 48%;" src="assets/images/yindunvipmember.jpg" (click)="jumpUrl()"> -->
<img style="border-radius: 10px;width: 48%;margin-right: 10px;" src="assets/images/yindunvipmember.jpg"
(click)="jumpUrl()">
<!-- <img style="border-radius: 10px;width: 48%;" src="assets/images/yindunvipmember.jpg" (click)="jumpUrl()"> -->
</div>
</div>
<div class="footer" style="font-size: 12px;padding-top: 10px;text-align: center;background: #f6f7f2;">
<p>上海银盾保险经纪有限公司</p>
<p>保险业务经营许可证:269615000000800</p>
<p>版权所有©2020银盾保险在线 &nbsp;沪ICP备18000565号</p>
<p>版权所有©2020银盾保险在线 &nbsp;沪ICP备18000565号</p>
</div>
</div>
<ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert>
<ydlife-alert *ngIf="isNeedAlert" [dialogInfo]="dialogInfo" (popInfo)="getPopInfo()"></ydlife-alert>
\ No newline at end of file
import {Component, OnInit,ViewChild,ElementRef,AfterViewInit} from '@angular/core';
import {Router} from "@angular/router";
import {LifeCommonService} from "../../common/life-common.service";
import {environment} from "../../../environments/environment";
import {MyService} from "../my.service";
import {Plans} from '../../domain/plans';
import {User} from '../../domain/user';
import {LocalStorage} from '../../domain/local.storage';
import { Component, OnInit, ViewChild, ElementRef, AfterViewInit } from '@angular/core';
import { Router } from "@angular/router";
import { LifeCommonService } from "../../common/life-common.service";
import { environment } from "../../../environments/environment";
import { MyService } from "../my.service";
import { Plans } from '../../domain/plans';
import { User } from '../../domain/user';
import { LocalStorage } from '../../domain/local.storage';
declare var wx: any;
@Component({
selector: 'ydlife-my-center-home',
templateUrl: './my-center-home.component.html',
styleUrls: ['./my-center-home.component.scss']
})
export class MyCenterHomeComponent implements OnInit,AfterViewInit {
@ViewChild('hide') hide:ElementRef
export class MyCenterHomeComponent implements OnInit, AfterViewInit {
@ViewChild('hide') hide: ElementRef
menuLists: Array<any>;
isNeedAlert: boolean;
dialogInfo: any;
lifeCustomerInfo: any;
deviceType: number;
announcementLists:Array<any>;
firstAnnouncement:string;
allPerformanceInfo:any;
performanceList:Array<any>;
performanceInfo:any;
performanceSelectedFlag:string;
leftWidth:any;
announcementLists: Array<any>;
firstAnnouncement: string;
allPerformanceInfo: any;
performanceList: Array<any>;
performanceInfo: any;
performanceSelectedFlag: string;
leftWidth: any;
products: Plans[];
productInfo: Plans;
inquiry: User;
firstAnnouncementTitle:string;
firstAnnouncementTitle: string;
constructor(
private router: Router,
private router: Router,
private lifeCommonService: LifeCommonService,
private myService: MyService,
private ls: LocalStorage
) {
) {
}
ngOnInit() {
this.deviceType = this.lifeCommonService.checkDeviceType();
this.lifeCustomerInfo = JSON.parse(localStorage.getItem('lifeCustomerInfo')) ? JSON.parse(localStorage.getItem('lifeCustomerInfo')) : null;
this.announcementQuery();
// fileUpload
// this.menuLists = [
// {
// no: 1,
// title: '重要公告',
// path: 'https://www.ydinsurance.cn/?page_id=13763',
// icon: 'icon-gonggao',
// routerLink: 'importantAnnouncement'
// },
// {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: 'training'},
// {
// no: 6,
// title: '文件下载',
// path: 'https://www.ydinsurance.cn/?page_id=13957',
// icon: 'icon-xiazai',
// routerLink: 'fileUpload'
// },
// {no: 7, title: '产品海报', path: '', icon: 'icon-sucai', routerLink: 'material'},
// {no: 0, title: '退出登录', path: '', icon: 'icon-tuichu', routerLink: ''},
// ];
this.menuLists = [
{
title:'营销工具',
content:[
{no:2,subtitle:'AI咨询',icon:'icon-ai',path:`https://${window.location.host}/questionnaire/#/index?campaign=AIRobot&task=AItask1`,routerLink:''},
{no:1,subtitle:'獴哥咨询',icon:'icon-btnconsult',path:`https://${window.location.host}/consulting`,routerLink:''},
{no:3,subtitle:'产品海报',icon:'icon-wenjian',path:'',routerLink:'material'},
{no:4,subtitle:'银盾在线',icon:'icon-zaixian',path:`https://${window.location.host}/index`,routerLink:''}
title: '营销工具',
content: [
{ no: 2, subtitle: 'AI咨询', icon: 'icon-ai', path: `https://${window.location.host}/questionnaire/#/index?campaign=AIRobot&task=AItask1`, routerLink: '' },
{ no: 1, subtitle: '獴哥咨询', icon: 'icon-btnconsult', path: `https://${window.location.host}/consulting`, routerLink: '' },
{ no: 3, subtitle: '产品海报', icon: 'icon-wenjian', path: '', routerLink: 'material' },
{ no: 4, subtitle: '银盾在线', icon: 'icon-zaixian', path: `https://${window.location.host}/index`, routerLink: '' }
]
},{
title:'教育培训',
content:[
{no:5,subtitle:'保险ABC',icon:'icon-xueshimao',path:`https://${window.location.host}/issue`,routerLink:''},
{no:6,subtitle:'培训课件',icon:'icon-jiaoyu',path:'',routerLink:'training'},
{no:7,subtitle:'文章分享',icon:'icon-zhuanfaxian',path:`https://${window.location.host}/discovery`,routerLink:''},
{no:8,subtitle:'',icon:'',path:'',routerLink:''}
}, {
title: '教育培训',
content: [
{ no: 5, subtitle: '保险ABC', icon: 'icon-xueshimao', path: `https://${window.location.host}/issue`, routerLink: '' },
{ no: 6, subtitle: '培训课件', icon: 'icon-jiaoyu', path: '', routerLink: 'training' },
{ no: 7, subtitle: '文章分享', icon: 'icon-zhuanfaxian', path: `https://${window.location.host}/discovery`, routerLink: '' },
{ no: 8, subtitle: '', icon: '', path: '', routerLink: '' }
]
},{
title:'展业工具',
content:[
{no:9,subtitle:'执业分享',icon:'icon-shenfenzheng',path:'',routerLink:''},
{no:10,subtitle:'职业类别',icon:'icon-zhiyeleibie',path:'https://www.ydinsurance.cn/occupationQry/',routerLink:''},
{no:11,subtitle:'文件下载',icon:'icon-xiazai1',path:'https://www.ydinsurance.cn/?page_id=13957',routerLink:'fileUpload'},
{no:12,subtitle:'',icon:'',path:'',routerLink:''}
}, {
title: '展业工具',
content: [
{ no: 9, subtitle: '执业分享', icon: 'icon-shenfenzheng', path: `https://${window.location.host}/brokerQry/#/brokerDetail/${this.lifeCustomerInfo.practitionerId}`, routerLink: '' },
{ no: 10, subtitle: '职业类别', icon: 'icon-zhiyeleibie', path: 'https://www.ydinsurance.cn/occupationQry/', routerLink: '' },
{ no: 11, subtitle: '文件下载', icon: 'icon-xiazai1', path: 'https://www.ydinsurance.cn/?page_id=13957', routerLink: 'fileUpload' },
{ no: 12, subtitle: '', icon: '', path: '', routerLink: '' }
]
}
];
this.performanceList = [
{type: 'month',name:'本月'},
{type: 'year',name:'本年度'}
{ type: 'month', name: '本月' },
{ type: 'year', name: '本年度' }
]
this.brokerInfoQuery();
this.recommendPlanQuery();
......@@ -105,7 +82,7 @@ export class MyCenterHomeComponent implements OnInit,AfterViewInit {
ngAfterViewInit() {
setTimeout(() => {
this.firstAnnouncementTitle =this.getStr(this.hide.nativeElement.innerText, '28')
this.firstAnnouncementTitle = this.getStr(this.hide.nativeElement.innerText, '28')
}, 500);
}
......@@ -115,14 +92,16 @@ export class MyCenterHomeComponent implements OnInit,AfterViewInit {
this.router.navigate([`./${item.routerLink}`]);
} else if (item.path) {
window.open(item.path);
}else if(item.no ===9){
this.shareIdCard();
}else {
}
// else if (item.no === 9) {
// this.shareIdCard();
// }
else {
this.isNeedAlert = true;
this.dialogInfo = {
title: null,
content: {value: '即将开发,敬请期待!', align: 'center'},
footer: [{value: '我知道了', routerLink: '', className: 'weui-dialog__btn_primary'}],
content: { value: '即将开发,敬请期待!', align: 'center' },
footer: [{ value: '我知道了', routerLink: '', className: 'weui-dialog__btn_primary' }],
};
}
}
......@@ -132,7 +111,7 @@ export class MyCenterHomeComponent implements OnInit,AfterViewInit {
this.isNeedAlert = false;
}
// 分享名片
// 分享名片
shareIdCard() {
const imgUrl = this.lifeCustomerInfo.practitionerBasicInfo.headImagePath ? this.lifeCustomerInfo.practitionerBasicInfo.headImagePath : `${environment.ORIGINNAME}/ydLife/assets/images/icons/meng.png`;
this.lifeCommonService.shareStatusPublish(1);
......@@ -148,21 +127,21 @@ export class MyCenterHomeComponent implements OnInit,AfterViewInit {
if (res['success']) {
this.announcementLists = res['data']['announcementInfoList'];
this.firstAnnouncement = this.announcementLists[0]['title'];
}
});
}
getOut(){
getOut() {
localStorage.removeItem('lifeCustomerInfo');
this.router.navigate(['/login']);
}
//查询业绩
brokerInfoQuery(){
brokerInfoQuery() {
const practitionerId = JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerId'];
this.myService.brokerInfoQuery({practitionerId:practitionerId}).subscribe((res)=>{
if(res['success']){
this.myService.brokerInfoQuery({ practitionerId: practitionerId }).subscribe((res) => {
if (res['success']) {
this.allPerformanceInfo = res['data']['commissionInfo'];
//初始化查本月业绩
this.selectRang('month');
......@@ -181,8 +160,8 @@ export class MyCenterHomeComponent implements OnInit,AfterViewInit {
} else {
templen++;
}
if (len == templen || len== templen+1) {
return str.substring(0, i + 1) + '...' ;
if (len == templen || len == templen + 1) {
return str.substring(0, i + 1) + '...';
} else if (templen > len + 1) {
return str.substring(0, i);
}
......@@ -190,21 +169,21 @@ export class MyCenterHomeComponent implements OnInit,AfterViewInit {
return str;
}
selectRang(e){
if(e=='year'){
selectRang(e) {
if (e == 'year') {
this.performanceInfo = this.allPerformanceInfo['thisYearInfo'];
this.leftWidth = '30%'
}
if(e=='month'){
if (e == 'month') {
this.performanceInfo = this.allPerformanceInfo['thisMonthInfo'];
this.leftWidth = '15%'
}
this.performanceSelectedFlag = e;
}
// 大家都在买产品查询列表
recommendPlanQuery() {
this.myService.queryproductlistbytag({mdTagId:17}).subscribe(res => {
// 大家都在买产品查询列表
recommendPlanQuery() {
this.myService.queryproductlistbytag({ mdTagId: 17 }).subscribe(res => {
this.products = res['data'].plans;
})
}
......@@ -226,8 +205,8 @@ export class MyCenterHomeComponent implements OnInit,AfterViewInit {
window.location.href = `https://${window.location.host}/life/${this.productInfo.productId}`
} else {
if (this.productInfo.productCategoryId === 1 || this.productInfo.productCategoryId === 4) {
window.location.href = `https://${window.location.host}/pdetail/${this.productInfo.planId}`
} else if (this.productInfo.productCategoryId === 2) {
window.location.href = `https://${window.location.host}/pdetail/${this.productInfo.planId}`
} else if (this.productInfo.productCategoryId === 2) {
window.location.href = `https://${window.location.host}/hProductDetail/${this.productInfo.planId}?type=7`
} else if (this.productInfo.productCategoryId === 5) {
window.location.href = `https://${window.location.host}/hProductDetail/${this.productInfo.planId}?type=9`
......@@ -244,11 +223,11 @@ export class MyCenterHomeComponent implements OnInit,AfterViewInit {
this.lifeCommonService.setInitDate(this.productInfo.dayCount);
}
jumpUrl(){
jumpUrl() {
window.location.href = `https://${window.location.host}/mk/ydviphexincoupon`
}
jumpToDetail(){
this.router.navigate(['/salesDetail'],{ queryParams: { type: this.performanceSelectedFlag }});
jumpToDetail() {
this.router.navigate(['/salesDetail'], { queryParams: { type: this.performanceSelectedFlag } });
}
}
import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';
import {MyCenterHomeComponent} from './my-center-home/my-center-home.component';
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 {SalesDetailComponent} from './sales-detail/sales-detail.component';
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { MyCenterHomeComponent } from './my-center-home/my-center-home.component';
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 { SalesDetailComponent } from './sales-detail/sales-detail.component';
import { AnnouncementDetailComponent } from './announcement-detail/announcement-detail.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], data: [{type: 'fileUpload'}]},
{path: 'training', component: FileUploadComponent, canActivate: [AuthGuard], data: [{type: 'training'}]},
{path: 'importantAnnouncement', component: ImportantAnnouncementComponent, canActivate: [AuthGuard]},
{path: 'salesDetail',component:SalesDetailComponent,canActivate:[AuthGuard]}
{ path: '', component: MyCenterHomeComponent, canActivate: [AuthGuard] },
{ path: 'material', component: MkMaterialComponent, canActivate: [AuthGuard] },
{ path: 'material/:itemId', component: MkMaterialDetailComponent, 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] },
{ path: 'salesDetail', component: SalesDetailComponent, canActivate: [AuthGuard] },
{ path: 'importantAnnouncement/:id', component: AnnouncementDetailComponent, canActivate: [AuthGuard] }
];
@NgModule({
......
......@@ -9,8 +9,9 @@ import { MkMaterialDetailComponent } from './mk-material-detail/mk-material-deta
import { FileUploadComponent } from './file-upload/file-upload.component';
import { ImportantAnnouncementComponent } from './important-announcement/important-announcement.component';
import { SalesDetailComponent } from './sales-detail/sales-detail.component';
import { AnnouncementDetailComponent } from './announcement-detail/announcement-detail.component';
@NgModule({
declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent],
declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent, AnnouncementDetailComponent],
imports: [
CommonModule,
LifeCommonModule,
......
import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {environment} from '../../environments/environment';
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { environment } from '../../environments/environment';
@Injectable({
providedIn: 'root'
......@@ -11,28 +11,28 @@ export class MyService {
private API = environment.BACKEND_URL_CONFIG_VALUE;
// 保存分享码
// 保存分享码
shareCallBack(shareInfo) {
const url = this.API + '/shareCallBack';
return this.http
.post(url, JSON.stringify(shareInfo));
}
// 文件下载
filePath(itemType, itemId, fileCategory,code,mdDropOptionId) {
// 文件下载
filePath(itemType, itemId, fileCategory, code, mdDropOptionId) {
const url = this.API + '/filePathQuery';
return this.http
.post(url, JSON.stringify({itemType: itemType, itemId: itemId, fileCategory: fileCategory,code:code,mdDropOptionId:mdDropOptionId}));
.post(url, JSON.stringify({ itemType: itemType, itemId: itemId, fileCategory: fileCategory, code: code, mdDropOptionId: mdDropOptionId }));
}
// 重要公告
// 重要公告
announcementQuery(id, announcementTypeId) {
const url = this.API + '/announcementQuery';
return this.http
.post(url, JSON.stringify({id: id, announcementTypeId: announcementTypeId}));
.post(url, JSON.stringify({ id: id, announcementTypeId: announcementTypeId }));
}
// 产品海报
// 产品海报
posterQuery(paginationInfo) {
const url = this.API + '/posterQuery';
return this.http
......@@ -61,10 +61,10 @@ export class MyService {
});
}
queryproductlistbytag(param){
queryproductlistbytag(param) {
const url = this.API + "/queryproductlistbytag";
return this.http.post(url, JSON.stringify(param)).pipe(res => {
return res;
});
});
}
}
<div class="salesWrapper">
<ul class="tab">
<li *ngFor="let item of performanceList"
(click)="selectRang(item.type)"
[ngClass]="{selected:salesDetailType==item.type}"
>
<div style="position: relative;">
<h3>{{item.name}}
<!-- <i class="line" *ngIf="performanceSelectedFlag==item.type"
<li *ngFor="let item of performanceList" (click)="selectRang(item.type)"
[ngClass]="{selected:salesDetailType==item.type}">
<div style="position: relative;">
<h3>{{item.name}}
<!-- <i class="line" *ngIf="performanceSelectedFlag==item.type"
[ngStyle]="{'left':leftWidth}"
></i> -->
</h3>
</div>
</li>
</h3>
</div>
</li>
</ul>
<div class="salesContent">
<div class="salesItem" *ngFor="let salesDetailItem of salesDetailList">
<div class="icon_bolck"><span class="iconfont icon-money-more"></span></div>
<div class="line">
<div>投保人:{{salesDetailItem.holderName}}</div>
<div>投保人:{{salesDetailItem.holderName}}</div>
<div class="price">¥{{salesDetailItem.referralAmount | number: "1.2-2"}}</div>
</div>
<div class="line long_line">产品名称:{{salesDetailItem.productName}}</div>
<div class="line long_line">
<div>保单号:{{salesDetailItem.policyNo}}</div>
<div>{{(salesDetailItem.orderDate).substr(0,10)}}</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
......@@ -25,17 +25,6 @@
background-color: #ff5a32;
color: #fff;
border: 1px #f0f0f0 solid;
// h3{
// font-weight: bold;
// }
// .line{
// width: 20px;
// height: 3px;
// display: inline-block;
// position: absolute;
// bottom: 2px;
// background: #ff002a;
// }
}
}
.salesContent{
......@@ -66,7 +55,7 @@
display: flex;
justify-content: space-between;
align-items: center;
height: 30px;
height: 18px;
font-size: 14px;
.price{
font-size: 16px;
......@@ -78,5 +67,8 @@
font-size: 12px;
}
}
.salesItem:last-child{
border-bottom: none;
}
}
}
\ No newline at end of file
......@@ -54,3 +54,4 @@ input::placeholder {
.summaryBox .summaryContent:nth-child(2n) {
margin-right: 0;
}
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