沈斌
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import { Injectable } from '@angular/core';
 
@Injectable()
export class TransferService {
 
    step: 0 | 1 | 2 = 1;
 
    /**
     * 付款账户
     */
    pay_account: string;
 
    /**
     * 收款账户类型
     */
    receiver_type: 'alipay' | 'bank';
 
    get receiver_type_str() {
        return this.receiver_type === 'alipay' ? '支付宝' : '银行';
    }
 
    /**
     * 收款账户
     */
    receiver_account: string;
 
    /**
     * 收款姓名
     */
    receiver_name: string;
 
    /**
     * 金额
     */
    amount: number;
 
    /**
     * 支付密码
     */
    password = '123456';
 
    again() {
        this.step = 0;
        this.pay_account = 'ant-design@alipay.com';
        this.receiver_type = 'alipay';
        this.receiver_account = 'test@example.com';
        this.receiver_name = 'asdf';
        this.amount = 500;
    }
 
    constructor() {
        this.again();
    }
}