profile.vue
2.17 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<template>
<layout-body>
<layout-list>
<h2>帐号信息</h2>
<Form :label-width="80">
<FormItem label="PID:">
<span>{{profile.pid}}</span>
</FormItem>
<FormItem label="真实姓名:">
<span>{{profile.truename}}</span>
</FormItem>
<FormItem label="帐号:">
<span>{{profile.account}}</span>
</FormItem>
<FormItem label="有效期:">
<span>{{formatDate(profile.create_time)}} ~ {{formatDate(profile.expires)}}</span>
</FormItem>
</Form>
<h2 class="mb30">银行账号信息(<span class="red"> * 此账户用于佣金结算,请及时填写,添加后不可修改!</span>)</h2>
<Form :label-width="80">
<FormItem label="开户行:">
<span>{{profile.bankName}}</span>
</FormItem>
<FormItem label="银行帐号:">
<span>{{profile.bankAccount}}</span>
</FormItem>
</Form>
</layout-list>
</layout-body>
</template>
<script>
import CandidateListService from 'services/kol/candidate-list-service';
import moment from 'moment';
export default {
name: 'profile',
data() {
return {
profile: {}
};
},
created() {
this.candidateListService = new CandidateListService();
},
mounted() {
this.getData();
},
methods: {
getData() {
this.candidateListService.queryByPidForFavorite().then(ret => {
if (ret && ret.code === 200) {
this.profile = ret.data;
} else {
console.log(ret.message);
}
});
},
formatDate(date) {
if (date) {
return moment.unix(date).format('YYYY.MM.DD');
}
}
},
components: {
},
watch: {
}
};
</script>
<style lang="scss">
.ivu-form .ivu-form-item-label {
text-align: left;
margin-left: 90px;
}
h2 {
font-size: 14px;
}
h2 .red {
color: red;
font-size: 12px;
}
.mb30 {
margin-bottom: 30px;
}
</style>