<script>
|
import {
|
checkUserStatus,
|
getCustomerInfo,
|
getOrderExamineShow,
|
getProtocol,
|
xinheyuanBankcardDetail
|
} from '@/api/modules/user'
|
import sfkef from "@/components/sfkef/index.vue";
|
export default {
|
name: "index",
|
components:{sfkef},
|
data() {
|
return {
|
noticeList: [],
|
userInfo:{},
|
totalCreditsum:0,
|
agencyList:[],
|
value:0,
|
bankcardDetail:{},
|
district:'1'
|
}
|
},
|
onShow() {
|
if(uni.getStorageSync('customerZcyId')){
|
xinheyuanBankcardDetail().then(res=>{
|
this.bankcardDetail = res;
|
})
|
}
|
checkUserStatus().then(res=>{
|
this.userInfo = res;
|
this.totalCreditsum = res.firstQuota;
|
uni.getLocation({
|
type: 'wgs84',
|
success: function (res) {
|
uni.setStorageSync('lng', res.longitude)
|
uni.setStorageSync('lat', res.latitude)
|
}
|
});
|
});
|
getOrderExamineShow({isVersion3:1}).then(res=>{
|
if(res){
|
let hbdata = [...res['loanSupermarkets'],...res['noAutoPushList'],...res['yesAutoPushList']];
|
hbdata.forEach(item=>{
|
this.totalCreditsum += item.totalCredit;
|
})
|
this.agencyList = hbdata
|
}
|
|
})
|
},
|
onLoad() {
|
getProtocol('TOP_SWITCH_NOTICE2_KDN').then(res=>{
|
const {content} = {...res}
|
const fkjd = content.replace("<p>", "");
|
const fkjd1 = fkjd.replace("</p>", "");
|
const strArr = fkjd1.split(";", 10);
|
this.noticeList = strArr;
|
})
|
|
|
},
|
methods: {
|
hanldeStr(vla){
|
return vla?vla.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","):'';
|
},
|
handleButStr(vla) {
|
let {thirdOrderStatus,approvalResult,capitalCode} = {...vla};
|
if( ['XIAO_HUA_QIAN_BAO', 'XIN_YE_YOU_PIN'].includes(capitalCode)){
|
|
if(thirdOrderStatus === 110 && approvalResult === 0){
|
return '审批中'; // 跳借款进度页面
|
}
|
if(thirdOrderStatus === 120 && approvalResult === 2){
|
return '审批失败'; // 不进行跳转
|
}
|
|
|
if(thirdOrderStatus === 190 || thirdOrderStatus === 250 && approvalResult === 5){
|
return '放款中';
|
}
|
|
if(thirdOrderStatus === 200 && approvalResult === 5){
|
return '放款失败';
|
}
|
|
|
if(thirdOrderStatus === 210 && (approvalResult === 6 || 5)){
|
return '放款成功';
|
}
|
if(thirdOrderStatus === 280 && approvalResult === 6){
|
return '还款中';
|
}
|
|
if(thirdOrderStatus === 270 || thirdOrderStatus === 290 && approvalResult === 6){
|
return `去还款`
|
}
|
|
if(thirdOrderStatus === 131 || thirdOrderStatus === 152 && approvalResult === 1){
|
return '待提现';
|
}
|
|
|
|
if(thirdOrderStatus === 270 || 290 && approvalResult === 6){
|
return `去还款`
|
}
|
|
if(thirdOrderStatus === 260 && approvalResult === 6){
|
return '已还款';
|
}
|
|
if(thirdOrderStatus === 240 && approvalResult === 5){
|
return '已结清';
|
}
|
|
|
}
|
|
else {
|
if(approvalResult===1){
|
return '审批中';
|
}
|
|
|
if(thirdOrderStatus === 190 && showstatus === 0 && approvalResult === 2){
|
return '放款中...'
|
}
|
if(thirdOrderStatus === 210 && showstatus === 0 && approvalResult === 2){
|
return '已完成放款,请到绑卡银行查收'
|
}
|
if(thirdOrderStatus === 110 && showstatus === 1 && approvalResult === 2){
|
return '审核中...'
|
}
|
if(thirdOrderStatus === 120 && showstatus === 1 && approvalResult === 2){
|
return '审批失败';
|
}
|
if(thirdOrderStatus === 160 && showstatus === 1 && approvalResult === 2){
|
return '订单已被取消'
|
}
|
if(thirdOrderStatus === 245 && showstatus === 1 && approvalResult === 2){
|
return '紧急划回'
|
}
|
|
|
}
|
|
},
|
handleGoToSupport(){
|
uni.navigateTo({
|
url: '/pages/support/index'
|
})
|
},
|
toWrite(){
|
if(this.userInfo.infoStatus===null && !uni.getStorageSync('isOcr')){
|
uni.navigateTo({
|
url: '/pages/attestation/index'
|
});
|
return;
|
}
|
|
|
if(uni.getStorageSync('isOcr') && this.userInfo.infoStatus===null){
|
uni.navigateTo({
|
url: '/pages/apply/index'
|
});
|
return;
|
}
|
|
|
if(this.userInfo.infoStatus==2){
|
uni.navigateTo({
|
url: '/pages/progress/index'
|
});
|
return;
|
}
|
if(this.userInfo.infoStatus==3){
|
uni.navigateTo({
|
url: '/pages/apply/steps-b'
|
});
|
return;
|
}
|
if(this.userInfo.infoStatus==4){
|
uni.navigateTo({
|
url: '/pages/apply/steps-c'
|
});
|
return;
|
}
|
uni.navigateTo({
|
url: '/pages/progress/index'
|
})
|
},
|
toDetails(item){
|
|
if(this.bankcardDetail.bindStatusRepay===0){
|
uni.navigateTo({
|
url: '/pages/sign/index'
|
})
|
return;
|
}
|
if(this.bankcardDetail.bindStatusRepay===1 && this.bankcardDetail.bindStatusLoan===0){
|
uni.navigateTo({
|
url: '/pages/details/borrow/index'
|
})
|
return;
|
}
|
|
let {thirdOrderStatus,approvalResult,capitalCode} = {...item};
|
if( ['XIAO_HUA_QIAN_BAO', 'XIN_YE_YOU_PIN'].includes(capitalCode)){
|
|
if(thirdOrderStatus === 110 && approvalResult === 0){
|
/* uni.navigateTo({
|
url: '/pages/progress/index'
|
})*/
|
return '审批中'; // 跳借款进度页面
|
}
|
if(thirdOrderStatus === 120 && approvalResult === 2){
|
return '审批失败'; // 不进行跳转
|
}
|
if(thirdOrderStatus === 131 || thirdOrderStatus === 152 && approvalResult === 1){
|
uni.navigateTo({
|
url: '/pages/sign/index'
|
})
|
return '审批通过'
|
}
|
|
|
|
if(thirdOrderStatus === 190 || thirdOrderStatus === 250 && approvalResult === 5){
|
return '放款中';
|
}
|
|
|
if(thirdOrderStatus === 200 && approvalResult === 5){
|
uni.navigateTo({
|
url: '/pages/result/not'
|
})
|
return '放款失败';
|
}
|
|
|
if(thirdOrderStatus === 210 && (approvalResult === 6 || approvalResult === 5)){
|
uni.navigateTo({
|
url: '/pages/details/index'
|
})
|
return '放款成功';
|
}
|
if(thirdOrderStatus === 280 && approvalResult === 6){
|
uni.navigateTo({
|
url: '/pages/details/index'
|
})
|
return '还款中';
|
}
|
|
if(thirdOrderStatus === 270 || thirdOrderStatus === 290 && approvalResult === 6){
|
uni.navigateTo({
|
url: '/pages/details/index'
|
})
|
return `去还款`
|
}
|
|
if(thirdOrderStatus === 131 || thirdOrderStatus === 152 && approvalResult === 1){
|
uni.navigateTo({
|
url: '/pages/details/index'
|
})
|
return '待提现';
|
}
|
|
|
|
if(thirdOrderStatus === 270 || thirdOrderStatus === 290 && approvalResult === 6){
|
uni.navigateTo({
|
url: '/pages/details/index'
|
})
|
return `去还款`
|
}
|
|
if(thirdOrderStatus === 260 && approvalResult === 6){
|
uni.navigateTo({
|
url: '/pages/details/index'
|
})
|
return '已还款';
|
}
|
|
if(thirdOrderStatus === 240 && approvalResult === 5){
|
uni.navigateTo({
|
url: '/pages/details/index'
|
})
|
return '已结清';
|
}
|
|
|
}
|
|
else {
|
if(approvalResult===1){
|
/* uni.navigateTo({
|
url: '/pages/progress/index'
|
})*/
|
return '审批中';
|
}
|
if(thirdOrderStatus === 190 && showstatus === 0 && approvalResult === 2){
|
uni.navigateTo({
|
url: '/pages/result/index?state=0'
|
})
|
return '放款中...'
|
}
|
if(thirdOrderStatus === 210 && showstatus === 0 && approvalResult === 2){
|
uni.navigateTo({
|
url: '/pages/sign/index'
|
})
|
return '已完成放款,请到绑卡银行查收'
|
}
|
if(thirdOrderStatus === 110 && showstatus === 1 && approvalResult === 2){
|
|
return '审核中...'
|
}
|
if(thirdOrderStatus === 120 && showstatus === 1 && approvalResult === 2){
|
|
return '审批失败';
|
}
|
if(thirdOrderStatus === 160 && showstatus === 1 && approvalResult === 2){
|
return '订单已被取消'
|
}
|
if(thirdOrderStatus === 245 && showstatus === 1 && approvalResult === 2){
|
return '紧急划回'
|
}
|
|
|
}
|
},
|
toMe(){
|
uni.redirectTo({
|
url: '/pages/me/index'
|
})
|
}
|
},
|
}
|
</script>
|
|
<template>
|
<view style="background: #F7F7F7;min-height: 100vh" >
|
<view class="paddingNavNot" style=" background: linear-gradient( 104deg, #6D89FF 0%, #2865F2 100%);">
|
<view class="tips">
|
<uv-notice-bar color="#ffffff" bgColor="rgba(144,174,248,1)" :text="noticeList" direction="column"></uv-notice-bar>
|
</view>
|
<view class="head">
|
<view class="limit">
|
<view style="font-size: 24rpx;color: white;margin: auto">当天预审总额度(元)</view>
|
<view >
|
<uv-count-to duration="1000" separator="," style="font-size: 84rpx;color: white;margin: auto;font-weight: bold;margin-top: 20rpx;" :startVal="0" :endVal="totalCreditsum"></uv-count-to>
|
</view>
|
<view style="font-size: 24rpx;color: white;margin: auto;margin-top: 10rpx;">21:00前提款最快当天放款</view>
|
|
|
</view>
|
<view class="li">
|
<view class="yibei">
|
<view class="title">宜呗</view>
|
<view class="money" style="">
|
¥{{hanldeStr(userInfo.firstQuota)}}
|
<view class="day">3天后失效</view>
|
</view>
|
</view>
|
<view style="display: flex;justify-content: center">
|
<button class="btn" @click="toWrite">领取额度</button>
|
</view>
|
</view>
|
|
|
<view class="li" v-for="(item,index) in agencyList" :key="index">
|
<view class="yibei">
|
<view class="title">{{item.capitalName}}</view>
|
<view class="money" style="">
|
¥{{ hanldeStr(item.totalCredit) }}
|
<view class="day">3天后失效</view>
|
</view>
|
</view>
|
<view style="display: flex;justify-content: center;position: relative;">
|
<button class="btn" @click="toDetails(item)">{{handleButStr(item)}}</button>
|
|
</view>
|
<view
|
class="tags"
|
v-if="item.thirdOrderStatus=='290'">已逾期</view>
|
</view>
|
</view>
|
</view>
|
|
<view class="content" style="margin: 0 30rpx;">
|
<view class="nav">
|
<view class="group" style="padding-bottom: 60rpx;">
|
<view class="group-title">额度限时抢</view>
|
</view>
|
|
</view>
|
<view class="nav">
|
<view class="group" style="background: white;border-radius: 16rpx 16rpx 16rpx 16rpx;">
|
<view class="group-title">精选推荐 <view class="notes">根据资质为您精准匹配</view></view>
|
<!-- <view style="margin-top: 36rpx;display: flex;flex-direction: row;">
|
<image style="height: 56rpx;width: 56rpx;border-radius: 50%" src="http://gips3.baidu.com/it/u=100751361,1567855012&fm=3028&app=3028&f=JPEG&fmt=auto?w=960&h=1280"/>
|
<view class="group-name" style="">趣享花</view>
|
</view>
|
<view class="cooperate" style="">
|
<view>
|
<view class="num">10,000</view>
|
<view class="cooperate-title">审批额度</view>
|
</view>
|
<view>
|
<view class="num">70%</view>
|
<view class="cooperate-title">审批比例</view>
|
</view>
|
<view class="cooperate-but">立即申请</view>
|
</view>-->
|
</view>
|
|
|
</view>
|
<view class="nav" style="margin-bottom: 20rpx;">
|
<view class="group" style="background: white;border-radius: 16rpx 16rpx 16rpx 16rpx;">
|
<view class="group-title">银行直贷</view>
|
</view>
|
|
</view>
|
</view>
|
<sfkef></sfkef>
|
<uv-tabbar :value="value" @change="index=>value = index" :border="false">
|
<uv-tabbar-item text="首页" icon="home-fill"></uv-tabbar-item>
|
<uv-tabbar-item text="我的" icon="account" @click="toMe"></uv-tabbar-item>
|
</uv-tabbar>
|
</view>
|
|
</template>
|
|
<style scoped lang="scss">
|
.loan-sfkef {
|
width: 140rpx;
|
height: 162rpx;
|
position: fixed;
|
right: 20rpx;
|
bottom: 270rpx;
|
image {
|
width: 140rpx;
|
height: 162rpx;
|
}
|
}
|
.tips{
|
font-size: 24rpx;
|
text-align: center;
|
}
|
.head{
|
padding-top: 38rpx;
|
padding-bottom: 20rpx;
|
|
|
.limit{
|
margin-left: 22rpx;
|
margin-right: 22rpx;
|
padding: 132rpx 0 2rpx;
|
margin-bottom: 30rpx;
|
background-image: url(#{$iconHttps}/static/img/loan/loan-app/loan-limit-bg.png);
|
background-repeat: no-repeat;
|
background-size: 100%;
|
text-align: center;
|
height: 368rpx;
|
}
|
.li{
|
background: #FFFFFF;
|
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
padding: 26rpx 40rpx;
|
margin: 20rpx;
|
margin-bottom: 0;
|
display: flex;
|
flex-direction: row;
|
justify-content: space-between;
|
.yibei{
|
.title{
|
color: #333333;font-size: 28rpx;
|
}
|
.money{
|
color: #333333;font-size: 48rpx;font-weight: bold;margin-top: 10rpx;
|
display: flex;
|
flex-direction: row;
|
.day{
|
color: #E23030;
|
font-size: 24rpx;
|
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
background: #FFE6E6;
|
margin-left: 8rpx;
|
display: flex;
|
justify-content: center;
|
padding:4rpx 8rpx;
|
font-weight: 400;
|
}
|
}
|
|
}
|
.tags{
|
font-size: 24rpx;
|
color: white;
|
background: #E23030;
|
padding: 4rpx 8rpx;
|
border-top-left-radius: 16rpx;border-bottom-right-radius: 16rpx;
|
text-align: center;position: absolute;
|
right: 0;
|
top: 26rpx;
|
}
|
.btn{
|
|
height: 80rpx;
|
line-height: 80rpx;
|
background: #4766FE;
|
border-radius: 40rpx 40rpx 40rpx 40rpx;
|
color: white;
|
font-size: 28rpx;
|
}
|
}
|
|
}
|
.content{
|
|
.nav{
|
margin-top: 20rpx;
|
.group{
|
background-image: url(#{$iconHttps}/static/img/loan/loan-app/loan-market-bg.png);
|
background-repeat: no-repeat;
|
background-size: 100%;
|
height: 100%;
|
padding: 30rpx 40rpx;
|
position: relative;
|
&::before{
|
position: absolute;
|
left: 0;
|
content: '';
|
display: block;
|
width: 8rpx;
|
height: 40rpx;
|
background: #4766FE;
|
}
|
.group-name{
|
color: #252938;font-size: 28rpx;
|
font-weight: bold;
|
margin-left: 20rpx;
|
display: flex;
|
justify-content: center;
|
}
|
.group-title{
|
color: #333333;
|
font-size: 34rpx;
|
font-weight: 800;
|
display: flex;
|
flex-direction: row;
|
.notes{
|
font-size: 24rpx;
|
color: #666666;
|
margin-left: 20rpx;
|
display: flex;
|
justify-content: center;
|
}
|
}
|
|
.cooperate{
|
display: flex;flex-direction: row;justify-content: space-between;margin-top: 20rpx;
|
.num{
|
font-size: 40rpx;
|
color: #252938;
|
font-weight: bold;
|
}
|
.cooperate-title{
|
font-size: 24rpx;
|
color: #8B8D96;
|
margin-top: 6rpx;
|
}
|
.cooperate-but{
|
display: flex;
|
justify-content: center;
|
padding: 12rpx 28rpx;
|
font-size: 28rpx;
|
color: white;
|
background: #4766FE;
|
border-radius: 41rpx 41rpx 41rpx 41rpx;
|
}
|
}
|
}
|
}
|
}
|
</style>
|