credit.vue 1.48 KB
<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>