Commit 3509b8f2 by Chao Sun

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

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