Commit 21690313 by Chao Sun

龙虎榜详情数据从接口取

parent 2ac0b6bd
...@@ -158,7 +158,7 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit { ...@@ -158,7 +158,7 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
this.myService.brokerInfoQuery({ practitionerId: practitionerId }).subscribe((res) => { this.myService.brokerInfoQuery({ practitionerId: practitionerId }).subscribe((res) => {
if (res['success']) { if (res['success']) {
this.allPerformanceInfo = res['data']['commissionInfo']; this.allPerformanceInfo = res['data']['commissionInfo'];
sessionStorage.setItem('allPerformanceInfo', JSON.stringify((this.allPerformanceInfo))); // sessionStorage.setItem('allPerformanceInfo', JSON.stringify((this.allPerformanceInfo)));
//初始化查本月业绩 //初始化查本月业绩
this.selectRang('month', 'fyp'); this.selectRang('month', 'fyp');
} }
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from "@angular/router"; import { ActivatedRoute } from "@angular/router";
import { MyService } from "../my.service";
@Component({ @Component({
selector: 'ydlife-sales-rank', selector: 'ydlife-sales-rank',
templateUrl: './sales-rank.component.html', templateUrl: './sales-rank.component.html',
...@@ -14,7 +15,7 @@ export class SalesRankComponent implements OnInit { ...@@ -14,7 +15,7 @@ export class SalesRankComponent implements OnInit {
performanceListShow: Array<any>; performanceListShow: Array<any>;
rankType: any; rankType: any;
searchList: Array<any>; searchList: Array<any>;
constructor(private activatedRoute: ActivatedRoute) { constructor(private activatedRoute: ActivatedRoute, private myService: MyService) {
this.performanceList = [ this.performanceList = [
{ type: 'month', name: '本月' }, { type: 'month', name: '本月' },
{ type: 'year', name: '本年' } { type: 'year', name: '本年' }
...@@ -34,9 +35,20 @@ export class SalesRankComponent implements OnInit { ...@@ -34,9 +35,20 @@ export class SalesRankComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.dateType = this.activatedRoute.snapshot.queryParams.searchType; this.dateType = this.activatedRoute.snapshot.queryParams.searchType;
this.allPerformanceInfo = JSON.parse(sessionStorage.getItem('allPerformanceInfo')); this.allPerformanceInfo = JSON.parse(sessionStorage.getItem('allPerformanceInfo'));
this.brokerInfoQuery();
}
brokerInfoQuery() {
const practitionerId = JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerId'];
this.myService.brokerInfoQuery({ practitionerId: practitionerId }).subscribe((res) => {
if (res['success']) {
this.allPerformanceInfo = res['data']['commissionInfo'];
// sessionStorage.setItem('allPerformanceInfo', JSON.stringify((this.allPerformanceInfo)));
//初始化查询本月+线上+fyp //初始化查询本月+线上+fyp
this.selectRang('month', 'online', 'fyp') this.selectRang('month', 'online', 'fyp')
} }
})
}
selectRang(dateType, lineType, rankType) { selectRang(dateType, lineType, rankType) {
this.dateType = dateType; this.dateType = dateType;
......
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