-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex_new.html
782 lines (693 loc) · 30.7 KB
/
index_new.html
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
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
<!DOCTYPE html>
<html>
<body>
<!-- header -->
<div class="include" data-include="header"></div>
<!-- end header -->
<section class='aside-section'>
<section class="hbox stretch">
<!-- .aside -->
<aside class="bg-Green lter aside hidden-print include" data-include="aside" id="nav"></aside>
<!-- /.aside -->
<section id="content">
<section class="hbox stretch">
<aside>
<section class="vbox xbox">
<!-- 如果没有三级导航 这段代码注释-->
<!-- <div class="head-box"> <a href="#subNav" data-toggle="class:hide"> <i class="fa fa-angle-left text"></i> <i class="fa fa-angle-right text-active"></i> </a> </div> -->
<!-- <marquee behavior="scroll">
单方向循环滚动
</marquee>-->
<script language="JavaScript" type="text/javascript">
var marqueeContent=new Array();
marqueeContent[0]="<span >壹耘有新的讯息1壹耘有新的讯息3壹耘有新的讯息3壹耘有壹耘有新的讯息3壹耘有新的讯息3壹耘有新的讯息3壹耘有新的讯息3新的讯息3壹耘有新的讯息3壹耘有新的讯息3壹耘有新的讯息3壹耘有新的讯息3壹耘有新的讯息3壹耘有新的讯息3壹耘有新的讯息3壹耘有新的讯息3壹耘有新的讯息3</span>";
var marqueeInterval=new Array();
var marqueeId=0;
var marqueeDelay=2000;
var marqueeHeight=20;
//初始化
function initMarquee() {
var str=marqueeContent[0];
document.write('<div class="common-info" ><div id="marqueeBox" style="overflow:hidden;float:left;height:'+marqueeHeight+'px; width: 80%;" onmouseover="clearInterval(marqueeInterval[0])" onmouseout="marqueeInterval[0]=setInterval(\'startMarquee()\',marqueeDelay)"><div>'+str+'</div></div><span class="close" id="common-close"></span><a class="detail" >查看详情</a></div>');
marqueeId++;
marqueeInterval[0]=setInterval("startMarquee()",marqueeDelay);
}
//开始滚动
function startMarquee() {
var str=marqueeContent[marqueeId];
marqueeId++;
if(marqueeId>=marqueeContent.length) marqueeId=0;
if(document.getElementById("marqueeBox").childNodes.length==1) {
var nextLine=document.createElement('DIV');
nextLine.innerHTML=str;
document.getElementById("marqueeBox").appendChild(nextLine);
}
else {
document.getElementById("marqueeBox").childNodes[0].innerHTML=str;
document.getElementById("marqueeBox").appendChild(document.getElementById("marqueeBox").childNodes[0]);
document.getElementById("marqueeBox").scrollTop=0;
}
clearInterval(marqueeInterval[1]);
marqueeInterval[1]=setInterval("scrollMarquee()",20);
}
//
function scrollMarquee() {
document.getElementById("marqueeBox").scrollTop++;
if(document.getElementById("marqueeBox").scrollTop%marqueeHeight==(marqueeHeight-1)){
clearInterval(marqueeInterval[1]);
}
}
initMarquee();
</script>
<section class="scrollable wrapper w-f">
<section class="panel panel-default yunhuni-personal">
<div class="row m-l-none m-r-none bg-light lter">
<div class="col-md-3 padder-v fix-padding">
<div class='wrappernewBox green-border-top'>
<span class="pull-left m-r-sm">
<img src="images/index/avatar-middle.png" width="80"/>
</span>
<span class="h5 block m-t-xs">
<i class="iconfont icon-yue middleicon"></i>
<span class="inline-block">余额(元)</span>
</span>
<span class="block m-t-25">
<small class="text-muted text-uc account-money green">¥998</small>
<small class="account-number-decimal green">.00</small>
元
</span>
<div class="box-footer">
<button class="btn btn-primary" >充值</button>
<button class="btn btn-default" >消费情况</button>
</div>
</div>
</div>
<div class="col-md-3 padder-v fix-padding">
<div class='wrappernewBox blue-border-top'>
<span class="h5 block m-t-xs"> <i class="iconfont icon-oc-appnum middleicon m-r-5"></i><span class="inline-block">应用数(上线数/总数)</span></span>
<a class="h5 block m-t-25 text-center" href="application_list.html"><span class="green bigger-font-size">10/25</span>个</a>
<div class="box-footer">
<a class="btn btn-primary" href="application_create.html" >创建应用</a>
</div>
</div>
</div>
<div class="col-md-3 padder-v fix-padding">
<div class='wrappernewBox yellow-border-top'>
<span class="h5 block m-t-xs"> <i class="iconfont icon-huawuliang middleicon m-r-5"></i><span class="inline-block">平均通话时长</span></span>
<span class="h5 block m-t-25 text-center ">
<span class="green bigger-font-size">--</span>
</span>
</div>
</div>
<div class="col-md-3 padder-v fix-padding">
<div class='wrappernewBox pink-border-top'>
<span class="h5 block m-t-xs"> <i class="iconfont icon-oc-callrate middleicon m-r-5"></i><span class="inline-block">接通率</span></span>
<span class="h5 block m-t-25 text-center ">
<span class="green bigger-font-size">90%</span>
</span>
</div>
</div>
</div>
</section>
<section class="panel panel-default pos-rlt clearfix ">
<div class="sectionnewWrap">
<header class="panel-heading">
<div class="h5 ">开发者账号</div>
</header>
<div class="panel-body clearfix border-top-none">
<p>
<span class="iconfont icon-oc-api smallicon inline-block develop-icon"></span>
<span class="index-key"><strong>接口API:</strong></span>
<span class="index-api" id="restapi">http://api.yunhuni.com/cf20c6553c46d9a28679b400a552f2d5/</span>
<span>
<a href="#"><i class="iconfont icon-oc-small-copy inline-block develop-icon"></i>API文档</a>
<a id="copyapi" data-clipboard-text="http://api.yunhuni.com/1234135312321414134/"><i class="iconfont icon-oc-small-copy inline-block develop-icon"></i>复制</a>
</span>
</p>
<p>
<span class="iconfont icon-oc-secrekey smallicon inline-block develop-icon"></span>
<span class="index-key"><strong>密钥:</strong></span>
<span class="index-api" id="secretkey">1234135312321414134</span>
<span>
<a class='reset_confirm'><i class="iconfont icon-resert smallicon inline-block develop-icon"></i>重新生成</a>
<a id="copysecrekey" data-clipboard-text="123456789" ><i class="iconfont icon-oc-small-copy"></i>复制</a>
</span>
<span>
<a class='tips-error tips-key'></a>
</span>
</p>
<p>
<span class="iconfont icon-oc-certid smallicon inline-block develop-icon"></span>
<span class="index-key"><strong>鉴权账号:</strong></span>
<span class="index-api" id="certid" >123456789123456789</span>
<span>
<a id="copycertid" data-clipboard-text="11111111" ><i class="iconfont icon-oc-small-copy inline-block develop-icon"></i>复制</a>
</span>
</p>
</div>
</div>
</section>
<section class="panel panel-default pos-rlt clearfix ">
<div class="sectionnewWrap">
<header class="panel-heading">
<div class="h5">
<a class="tab-data cursor tab-active" data-id="today">今日数据</a>
<a class="tab-data cursor" data-id="month">本月数据</a>
<a href="statistics_conversation.html" class="tab-data">更多数据</a>
</div>
</header>
<div class="panel-body clearfix border-top-none remove-padding">
<div class="row m-l-none m-r-none bg-light lter">
<div class="col-md-2 padder-v fix-padding width-twenty-percent" >
<div class="warpbox">
<div class="">
<i class="icon iconfont icon-oc-wallet bigicon"></i>
<span class="green money datatoday" >188.<span class="small-font-size">33</span></span>
<span class="green money datamonth" >188.<span class="small-font-size">32</span></span>
</div>
<div class="middle-font-size middle-font-color" >
消费额(元)
</div>
</div>
</div>
<div class="col-md-2 padder-v fix-padding width-twenty-percent">
<div class="warpbox">
<div class="">
<i class="icon iconfont icon-oc-msg1 bigicon"></i>
<span class="green money datatoday">123456</span>
<span class="green money datamonth">123</span>
</div>
<div class="middle-font-size middle-font-color" >
会话量(次)
</div>
</div>
</div>
<div class="col-md-2 padder-v fix-padding width-twenty-percent" >
<div class="warpbox">
<div class="">
<i class="icon iconfont icon-oc-mobile bigicon"></i>
<span class="green money datatoday">0</span>
<span class="green money datamonth">123</span>
</div>
<div class="middle-font-size middle-font-color" >
话务量(分钟)
</div>
</div>
</div>
<div class="col-md-2 padder-v fix-padding width-twenty-percent">
<div class="warpbox">
<div class="">
<i class="icon iconfont icon-oc-talktime bigicon"></i>
<span class="green money datatoday">0</span>
<span class="green money datamonth">123</span>
</div>
<div class="middle-font-size middle-font-color" >
平均通话时长(分钟)
</div>
</div>
</div>
<div class="col-md-2 padder-v fix-padding width-twenty-percent" >
<div class="warpbox remove-border">
<div class="">
<i class="icon iconfont icon-oc-callrate bigicon"></i>
<span class="green money datatoday">0</span>
<span class="green money datamonth">123</span>
</div>
<div class="middle-font-size middle-font-color" >
接通率(%)
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="panel panel-default pos-rlt clearfix ">
<div class="sectionWrap">
<div class="panel-body clearfix">
<div class="none-newapp">
<img src="./images/index/avatar-big.png" alt="">
<span class="">
<span class="app">您还没有创建属于自己的应用,快来创建应用吧</span>
<br/><br/>
<a class="btn btn-primary fl">创建应用</a>
</span>
</div>
</div>
</div>
</section>
<!--话务量消费额-->
<section class="panel panel-default pos-rlt clearfix ">
<div class="sectionWrap">
<div class="panel-body clearfix border-top-none">
<div class="row monthform" >
<div class="col-md-12">
<input type="text" class="datepicker currentMonth form-control date_block monthstart" value="2016-07" data-time="2016-06-07" />
</div>
</div>
<div class="row">
<div class="col-md-12 scanvas" >
<!--统计列表-->
<div class="ecpanel" id="ecpanel" style=" height: 450px; "></div>
</div>
</div>
</div>
</div>
</section>
<!--话务量消费额end-->
<section class="panel panel-default pos-rlt clearfix ">
<div class="row ">
<div class="col-md-6 remove-left-padding" >
<div class="sectionWrap">
<div class="panel-body clearfix border-top-none">
<div class="row">
<div class="col-md-12">
<input type="text" class="datepicker currentMonth form-control date_block sessionstart" value="2016-07" data-time="2016-06-07" />
</div>
</div>
<div class="row" >
<div class="col-md-12">
<div class="ecpanel" id="sessionecpanel" style=" height: 450px;"></div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6 remove-right-padding">
<div class="sectionWrap">
<div class="panel-body clearfix border-top-none">
<div class="row">
<div class="col-md-12">
<input type="text" class="datepicker currentMonth form-control date_block apistart" value="2016-07" data-time="2016-06-07" />
</div>
</div>
<div class="row">
<div class="ecpanel" id="apiecpanel" style="height: 450px;"></div>
</div>
</div>
</div>
</div>
</div>
</section>
<!--end-->
</section>
</section>
</aside>
</section>
<a href="#" class="hide nav-off-screen-block" data-toggle="class:nav-off-screen" data-target="#nav"></a>
</section>
</section>
</section>
</section>
<script src="js/app.v2.js"></script> <!-- Bootstrap --> <!-- App -->
<script src="js/jquery.cookie.min.js"></script>
<script src="js/charts/flot/jquery.flot.min.js" cache="false"></script>
<script src="js/bootbox.min.js"></script>
<script src="js/charts/flot/demo.js" cache="false"></script>
<!--统计插件-->
<script src="./js/echarts.min.js" ></script>
<!--统计插件主题-->
<script src="./js/echartstheme/wonderland.js" ></script>
<script>
$('.tab-data').click(function(){
var id = $(this).attr('data-id');
$('.tab-data').removeClass('tab-active');
$(this).addClass('tab-active');
if(id=='today'){
$('.datatoday').show();$('.datamonth').hide();
}else{
$('.datatoday').hide();$('.datamonth').show();
}
})
//查询
$('.monthstart').change(function(){
var id = $(this).attr('data-id');
var tipsclass = '.'+id+'tips';
$(tipsclass).html('');
var starttime = $('.'+id+'start').val();
if(starttime==''){
tips(tipsclass,'请先填写时间'); return;
}
initchart();
});
//查询
$('.sessionstart').change(function(){
var id = $(this).attr('data-id');
var tipsclass = '.'+id+'tips';
$(tipsclass).html('');
var starttime = $('.'+id+'start').val();
if(starttime==''){
tips(tipsclass,'请先填写时间'); return;
}
initsessionchart();
});
//查询
$('.apistart').change(function(){
var id = $(this).attr('data-id');
var tipsclass = '.'+id+'tips';
$(tipsclass).html('');
var starttime = $('.'+id+'start').val();
if(starttime==''){
tips(tipsclass,'请先填写时间'); return;
}
initapichart();
});
//初始时间
function initialStartTime(id){
var starttime = $('.'+id+'start').val();
if(starttime==''){
starttime = $('.'+id+'start').attr('data-time');
}
return starttime;
}
//触发函数
/**
* starttime 时间
* endtime 对比时间
*/
function initchart(){
var starttime = initialStartTime();
var param = {starttime:starttime};
//异步查询 返回json 数据
//消费额最大值
//会话次数最大值
//数据处理
//注意 tdata 等于 seriesjson[name]
var tdata = new Array('5月','6月');
var seriesjson ="[{name:'5月',type:'line',data:[120, 132, 101, 134, 90, 230, 210,120, 132, 101, 134, 90, 230, 210,120, 132, 101, 134, 90, 230, 210,120, 132, 101,4000]},{name:'6月',type:'line',data:[220, 182, 191, 234, 290, 330, 310]}]";
var seriesjson = eval('('+seriesjson+')');
charts(tdata,seriesjson);
}
function initsessionchart(){
var starttime = initialStartTime();
var param = {starttime:starttime};
//异步查询 返回json 数据
//消费额最大值
//会话次数最大值
//数据处理
sessioncharts();
}
function initapichart(){
apicharts();
}
var monthData = ['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日'];
//测试随机生成数据
function moneyDataMonth(){
var res = [];
var len = 31;
while (len--) {
res.push(Math.round(Math.random() * 1000));
}
return res;
}
//测试随机生成数据
function moneyDataYear(){
var res = [];
var len = 12;
while (len--) {
res.push(Math.round(Math.random() * 1000));
}
return res;
}
//测试随机生成数据
function meetDataMonth(){
var res = [];
var len = 0;
while (len < 31) {
res.push((Math.random()*10 + 5).toFixed(1) - 0);
len++;
}
return res;
}
//测试随机生成数据
function meetDataYear(){
var res = [];
var len = 0;
while (len < 12) {
res.push((Math.random()*10 + 5).toFixed(1) - 0);
len++;
}
return res;
}
/**
* 回调数据
* @param xd 消费数据
* @param yd 会话数据
*
*
* @param type 年月
*/
function charts(xd,yd){
var Xdata = monthData;
var xd = moneyDataMonth();
var yd = meetDataMonth();
var myChart = echarts.init(document.getElementById('ecpanel'),'wonderland');
option = {
title: {
text: '',
subtext: ''
},
grid: {
left: '10px',
right: '10px',
bottom: '3%',
containLabel: true
},
tooltip: {
trigger: 'axis'
},
legend: {
data:['话务量', '消费额']
},
toolbox: {
show: true,
},
dataZoom: {
show: false,
start: 0,
end: 100
},
xAxis: [
{
type: 'category',
boundaryGap: true,
data : Xdata,
name: '日期',
},
],
yAxis: [
{
type: 'value',
scale: true,
name: '会话(次)',
max: 30,
min: 0,
nameGap:32,
nameTextStyle:{
color:'#999',
},
areaStyle: {normal: {}},
boundaryGap: [0.2,0.2]
},
{
type: 'value',
scale: true,
name: '消费额(元)',
max: 1200,
min: 0,
nameGap:32,
areaStyle: {normal: {}},
nameTextStyle:{
color:'#999',
},
boundaryGap: [0.2, 0.2]
}
],
series: [
{
name:'消费额',
type:'bar',
yAxisIndex: 1,
data:xd
},
{
name:'话务量',
type:'line',
data:yd
}
]
};
myChart.setOption(option);
}
/**
* 会话量 回调数据
* @param xd 消费数据
* @param yd 会话数据
*
*/
function sessioncharts(){
var Xdata = monthData;
var xd = moneyDataMonth();
var yd = meetDataMonth();
var sessionChart = echarts.init(document.getElementById('sessionecpanel'),'wonderland');
option = {
title: {
text: ''
},
tooltip: {
trigger: 'axis'
},
legend: {
data:['会话量']
},
grid: {
left: '10px',
right: '3%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data : Xdata,
name: '',
},
yAxis: {
type: 'value',
name: '消费额(元)',
nameGap:32
},
series: [
{
name:'会话量',
type:'line',
stack: '总量',
data:xd,
areaStyle: {normal: {}}
},
]
};
sessionChart.setOption(option);
}
/**
* 会话量 回调数据
* @param xd 消费数据
* @param yd 会话数据
*
*/
function apicharts(){
var Xdata = monthData;
var xd = moneyDataMonth();
var yd = meetDataMonth();
var sessionChart = echarts.init(document.getElementById('apiecpanel'),'wonderland');
option = {
title: {
text: ''
},
tooltip: {
trigger: 'axis'
},
legend: {
data:['api调用次数']
},
grid: {
left: '10px',
right: '3%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data : Xdata,
name: '',
},
yAxis: {
type: 'value',
name: '消费额(元)',
nameGap:32
},
series: [
{
name:'api调用次数',
type:'line',
stack: '',
data:xd,
areaStyle: {normal: {}}
},
]
};
sessionChart.setOption(option);
}
//当浏览器大小变化时
$(window).resize(function () {
initchart();
sessioncharts();
apicharts();
});
</script>
<script type="text/javascript" src="js/zero/ZeroClipboard.js"></script>
<script type="text/javascript">
if(window.clipboardData){
//支持IE
var restapi = document.getElementById("restapi");
restapi.onclick = function(){
window.clipboardData.setData('text',restapi.innerHTML);
showtoast('复制成功');
}
var secretkey = document.getElementById("secretkey");
secretkey.onclick = function(){
window.clipboardData.setData('text',secretkey.innerHTML);
showtoast('复制成功');
}
var certid = document.getElementById("certid");
certid.onclick = function(){
window.clipboardData.setData('text',certid.innerHTML);
showtoast('复制成功');
}
}else{
var restapi = new ZeroClipboard( document.getElementById("copyapi"), {
moviePath: "js/zero/ZeroClipboard.swf"
} );
var secrekey = new ZeroClipboard( document.getElementById("copysecrekey"), {
moviePath: "js/zero/ZeroClipboard.swf"
} );
var certid = new ZeroClipboard( document.getElementById("copycertid"), {
moviePath: "js/zero/ZeroClipboard.swf"
} );
restapi.on( 'complete', function(client, args) {
showtoast('复制成功');
} );
}
</script>
<script src="js/include.js" aysnc></script>
<script src="js/include.js"></script>
<script type="text/javascript">
$('.reset_confirm').click(function(){
bootbox.setLocale("zh_CN");
bootbox.confirm("确认重新生成?", function(result) {
if(result){
$('.tips-key').html('错误提示');
$('.secretkey').html('aaaaaaaaaaaaaaaaaaaa');
}
});
});
$('#common-close').click(function(){
$('.common-info').fadeOut()
})
</script>
<script type="text/javascript" src='./js/bootstrap-datepicker/js/bootstrap-datepicker.js'> </script>
<script type="text/javascript" src='./js/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js'> </script>
<script src="js/index/index.js" ></script>
<script>
</script>
</body>
</html>