@@ -9,6 +9,7 @@ let wechatFollow = 0
9
9
let wechatRead = 0
10
10
let wechatServeYesterday = 0
11
11
let wechatServeToday = 0
12
+ let dingWidgetClick = 0
12
13
13
14
function getData ( ) {
14
15
return [
@@ -65,17 +66,17 @@ function getData() {
65
66
unit : '次' ,
66
67
} ,
67
68
{
68
- title : '隧道 ' ,
69
+ title : '钉钉组件点击 ' ,
69
70
number : {
70
- number : [ randomExtend ( 5 , 10 ) ] ,
71
+ number : [ dingWidgetClick ] ,
71
72
content : '{nt}' ,
72
73
textAlign : 'right' ,
73
74
style : {
74
75
fill : '#f46827' ,
75
76
fontWeight : 'bold' ,
76
77
} ,
77
78
} ,
78
- unit : '个 ' ,
79
+ unit : '次 ' ,
79
80
} ,
80
81
{
81
82
title : '服务区' ,
@@ -149,16 +150,19 @@ export default () => {
149
150
getWechatArticleReadNum ( )
150
151
getWechatServiceTimesYesterday ( )
151
152
getWechatServiceTimesToday ( )
153
+ getDingTalkWidgetMetric ( )
152
154
153
155
const timer = setInterval ( createData , 3000 )
154
156
155
157
const wechatTimer = setInterval ( getWechatFollowNum , 30000 )
156
158
const wechatServiceTimer = setInterval ( getWechatServiceTimesToday , 30000 )
159
+ const dingTalkTimer = setInterval ( getDingTalkWidgetMetric , 30000 )
157
160
158
161
return ( ) => {
159
162
clearInterval ( timer )
160
163
clearInterval ( wechatTimer )
161
164
clearInterval ( wechatServiceTimer )
165
+ clearInterval ( dingTalkTimer )
162
166
}
163
167
} , [ ] )
164
168
@@ -202,3 +206,7 @@ function getWechatServiceTimesToday() {
202
206
r => ( wechatServeToday = Number ( r ) )
203
207
)
204
208
}
209
+
210
+ function getDingTalkWidgetMetric ( ) {
211
+ httpGet ( 'https://news.hduhelp.com/subscription/v1/ding/metric' ) . then ( r => ( dingWidgetClick = r ) )
212
+ }
0 commit comments