Commit 04c2648c by Chao Sun

团队

parent 61d5f4b1
......@@ -75,4 +75,8 @@ export class AuthService {
const url = this.API + '/metadata/currentVersionQuery';
return this.http.get(url);
}
getOppId(urlParam) {
return this.http.get(urlParam)
}
}
......@@ -2,6 +2,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core';
import { NavigationExtras, Router } from '@angular/router';
import { AuthService } from '../auth.service';
@Component({
selector: 'ydlife-login',
templateUrl: './login.component.html',
......@@ -46,6 +47,13 @@ export class LoginComponent implements OnInit, OnDestroy {
if (res['success']) {
this.authService.login({ mobileNo: this.userInfo.mobileNo }).subscribe((response) => {
if (response['success']) {
console.log()
if (response['data']['getOpenIdUrl']) {
window.location.href = response['data']['getOpenIdUrl'];
// this.authService.getOppId(response['data']['getOpenIdUrl']).subscribe((res) => {
// console.log(res)
// })
}
this.authService.isLoggedIn = true;
const lifeCustomerInfo = { ...response.data, mobileNo: this.userInfo.mobileNo, commonResult: null };
if (lifeCustomerInfo['customerId'] && lifeCustomerInfo['practitionerId']) {
......
a:hover.weui-dialog__ft{
color: #fff;
text-decoration: none;
}
\ No newline at end of file
......@@ -9,7 +9,7 @@
<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;"
<div style="color: #333;font-weight: normal;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>
......
......@@ -20,8 +20,10 @@
align-items: center;
padding: 10px 0 10px 21px;
width: 100%;
color: #fff;
background: linear-gradient(90deg, #494949, #393939);
// color: #fff;
// background: linear-gradient(90deg, #494949, #393939);
color: #333;
background: #f6f7f2;
box-sizing: border-box;
img {
max-width: 100%;
......@@ -78,11 +80,11 @@
}
}
.weui-panel__hd.header{
background: -webkit-linear-gradient(left, #696d90, #a1adc7);
background: -o-linear-gradient(left, #696d90, #a1adc7);
background: -moz-linear-gradient(left, #696d90, #a1adc7);
background: -ms-linear-gradient(left, #696d90, #a1adc7);
background: linear-gradient(to right, #696d90, #a1adc7);
// background: -webkit-linear-gradient(left, #696d90, #a1adc7);
// background: -o-linear-gradient(left, #696d90, #a1adc7);
// background: -moz-linear-gradient(left, #696d90, #a1adc7);
// background: -ms-linear-gradient(left, #696d90, #a1adc7);
// background: linear-gradient(to right, #696d90, #a1adc7);
}
.weui-panel__bd{
background: #f6f7f2;
......@@ -94,22 +96,19 @@
}
.performance_wrapper{
border-radius: 6px;
margin: 5px auto 8px auto;
// margin: 5px auto 8px auto;
margin: 0 auto 8px auto;
box-shadow: 0 0px 2.5px #969696;
position: relative;
background: url('../../../assets/images/top_bg.png') no-repeat ;
// background: url('../../../assets/images/top_bg.png') no-repeat ;
background: url('../../../assets/images/bg_02.jpg') no-repeat ;
background-size: cover;
// top: -25px;
.bg{
height: 100%;
position: absolute;
z-index: 1;
// -webkit-filter: blur(1px);
// filter: blur(3px);
// opacity: 0.8;
}
.content{
// z-index: 100;
position: relative;
padding: 0px 0px 5px 8px;
ul{
......@@ -154,7 +153,7 @@
width: 60px;
height: 25px;
line-height: 25px;
background: rgba(0, 0, 0, 0.7);
background: rgba(0, 0, 0, 0.4);
border-top-left-radius: 12px;
border-bottom-left-radius: 12px;
font-size:12px;
......
......@@ -56,10 +56,18 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
{ no: 14, subtitle: '我的佣金', icon: 'icon-yongjin', path: '', routerLink: '' },
{ no: 15, subtitle: '', icon: '', path: '', routerLink: '' },
{ no: 16, subtitle: '', icon: '', path: '', routerLink: '' }
]
}, {
},
{
title: '我的团队',
content: [
{ no: 17, subtitle: '我的团队', icon: 'icon-AI', path: '', routerLink: 'teamRank' },
{ no: 18, subtitle: '团队增员', icon: 'icon-AI', path: '', routerLink: '' },
{ no: 19, subtitle: '', icon: '', path: '', routerLink: '' },
{ no: 20, subtitle: '', icon: '', path: '', routerLink: '' }
]
},
{
title: '教育培训',
content: [
{ no: 5, subtitle: '保险ABC', icon: 'icon-zidian', path: `https://${window.location.host}/issue`, routerLink: '' },
......@@ -108,8 +116,7 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
this.router.navigate(['/salesDetail'], { queryParams: { searchType: this.performanceSelectedFlag, showType: 'orderform' } });
} else if (item.no === 14) {
this.router.navigate(['/salesDetail'], { queryParams: { searchType: this.performanceSelectedFlag, showType: 'sales' } });
} else if (item.no === 8 || item.no === 15 || item.no === 16) {
} else if (!item.subtitle) {
return;
} else {
this.isNeedAlert = true;
......
......@@ -11,6 +11,7 @@ import { AnnouncementDetailComponent } from './announcement-detail/announcement-
import { MyBusinessComponent } from './my-business/my-business.component';
import { MyBusinessDetailComponent } from './my-business-detail/my-business-detail.component';
import { SalesRankComponent } from './sales-rank/sales-rank.component';
import { TeamRankComponent } from './team-rank/team-rank.component';
const myRoutes: Routes = [
{ path: '', component: MyCenterHomeComponent, canActivate: [AuthGuard] },
{ path: 'material', component: MkMaterialComponent, canActivate: [AuthGuard] },
......@@ -22,7 +23,8 @@ const myRoutes: Routes = [
{ path: 'importantAnnouncement/:id', component: AnnouncementDetailComponent, canActivate: [AuthGuard] },
{ path: 'business', component: MyBusinessComponent, canActivate: [AuthGuard] },
{ path: 'business/:id', component: MyBusinessDetailComponent, canActivate: [AuthGuard] },
{ path: 'rank', component: SalesRankComponent, canActivate: [AuthGuard] }
{ path: 'rank', component: SalesRankComponent, canActivate: [AuthGuard] },
{ path: 'teamRank', component: TeamRankComponent, canActivate: [AuthGuard] }
];
@NgModule({
......
......@@ -15,10 +15,11 @@ import { MyBusinessDetailComponent } from './my-business-detail/my-business-deta
import { PickerComponent } from '../common/picker/picker.component';
import { ToastComponent } from '../common/toast/toast.component';
import { SalesRankComponent } from './sales-rank/sales-rank.component';
import { TeamRankComponent } from './team-rank/team-rank.component';
@NgModule({
declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent, AnnouncementDetailComponent, MyBusinessComponent, MyBusinessDetailComponent, PickerComponent, ToastComponent, SalesRankComponent],
declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent, AnnouncementDetailComponent, MyBusinessComponent, MyBusinessDetailComponent, PickerComponent, ToastComponent, SalesRankComponent, TeamRankComponent],
imports: [
CommonModule,
LifeCommonModule,
......
......@@ -35,11 +35,15 @@ export class SalesDetailComponent implements OnInit {
if (this.searchType === 'month') {
if (this.allPerformanceInfo['thisMonthInfo']) {
this.salesDetailList = this.allPerformanceInfo['thisMonthInfo']['onlineInfo']['fortuneItemList'];
} else {
this.salesDetailList = [];
}
}
if (this.searchType === 'year') {
if (this.allPerformanceInfo['thisYearInfo']['onlineInfo']) {
this.salesDetailList = this.allPerformanceInfo['thisYearInfo']['onlineInfo']['fortuneItemList'];
} else {
this.salesDetailList = [];
}
}
}
......
......@@ -23,39 +23,6 @@
</li>
</ul>
</div>
<!-- <div class="rankContent">
<ul>
<li>排名</li>
<li>姓名</li>
<li>团队</li>
<li>FYP<span class="iconfont icon-xiangxia" (click)="selectRang(dateType,lineType,'fyp')"></span></li>
<li>FYC<span class="iconfont icon-xiangxia" (click)="selectRang(dateType,lineType,'fyc')"></span></li>
<li>件数<span class="iconfont icon-xiangxia" (click)="selectRang(dateType,lineType,'count')"></span></li>
</ul>
<ul *ngFor="let performanceItem of performanceListShow;index as i;">
<li class="icon">
<ng-container *ngIf="i<=2">
<div [ngSwitch]="i+1">
<i class="iconfont icon-huangguan1" *ngSwitchCase="1"
[ngStyle]="{'color':'#fdb941','position': 'absolute','left':'0px'}"></i>
<i class="iconfont icon-huangguan1" *ngSwitchCase="2"
[ngStyle]="{'color':'#b4b9c1','position': 'absolute','left':'0px'}"></i>
<i class="iconfont icon-huangguan1" *ngSwitchCase="3"
[ngStyle]="{'color':'#ca8a6e','position': 'absolute','left':'0px'}"></i>
<i class="iconfont icon-huangguan1" *ngSwitchDefault
[ngStyle]="{'color':'#fdb941','position': 'absolute','left':'0px'}"></i>
</div>
</ng-container>
<span style="margin-left: 8px;">{{performanceItem.rank}}</span>
</li>
<li>{{performanceItem.name}}</li>
<li>{{performanceItem.subordinateSystemName}}</li>
<li>{{performanceItem.fyp | number: "1.2-2"}}</li>
<li>{{performanceItem.fyc | number: "1.2-2"}}</li>
<li>{{performanceItem.count}}</li>
</ul>
</div> -->
<div class="rankContent">
<ul>
<li>排名</li>
......
.salesWrapper{
padding: 10px 5px;
// background: #062a61;
background: #002495;
height: 100%;
ul,ol{
......@@ -10,16 +9,13 @@
width: 100%;
float: left;
margin-bottom: 10px;
padding: 10px 5px;
padding: 10px 5%;
ul.tab{
float: left;
width: 29%;
// border-right: 1px #ddd solid;
margin-right: 1%;
// margin-bottom: 10px;
li{
float: left;
// width: 20%;
margin-right: 5px;
text-align: left;
height: 30px;
......@@ -30,22 +26,20 @@
li.selected{
font-size: 18px;
font-weight: bold;
// border: 1px #e10d0d solid;
border-bottom: 2px #ff002a solid;
// border-radius: 20px;
}
li:nth-child(3){
margin-right: 0;
}
}
ul.tab:nth-child(3){
width: 37%;
// margin-right: 0;
// border-right: 0;
float: right;
li:nth-child(3){
float: right;
margin-right: 5%;
}
}
// ul.tab:nth-child(2){
// float: right;
// li{
// float: right;
// }
// }
}
.rankContent{
float: left;
......@@ -83,7 +77,6 @@
font-weight: bold;
font-size: 15px;
}
}
}
......
......@@ -23,7 +23,6 @@ export class SalesRankComponent implements OnInit {
this.list = [
{ type: 'online', name: '线上' },
{ type: 'underLine', name: '寿险' },
]
this.searchList = [
{ type: 'fyp', name: 'FYP' },
......
<div class="salesWrapper">
<div class="teamHeader">
<div class="teamInfo">
冠军战队
</div>
<div class="totalSales">
<div>FYP:<span>20000</span></div>
<div>FYC:<span>24000</span></div>
<div>件数:<span>40</span></div>
</div>
</div>
<div class="rankInfoWrapper">
<div class="title">
<ul class="tab">
<li *ngFor="let item of performanceList" (click)="selectRang(item.type,lineType,rankType)"
[ngClass]="{selected:dateType==item.type}">
{{item.name}}
</li>
</ul>
<ul class="tab">
<li *ngFor="let listItem of list" (click)="selectRang(dateType,listItem.type,rankType)"
[ngClass]="{selected:lineType==listItem.type}">
{{listItem.name}}
</li>
</ul>
<ul class="tab">
<li *ngFor="let searchListItem of searchList" (click)="selectRang(dateType,lineType,searchListItem.type)"
[ngClass]="{selected:rankType==searchListItem.type}">
{{searchListItem.name}}
</li>
</ul>
</div>
<div class="rankContent">
<ul>
<!-- <li class="rank">排名</li> -->
<li class="name">姓名</li>
<li class="fyp">FYP</li>
<li class="fyc">FYC</li>
<li class="count">件数</li>
</ul>
<div style="width: 100%;text-align: center;float: left;height: 35px;" *ngIf="performanceListShow?.length <=0">
暂无战队成员,努力去增员吧
</div>
<ul *ngFor="let performanceItem of performanceListShow;index as i;">
<!-- <li class="rank">
{{performanceItem.rank}}
</li> -->
<li class="name">{{performanceItem.name}}</li>
<li class="fyp">¥{{performanceItem.fyp | number: "1.2-2"}}</li>
<li class="fyc">¥{{performanceItem.fyc | number: "1.2-2"}}</li>
<li class="count">{{performanceItem.count}}</li>
</ul>
</div>
</div>
</div>
\ No newline at end of file
.salesWrapper{
padding: 10px 5px;
background: #f6f7f2;
height: 100%;
ul,ol{
list-style: none;
}
.teamHeader{
div{
height: 30px;
display: flex;
justify-content: space-around;
align-items: center;
}
div.teamInfo{
font-size: 24px;
height: 45px;
line-height: 45px;
}
div.totalSales{
font-size: 18px;
}
}
.rankInfoWrapper{
.title{
width: 100%;
float: left;
margin-bottom: 10px;
padding: 10px 5%;
ul.tab{
float: left;
width: 29%;
margin-right: 1%;
li{
float: left;
margin-right: 5px;
text-align: left;
height: 30px;
line-height: 30px;
margin-right: 10%;
// color: #fff;
}
li.selected{
font-size: 18px;
font-weight: bold;
border-bottom: 2px #ff002a solid;
}
li:nth-child(3){
margin-right: 0;
}
}
ul.tab:nth-child(3){
width: 37%;
float: right;
li:nth-child(3){
float: right;
margin-right: 5%;
}
}
}
.rankContent{
float: left;
width: 100%;
overflow: auto;
background: #fff;
box-shadow: 0 0px 2.5px #969696;
border-radius: 6px;
padding: 5px;
ul{
width: 100%;
li{
float: left;
width: 28%;
height: 34px;
line-height: 34px;
text-align: right;
margin-right: 1%;
position: relative;
margin-bottom: 5px;
li.icon .iconfont{
position: absolute;
}
}
li.name,li.count{
width: 18%;
}
li.name{
text-align: center;
}
}
}
}
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { TeamRankComponent } from './team-rank.component';
describe('TeamRankComponent', () => {
let component: TeamRankComponent;
let fixture: ComponentFixture<TeamRankComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ TeamRankComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(TeamRankComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'ydlife-team-rank',
templateUrl: './team-rank.component.html',
styleUrls: ['./team-rank.component.scss']
})
export class TeamRankComponent implements OnInit {
performanceListShow: Array<any>;
performanceList: Array<any>;
list: Array<any>;
dateType: any;
lineType: any;
constructor() {
this.performanceList = [
{ type: 'month', name: '本月' },
{ type: 'year', name: '本年' }
]
this.list = [
{ type: 'online', name: '线上' },
{ type: 'underLine', name: '寿险' },
]
}
ngOnInit() {
this.performanceListShow = [];
this.selectRang('month', 'online')
}
selectRang(dateType, lineType) {
this.dateType = dateType;
this.lineType = lineType;
if (lineType == 'online') {
if (dateType == 'year') {
this.performanceListShow = [];
}
if (dateType == 'month') {
this.performanceListShow = [
{ rank: 1, name: '蛋挞', fyp: 12000, fyc: 123333, count: 10 },
{ rank: 2, name: '甜筒', fyp: 1800, fyc: 123, count: 4 },
{ rank: 3, name: '圣代', fyp: 1600, fyc: 1233, count: 6 },
{ rank: 4, name: '油条', fyp: 120, fyc: 523, count: 2 },
{ rank: 5, name: '奥利奥', fyp: 120, fyc: 523, count: 2 }
];
}
} else {
this.performanceListShow = [];
}
}
}
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