credit.vue
1.48 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
<template>
    <div class="credit_container">
        <el-empty v-if="state.creditInfo && state.creditInfo.length == 0" description="暂无数据" />
        <div v-else class="credit_wrap" v-for="item in state.creditInfo">
            <div class="product_name">{{item.productName}}</div>
            <div class="amount_title">可用额度(元)</div>
            <div class="available_amount">{{util.moneyFormat(item.availableLine*10000)}}</div>
            <div class="apply_amount">
                <span>授信额度(元): {{util.moneyFormat(item.creditLine*10000)}}</span>
                <el-button class="add_amount">额度不够?申请提额</el-button>
            </div>
            <el-button round @click="linkTo()" class="primary-btn reverse">立即借款</el-button>
        </div>
    </div>
</template>
<script setup lang="ts">
    import getImage from './../../assets/getImage'
    import { ArrowRight } from '@element-plus/icons-vue'
    import './../../assets/css/credit.scss'
    import router from "../../router/index";
    import * as util from "./../../utils/until"
    import * as api from "./../../interface/api"
    let state = reactive({
        isLogin: false,
        isAuth: false,
        creditInfo: []
    })
    let linkTo = () => {
        ElMessage.error("我要跳转到资方H5啊")
    }
    api.getMyCreditList().then(res=> {
        state.creditInfo = res.data
    })
    const arrowPath = ref("/mine")
    defineExpose({arrowPath})
</script>
<style scoped>
</style>