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
165
| <script>
| import CircleProgress from "@/components/CircleProgress.vue";
| import {withdrawCheckBefore} from '@/api/modules/user'
| export default {
| name: "index",
| components: {
| CircleProgress
| },
| data() {
| return {
| processDesc: '贷款风险排查中',
| dynamicProgress: 0,
| interval: null,
| redirectUrl: null,
| summaryValue: 0,
| processValue: 0,
| processText: '0%',
| totalValue: 800,
| height:'15rpx',
| // 推送是否完成
| pushIsSucc: false,
| // 百分比是否完成
| mockLoanIsOver: false,
| // 是否在显示等待界面
| isShowLoading: false,
| checkList: [
| {
| name: '基础信息',
| value: 0,
| success: true,
| },
| {
| name: '多头借贷检测',
| value: 0,
| success: true,
| },
| {
| name: '平台逾期记录',
| value: 0,
| success: false,
| },
| {
| name: '失信风险查询',
| value: 0,
| success: true,
| },
| {
| name: '反欺诈规则命中名单',
| value: 0,
| success: true,
| },
| {
| name: '借贷意向验证',
| value: 0,
| success: true,
| },
| {
| name: '高风险借贷意向验证',
| value: 0,
| success: false,
| },
| {
| name: '偿债压力指数',
| value: 0,
| success: false,
| },
| ],
| };
| },
| created() {
| this.loanCheck();
| this.updateProgress();
| },
| methods: {
| updateProgress() {
| this.dynamicProgress = Math.min(100, this.dynamicProgress + 10)
| },
| mockLoanCheck(){
| this.interval = setInterval(() => {
| this.checkList.forEach((item) => {
| if (item.value < 100) {
| const minus = 100 - item.value
| let randomValue = Math.floor(Math.random() * 2 + Math.random() * 2)
| if (this.redirectUrl) {
| randomValue = 0.17
| }
| item.value += randomValue
| if (item.value > 100) {
| item.value = 100
| this.summaryValue += minus
| } else {
| this.summaryValue += randomValue
| }
| }
| })
| this.processValue = Math.ceil(
| (this.summaryValue / this.totalValue) * 100
| )
| this.processText = this.processValue + '%'
| if (this.processValue >= 100) {
| this.mockLoanIsOver = true
| this.processValue = 100
| this.processDesc = '贷款风险排查完成'
| clearInterval(this.interval)
| this.interval = null;
| uni.showToast({
| title: '审核完成',
| icon: 'none',
| })
| setTimeout(() => {
| uni.reLaunch({
| url: '/pages/progress/index',
| })
| },2000)
| }
| }, 100)
| },
| loanCheck(){
| this.mockLoanCheck()
| }
| },
| beforeDestroy() {
| if (this.interval) {
| clearInterval(this.interval)
| this.interval = null
| }
| },
| }
| </script>
|
| <template>
| <view class="content">
|
| <view style="margin: auto;position: relative">
| <CircleProgress :animationDuration="6000" class="mine-member-level-progress" :diameter="170" :hoopThickness="8" :hoopColor="'#156ff6'" :percent="1" :animate="true" />
| <view style="text-align: center;position: absolute;top: 30%;bottom: 0;left: 0;right: 0;margin: auto;">
| <view style="color: #333333;font-size: 56rpx;font-weight: bold;text-align: center">{{processValue}}%</view>
| <view style="text-align: center;color: #666666;font-size: 28rpx;margin-top: 20rpx;">{{processDesc}}</view>
| </view>
| </view>
| <view>
|
| </view>
| <view class="li" v-for="(item,index) in checkList" :key="index">
| <view class="title">{{ item.name }}</view>
| <uv-line-progress :height="height" :percentage="item.value" :activeColor="item.success ? '#156ff6' : '#00ffff'" :showText="false"></uv-line-progress>
| </view>
|
| </view>
| </template>
|
| <style scoped lang="scss">
| .content{
| padding: 40rpx;
| .li{
| margin-bottom: 40rpx;
| .title{
| color: #333333;
| font-size: 28rpx;
| margin-bottom: 20rpx;
| }
| }
|
| }
| </style>
|
|