trust-report.html
25.7 KB
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
<!DOCTYPE html>
<html lang="zh-CN" style="font-size: 50px;">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="format-detection" content="telephone=no" />
<meta name="format-detection" content="email=no" />
<meta name="format-detection" content="address=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="screen-orientation" content="portrait" />
<meta name="x5-orientation" content="portrait" />
<meta name="x5-page-mode" content="app" />
<meta name="x5-fullscreen" content="true" />
<meta name="full-screen" content="yes" />
<meta http-equiv="x-dns-prefetch-control" content="on" />
<style type="text/css">
body {
margin: 0;
background-color: #eee;
}
.header {
flex-direction: column;
background-image: url('https://img.xiulixin.com/M00/00/01/oYYBAF2tSGKAKXaVAAKzhhSND48223.png');
background-repeat: no-repeat;
background-size: 100% 4.15rem;
position: relative;
}
.gotoApp {
border: 1px solid white;
z-index: 99;
position: absolute;
right: 0;
top: 0.6rem;
font-size: 0.28rem;
padding: 0.05rem 0.15rem;
color: white;
border-top-left-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
}
.title {
font-size: 0.36rem;
width: 100%;
height: 0.36rem;
color: rgba(255, 255, 255, 1);
font-weight: 700;
padding-top: 0.7rem;
padding-left: 0.75rem;
}
.info {
font-size: 0.28rem;
height: 0.27rem;
color: rgba(255, 255, 255, 1);
padding-top: 0.2rem;
padding-left: 0.75rem;
}
.score {
width: 6.9rem;
height: 10rem;
border-radius: 0.2rem;
background-color: white;
margin: 0 auto;
margin-top: 0.4rem;
display: flex;
flex-direction: column;
}
.title-1 {
height: 0.4rem;
font-size: 0.3rem;
margin-top: 0.39rem;
margin-left: 0.32rem;
color: rgba(51, 51, 51, 1);
font-weight: 500;
}
.title-2 {
height: 0.3rem;
font-size: 0.24rem;
margin-top: 0.25rem;
margin-left: 0.32rem;
color: rgba(51, 51, 51, 1);
}
.title-3 {
display: flex;
flex-direction: row;
font-size: 0.24rem;
margin-top: 0.25rem;
margin-left: 0.33rem;
margin-right: 0.33rem;
}
.score-title {
width: 0.98rem;
text-align: right;
font-size: 0.24rem;
line-height: 0.24rem;
color: rgba(206,167,121,1);
}
.score-scroll {
width: 3.5rem;
height: 0.1rem;
margin: 0.09rem 0.25rem 0rem 0.26rem;
}
.score-scroll-default {
width: 3.5rem;
height: 0.1rem;
background: linear-gradient(270deg,rgba(105,255,105,1),rgba(127,235,255,1),rgba(255,243,52,1),rgba(247,142,72,1),rgba(255,65,65,1));
border-radius: 0.05rem;
}
.score-scroll-active {
float: right;
height: 0.1rem;
border-radius: 0.05rem;
background: rgba(248,248,248,1);
margin-top: -0.1rem;
}
.score-text {
width: 6rem;
font-size: 0.28rem;
color: rgba(87, 87, 87, 1);
margin: 0 auto;
margin-top: 0.55rem;
}
.bank-num {
color: rgba(206,167,121,1);
}
.star-list {
width: 4.5rem;
height: 0.5rem;
margin: 0rem auto;
margin-top: 0.28rem;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.star {
width: 0.5rem;
height: 0.5rem;
}
.score-text-2 {
width: 6rem;
font-size: 0.28rem;
color: rgba(87, 87, 87, 1);
margin: 0 auto;
margin-top: 0.3rem;
}
.mechanism {
margin-top: 0.6rem;
margin-bottom: 0.9rem;
height: 0.4rem;
display: flex;
flex-direction: column;
}
.logo {
display: flex;
flex-direction: row;
margin: 0rem auto;
}
.logo-left {
height: 0.4rem;
width: 1.57rem;
background-image: url("http://oss.tanleizhen.com/static/rportline-right.png");
background-size: 100% 100%;
}
.logo-text {
font-size: 0.36rem;
color: rgba(225, 150, 51, 1);
line-height: 0.36rem;
margin: 0rem 0.36rem;
text-align: center;
}
.arrow {
margin-top: 0.4rem;
width: 0.38rem;
}
.logo-right {
height: 0.4rem;
width: 1.57rem;
background-image: url("http://oss.tanleizhen.com/static/rportline-left.png");
background-size: 100% 100%;
}
.fragment-1 {
border: 1px solid white;
width: 6.9rem;
border-radius: 0.2rem;
margin: 0rem auto;
margin-bottom: 0.7rem;
font-size: 0.24rem;
background-color: white;
}
.frag-title {
font-size: 0.3rem;
margin-top: 0.35rem;
margin-left: 0.33rem;
}
.frag-text {
margin: 0.2rem 0.33rem 0.53rem 0.33rem;
letter-spacing: 0.02rem;
font-size: 0.24rem;
line-height: 0.4rem;
}
.fragment-2 {
width: 6.9rem;
border-radius: 0.2rem;
margin: 0rem auto;
margin-bottom: 0.7rem;
font-size: 0.24rem;
background-color: white;
}
.frag-2-title {
font-size: 0.3rem;
padding-top: 0.35rem;
margin-left: 0.33rem;
}
.frag-scroll {
height: 0.1rem;
width: 5.13rem;
border-radius: 0.05rem;
background: rgba(234, 228, 211, 1);
margin: 0rem auto;
margin-top: 0.38rem;
margin-bottom: 0.74rem;
}
.active-scroll {
height: 0.1rem;
border-radius: 0.05rem;
background: linear-gradient(270deg,rgba(255,229,159,1), rgba(164,126,59,1));
}
.popover {
width: 0.7rem;
height: 0.4rem;
margin-top: -0.6rem;
padding: 0.05rem 0.2rem;
font-size: 0.24rem;
color: white;
text-align: center;
background-image: url("http://oss.tanleizhen.com/static/rportrow-name.png");
background-size: 100% 100%;
}
.frag-bottom {
height: 0.5rem;
background-color: #d7d7d7;
border-bottom-right-radius: 0.2rem;
border-bottom-left-radius: 0.2rem;
display: flex;
}
.frag-bottom-left {
line-height: 0.5rem;
font-size: 0.24rem;
margin-left: 0.33rem;
color: #575757;
flex: 1;
}
.frag-bottom-right {
width: 1.8rem;
height: 0.5rem;
font-size: 0.28rem;
font-weight: normal;
background-image: url("http://oss.tanleizhen.com/static/rportcontent-bottom.png");
background-size: 100% 100%;
color:rgba(79, 79, 79, 1);
text-align: center;
line-height: 0.5rem;
}
</style>
<script>
!(function (t, e) {
var n = t.documentElement,
o = 'orientationchange' in window ? 'orientationchange' : 'resize',
i = function () {
var t = n.clientWidth,
e = 750;
t &&
(t >= e ?
(n.style.fontSize = '100px') :
(n.style.fontSize = 100 * (t / e) + 'px'));
};
i(),
t.addEventListener &&
(e.addEventListener(o, i, !1),
t.addEventListener('DOMContentLoaded', i, !1));
})(document, window);
document.documentElement.scrollTop = 0;
</script>
</head>
<body>
<div class="header" style="width: 100%; overflow-x: hidden;">
<div id="gotoApp" class="gotoApp" onclick="gotoApp()">返回APP</div>
<div id="header-title" class="title"></div>
<div id="productName" class="info"></div>
<div class="score">
<div class="title-1">综合评分</div>
<div class="title-2">机构评分</div>
<div class="title-3">
<div class="score-title">银行分类</div>
<div class="score-scroll">
<div class="score-scroll-default"></div>
<div id="bank-scroll" class="score-scroll-active"></div>
</div>
<div class="score-num"><span id="bank-num" class="bank-num"></span> /10</div>
</div>
<div class="title-3">
<div class="score-title">风控能力</div>
<div class="score-scroll">
<div class="score-scroll-default"></div>
<div id="risk-scroll" class="score-scroll-active"></div>
</div>
<div class="score-num"><span id="risk-num" class="bank-num"></span> /10</div>
</div>
<div class="title-3">
<div class="score-title">发行能力</div>
<div class="score-scroll">
<div class="score-scroll-default"></div>
<div id="issue-scroll" class="score-scroll-active"></div>
</div>
<div class="score-num"><span id="issue-num" class="bank-num"></span> /10</div>
</div>
<div class="title-2">产品评分</div>
<div class="title-3">
<div class="score-title">流动性</div>
<div class="score-scroll">
<div class="score-scroll-default"></div>
<div id="mobility-scroll" class="score-scroll-active"></div>
</div>
<div class="score-num"><span id="mobility-num" class="bank-num"></span> /10</div>
</div>
<div class="title-3">
<div class="score-title">安全性</div>
<div class="score-scroll">
<div class="score-scroll-default"></div>
<div id="safe-scroll" class="score-scroll-active"></div>
</div>
<div class="score-num"><span id="safe-num" class="bank-num"></span> /10</div>
</div>
<div class="score-text">
综合考虑 <span id="header-title-2" style="font-size: 0.28rem; font-weight: bold;"></span> 的银行分类、经营能力、盈利能力和管理能力的基础上,联合征信运动自身在风险分析与评价方面的经验和技术,结合产品的流动性、安全性和收益性,确定产品的评价等级:
</div>
<div id="star" class="star-list"></div>
<div id="level" class="score-text-2"></div>
</div>
</div>
<div class="mechanism">
<div class="logo">
<div class="logo-left"></div>
<div class="logo-text">
<div>发 行 机 构</div>
<img class="arrow" src="http://oss.tanleizhen.com/static/rportline-down.png">
</div>
<div class="logo-right"></div>
</div>
</div>
<div class="fragment-1">
<div class="frag-title">公司性质</div>
<div id="bank-frag" class="frag-text"></div>
</div>
<div class="fragment-2">
<div class="frag-2-title">经营能力</div>
<div id="risk-frag" class="frag-text"></div>
<div class="frag-scroll">
<div id="risk-rate" class="active-scroll"></div>
<div id="risk-popover" class="popover"></div>
</div>
<div class="frag-bottom">
<div class="frag-bottom-left">综合考虑发行机构的经营能力</div>
<div id="risk-btm-title" class="frag-bottom-right"></div>
</div>
</div>
<div class="fragment-2">
<div class="frag-2-title">盈利能力</div>
<div id="issue-frag" class="frag-text"></div>
<div class="frag-scroll">
<div id="issue-rate" class="active-scroll"></div>
<div id="issue-popover" class="popover"></div>
</div>
<div class="frag-bottom">
<div class="frag-bottom-left">综合考虑发行机构的盈利能力</div>
<div id="issue-btm-title" class="frag-bottom-right"></div>
</div>
</div>
<div class="fragment-2">
<div class="frag-2-title">管理能力</div>
<div id="manage-frag" class="frag-text"></div>
<div class="frag-scroll">
<div id="manage-rate" class="active-scroll"></div>
<div id="manage-popover" class="popover"></div>
</div>
<div class="frag-bottom">
<div class="frag-bottom-left">综合考虑发行机构的管理能力</div>
<div id="manage-btm-title" class="frag-bottom-right"></div>
</div>
</div>
<div class="mechanism">
<div class="logo">
<div class="logo-left"></div>
<div class="logo-text">
<div>信 托 产 品</div>
<img class="arrow" src="http://oss.tanleizhen.com/static/rportline-down.png">
</div>
<div class="logo-right"></div>
</div>
</div>
<div class="fragment-2">
<div class="frag-2-title">产品期限</div>
<div id="term-frag" class="frag-text"></div>
<div class="frag-scroll">
<div id="term-rate" class="active-scroll"></div>
<div id="term-popover" class="popover"></div>
</div>
<div class="frag-bottom">
<div class="frag-bottom-left">综合考虑本产品的流动性</div>
<div id="term-btm-title" class="frag-bottom-right"></div>
</div>
</div>
<div class="fragment-1">
<div class="frag-title">信托类型</div>
<div id="type-frag" class="frag-text"></div>
</div>
<div class="fragment-2">
<div class="frag-2-title">资金运用方式</div>
<div id="safe-frag" class="frag-text"></div>
<div class="frag-scroll">
<div id="safe-rate" class="active-scroll"></div>
<div id="safe-popover" class="popover"></div>
</div>
<div class="frag-bottom">
<div class="frag-bottom-left">综合考虑本产品的资金风险</div>
<div id="safe-btm-title" class="frag-bottom-right"></div>
</div>
</div>
<div class="fragment-2">
<div class="frag-2-title">投资方向</div>
<div id="profit-frag" class="frag-text"></div>
<div class="frag-scroll">
<div id="profit-rate" class="active-scroll"></div>
<div id="profit-popover" class="popover"></div>
</div>
<div class="frag-bottom">
<div class="frag-bottom-left">综合考虑未来收益的不确定性</div>
<div id="profit-btm-title" class="frag-bottom-right"></div>
</div>
</div>
</body>
<script>
// 原生ajax实现
function ajax(option) {
var xhr = new XMLHttpRequest();
if (option.method === 'GET') {
option.url += '?';
var strUrl = '';
for (var key in option.data) {
strUrl += key + '=' + option.data[key] + '&';
}
option.url += strUrl.substring(0, strUrl.length - 1);
xhr.open(option.method, option.url);
xhr.send()
}
if (option.method === 'POST') {
// xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
xhr.open(option.method, option.url);
xhr.send(option.data);
}
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
option.success(JSON.parse(xhr.responseText));
}
}
}
var headerTitle = document.getElementById('header-title');
var headerTitle2 = document.getElementById('header-title-2');
var params = window.location.search.split('?')[1].split('&');
headerTitle.innerHTML = decodeURI(params[4]).replace('=', '');
headerTitle2.innerHTML = decodeURI(params[4]).replace('=', '');
ajax({
url: '../web/trustReport/detail',
method: 'GET',
data: { id: params[1].replace('=', ''), clientType: params[2].replace('=', ''), version: params[3].replace('=', '') },
success: function(data) {
// 产品名称
var productName = document.getElementById('productName');
productName.innerHTML = decodeURI(params[0]).replace('=', '');
// 银行分类--capacityLevelScore
var bankScroll = document.getElementById('bank-scroll');
var bankNum = document.getElementById('bank-num');
var bankRate = data.data.capacityLevelScore;
bankScroll.style.width = 0.35 * (10 - bankRate) + 'rem';
bankNum.innerHTML = bankRate;
// 风控能力--profitabilityLevelScore
var riskScroll = document.getElementById('risk-scroll');
var riskNum = document.getElementById('risk-num');
var riskRate = data.data.profitabilityLevelScore;
riskScroll.style.width = 0.35 * (10 - riskRate) + 'rem';
riskNum.innerHTML = riskRate;
// 发行能力--managementAbilityLevelScore
var issueScroll = document.getElementById('issue-scroll');
var issueNum = document.getElementById('issue-num');
var issueRate = data.data.managementAbilityLevelScore;
issueScroll.style.width = 0.35 * (10 - issueRate) + 'rem';
issueNum.innerHTML = issueRate;
// 流动性--termLevelScore
var mobilityScroll = document.getElementById('mobility-scroll');
var mobilityNum = document.getElementById('mobility-num');
var mobilityRate = data.data.termLevelScore;
mobilityScroll.style.width = 0.35 * (10 - mobilityRate) + 'rem';
mobilityNum.innerHTML = mobilityRate;
// 安全性--riskLevelScore
var safeScroll = document.getElementById('safe-scroll');
var safeNum = document.getElementById('safe-num');
var safeRate = data.data.riskLevelScore;
safeScroll.style.width = 0.35 * (10 - safeRate) + 'rem';
safeNum.innerHTML = safeRate;
var levelStr = '';
switch(parseInt(data.data.reportLevel)) {
case 1:
levelStr = '本产品具有高风险,适合能够承受大部分本金损失的激进型客户。';
break;
case 2:
levelStr = '本产品具有较高风险,适合能够承受较多本金损失的激进型与进取型客户。';
break;
case 3:
levelStr = '本产品具有较高风险,适合能够承受一定本金损失的进取型与稳健型客户。';
break;
case 4:
levelStr = '本产品具有一定风险,适合能够承受轻微本金损失的稳健型与谨慎型客户。';
break;
case 5:
levelStr = '本产品具有较低风险,适合能够承受轻微本金损失的谨慎型客户;以及不希望本金损失的保守型客户。';
break;
case 6:
levelStr = '本产品具有低风险,适合不希望本金损失的保守型客户。';
break;
}
// 产品类型描述
var level = document.getElementById('level');
level.innerHTML = levelStr;
// 综合评分-内容
// 评价等级
var star = document.getElementById('star');
var starStr = '';
for (var i = 0; i < data.data.reportLevel; i++) {
starStr += "<img class='star' src='http://oss.tanleizhen.com/static/shoucang1.png' />"
}
if (6 - data.data.reportLevel) {
for (var i = 0; i < (6 - data.data.reportLevel); i++) {
starStr += "<img class='star' src='http://oss.tanleizhen.com/static/shoucang3.png' />"
}
}
star.innerHTML = starStr;
// 发行机构
// 公司性质
var bankFrag = document.getElementById('bank-frag');
bankFrag.innerHTML = ' ' + data.data.trustCompanyNameDesc.replace(/<</g, '<b style="font-size: 0.28rem;">').replace(/>>/g, '</b>');
// 经营能力
var riskFrag = document.getElementById('risk-frag');
var riskRate = document.getElementById('risk-rate');
var riskPopover = document.getElementById('risk-popover');
var riskBtmTitle = document.getElementById('risk-btm-title');
riskFrag.innerHTML = ' ' + data.data.operatingTimeDesc.replace(/<</g, '<b style="font-size: 0.28rem;">').replace(/>>/g, '</b>');
riskRate.style.width = 5.13 * Number(data.data.capacityLevel) + 'rem';
riskPopover.style.marginLeft = 5.13 * Number(data.data.capacityLevel) - 0.4 + 'rem';
riskPopover.innerHTML = data.data.capacityLevelDesc;
riskBtmTitle.innerHTML = data.data.capacityLevelDesc;
// 盈利能力
var issueFrag = document.getElementById('issue-frag');
var issueRate = document.getElementById('issue-rate');
var issuePopover = document.getElementById('issue-popover');
var issueBtmTitle = document.getElementById('issue-btm-title');
issueFrag.innerHTML = ' ' + data.data.profitabilityDesc.replace(/<</g, '<b style="font-size: 0.28rem;">').replace(/>>/g, '</b>');
issueRate.style.width = 5.13 * Number(data.data.profitabilityLevel) + 'rem';
issuePopover.style.marginLeft = 5.13 * Number(data.data.profitabilityLevel) - 0.4 + 'rem';
issuePopover.innerHTML = data.data.profitabilityLevelDesc;
issueBtmTitle.innerHTML = data.data.profitabilityLevelDesc;
// 管理能力
var manageFrag = document.getElementById('manage-frag');
var manageRate = document.getElementById('manage-rate');
var managePopover = document.getElementById('manage-popover');
var manageBtmTitle = document.getElementById('manage-btm-title');
manageFrag.innerHTML = ' ' + data.data.managementAbilityDesc.replace(/<</g, '<b style="font-size: 0.28rem;">').replace(/>>/g, '</b>');
manageRate.style.width = 5.13 * Number(data.data.managementAbilityLevel) + 'rem';
managePopover.style.marginLeft = 5.13 * Number(data.data.managementAbilityLevel) - 0.4 + 'rem';
managePopover.innerHTML = data.data.managementAbilityLevelDesc;
manageBtmTitle.innerHTML = data.data.managementAbilityLevelDesc;
// 信托产品
// 产品期限
var termFrag = document.getElementById('term-frag');
var termRate = document.getElementById('term-rate');
var termPopover = document.getElementById('term-popover');
var termBtmTitle = document.getElementById('term-btm-title');
termFrag.innerHTML = ' ' + data.data.trustProductTermDesc.replace(/<</g, '<b style="font-size: 0.28rem;">').replace(/>>/g, '</b>');
termRate.style.width = 5.13 * Number(data.data.termLevel) + 'rem';
termPopover.style.marginLeft = 5.13 * Number(data.data.termLevel) - 0.4 + 'rem';
termPopover.innerHTML = data.data.termLevelDesc;
termBtmTitle.innerHTML = data.data.termLevelDesc;
// 信托类型
var typeFrag = document.getElementById('type-frag');
typeFrag.innerHTML = ' ' + data.data.trustTypeDesc.replace(/<</g, '<b style="font-size: 0.28rem;">').replace(/>>/g, '</b>');
// 资金运用方式
var safeFrag = document.getElementById('safe-frag');
var safeRate = document.getElementById('safe-rate');
var safePopover = document.getElementById('safe-popover');
var safeBtmTitle = document.getElementById('safe-btm-title');
safeFrag.innerHTML = ' ' + data.data.trustUseApplicationDesc.replace(/<</g, '<b style="font-size: 0.28rem;">').replace(/>>/g, '</b>');
safeRate.style.width = 5.13 * Number(data.data.trustUseApplicationLevel) + 'rem';
safePopover.style.marginLeft = 5.13 * Number(data.data.trustUseApplicationLevel) - 0.4 + 'rem';
safePopover.innerHTML = data.data.trustUseApplicationLevelDesc;
safeBtmTitle.innerHTML = data.data.trustUseApplicationLevelDesc;
// 资金投向
var profitFrag = document.getElementById('profit-frag');
var profitRate = document.getElementById('profit-rate');
var profitPopover = document.getElementById('profit-popover');
var profitBtmTitle = document.getElementById('profit-btm-title');
profitFrag.innerHTML = ' ' + data.data.ourTrustPropertyApplicationDesc.replace(/<</g, '<b style="font-size: 0.28rem;">').replace(/>>/g, '</b>');
profitRate.style.width = 5.13 * Number(data.data.trustPropertyApplicationLevel) + 'rem';
profitPopover.style.marginLeft = 5.13 * Number(data.data.trustPropertyApplicationLevel) - 0.4 + 'rem';
profitPopover.innerHTML = data.data.trustPropertyApplicationLevelDesc;
profitBtmTitle.innerHTML = data.data.trustPropertyApplicationLevelDesc;
}
})
function gotoApp() {
if (isAndroid) {
openAndroidFn();
}
if (isiOS) {
openIosFn();
}
}
// Android scheme协议
var downloadAndroidSchema = 'lhcredit://lhcredit.com';
// iOS scheme协议
var downloadIosSchema = 'LHManagerment://';
// iOS下载地址
var downloadIosUrl = 'ios下载地址';
// Android下载地址
var downloadAndroidUrl = 'https://tlz-cms.oss-cn-beijing.aliyuncs.com/apk/app-release.apk';
var u = navigator.userAgent.toLocaleLowerCase();
var isWeixin = u.match(/MicroMessenger/i) == 'micromessenger'; //判断是不是微信浏览器
var isAndroid = u.indexOf('android') > -1 || u.indexOf('linux') > -1; //android终端或者uc浏览器
var isiOS = !! u.match(/(iphone|ipod|ipad|mac)/i);
function openAndroidFn() {
// 微信直接提示
if (isWeixin) {
alert('请在浏览器中打开');
} else {
if(openApp(downloadAndroidSchema)) {
openApp(downloadAndroidSchema);
} else {
var d = new Date();
var t0 = d.getTime();
//由于打开需要1~2秒,利用这个时间差来处理--打开app后,返回h5页面会出现页面变成app下载页面,影响用户体验
var delay = setInterval(function() {
var d = new Date();
var t1 = d.getTime();
if(t1 - t0 < 3000 && t1 - t0 > 2000) {
window.location.href = downloadAndroidUrl;
}
if(t1 - t0 >= 3000){
clearInterval(delay);
}
}, 1000);
}
}
}
function openIosFn() {
// 微信直接下载
if (isWeixin) {
alert('请在浏览器中打开');
} else {
if(openApp(downloadIosSchema)){
openApp(downloadIosSchema);
}else{
var delay = setInterval(function() {
var d = new Date();
var t1 = d.getTime();
if( t1 - t0 < 3000 && t1 - t0 > 2000){
window.location.href = downloadIosUrl;
}
if(t1 - t0 >= 3000){
clearInterval(delay);
}
}, 1000);
}
}
}
function openApp(src) {
// 通过iframe的方式试图打开APP,如果能正常打开,会直接切换到APP,并自动阻止a标签的默认行为
// 否则打开a标签的href链接
var ifr = document.createElement('iframe');
ifr.src = src;
ifr.style.display = 'none';
document.body.appendChild(ifr);
window.setTimeout(function() {
document.body.removeChild(ifr);
}, 2000);
}
</script>
</html>