Commit 21690313 by Chao Sun

龙虎榜详情数据从接口取

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