Commit 3509b8f2 by Chao Sun

增员海报&登录接口openId&季度业绩

parent dc4c40c0
......@@ -52,24 +52,34 @@ export class LoginComponent implements OnInit, OnDestroy {
const lifeCustomerInfo = { ...response.data, mobileNo: this.userInfo.mobileNo, commonResult: null };
if (lifeCustomerInfo['customerId'] && lifeCustomerInfo['practitionerId']) {
localStorage.setItem('lifeCustomerInfo', JSON.stringify(lifeCustomerInfo));
if (response['data']['loginTimes'] > 0) {
this.redirect = this.authService.redirectUrl ? this.router.parseUrl(this.authService.redirectUrl) : '/my';
this.router.navigateByUrl(this.redirect);
// if (response['data']['getOpenIdUrl']) {
// window.location.href = response['data']['getOpenIdUrl'];
// } else {
// this.redirect = this.authService.redirectUrl ? this.router.parseUrl(this.authService.redirectUrl) : '/my';
// this.router.navigateByUrl(this.redirect);
// }
//如果有openId跳页由后端判断,没有的话根据登录次数前端判断跳页
if (response['data']['getOpenIdUrl']) {
window.location.href = response['data']['getOpenIdUrl'];
} else {
this.router.navigateByUrl('/thanks')
// if (response['data']['getOpenIdUrl']) {
// window.location.href = response['data']['getOpenIdUrl'];
// } else {
// this.router.navigateByUrl('/thanks')
// }
if (response['data']['loginTimes'] > 0) {
this.redirect = this.authService.redirectUrl ? this.router.parseUrl(this.authService.redirectUrl) : '/my';
} else {
this.redirect = this.authService.redirectUrl ? this.router.parseUrl(this.authService.redirectUrl) : '/thanks';
}
this.router.navigateByUrl(this.redirect);
}
// if (response['data']['loginTimes'] > 0) {
// this.redirect = this.authService.redirectUrl ? this.router.parseUrl(this.authService.redirectUrl) : '/my';
// this.router.navigateByUrl(this.redirect);
// // if (response['data']['getOpenIdUrl']) {
// // window.location.href = response['data']['getOpenIdUrl'];
// // } else {
// // this.redirect = this.authService.redirectUrl ? this.router.parseUrl(this.authService.redirectUrl) : '/my';
// // this.router.navigateByUrl(this.redirect);
// // }
// } else {
// this.router.navigateByUrl('/thanks')
// // if (response['data']['getOpenIdUrl']) {
// // window.location.href = response['data']['getOpenIdUrl'];
// // } else {
// // this.router.navigateByUrl('/thanks')
// // }
// }
} else {
this.openPopInfo('暂无查询资格');
}
......
<div class='nav'>
<ul class="left">
<li *ngFor="let categoryItem of categoryList" (click)="switchCategory(categoryItem.id)"
[ngClass]="{'actived':selectedCategoryId===categoryItem.id}">
{{categoryItem.dropOptionName}}
</li>
<ng-container>
<li *ngFor="let categoryItem of categoryList" (click)="switchCategory(categoryItem.id)"
[ngClass]="{'actived':selectedCategoryId===categoryItem.id}">
{{categoryItem.dropOptionName}}
</li>
</ng-container>
</ul>
</div>
......
import { Component, OnInit } from '@angular/core';
import { Router } from "@angular/router";
import { MyService } from "../my.service";
import { ActivatedRoute } from "@angular/router";
@Component({
selector: 'ydlife-mk-material',
templateUrl: './mk-material.component.html',
......@@ -11,11 +11,12 @@ export class MkMaterialComponent implements OnInit {
posterInfos: Array<any>;
categoryList: Array<any>;
selectedCategoryId: number;
constructor(private router: Router, private myService: MyService) {
recruit: any;
constructor(private activatedRoute: ActivatedRoute, private router: Router, private myService: MyService) {
}
ngOnInit() {
this.recruit = this.activatedRoute.snapshot.queryParams.recruit ? this.activatedRoute.snapshot.queryParams.recruit : null;
this.dropOptionsQuery();
}
......@@ -38,7 +39,14 @@ export class MkMaterialComponent implements OnInit {
if (res['success']) {
this.categoryList = res['data']['dropMasterInfoList'][0]['dropOptionsInfoList'];
if (this.categoryList.length > 0) {
this.selectedCategoryId = this.categoryList[0].id;
if (this.recruit == 'recruit') {
this.selectedCategoryId = 78;
this.categoryList = this.categoryList.filter((item) => {
return item.id == 78;
})
} else {
this.selectedCategoryId = this.categoryList[0].id;
}
this.posterQuery();
}
} else {
......
......@@ -66,9 +66,9 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
title: '我的团队',
content: [
{ no: 15, subtitle: '我的团队', icon: 'icon-tuandui', path: '', routerLink: 'teamRank' },
// { no: 16, subtitle: '团队增员', icon: 'icon-tuanduiguanlisvg', path: '', routerLink: '' },
{ no: 16, subtitle: '团队增员', icon: 'icon-tuanduiguanlisvg', path: '', routerLink: 'recruiting' },
{ no: '', subtitle: '', icon: '', path: '', routerLink: '' },
{ no: 16, subtitle: '团队增员', icon: 'icon-tuanduiguanlisvg', path: '', routerLink: '' },
// { no: 16, subtitle: '团队增员', icon: 'icon-tuanduiguanlisvg', path: '', routerLink: 'recruiting' },
{ no: 18, subtitle: '招募海报', icon: 'icon-haibao-1', path: '', routerLink: '' },
{ no: '', subtitle: '', icon: '', path: '', routerLink: '' }
],
isShow: this.isShow
......@@ -97,8 +97,10 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
}, 300)
this.performanceList = [
{ type: 'month', name: '本月', time: 1 },
{ type: 'year', name: '本年度', time: 2 }
{ name: '本月', time: 1 },
{ name: '季度', time: 3 },
{ name: '本年度', time: 2 }
]
//初始化调本月线上 保费+ 本月线下保费
......@@ -130,6 +132,8 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
this.router.navigate(['/salesDetail'], { queryParams: { searchType: this.performanceSelectedFlag, showType: 'sales' } });
} else if (!item.subtitle) {
return;
} else if (item.no === 18) {
this.router.navigate(['/material'], { queryParams: { recruit: 'recruit' } });
} else {
this.isNeedAlert = true;
this.dialogInfo = {
......@@ -171,7 +175,7 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
}
/**
* time 1-month,2-year
* time 1-month,2-year,3-季度
* type 1-保费,2-佣金 3-件数
* platform //1-online,2-offline
*/
......@@ -185,8 +189,10 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
}
if (time == 1) {
this.leftWidth = '15%';
} else {
} else if (time == 2) {
this.leftWidth = '30%';
} else {
this.leftWidth = '17%';
}
this.myService.rank(param).subscribe((res) => {
if (res['success']) {
......
......@@ -16,21 +16,28 @@
{{listItem.name}}
</li>
</ul>
<ul class="tab">
<!-- <ul class="tab">
<li *ngFor="let searchListItem of searchList" (click)="rank(timeType,isOnlineType,searchListItem.type)"
[ngClass]="{selected:searchType==searchListItem.type}">
{{searchListItem.name}}
</li>
</ul>
</ul> -->
</div>
<div class="rankContent">
<ul>
<li>排名</li>
<li>姓名</li>
<li>团队</li>
<li *ngIf="searchType=='1'" style="color: #333;font-weight: normal;">首年保费</li>
<li *ngIf="searchType=='2'" style="color: #333;font-weight: normal;">首年佣金</li>
<li *ngIf="searchType=='3'" style="color: #333;font-weight: normal;margin-right: 0;">件数</li>
<li *ngIf="searchType=='1'" style="color: #333;font-weight: normal;" (click)="rank(timeType,isOnlineType,2)">
首年保费<span class="iconfont icon-xiangxia"></span>
</li>
<li *ngIf="searchType=='2'" style="color: #333;font-weight: normal;" (click)="rank(timeType,isOnlineType,3)">
首年佣金<span class="iconfont icon-xiangxia"></span>
</li>
<li *ngIf="searchType=='3'" style="color: #333;font-weight: normal;margin-right: 0;"
(click)="rank(timeType,isOnlineType,1)">
件数<span class="iconfont icon-xiangxia"></span>
</li>
</ul>
<div style="width: 100%;text-align: center;float: left;" *ngIf="rankList?.length <=0">暂无数据</div>
<ul *ngFor="let rankItem of rankList;index as i;">
......
......@@ -13,8 +13,9 @@
padding: 10px 0;
ul.tab{
float: left;
width: 21%;
margin-right: 1%;
// width: 21%;
width: 30%;
margin-right: 5%;
li{
float: left;
margin-right: 5px;
......
......@@ -19,6 +19,7 @@ export class SalesRankComponent implements OnInit {
constructor(private activatedRoute: ActivatedRoute, private myService: MyService) {
this.performanceList = [
{ type: 1, name: '本月' },
{ type: 3, name: '季度' },
{ type: 2, name: '本年' }
]
this.typelist = [
......@@ -39,7 +40,7 @@ export class SalesRankComponent implements OnInit {
}
/**
* time 1-month,2-year
* time 1-month,2-year,3-季度
* type 1-fyc,2-fyp 3-件数
* platform //1-online,2-offline
*/
......
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