沈斌
2017-12-15 f9b157566af34b8dc28ba10b34d025ac04f3168b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { Component, OnInit } from '@angular/core';
import { NzMessageService } from 'ng-zorro-antd';
import { getProfileBasicData } from '../../../../../../_mock/profile.service';
 
@Component({
    selector: 'pro-profile-basic',
    templateUrl: './basic.component.html'
})
export class ProProfileBaseComponent implements OnInit {
 
    basicLoading = true;
    basicNum = 0;
    amountNum = 0;
    data = {};
 
    constructor(public msg: NzMessageService) {}
 
    ngOnInit() {
        this.data = getProfileBasicData();
        (<any>this.data).basicGoods.forEach(item => {
            this.basicNum += Number(item.num);
            this.amountNum += Number(item.amount);
        });
        setTimeout(() => this.basicLoading = false, 500);
    }
}