profile.vue 2.17 KB
<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>