宜呗小程序--微信小程序
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
<script>
import {xinheyuanGetToBeRepaidAmount, xinheyuanRepay} from "@/api/modules/user";
export default {
  name: "index",
  onLoad(params) {
    let isClean = params.isClean==1?true:false;
    this.isClean = isClean;
    console.log(this.isClean);
    uni.showLoading();
    xinheyuanGetToBeRepaidAmount(isClean).then(res=>{
      this.info = res
    }).finally(()=>{
      uni.hideLoading();
    })
  },
  data(){
    return {
      disabled:false,
      isClean:false,
      info:{
        repayAmount:0
      }
    }
  },
  methods: {
    submit(){
      this.disabled = true;
      uni.showLoading({
        title: "还款提交中",
      });
      xinheyuanRepay(this.isClean).then(res=>{
        uni.showToast({
          icon: "none",
          title: "还款提交成功",
        });
        uni.navigateTo({
          url: '/pages/result/details?state=1'
        })
      }).finally(()=>{
        this.disabled = false;
        uni.hideLoading();
      })
    }
  },
 
 
}
</script>
 
<template>
  <view class="container">
    <view class="content" >
      <view class="box">
        <view class="title">应还金额(元)</view>
        <view class="money">{{ info.repayAmount }}</view>
      </view>
      <view class="more">更多详情</view>
      <view class="card">
        <view style="font-size: 28rpx">还款银行卡</view>
        <view style="font-size: 28rpx">中国工商银行(8110)</view>
      </view>
 
      <view class="but">
        <button :disabled="disabled" class="sub" @click="submit">立即还款</button>
      </view>
    </view>
  </view>
</template>
 
<style scoped lang="scss">
.container{
  height: 100vh;
  background: #F7F7F7;
}
.content{
  padding: 20rpx 32rpx;
  .box{
    background: #4766FE;
    border-radius: 16rpx;
    color: white;
    padding: 34rpx 0;
    .title{
      font-size: 28rpx;
      margin-bottom: 20rpx;
      text-align: center;
    }
    .money{
      font-size: 80rpx;
      font-weight: bold;
      text-align: center;
    }
  }
  .more{
    font-size: 30rpx;
    color: #252938;
    margin-top: 40rpx;
    font-weight: bold;
  }
  .card{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    background: #FFFFFF;
    border-radius: 16rpx;
    margin-top: 20rpx;
    padding: 30rpx 40rpx;
    font-size: 28rpx;
  }
  .but{
    position: fixed;
    margin: 30rpx;
    bottom: 40rpx;
    display: flex;
    width: 100%;
    .sub{
      width: calc( 100% - 140rpx);
      text-align: center;
      display: flex;
      flex-direction: row;
      justify-content: center;
      color: #FFFFFF;
      font-size: 34rpx;
      background: #4766FE;
      border-radius: 50rpx 50rpx 50rpx 50rpx;
    }
  }
}
</style>