宜呗小程序--微信小程序
Lzk
2025-08-05 b7bcaf556aa2424e808b6e6426ab22df9cfe11c1
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<script>
import {xinheyuanRepayPlanTrial} from "@/api/modules/user";
 
export default {
  props:{
    period:{
      type:Number,
      default:12
    },
    amount:{
      type:Number,
      default:6000
    },
    repayQuotaRate:{
      type:Number,
      default:16
    }
  },
  name: "index",
  created() {
    let pro = {
      customerId: uni.getStorageSync('customerZcyId'),
      customerBankcardId: uni.getStorageSync('customerBankcardId'),
      amount:this.amount,
      period:this.period,
    }
    xinheyuanRepayPlanTrial(pro).then(res=>{
      this.repayPlanInfo = res
      this.repayPlanList = res.repayPlanList;
      let unm = 0 ;
      for(let i = 0 ; i < res.repayPlanList.length ; i++){
        unm += Number(res.repayPlanList[i].amt)
      }
      unm = Math.ceil(unm * 100) / 100; // 向上保留两位小数
 
      this.title = `<div style="text-align: center;color: #252938;font-weight: bold">${this.period}期共还 <span style="color: #4766FE">${unm}</span> 元,含利息+担保费+权益费<span style="color: #4766FE">${unm}</span>元</div>`;
      this.loading = false;
    })
  },
 
  data() {
    return {
      repayPlanInfo:{
        totalAmt:'',
        repayPlanList:[]
      },
      title:null,
      loading:true,
 
    }
  },
}
</script>
 
<template>
  <view>
    <uv-loading-page v-if="loading" :loading="true" loading-mode="spinner"></uv-loading-page>
    <view class="head">
      <rich-text :nodes="title"></rich-text>
      <view class="tips">(注:以实际放款成功后合同为准)</view>
    </view>
    <view class="content" style="height: 800rpx;overflow-y: scroll">
      <view class="pt40"  v-if="repayPlanInfo.repayPlanList.length">
        <view class="lis" v-for="(item,index) in repayPlanInfo.repayPlanList" :key="index">
          <view class="mr">
            <view class="period" >第{{index+1}}期</view>
            <view class="date">{{item.dateDue.replace(/-/g, "")}}</view>
 
          </view>
          <view class="rotundity">
            <image class="drop" :src="`${$images}/static/img/loan-progress/loan-status-current-icon.png`" ></image>
          </view>
          <view class="notes" >
            <view class="nums" >{{item.amt}}</view>
            <view class="remarks">本金{{ item.prcpAmt }}+利息{{ item.intAmt }}</view>
          </view>
        </view>
      </view>
    </view>
  </view>
 
</template>
 
<style scoped lang="scss">
.head{
  margin-top: 40rpx;
  padding: 0 56rpx;
  padding-bottom: 40rpx;
  border-bottom: 10rpx solid #F7F7F7;
  font-size: 32rpx;
  color: #252938;
  .title{
    display: flex;
    flex-direction: row;
    text-align: center;
    color: #252938;
    font-size: 32rpx;
    font-weight: bold;
    .num{
      color: #4766FE;
      display: contents;
    }
  }
  .tips{
    color: #666666;
    font-size: 28rpx;
    text-align: center;
    margin-top: 20rpx;
  }
 
}
 
.content{
  .pt40{
    padding-top: 40rpx;
  }
  .mr{
    margin-right: 20rpx;
  }
  .lis{
    display: flex;flex-direction: row;padding-left: 60rpx;
    .period{
      color: #666666;font-size: 28rpx;text-align: right;
    }
    .date{
      color: #666666;font-size: 28rpx;margin-top: 12rpx;
    }
    &:nth-last-child(1){
      .rotundity{
        &:after{
          display: none;
        }
      }
    }
  }
}
 
.rotundity{
  position: relative;
  .drop{
    width: 28rpx;height: 28rpx;z-index: 9;position: relative;
  }
  &:after{
    content: '';
    display: inline-block;
    width: 2rpx;
    height: 100%;
    background: #E2E3E8;
    position: absolute;
    left: calc( 50% - 1rpx);
 
  }
 
}
.notes{
  margin-left: 30rpx;margin-bottom: 60rpx;
  .nums{
    color: #333333;font-size: 32rpx;font-weight: bold;
  }
  .remarks{
    color: #666666;font-size: 24rpx;margin-top: 14rpx;
  }
}
</style>