Commit a9f2ea9b by sunchao

产品库筛选&资料页跳转

parent 8c634c47
......@@ -35,4 +35,5 @@ export class Plans {
needIdCard?: string;
isActiveForProduct?: number;
isActiveForPlan?: number;
isActive?:any;
}
<div class="rich_media_content" >
<div [innerHTML]="commission | safeHtml">
</div>
</div>
\ No newline at end of file
.rich_media_content{
padding: calc(20px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 12px calc(16px + env(safe-area-inset-left));
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CommissionComponent } from './commission.component';
describe('CommissionComponent', () => {
let component: CommissionComponent;
let fixture: ComponentFixture<CommissionComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CommissionComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CommissionComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'ydlife-commission',
templateUrl: './commission.component.html',
styleUrls: ['./commission.component.scss']
})
export class CommissionComponent implements OnInit {
commission:any;
constructor() { }
ngOnInit() {
this.commission = sessionStorage.getItem('commission')
console.log(this,this.commission)
}
}
<div class="fileUploadLists">
<div class="contentList">
<ul>
<li *ngFor="let fileItem of fileList">
<a href="{{fileItem.ossFilePath}}" download="{{fileItem.displayName}}" target="_blank">
<div title="{{fileItem.displayName}}">{{fileItem.displayName}}</div>
<div style="position: absolute;right: 5px;top: 6px;"><i class="iconfont icon-xiazai"></i></div>
</a>
</li>
</ul>
</div>
</div>
\ No newline at end of file
.fileUploadLists {
height: 100%;
background: #f5f5f5;
ul {
list-style: none;
}
.contentList{
background-color: #fff;
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
height: auto;
overflow-x: hidden;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
ul li{
border-bottom: 1px solid #dcdcdc;
padding: 4px 20px;
position: relative;
.icon-xiazai {
font-size: 22px;
color: #ec2d37;
font-weight: bold;
}
a {
display: flex;
align-items: center;
color: #000;
.iconfont {
color: #ec2d37;
font-size: 22px;
margin-right: 8px;
}
}
}
ul li:last-child {
border: none;
}
}
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FileListComponent } from './file-list.component';
describe('FileListComponent', () => {
let component: FileListComponent;
let fixture: ComponentFixture<FileListComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ FileListComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(FileListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { Router,ActivatedRoute } from "@angular/router";
import { MyService } from "../my.service";
@Component({
selector: 'ydlife-file-list',
templateUrl: './file-list.component.html',
styleUrls: ['./file-list.component.scss']
})
export class FileListComponent implements OnInit {
productDataMenuLists: Array<any>;
productId:any;
planId:any;
categoryId:any;
fileList:Array<any>;
constructor(private router: Router,private myService:MyService,private activatedRoute: ActivatedRoute,) { }
ngOnInit() {
// window.location.href = urlItem['fileInfos'][0]['ossFilePath'];
this.productId = this.activatedRoute.snapshot.queryParams.productId?this.activatedRoute.snapshot.queryParams.productId:null;;
this.planId = this.activatedRoute.snapshot.queryParams.planId?this.activatedRoute.snapshot.queryParams.planId:null;
this.categoryId = this.activatedRoute.snapshot.queryParams.categoryId?this.activatedRoute.snapshot.queryParams.categoryId:null;
this.queryProductFile();
}
queryProductFile(){
this.myService.queryProductFile({productId:this.productId,planId:this.planId}).subscribe((res)=>{
if(res['success']){
this.productDataMenuLists = res['data']['categoryInfos'];
for(let i=0;i<this.productDataMenuLists.length;i++){
if(this.categoryId == this.productDataMenuLists[i]['categoryId']){
this.fileList = this.productDataMenuLists[i]['fileInfos']
}
}
}
})
}
}
......@@ -234,6 +234,7 @@ export class MkMaterialDetailComponent implements OnInit {
}
// 0是有plan,1是无plan
if (posterInfo.isPlan == '0') {
if (posterInfo.productCategoryId == '2') {
this.shareInfo.url = `${environment.DOMAINNAME}/hProductDetail/${this.materialItemId}?shareCode=${shareCodeUuid}&type=7`;
} else if (posterInfo.productCategoryId == '5') {
......
......@@ -92,7 +92,7 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
{ no: 4, subtitle: '线上投保', icon: 'online', path: `https://${window.location.host}/index?source=dyd`, routerLink: '' ,showSubMenu:true},
{ no: 13, subtitle: '我的商机', icon: 'line', path: '', routerLink: 'business',showSubMenu:true },
{ no: 9, subtitle: '执业证书', icon: 'card', path: `https://${window.location.host}/brokerQry/#/brokerDetail/${this.lifeCustomerInfo.practitionerId}?source=0`, routerLink: '',showSubMenu:true },
{ no: 10, subtitle: '职业类别', icon: 'job', path: 'https://www.ydinsurance.cn/occupationQry/', routerLink: '',showSubMenu:true },
{ no: 17, subtitle: '产品库', icon: 'product', path: '', routerLink: 'product' ,showSubMenu:true},
{ no: 7, subtitle: '文章分享', icon: 'article', path: '', routerLink: 'article/null' ,showSubMenu:true},
{ no: 3, subtitle: '产品海报', icon: 'poster_p', path: '/salesDetail', routerLink: 'material',showSubMenu:true },
],
......@@ -120,8 +120,9 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
{ no: 21, subtitle: '公司制度', icon: 'management', path: '', routerLink: '',showSubMenu:true },
{ no: 23, subtitle: '我的报聘', icon: 'pin', path: '', routerLink: 'my_application' ,showSubMenu:true},
{ no: 24, subtitle: '目标设置', icon: 'set', path: '', routerLink: 'target',showSubMenu:true },
{ no: 11, subtitle: '文件下载', icon: 'download', path: 'https://www.ydinsurance.cn/?page_id=13957', routerLink: 'fileUpload',showSubMenu:true },
{ no: 25, subtitle: '', icon: 'default', path: '', routerLink: '' ,showSubMenu:true},
{ no: 26, subtitle: '', icon: 'default', path: '', routerLink: '' ,showSubMenu:true}
// { no: 26, subtitle: '', icon: 'default', path: '', routerLink: '' ,showSubMenu:true}
],
isShow: true
......@@ -131,9 +132,9 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
content: [
{ no: 5, subtitle: '保险ABC', icon: 'abc', path: `https://${window.location.host}/issue`, routerLink: '' ,showSubMenu:true},
{ no: 6, subtitle: '培训课件', icon: 'train', path: '', routerLink: 'training',showSubMenu:true },
{ no: 11, subtitle: '文件下载', icon: 'download', path: 'https://www.ydinsurance.cn/?page_id=13957', routerLink: 'fileUpload',showSubMenu:true },
{ no: 17, subtitle: '产品库', icon: 'product', path: '', routerLink: 'product' ,showSubMenu:true}
{ no: 10, subtitle: '职业类别', icon: 'job', path: 'https://www.ydinsurance.cn/occupationQry/', routerLink: '',showSubMenu:true },
{ no: 26, subtitle: '', icon: 'default', path: '', routerLink: '' ,showSubMenu:true}
// { no: 17, subtitle: '产品库', icon: 'product', path: '', routerLink: 'https://www.ydinsurance.cn/?page_id=14331' ,showSubMenu:true}
],
isShow: true
}
......
......@@ -55,8 +55,9 @@ import { ArticleReadComponent } from './article-read/article-read.component';
import { SalaryDetailComponent } from './salary-detail/salary-detail.component';
import { SalaryFirstYearComponent } from './salary-first-year/salary-first-year.component';
import { ProductComponent } from './product/product.component';
import {ProductDataComponent} from "./product-data/product-data.component";
import { ProductDataComponent } from "./product-data/product-data.component";
import { CommissionComponent } from './commission/commission.component';
import { FileListComponent } from './file-list/file-list.component';
const myRoutes: Routes = [
{ path: '', component: MyCenterHomeComponent, canActivate: [AuthGuard], data: [{ title: '银盾保险经纪 - 工作台' }] },
......@@ -120,6 +121,8 @@ const myRoutes: Routes = [
{ path: 'salary_detail/:id',component:SalaryFirstYearComponent,canActivate:[AuthGuard]},
{ path: 'product',component:ProductComponent,canActivate:[AuthGuard]},
{ path: 'productData/:id',component:ProductDataComponent,canActivate:[AuthGuard]},
{ path: 'commission',component:CommissionComponent,canActivate:[AuthGuard]},
{ path: 'filelist',component:FileListComponent,canActivate:[AuthGuard]}
];
@NgModule({
......
......@@ -69,9 +69,11 @@ import { SalaryFirstYearComponent } from './salary-first-year/salary-first-year.
import { DetailModalComponent } from '../common/detail-modal/detail-modal.component';
import { ProductComponent } from './product/product.component';
import { ProductDataComponent } from './product-data/product-data.component';
import { CommissionComponent } from './commission/commission.component';
import { FileListComponent } from './file-list/file-list.component';
@NgModule({
declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent, AnnouncementDetailComponent, MyBusinessComponent, MyBusinessDetailComponent, PickerComponent, MyToastComponent, SalesRankComponent, TeamRankComponent, RecruitingComponent, RecruitingDetailComponent, ThanksComponent, MySettingComponent, MySettingDetailComponent, MyNewsComponent, MyTargetComponent, TeamPanelComponent, SwitchNumberPipe, TeamSalesScoreComponent, ScoreDetailsComponent, BusinessCardComponent, OrderDetailComponent, SalaryComponent, TodoListComponent, AddTaskComponent, MedicalServiceComponent, InvitationComponent, RegisterComponent, EmployeeInfoComponent, EmployeeBasicInfoComponent, WorkExperienceComponent, PersonalPhotosComponent, EmployeeIdCardComponent, EmployeeEducationComponent, PersonalStatementComponent, SignatureComponent, EmployeeSubmitComponent, BankCardComponent, MemberDetailComponent, ApprovalListComponent, ApprovalCommentsComponent, ApprovalResultListComponent, MyApplicationComponent, SuggestionComponent, EmployeeSalaryComponent, HistoricalRankComponent, TeamAreaPanelComponent, ArticleComponent, ArticleDetailComponent, ArticleReadComponent,SalaryDetailComponent,SalaryFirstYearComponent,DetailModalComponent, ProductComponent, ProductDataComponent],
declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent, AnnouncementDetailComponent, MyBusinessComponent, MyBusinessDetailComponent, PickerComponent, MyToastComponent, SalesRankComponent, TeamRankComponent, RecruitingComponent, RecruitingDetailComponent, ThanksComponent, MySettingComponent, MySettingDetailComponent, MyNewsComponent, MyTargetComponent, TeamPanelComponent, SwitchNumberPipe, TeamSalesScoreComponent, ScoreDetailsComponent, BusinessCardComponent, OrderDetailComponent, SalaryComponent, TodoListComponent, AddTaskComponent, MedicalServiceComponent, InvitationComponent, RegisterComponent, EmployeeInfoComponent, EmployeeBasicInfoComponent, WorkExperienceComponent, PersonalPhotosComponent, EmployeeIdCardComponent, EmployeeEducationComponent, PersonalStatementComponent, SignatureComponent, EmployeeSubmitComponent, BankCardComponent, MemberDetailComponent, ApprovalListComponent, ApprovalCommentsComponent, ApprovalResultListComponent, MyApplicationComponent, SuggestionComponent, EmployeeSalaryComponent, HistoricalRankComponent, TeamAreaPanelComponent, ArticleComponent, ArticleDetailComponent, ArticleReadComponent,SalaryDetailComponent,SalaryFirstYearComponent,DetailModalComponent, ProductComponent, ProductDataComponent, CommissionComponent, FileListComponent],
imports: [
CommonModule,
LifeCommonModule,
......
......@@ -3,13 +3,9 @@
<h3>产品海报</h3>
<div>
<ul>
<li>
<img src="./assets/images/loading_bg.png" alt="" class="img-responsive">
</li> <li>
<img src="./assets/images/loading_bg.png" alt="" class="img-responsive">
</li> <li>
<img src="./assets/images/loading_bg.png" alt="" class="img-responsive">
</li>
<li (click)="jumpToMaterial()">
<img [src]="posterUrl" class="img-responsive">
</li>
</ul>
</div>
</div>
......@@ -18,11 +14,11 @@
<h3>产品资料</h3>
<div>
<ul>
<li *ngFor="let productDataMenuItem of productDataMenuLists">
<li *ngFor="let productDataMenuItem of productDataMenuLists" (click)="jumpToDetail(productDataMenuItem)">
<div>
<img src="./assets/images/productData/{{productDataMenuItem['iconPath']}}" alt="">
<img src="./assets/images/productData/{{productDataMenuItem['displayImage']}}" alt="">
</div>
<div>{{productDataMenuItem.name}}</div>
<div>{{productDataMenuItem.categoryName}}</div>
</li>
</ul>
</div>
......
import {Component, OnInit} from '@angular/core';
import {MyService} from '../my.service';
import { ActivatedRoute } from "@angular/router";
import { Router,ActivatedRoute } from "@angular/router";
import { ToastService } from 'ng-zorro-antd-mobile';
@Component({
selector: 'ydlife-product-data',
......@@ -11,19 +12,9 @@ export class ProductDataComponent implements OnInit {
productDataMenuLists: Array<any>;
productId:any;
planId:any;
constructor(private myService:MyService,private activatedRoute: ActivatedRoute) {
// 产品资料菜单
this.productDataMenuLists = [
{id: 1, iconPath: 'comIntro.png', name: '保司介绍', active: 1},
{id: 2, iconPath: 'feature.png', name: '产品特色', active: 1},
{id: 3, iconPath: 'item.png', name: '产品条款', active: 1},
{id: 4, iconPath: 'priceRate.png', name: '费率现价表', active: 1},
{id: 5, iconPath: 'notice.png', name: '投保须知', active: 1},
{id: 6, iconPath: 'markting.png', name: '营销资料', active: 1},
{id: 7, iconPath: 'e-insure.png', name: '微投保资料', active: 1},
{id: 8, iconPath: 'commission.png', name: '公告佣金', active: 1},
{id: 9, iconPath: 'other.png', name: '其它', active: 1}
];
posterUrl:any;
posterInfo:any;
constructor(private router: Router,private myService:MyService,private activatedRoute: ActivatedRoute,private _toast: ToastService) {
}
ngOnInit() {
......@@ -34,7 +25,38 @@ export class ProductDataComponent implements OnInit {
queryProductFile(){
this.myService.queryProductFile({productId:this.productId,planId:this.planId}).subscribe((res)=>{
console.log(res)
if(res['success']){
this.productDataMenuLists = res['data']['categoryInfos'].filter((item)=>{
return item.categoryId != 22;
});
this.posterInfo = res['data']['categoryInfos'].filter((item)=>{
return item.categoryId == 22;
});
this.posterUrl = this.posterInfo[0]['fileInfos']['0']['ossFilePath'];
}else{
const toast = ToastService.show(`${res['message']}`, 0);
setTimeout(() => {
ToastService.hide();
}, 3000);
}
})
}
jumpToDetail(urlItem){
if(urlItem['categoryId'] != 35){
this.router.navigate(['/filelist'],{queryParams:{planId:this.planId,productId:this.productId,categoryId:urlItem['categoryId']}})
}else{
sessionStorage.setItem('commission',urlItem['fileInfos'][0]['description'])
this.router.navigate(['/commission']);
}
}
jumpToMaterial(){
this.router.navigate([`/material/${this.posterInfo[0]['fileInfos']['0']['itemId']}`],
{ queryParams:
{ itemType: this.posterInfo[0]['fileInfos']['0']['itemType'],
posterType: this.posterInfo[0]['fileInfos']['0']['id']
}
});
}
}
......@@ -9,22 +9,32 @@
</ul>
<div class="right">
<ul class="right_header">
<li *ngFor="let topItem of topList">
<li *ngFor="let topItem of topList" (click)="allFilter(2,topItem)">
{{topItem.tagName}}
<span class="iconfont icon-xiangxia"></span>
</li>
<li (click)="allFilter()">筛选 <img src="assets/images/product_select.png" alt="筛选" style="width: 16px;height:16px;"></li>
<li (click)="allFilter(1)">筛选 <img src="assets/images/product_select.png" alt="筛选" style="width: 16px;height:16px;"></li>
</ul>
<div class="mask" *ngIf="filterSelectedFlag" (click)="filterSelectedFlag=false"></div>
<div class="select_all slowRight" *ngIf="filterSelectedFlag">
<ul>
<li *ngFor="let rightItem of rightList">
<h5>{{rightItem.tagName}}</h5>
<div class="optionLists">
<h5>
<span>{{rightItem.tagName}}</span>
<span class="iconfont icon-xiangxia"
[ngStyle]="{'transform': rightItem.showAll? 'rotate(180deg)' : 'rotate(0)'}"
(click)="showAll(rightItem)" *ngIf="rightItem.tagViewQueryInfos.length>6"></span>
</h5>
<div class="optionLists" *ngIf="rightItem.showAll">
<div *ngFor="let optItem of rightItem.tagViewQueryInfos"
(click)="switchCategory(2,optItem)" [ngClass]="{selected:optItem.selected == true}"
>{{optItem.tagName}}</div>
</div>
<div class="optionLists" *ngIf="!rightItem.showAll">
<div *ngFor="let optItem of rightItem.tagViewQueryInfos.slice(0,6)"
(click)="switchCategory(2,optItem)" [ngClass]="{selected:optItem.selected == true}"
>{{optItem.tagName}}</div>
</div>
</li>
</ul>
<div class="foot_btn">
......@@ -35,31 +45,35 @@
<ul class="productLists">
<li *ngFor="let productInfoItem of productInfos">
<div class="productInfoContent" (click)="goProductDetail(productInfoItem)">
<h3>{{productInfoItem.productName}}</h3>
<div class="featureContent" *ngIf="productInfoItem['labels']">
<div *ngFor="let labelItem of productInfoItem['labels']">
{{labelItem}}
<div class="productInfoContent" >
<h3 (click)="goData(productInfoItem)">
<span>{{productInfoItem.productName}}</span>
<div class="dataContent">
<div>资料</div>
</div>
</div>
<div class="insuranceRulesContent" *ngIf="productInfoItem['adaptionInfos']">
<div *ngFor="let adaptionItem of productInfoItem['adaptionInfos']">
<span>{{adaptionItem.name}}:</span>
<span [innerHtml]="adaptionItem.value"></span>
</h3>
<div (click)="goProductDetail(productInfoItem)">
<div class="featureContent" *ngIf="productInfoItem['labels']">
<div *ngFor="let labelItem of productInfoItem['labels']">
{{labelItem}}
</div>
</div>
<div class="insuranceRulesContent" *ngIf="productInfoItem['adaptionInfos']">
<div *ngFor="let adaptionItem of productInfoItem['adaptionInfos']" style="display: flex;">
<span>{{adaptionItem.name}}:</span>
<span [innerHtml]="adaptionItem.value"></span>
</div>
</div>
<div class="priceContent">
<span></span><strong>{{productInfoItem.price | number:'1.0-0'}}</strong><span>元起 | 每人每年</span>
</div>
</div>
<div class="priceContent">
<span></span><strong>{{productInfoItem.price | number:'1.0-0'}}</strong><span>元起 | 每人每年</span>
</div>
</div>
<div class="dataContent">
<!-- <div class="dataContent">
<div (click)="goData(productInfoItem)">资料</div>
<div>可售</div>
</div>
</div> -->
</li>
</ul>
</div>
</div>
......
......@@ -90,6 +90,8 @@
width: 100%;
height: 100%;
padding: 20px 0 20px 10px;
z-index: 1000;
overflow-y: auto;
ul{
> li {
margin-bottom: 15px;
......@@ -98,6 +100,9 @@
font-weight: bold;
color: #333;
margin-bottom: 10px;
display: flex;
justify-content: space-between;
padding-right: 10px;
}
.optionLists {
display: flex;
......@@ -168,6 +173,9 @@
font-weight: bold;
padding-top: 14px;
padding-bottom: 8px;
display: flex;
justify-content: space-between;
align-items: baseline;
}
.featureContent {
display: flex;
......@@ -200,20 +208,21 @@
padding-right: 15px;
> div:first-child {
width: 55px;
height: 21px;
height: 26px;
text-align: center;
border: 1px solid #F16A5D;
border-radius: 10px;
color: #F16A5D;
font-size: 13px;
}
> div:last-child {
background: #FDF5F4;
color: #F16A5D;
font-size: 12px;
border-radius: 3px;
padding: 5px 6px;
font-size: 15px;
font-weight: normal;
}
// > div:last-child {
// background: #FDF5F4;
// color: #F16A5D;
// font-size: 12px;
// border-radius: 3px;
// padding: 5px 6px;
// }
}
}
}
......
......@@ -13,14 +13,17 @@ import { User } from '../../domain/user';
})
export class ProductComponent implements OnInit {
leftList: Array<any>;
topList: Array<any>;
rightList: Array<any>;
topList: Array<any> = [];
rightList: Array<any> = [];
leftSelectedId: number = null;
filterSelectedFlag: boolean = false;
tagIds:Array<any> = [];
productInfos:Array<any>;
productInfo: Plans;
inquiry: User;
rightIds:Array<any> = [];
rightTagIds:Array<any> = [];
topAndright:Array<any> = [];
constructor(private myService: MyService,
public lifeCommonService: LifeCommonService,
private router: Router,
......@@ -32,7 +35,7 @@ export class ProductComponent implements OnInit {
this.lifeCommonService.setTitle('产品库');
this.tagViewQuery(305);
this.tagViewQuery(309);
this.tagViewQuery(306);
}
//type:1表示左侧筛选2表示右侧筛选
......@@ -48,6 +51,20 @@ export class ProductComponent implements OnInit {
this.queryProductBox();
}else if(type==2){
item.selected = !item.selected;
for(let i=0;i<this.rightList.length;i++){
for(let j=0;j<this.rightList[i]['tagViewQueryInfos'].length;j++){
if(this.rightList[i]['tagViewQueryInfos'][j]['selected'] == true){
this.rightIds.push(this.rightList[i]['tagViewQueryInfos'][j]['id'])
}else{
for(let m=0;m<this.rightIds.length;m++){
if(this.rightIds[m] == this.rightList[i]['tagViewQueryInfos'][j]['id']){
this.rightIds.splice(m,1)
}
}
}
}
}
this.rightIds = Array.from(new Set(this.rightIds))
}
}
......@@ -67,14 +84,31 @@ export class ProductComponent implements OnInit {
this.topList = res['data']['tagViewQueryInfos'];
} else {
this.rightList = res['data']['tagViewQueryInfos'];
if(this.rightIds.length >0){
for(let i=0;i<this.rightList.length;i++){
for(let j=0;j<this.rightList[i]['tagViewQueryInfos'].length;j++){
for(let m=0;m<this.rightIds.length;m++){
if(this.rightIds[m] == this.rightList[i]['tagViewQueryInfos'][j]['id']){
this.rightList[i]['tagViewQueryInfos'][j]['selected'] = true;
}
}
}
}
}
}
this.topAndright = this.rightList.concat(this.topList)
}
})
}
// 筛选
allFilter() {
allFilter(type,item?:any) {
this.filterSelectedFlag = true;
if(type==1){
this.tagViewQuery(306);
}else{
this.rightList = [item];
}
}
// 进入产品资料页面
......@@ -84,7 +118,20 @@ export class ProductComponent implements OnInit {
//根据标签查询产品
queryProductBox(){
this.myService.queryProductBox({tagIds:this.tagIds}).subscribe((res)=>{
this.rightTagIds=[];
if(this.rightIds.length){
for(let i=0;i<this.topAndright.length;i++){
for(let j=0;j<this.topAndright[i]['tagViewQueryInfos'].length;j++){
for(let m=0;m<this.rightIds.length;m++){
if(this.rightIds[m] == this.topAndright[i]['tagViewQueryInfos'][j]['id']){
this.rightTagIds.push(this.topAndright[i]['tagViewQueryInfos'][j]['tagId'])
}
}
}
}
}
let tagIds = this.tagIds.concat(this.rightTagIds)
this.myService.queryProductBox({tagIds:tagIds}).subscribe((res)=>{
if(res['success']){
this.productInfos = res['data']['productInfos'];
//截取两个特色
......@@ -110,19 +157,17 @@ export class ProductComponent implements OnInit {
for(let i=0;i<this.rightList.length;i++){
for(let j=0;j<this.rightList[i]['tagViewQueryInfos'].length;j++){
this.rightList[i]['tagViewQueryInfos'][j]['selected'] = false;
for(let m=0;m<this.rightIds.length;m++){
if(this.rightIds[m] == this.rightList[i]['tagViewQueryInfos'][j]['id']){
this.rightIds.splice(m,1)
}
}
}
}
}
//确定搜索
confirm(){
for(let i=0;i<this.rightList.length;i++){
for(let j=0;j<this.rightList[i]['tagViewQueryInfos'].length;j++){
if(this.rightList[i]['tagViewQueryInfos'][j]['selected'] == true){
this.tagIds.push(this.rightList[i]['tagViewQueryInfos'][j]['tagId'])
}
}
}
this.filterSelectedFlag = false;
this.queryProductBox();
}
......@@ -132,18 +177,22 @@ export class ProductComponent implements OnInit {
goProductDetail(product: Plans): void {
this.productInfo = product;
this.productInfo.type = 2;
if (this.productInfo.noPlanProduct === true) {
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}/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`
} else {
if(this.productInfo.isActive == 4){
this.router.navigate(['/productData', product.productId],{queryParams:{planId:product.planId}});
}else if(this.productInfo.isActive != 4){
if (this.productInfo.noPlanProduct === true) {
window.location.href = `https://${window.location.host}/life/${this.productInfo.productId}`
this.router.navigate(['/pdetail', this.productInfo.planId]);
} 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}/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`
} else {
window.location.href = `https://${window.location.host}/life/${this.productInfo.productId}`
this.router.navigate(['/pdetail', this.productInfo.planId]);
}
}
}
}
......@@ -153,4 +202,8 @@ export class ProductComponent implements OnInit {
this.productInfo.dayCount = this.lifeCommonService.yearDayCount(this.productInfo.dayCount, this.productInfo.insurerId == '5');
this.lifeCommonService.setInitDate(this.productInfo.dayCount);
}
showAll(item){
item.showAll = !item.showAll;
}
}
......@@ -122,7 +122,7 @@
}else{
initialize();
}
getknowledgeQry();
} else if (window.name == "isReload") {
let loading = document.getElementById("adv");
loading.style.display = 'none';
......@@ -170,7 +170,7 @@
}
})
}
getknowledgeQry();
// (function() {
// if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
......
......@@ -279,4 +279,8 @@ footer.fixed{
font-size: 22px;
}
.rich_media_content td,.rich_media_content th {
padding: 5px 10px!important;
border: 1px solid #DDD!important;
}
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